From bfb2c6cc4ddb03fa32dc2345cfbe3dc3d90c9a18 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期四, 22 二月 2024 10:14:07 +0800 Subject: [PATCH] 权限平台 联系人姓名相关bug修复 --- src/views/unifiedManage/userLevel/components/AddUserLevel.vue | 36 +++++++++--------------------------- 1 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/views/unifiedManage/userLevel/components/AddUserLevel.vue b/src/views/unifiedManage/userLevel/components/AddUserLevel.vue index e845320..7f5cacc 100644 --- a/src/views/unifiedManage/userLevel/components/AddUserLevel.vue +++ b/src/views/unifiedManage/userLevel/components/AddUserLevel.vue @@ -51,7 +51,7 @@ :data="item.menus" show-checkbox node-key="id" - @check-change="handleCheckChange" + :default-checked-keys="editConfig.infomation.menuIDs" :props="treeDefaultProp" default-expand-all > @@ -84,12 +84,6 @@ title: "鏂板缓", infomation: {} } - } - }, - editRow: { - type: Object, - default: () => { - return {} } } }, @@ -146,7 +140,7 @@ }, // 鑾峰彇鍙傝�冭鑹� 椤甸潰鏉冮檺 鑿滃崟 鐨勬暟鎹� async getDataInfo(val) { - const rsp = await getDataRole({ useType: 2 }) + const rsp = await getDataRole({ useType: 1 }) if (rsp.code == 200) { // 鍙傝�冭鑹� this.prepareRoleList = rsp.data.roles ? rsp.data.roles : [] @@ -156,6 +150,7 @@ this.form.completeType = this.completeList.length > 0 ? this.completeList[0].systemType : 1 } if (this.editConfig.visible) { + console.log("ssss") this.resetForm(val) } }, @@ -177,21 +172,10 @@ this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1 } if (val) { + console.log("aaaa", val) this.form = JSON.parse(JSON.stringify(val)) this.form.completeType = this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1 - if (this.form.menuIDs && this.form.menuIDs.length > 0) { - for (let i in this.menusList) { - console.log(this.$refs["menuTree&" + this.menusList[i].systemType]) - // this.$refs["menuTree&" + this.menusList[i].systemType][0].setCheckedKeys(this.form.allMenu.split(",")) - } - } - } else { - console.log(this.menusList) - for (let i in this.menusList) { - console.log(this.$refs["menuTree&" + this.menusList[i]?.systemType]) - // this.$refs["menuTree&" + this.menusList[i]?.systemType][0].setCheckedKeys([]) - } } }, imgClick(item, index) { @@ -217,12 +201,13 @@ this.$refs[formName].validate((valid) => { console.log(valid) if (valid) { - let submitFn = this.editRow.id ? updateRole : addRole + let submitFn = this.editConfig.title === "缂栬緫" ? updateRole : addRole let param = this.saveParams() submitFn(param).then((reply) => { if (reply && reply.code === 200) { this.$message.success("淇濆瓨鎴愬姛") - this.$emit("shutdown", false) + this.handleClose() + this.$parent.getData() } }) } @@ -262,17 +247,14 @@ subsystemIDs: subsystemIDs, role: { allMenu: allMenuIds.join(), - id: this.editRow.id, + id: this.editConfig.infomation.id, comment: data.comment || "", name: data.name || "", - useType: 2 + useType: 1 }, menuIDs: menuIds } return params - }, - shutdown() { - this.$emit("shutdown", false) } } } -- Gitblit v1.8.0