diff --git a/packages/3.0.0/AppHealthReport/components/Detail.vue b/packages/3.0.0/AppHealthReport/components/Detail.vue index b5e3c437..93b14dac 100644 --- a/packages/3.0.0/AppHealthReport/components/Detail.vue +++ b/packages/3.0.0/AppHealthReport/components/Detail.vue @@ -11,57 +11,135 @@ - - - - - - - - - - + +
+ + + + + + + + + + + + + + + +
@@ -81,44 +159,143 @@ total: 0, info: {}, id: '', + isShowAdd: false, + recordTotal: 0, + recordSerch: { + current: 1, + size: 10 + }, search: { current: 1, size: 10 }, + form: { + content: '' + }, + recordConfigs: [ + {prop: 'content', label: '说明', align: 'center' }, + {prop: 'createTime', label: '创建时间', align: 'center'} + ], + reportInfo: {}, + isShow: false, currIndex: 0, tableData: [], + recordList: [], colConfigs: [ - {prop: 'name', label: '报名人员名称', align: 'center' }, - {prop: 'createTime', label: '报名时间', align: 'center'}, - {prop: 'phone', label: '联系方式', align: 'center' } + {prop: 'createTime', label: '上报日期', align: 'center', dateFormart: 'YYYY-MM-DD'}, + {prop: 'status', label: '健康状态', align: 'center', formart: v => v === '0' ? '异常' : '正常' } ], - tabList: ['基本信息', '异常处理'] + tabList: ['基本信息', '每日上报'] } }, created () { if (this.params && this.params.id) { this.id = this.params.id - // this.getInfo(this.params.id) - // this.getList(this.params.id) + this.dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicMemberType', 'epidemicRecentTestResult']).then(() => { + this.getInfo(this.params.id) + this.getList(this.params.id) + this.getRecordList(this.params.id) + }) } }, methods: { getInfo (id) { - this.instance.post(`/app/appvillageactivityinfo/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.info = res.data - // this.info.url = res.data.url ? JSON.parse(res.data.url) : [] + if (res.data.status === '0') { + this.tabList = ['基本信息', '每日上报', '异常处理'] + } else { + this.tabList = ['基本信息', '每日上报'] + } + this.currIndex = 0 + } + }) + }, + + getRecordList (id) { + this.instance.post(`/app/appepidemicunusuallog/list`, null, { + params: { + ...this.search, + recordId: id + } + }).then(res => { + if (res.code == 0) { + this.recordList = res.data.records + this.recordTotal = res.data.total + } + }) + }, + + onConfirm() { + this.$refs.form.validate(v => { + if (v) { + this.instance.post('/app/appepidemicunusuallog/addOrUpdate', { + ...this.form, + recordId: this.params.id + }).then(res => { + if (res?.code == 0) { + this.isShowAdd = false + this.getRecordList(this.params.id) + this.$message.success('添加成功!') + } + }) + } + }) + }, + + release () { + this.$confirm('确定解除异常?').then(() => { + this.instance.post(`/app/appepidemicreportmember/release`, { + id: this.params.id + }).then(res => { + if (res.code == 0) { + this.$message.success('解除异常成功!') + this.currIndex = 0 + this.getInfo(this.params.id) + } + }) + }) + }, + + remove(id) { + this.$confirm('确定删除该数据?').then(() => { + this.instance.post(`/app/appepidemicunusuallog/delete?ids=${id}`).then(res => { + if (res.code == 0) { + this.$message.success('删除成功!') + this.getList(this.params.id) + } + }) + }) + }, + + toDetail (id) { + this.instance.post(`/app/appepidemichealthreport/queryDetailById?id=${id}`).then(res => { + if (res.code === 0) { + this.reportInfo = res.data + this.reportInfo.checkPhoto = JSON.parse(res.data.checkPhoto) + let healthName = '' + this.reportInfo.isHealth = false + res.data.health.split(',').forEach(v => { + if (v > 0) { + this.reportInfo.isHealth = true + } + healthName = healthName + this.dict.getLabel('epidemicRecentHealth', v) + }) + this.reportInfo.healthName = healthName + + this.isShow = true } }) }, getList (id) { - this.instance.post(`/app/appvillageactivityuser/list`, null, { + this.instance.post(`/app/appepidemichealthreport/list`, null, { params: { ...this.search, - activityId: id + memberId: id } }).then(res => { if (res.code == 0) { diff --git a/packages/3.0.0/AppHealthReport/components/List.vue b/packages/3.0.0/AppHealthReport/components/List.vue index 2704a16f..cc8a1046 100644 --- a/packages/3.0.0/AppHealthReport/components/List.vue +++ b/packages/3.0.0/AppHealthReport/components/List.vue @@ -4,29 +4,39 @@