| | |
| | | :data="item.menus" |
| | | show-checkbox |
| | | node-key="id" |
| | | @check-change="handleCheckChange" |
| | | :default-checked-keys="editConfig.infomation.menuIDs" |
| | | :props="treeDefaultProp" |
| | | default-expand-all |
| | | > |
| | |
| | | }, |
| | | // 获取参考角色 页面权限 菜单 的数据 |
| | | 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 : [] |
| | |
| | | this.form.completeType = this.completeList.length > 0 ? this.completeList[0].systemType : 1 |
| | | } |
| | | if (this.editConfig.visible) { |
| | | console.log("ssss") |
| | | this.resetForm(val) |
| | | } |
| | | }, |
| | |
| | | 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) { |
| | |
| | | submitFn(param).then((reply) => { |
| | | if (reply && reply.code === 200) { |
| | | this.$message.success("保存成功") |
| | | this.$emit("shutdown", false) |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | |
| | | id: this.editRow.id, |
| | | comment: data.comment || "", |
| | | name: data.name || "", |
| | | useType: 2 |
| | | useType: 1 |
| | | }, |
| | | menuIDs: menuIds |
| | | } |
| | | return params |
| | | }, |
| | | shutdown() { |
| | | this.$emit("shutdown", false) |
| | | } |
| | | } |
| | | } |