From 619ac16a4e7a131d8c08db074ceab194de3454ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Mon, 8 Apr 2024 16:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 1 + src/views/system/specialDiseaseNode/index.vue | 72 +++++++++++++++---- 2 files changed, 58 insertions(+), 15 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index ab0a6fe..324c99f 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -52,6 +52,7 @@ const user = { getInfo().then(res => { const user = res.user const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; + localStorage.setItem('user', JSON.stringify(user)) if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 commit('SET_ROLES', res.roles) commit('SET_PERMISSIONS', res.permissions) diff --git a/src/views/system/specialDiseaseNode/index.vue b/src/views/system/specialDiseaseNode/index.vue index 9584b92..5b8c1e1 100644 --- a/src/views/system/specialDiseaseNode/index.vue +++ b/src/views/system/specialDiseaseNode/index.vue @@ -262,9 +262,25 @@ + + + + 同意 + 不同意 + + + + + + + + @@ -283,6 +299,16 @@ export default { name: "specialDiseaseNode", data() { return { + dialogVisible: false, + routeform: { + routeCheckStatus: null, + routeCheckRemark: "", + }, + rules: { + routeCheckStatus: [ + { required: true, message: '请选择节点审核状态', trigger: 'change' } + ], + }, totalNumber: 0, agreeNumber: 0, updata: { @@ -553,22 +579,38 @@ export default { this.lists.splice(index, 1) } }, + //取消 + handleClose() { + this.dialogVisible = false + this.routeform = { + routeCheckStatus: '', + routeCheckRemark: "", + } + this.resetForm("routeform"); + }, //审核 auditing() { - const loading = this.$loading({ - lock: true, - text: '审核中', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); - updateRouteCheckStatus({ - routeCheckStatus: 'AGREE', - id: this.form.specialDiseaseNodeId - }).then(res => { - if (res.data == 1) { - this.info(); - this.$modal.msgSuccess("审核成功!"); - loading.close(); + this.$refs["routeform"].validate(valid => { + if (valid) { + const loading = this.$loading({ + lock: true, + text: '审核中', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + updateRouteCheckStatus({ + routeCheckStatus: this.routeform.routeCheckStatus, + id: this.form.specialDiseaseNodeId, + routeCheckRemark: this.routeform.routeCheckRemark, + routeCheckPerson: JSON.parse(localStorage.getItem('user')).nickName + }).then(res => { + if (res.data == 1) { + this.info(); + this.handleClose() + this.$modal.msgSuccess("审核成功!"); + loading.close(); + } + }) } }) },