类型分类 |
-
+
目录
菜单
按钮
@@ -115,43 +115,49 @@
菜单名称 |
-
+
|
路由名称 |
-
+
|
路由路径 |
-
+
|
菜单图片 |
-
+
|
组件路径 |
-
+
+ |
+
+
+ 按钮Key |
+
+
|
权限标识 |
-
+
|
是否手机端权限 |
-
+
否
是
@@ -160,7 +166,7 @@
是否可见 |
-
+
否
是
@@ -169,7 +175,7 @@
排序号 |
-
+
|
@@ -258,10 +264,16 @@
+
+ 按钮Key |
+
+
+ |
+
权限标识 |
-
+
|
@@ -336,6 +348,7 @@
remarks: '',
sortNo: 0,
cid: '',
+ btnKey: "",
sourceName: 'wms',
phoneFunction: "0",
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
@@ -414,10 +427,18 @@
menuTypeChangeRadio(val) {
console.log('menuTypeChangeRadio', val)
+ if (val != '2') {
+ this.form.btnKey = ""
+ }
this.form.menuType = val
},
menuTypeChangeRadio2(val) {
console.log('menuTypeChangeRadio2', val)
+
+ if (val != '2') {
+ this.form.btnKey = ""
+ }
+
this.form.menuType = val
},
changeRadio(val) {
@@ -468,6 +489,7 @@
},
handleClick(tab, event) {
if (tab.name == 'addrole') {
+ this.form = {}
this.dialogTitle = '新增'
this.form.isShow = '1'
this.form.menuType = '0'
@@ -482,6 +504,7 @@
}
},
add(row) {
+
this.activeName = 'addrole'
// if(row == 0){
// this.isadd = false
@@ -493,8 +516,8 @@
this.form.isShow = '1'
this.form.menuType = '0'
// this.form.psid = row.sid || 0
- this.form.pname = ''
- this.form.psid = ''
+ this.form.pname = row.name
+ this.form.psid = row.sid
this.form.sourceName = row.sourceName
this.form.sourceSid = row.sourceSid
if (row.isSource == '1') {
@@ -502,6 +525,10 @@
} else {
this.form.psid = row.sid
}
+ let arr = []
+ arr = [row.sid];
+ this.$refs.Tree.setCheckedKeys(arr);
+
},
editRow(row) {
console.log("editRow", row);
@@ -511,12 +538,37 @@
this.editShow = this.form.isShow
this.editMenuType = this.form.menuType
+ let arr = []
+ arr = [row.sid];
+ this.$refs.Tree.setCheckedKeys(arr);
// this.form.isShow = 1
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
},
save() {
+
+ if (this.form.name == '') {
+ this.$message({
+ message: '菜单名称不能为空',
+ type: 'warning'
+ })
+ return
+ }
+
+ if (this.form.menuType == '2') {
+
+ if (this.form.btnKey == '') {
+ this.$message({
+ message: '按钮Key不能为空',
+ type: 'warning'
+ })
+ return
+ }
+
+ }
+
if (this.form.sid) {
+
putMenusInfo(this.form).then(res => {
this.editDialog = false
this.getPageList()
diff --git a/src/views/system/roleAdminister/roleAdminister.vue b/src/views/system/roleAdminister/roleAdminister.vue
index 61c4474..c1b1cbc 100644
--- a/src/views/system/roleAdminister/roleAdminister.vue
+++ b/src/views/system/roleAdminister/roleAdminister.vue
@@ -212,14 +212,18 @@
-
+
角色名称 |
-
+
+
+ 父子级联动
+
+
|
@@ -227,7 +231,8 @@
+ :default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"
+ :check-strictly="!checkStrictly">
|
@@ -235,7 +240,7 @@
保 存
- 关 闭
+ 关 闭
| | |