|
|
@ -23,7 +23,7 @@ |
|
|
|
size="small" |
|
|
|
class="list_item_width_1" |
|
|
|
clearable |
|
|
|
placeholder="请输入姓名"> |
|
|
|
placeholder="请输入手机号"> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
@ -44,13 +44,14 @@ |
|
|
|
|
|
|
|
<el-form-item label="来自地区" |
|
|
|
prop="sourceAddressCode"> |
|
|
|
<el-input v-model="formData.sourceAddressCode" |
|
|
|
<!-- <el-input v-model="formData.sourceAddressCode" |
|
|
|
size="small" |
|
|
|
class="list_item_width_1" |
|
|
|
clearable |
|
|
|
placeholder="请输入姓名"> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
</el-input> --> |
|
|
|
<el-cascader ref="nowArea" size="small" class="list_item_width_1" :props="areaProps" |
|
|
|
v-model="searchAreacode" clearable @change="handleAreaChange"></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="来到本地时间" |
|
|
@ -112,6 +113,10 @@ |
|
|
|
class="diy-button--more" |
|
|
|
size="small" |
|
|
|
@click="handleSendNotice">发送通知</el-button> |
|
|
|
<el-button style="margin-left:15px" |
|
|
|
class="diy-button--more" |
|
|
|
size="small" |
|
|
|
@click="handleAttention">加入关注</el-button> |
|
|
|
<el-button style="margin-left:15px" |
|
|
|
class="diy-button--more" |
|
|
|
size="small" |
|
|
@ -127,18 +132,18 @@ |
|
|
|
style="width: 100%" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" |
|
|
|
width="55"></el-table-column> |
|
|
|
width="55" fixed="left"></el-table-column> |
|
|
|
<el-table-column label="序号" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
type="index" |
|
|
|
width="50"></el-table-column> |
|
|
|
width="50" fixed="left"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="name" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="姓名" |
|
|
|
width="100"> |
|
|
|
width="100" fixed="left"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="mobile" |
|
|
|
header-align="center" |
|
|
@ -340,7 +345,7 @@ export default { |
|
|
|
pageNo: 0, |
|
|
|
tableLoading: false, |
|
|
|
sHeight: 0, |
|
|
|
|
|
|
|
searchAreacode: [], |
|
|
|
agencyId: '', |
|
|
|
selectionAll: [], |
|
|
|
timeRange: [], |
|
|
@ -358,6 +363,11 @@ export default { |
|
|
|
//form相关 |
|
|
|
formShow: false, |
|
|
|
formTitle: '新增', |
|
|
|
areaProps: { |
|
|
|
lazy: true, |
|
|
|
checkStrictly: true, |
|
|
|
lazyLoad: this.lzayLoadArea |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -383,6 +393,12 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
lzayLoadArea(node, resolve) { |
|
|
|
this.getArea(node, resolve) |
|
|
|
// setTimeout(() => { |
|
|
|
|
|
|
|
// }, 1000) |
|
|
|
}, |
|
|
|
handleSearch () { |
|
|
|
this.loadTable() |
|
|
|
}, |
|
|
@ -391,7 +407,31 @@ export default { |
|
|
|
console.log('val----', val) |
|
|
|
this.selectionAll = val |
|
|
|
}, |
|
|
|
async getArea (node, resolve) { |
|
|
|
|
|
|
|
const url = "/commonservice/areacode/nextarea" |
|
|
|
let params = { |
|
|
|
parentLevel: node.data ? node.data.level : '', |
|
|
|
parentAreaCode: node.data ? node.data.code : '' |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
const nodes = data.map(item => ({ |
|
|
|
value: item.areaCode, // |
|
|
|
label: item.areaName, |
|
|
|
code: item.areaCode, |
|
|
|
level: item.level, |
|
|
|
leaf: node.level >= 4 // 5层级 |
|
|
|
})) |
|
|
|
resolve(nodes) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
async loadTable () { |
|
|
|
this.tableLoading = true |
|
|
|
|
|
|
@ -421,7 +461,13 @@ export default { |
|
|
|
} |
|
|
|
this.tableLoading = false |
|
|
|
}, |
|
|
|
handleAreaChange(val) { |
|
|
|
|
|
|
|
if (val.length > 0) { |
|
|
|
const len = val.length - 1 |
|
|
|
this.formData.sourceAddressCode = val[len] |
|
|
|
} else this.formData.sourceAddressCode = '' |
|
|
|
}, |
|
|
|
handleScheduledTimeChange (time) { |
|
|
|
if (time) { |
|
|
|
this.formData.startDate = time[0] |
|
|
@ -445,7 +491,7 @@ export default { |
|
|
|
handleNoticeList (row) { |
|
|
|
this.noticeListFormShow = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ref_noticelist.initTable(row.idCard) |
|
|
|
this.$refs.ref_noticelist.initTable(row.idCard, '0') |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
@ -465,10 +511,36 @@ export default { |
|
|
|
} |
|
|
|
this.sendNoticeFormShow = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ref_sendnotice.initForm(this.selectionAll) |
|
|
|
const arr = this.selectionAll.map(item => { |
|
|
|
return { |
|
|
|
userId: item.userId, |
|
|
|
idCard: item.idCard, |
|
|
|
mobile: item.mobile |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$refs.ref_sendnotice.initForm(arr, '0') |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
handleAttention(row) { |
|
|
|
if (this.selectionAll.length === 0) { |
|
|
|
this.$message.info('请选择要加入关注的名单') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$confirm("确认选择的名单加入关注?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.saveFocus(row) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log('err-----', err) |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleDeletes (row) { |
|
|
|
if (this.selectionAll.length === 0) { |
|
|
|
this.$message.info('请选择要取消关注的名单') |
|
|
@ -489,6 +561,37 @@ export default { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
async saveFocus (row) { |
|
|
|
const url = "/epmetuser/icEpidemicSpecialAttention/vaccination-add" |
|
|
|
// let idCards = [] |
|
|
|
|
|
|
|
// this.selectionAll.forEach(element => { |
|
|
|
// idCards.push(element.idCard) |
|
|
|
// }); |
|
|
|
let params = { |
|
|
|
list: this.selectionAll.map(item => { |
|
|
|
return { |
|
|
|
name: item.name, |
|
|
|
mobile: item.mobile, |
|
|
|
idCard: item.idCard, |
|
|
|
attentionType: 2 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "操作成功" |
|
|
|
}); |
|
|
|
|
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async deleteFocus (row) { |
|
|
|
const url = "/epmetuser/icEpidemicSpecialAttention/cancel-attention" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del" |
|
|
@ -498,7 +601,7 @@ export default { |
|
|
|
idCards.push(element.idCard) |
|
|
|
}); |
|
|
|
let params = { |
|
|
|
attentionType: 0, |
|
|
|
attentionType: 2, |
|
|
|
idCards: idCards |
|
|
|
} |
|
|
|
|
|
|
@ -592,6 +695,7 @@ export default { |
|
|
|
this.$refs.ref_searchform.resetFields() |
|
|
|
this.formData.startDate = '' |
|
|
|
this.formData.endDate = '' |
|
|
|
this.searchAreacode = [] |
|
|
|
this.timeRange = [] |
|
|
|
this.pageSize = 20 |
|
|
|
this.pageNo = 1 |
|
|
|