From 3b28a05b45f50b3cac08156db8a9e38e89be95ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?= =?UTF-8?q?=E9=98=B4?= <185154740@qq.com> Date: Mon, 10 Jan 2022 17:08:12 +0800 Subject: [PATCH] background --- src/apps/AppEpidemicSituation/ErrorDetail.vue | 36 +++++++++++++++---- src/apps/AppEpidemicSituation/Health.vue | 6 ++-- .../AppEpidemicSituation/HealthDetail.vue | 2 +- src/apps/AppEpidemicSituation/UserDetail.vue | 2 ++ 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/apps/AppEpidemicSituation/ErrorDetail.vue b/src/apps/AppEpidemicSituation/ErrorDetail.vue index 0220f283..fc88bcf1 100644 --- a/src/apps/AppEpidemicSituation/ErrorDetail.vue +++ b/src/apps/AppEpidemicSituation/ErrorDetail.vue @@ -72,6 +72,7 @@ export default { data: [{ name: '张三' }], addShow: false, content: '', + flag: false, } }, computed: { @@ -81,12 +82,35 @@ export default { onLoad() {}, onShow() {}, methods: { - close() { - this.content = '' + save() { + if (this.flag) return + if (!this.content) { + return this.$u.toast('请输入异常情况记录') + } + + this.$http + .post(`/app/appvillagediscussmessage/addOrUpdate`, { + // content: this.content, + // avatar: this.user.avatar, + // createUserId: this.user.id, + // createUserName: this.user.name, + // discussId: this.id, + }) + .then((res) => { + if (res?.code == 0) { + this.$u.toast('新增记录成功') + this.flag = false + this.content = '' + this.addShow = false + // this.getDetail() + } + }) }, - save() { - console.log(22) + relieveError() {}, + + close() { + this.content = '' }, toAddRecord() { @@ -113,7 +137,7 @@ export default {