From 5360fdb078866cfcc255e8ee99aafb6c8db75385 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 19 Mar 2020 17:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E6=88=90=E5=91=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/master/master-user.vue | 2 +- .../modules/master/masteruserrelation-add.vue | 50 +++++------ .../modules/master/masteruserrelation.vue | 87 ++++++++----------- 3 files changed, 61 insertions(+), 78 deletions(-) diff --git a/src/views/modules/master/master-user.vue b/src/views/modules/master/master-user.vue index f5edbff5..a1a06921 100644 --- a/src/views/modules/master/master-user.vue +++ b/src/views/modules/master/master-user.vue @@ -96,7 +96,7 @@ export default { message: '请选择书记!', type: 'warning' }) - return + return false } this.$emit('connectResponse', this.responseData) this.visible = false diff --git a/src/views/modules/master/masteruserrelation-add.vue b/src/views/modules/master/masteruserrelation-add.vue index 6415b9b4..8799fd22 100644 --- a/src/views/modules/master/masteruserrelation-add.vue +++ b/src/views/modules/master/masteruserrelation-add.vue @@ -9,33 +9,31 @@
+
{{"书记"+(index+1)+":"}}
-
{{"书记"+(index+1)+":"}}
- - - -   - -   - {{"选择书记"}}   - - - -   - {{"删除"}}   - - + + +   + +   + {{"选择书记"}}   + + + +   + {{"删除"}}   +
diff --git a/src/views/modules/master/masteruserrelation.vue b/src/views/modules/master/masteruserrelation.vue index 44b249c5..ae0470a9 100755 --- a/src/views/modules/master/masteruserrelation.vue +++ b/src/views/modules/master/masteruserrelation.vue @@ -61,8 +61,8 @@ @@ -79,26 +79,6 @@ - - 将该成员设置为管理员身份,管理员可以将通知和话题置顶、关闭等权限。 - - 取 消 - 确 定 - - - - 将该成员的管理权限解除,解除后无法管理,不能置顶、关闭等权限。 - - 取 消 - 确 定 - - @@ -134,11 +114,7 @@ export default { return time.getTime() < new Date(EndDateVal).getTime() } } - }, - updateManageFlagId: '', - disAbled: false, - setManagerDialog: false, - cancelManagerDialog: false + } } }, components: { @@ -159,32 +135,41 @@ export default { return '管理员' } }, - setManageFlagHandle (id) { - this.setManagerDialog = true - this.updateManageFlagId = id - }, - cancelManageFlagHandle (id) { - this.cancelManagerDialog = true - this.updateManageFlagId = id - }, - updateManageFlagHandle () { - this.disAbled = true - this.$http.get(`/cloudAnalysis/masteruserrelation/updateManageFlag/${this.updateManageFlagId}`).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.setManagerDialog = false - this.cancelManagerDialog = false - this.disAbled = false - this.getDataList() + updateManageFlagHandle (id, flag) { + let contentInfo = '' + let titleInfo = '' + if (flag === '0') { + contentInfo = '将该成员的管理权限解除,解除后无法管理,不能置顶、关闭等权限。' + titleInfo = '确认要解除管理员身份吗?' + } else { + contentInfo = '将该成员设置为管理员身份,管理员可以将通知和话题置顶、关闭等权限。' + titleInfo = '确认要设置管理员身份吗?' + } + this.$confirm(contentInfo, titleInfo, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.disAbled = true + this.$http.get(`/cloudAnalysis/masteruserrelation/updateManageFlag/${id}`).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getDataList() + } + }) + }).catch(() => { + this.$message({ + type: 'success', + message: '操作成功!' + }) }) - }).catch(() => { }) + }).catch(() => {}) } } }