|
@@ -92,7 +92,9 @@ export default {
|
|
|
silderList: [],
|
|
|
allChildIds: [], // 所有子编号
|
|
|
slideCount: 0,
|
|
|
- seachRoleValue: '' //权限搜索字段
|
|
|
+ seachRoleValue: '', //权限搜索字段
|
|
|
+ filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627]
|
|
|
+ // 4229 公用权限
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -105,6 +107,11 @@ export default {
|
|
|
}
|
|
|
this.menuId = activeRow.menuId ? activeRow.menuId.split(',').map(res => Number(res)) : []
|
|
|
}
|
|
|
+
|
|
|
+ if(this.pageType == 'create') {
|
|
|
+ this.$refs.tree.setCheckedKeys([4229]);
|
|
|
+ }
|
|
|
+
|
|
|
this.lookSilder()
|
|
|
},
|
|
|
methods: {
|
|
@@ -155,6 +162,7 @@ export default {
|
|
|
this.silderList = silderItem
|
|
|
|
|
|
tempData = this.setTableData(silderItem)
|
|
|
+ console.log(tempData)
|
|
|
this.data = tempData
|
|
|
}
|
|
|
if (this.pageType == 'update') {
|
|
@@ -213,24 +221,33 @@ export default {
|
|
|
setTableData (result) {
|
|
|
let list = []
|
|
|
list = result.map(res => {
|
|
|
- let tempList = {}
|
|
|
- tempList = {
|
|
|
- id: res.id,
|
|
|
- name: res.name,
|
|
|
- label: res.name,
|
|
|
- type: res.type,
|
|
|
- path: res.path,
|
|
|
- permission: res.permission,
|
|
|
- icon: res.icon,
|
|
|
- parentId: res.parentId
|
|
|
+ if(!this.filterIds.includes(res.id)) {
|
|
|
+ let tempList = {}
|
|
|
+ tempList = {
|
|
|
+ id: res.id,
|
|
|
+ name: res.name,
|
|
|
+ label: res.name,
|
|
|
+ type: res.type,
|
|
|
+ path: res.path,
|
|
|
+ permission: res.permission,
|
|
|
+ icon: res.icon,
|
|
|
+ parentId: res.parentId
|
|
|
+ }
|
|
|
+ this.slideCount++
|
|
|
+ if (res.sysMenus && res.sysMenus.length > 0) {
|
|
|
+ tempList.children = this.setTableData(res.sysMenus)
|
|
|
+ }
|
|
|
+ return tempList
|
|
|
}
|
|
|
- this.slideCount++
|
|
|
- if (res.sysMenus && res.sysMenus.length > 0) {
|
|
|
- tempList.children = this.setTableData(res.sysMenus)
|
|
|
+ return null
|
|
|
+ })
|
|
|
+ let tempList = []
|
|
|
+ list.forEach(item => {
|
|
|
+ if(item) {
|
|
|
+ tempList.push(item)
|
|
|
}
|
|
|
- return tempList
|
|
|
})
|
|
|
- return list
|
|
|
+ return tempList
|
|
|
},
|
|
|
onReSet () {
|
|
|
this.$refs.tree.setCheckedNodes([])
|
|
@@ -238,6 +255,7 @@ export default {
|
|
|
roleName: null,
|
|
|
roleDesc: null,
|
|
|
}
|
|
|
+ this.isIndeterminate = false
|
|
|
this.checkAll = false
|
|
|
},
|
|
|
onCancel () {
|
|
@@ -253,9 +271,9 @@ export default {
|
|
|
this.$refs.tree.filter(this.seachRoleValue);
|
|
|
},
|
|
|
filterNode(value, data) {
|
|
|
- if (!value) return true;
|
|
|
- return data.label.indexOf(value) !== -1;
|
|
|
- },
|
|
|
+ if (!value) return true;
|
|
|
+ return data.label.indexOf(value) !== -1;
|
|
|
+ },
|
|
|
onReSetRole () {
|
|
|
this.seachRoleValue = ''
|
|
|
this.data = this.setTableData(this.silderList)
|