@@ -69,10 +69,14 @@
search: {
current: 1,
size: 10,
- title: ''
+ name: '',
+ areaId: '',
+ fpRiskType: '',
+ status: ''
},
- ids: [],
+ chooseList: [],
total: 10,
+ checkType: '',
tableData: []
}
},
@@ -83,43 +87,46 @@
colConfigs () {
return [
{ type: 'selection' },
- { prop: 'title', label: '姓名', align: 'left' },
- { prop: 'createUserName', label: '联系方式', align: 'center' },
- { prop: 'publishUnitName', label: '风险类型', align: 'center'},
- { prop: 'createTime', label: '所属区域', align: 'center' },
- { prop: 'createUserName', label: '备注说明', align: 'center' },
- {
- prop: 'status',
- label: '状态',
- align: 'center',
- render: (h, { row }) => {
- return h(
- "span",
- {
- style: {
- color: this.dict.getColor('epidemicRecentTestResult', row.status)
- }
- },
- this.dict.getLabel('epidemicRecentTestResult', row.status)
- )
- }
- },
- {prop: 'createTime', label: '处理时间', align: 'center' },
- {prop: 'createTime', label: '处理人', align: 'center' },
- {slot: 'options', label: '操作'}
+ { prop: 'name', label: '姓名', align: 'left'},
+ { prop: 'phone', label: '联系方式', align: 'center' },
+ { prop: 'riskType', label: '风险类型', align: 'center', formart: v => this.dict.getLabel('fpRiskType', v) },
+ { prop: 'areaName', label: '所属区域', align: 'center' },
+ { prop: 'remarks', label: '备注说明', align: 'center' },
+ { prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('fpRiskPersonStatus', v) },
+ { prop: 'createTime', label: '处理时间', align: 'center' },
+ { prop: 'createUserName', label: '处理人', align: 'center' }
]
+ },
+
+ addIds () {
+ if (!this.chooseList.length) {
+ return []
+ }
+
+ return this.chooseList.filter(v => v.status === '0' || v.status === '1').map(v => v.id)
+ },
+
+ removeIds () {
+ if (!this.chooseList.length) {
+ return []
+ }
+
+ return this.chooseList.filter(v => v.status !== '3').map(v => v.id)
}
},
created () {
- this.dict.load('epidemicRecentTestResult').then(() => {
+ this.search.areaId = this.user.info.areaId
+ this.dict.load('fpRiskType', 'fpRiskPersonStatus').then(() => {
this.getList()
})
+
+ this.getInfo()
},
methods: {
getList() {
- this.instance.post(`/app/appmininotice/list`, null, {
+ this.instance.post(`/app/apppreventionreturntopovertyriskperson/list`, null, {
params: {
...this.search
}
@@ -131,16 +138,36 @@
})
},
- removeAll () {
- var id = this.ids.join(',')
- this.remove(id)
+ getInfo () {
+ this.instance.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
+ if (res.code == 0) {
+ this.checkType = res.data.checkType
+ }
+ })
},
- remove(id) {
- this.$confirm('确定删除该数据?').then(() => {
- this.instance.post(`/app/appmininotice/delete?ids=${id}`).then(res => {
+ addMonitor () {
+ this.$confirm('是否纳入监测对象?').then(() => {
+ this.instance.post(`/app/apppreventionreturntopovertyriskperson/monitor`, {
+ ids: this.addIds,
+ operation: 1
+ }).then(res => {
if (res.code == 0) {
- this.$message.success('删除成功!')
+ this.$message.success('操作成功!')
+ this.getList()
+ }
+ })
+ })
+ },
+
+ removeAll () {
+ this.$confirm('确定删除该数据?').then(() => {
+ this.instance.post(`/app/apppreventionreturntopovertyriskperson/monitor`, {
+ ids: this.removeIds,
+ operation: 2
+ }).then(res => {
+ if (res.code == 0) {
+ this.$message.success('操作成功!')
this.getList()
}
})