From 086c4fbc914b523e06113b56efd3c23f958b96c6 Mon Sep 17 00:00:00 2001 From: liuye Date: Tue, 11 Jan 2022 15:52:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppEpidemicSituation/BackUserList.vue | 20 +- src/apps/AppEpidemicSituation/ErrorInfo.vue | 377 +++++++++++------- src/apps/AppEpidemicSituation/UserInfo.vue | 11 +- 3 files changed, 259 insertions(+), 149 deletions(-) diff --git a/src/apps/AppEpidemicSituation/BackUserList.vue b/src/apps/AppEpidemicSituation/BackUserList.vue index fbf85db4..85eb6c40 100644 --- a/src/apps/AppEpidemicSituation/BackUserList.vue +++ b/src/apps/AppEpidemicSituation/BackUserList.vue @@ -2,19 +2,19 @@
-

274

+

{{totalInfo.total}}

返乡人员

-

274

+

{{totalInfo.today}}

今日返乡

-

274

+

{{totalInfo.todayUnusual}}

今日异常

-

274

+

{{totalInfo.release}}

异常处理

@@ -58,6 +58,7 @@ export default { current: 1, list: [], name: '', + totalInfo: {} } }, computed: { ...mapState(['user']) }, @@ -65,6 +66,10 @@ export default { this.areaId = this.user.areaId document.title = '疫情防控' this.getList() + this.getTotal() + uni.$on('updateList', () => { + this.getListInit() + }) }, methods: { areaSelect() { @@ -91,6 +96,13 @@ export default { } }) }, + getTotal() { + this.$http.post(`/app/appepidemicbackhomerecord/statistic`).then((res) => { + if (res.code == 0) { + this.totalInfo = res.data + } + }) + }, toUser(row) { uni.navigateTo({url: `./UserInfo?id=${row.id}`}) } diff --git a/src/apps/AppEpidemicSituation/ErrorInfo.vue b/src/apps/AppEpidemicSituation/ErrorInfo.vue index bda3727b..720edb69 100644 --- a/src/apps/AppEpidemicSituation/ErrorInfo.vue +++ b/src/apps/AppEpidemicSituation/ErrorInfo.vue @@ -1,47 +1,39 @@ @@ -49,130 +41,229 @@ import { mapState } from 'vuex' export default { + components: {}, + props: {}, data() { return { - areaId: '', - areaName: '' + show: false, + value: '', + id: '', + list: [], + info: {} } }, - computed: { ...mapState(['user']) }, - onShow() {}, + computed: { + ...mapState(['user']), + }, + onShow() { + document.title = '异常情况处理' + }, + onLoad(option) { + this.id = option.id + this.$dict.load('epidemicRecentHealth').then(() => { + this.getDetail() + }) + this.getList() + }, methods: { - areaSelect() { + getList() { + this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.id}`).then((res) => { + if (res.code == 0) { + this.list = res.data.records + } + }) + }, + getDetail() { + this.$http.post(`/app/appepidemicbackhomerecord/queryDetailById?id=${this.id}`).then((res) => { + if (res.code == 0) { + this.info = res.data + this.info.health = this.info.health.split(',') + } + }) + }, + cancel() { + this.$confirm(`是否解除该条异常信息?`).then(() => { + this.$http.post("/app/appepidemicbackhomerecord/release", {id: this.id}).then(res => { + if (res?.code == 0) { + this.$u.toast("解除成功!") + uni.$emit('updateDetail') + uni.$emit('updateList') + setTimeout(() => { + uni.navigateBack() + }, 600); + } + }) + }) + }, + confirm() { + if(!this.value) { + return this.$u.toast('请输入异常情况') + } - } + var params = { + "content": this.value, + "createUserId": this.user.id, + "createUserName": this.user.name, + "recordId": this.id + } + this.$http.post("/app/appepidemicbackhomerecord/release", params).then(res => { + if (res.code == 0) { + this.$u.toast("新增成功!") + this.show = false + this.value = '' + this.getList() + } + }) + }, + callPhone(phone) { + uni.makePhoneCall({phoneNumber: phone}) + }, }, } -