|
|
@@ -122,12 +122,12 @@ export default {
|
|
|
name: '馆藏管理',
|
|
|
push: '/layout/holding',
|
|
|
son: [
|
|
|
- { name: '藏品登记', id: 0 },
|
|
|
- { name: '藏品总账', id: 3 },
|
|
|
- { name: '入库管理', id: 1 },
|
|
|
- { name: '出库管理', id: 2 },
|
|
|
- { name: '藏品修改', id: 4 },
|
|
|
- { name: '藏品注销', id: 5 }
|
|
|
+ { name: '藏品登记', id: 0, ip: 100 },
|
|
|
+ { name: '藏品总账', id: 3, ip: 200 },
|
|
|
+ { name: '入库管理', id: 1, ip: 300 },
|
|
|
+ { name: '出库管理', id: 2, ip: 400 },
|
|
|
+ { name: '藏品修改', id: 4, ip: 500 },
|
|
|
+ { name: '藏品注销', id: 5, ip: 600 }
|
|
|
]
|
|
|
},
|
|
|
// {
|
|
|
@@ -144,9 +144,9 @@ export default {
|
|
|
name: '库房管理',
|
|
|
push: '/layout/statistics',
|
|
|
son: [
|
|
|
- { name: '库房设置', id: 0 },
|
|
|
- { name: '统计报表', id: 1 },
|
|
|
- { name: '藏品移库', id: 2 }
|
|
|
+ { name: '库房设置', id: 0, ip: 700 },
|
|
|
+ { name: '统计报表', id: 1, ip: 99999 },
|
|
|
+ { name: '藏品移库', id: 2, ip: 800 }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
@@ -240,6 +240,29 @@ export default {
|
|
|
// 进来显示用户信息
|
|
|
const userData = localStorage.getItem('daliCK')
|
|
|
this.userData = JSON.parse(userData).user
|
|
|
+ // 只有系统管理员才能看到系统管理
|
|
|
+ // 获取用户角色权限标识
|
|
|
+ let temp = localStorage.getItem('daliCK')
|
|
|
+ temp = JSON.parse(temp)
|
|
|
+ if (temp) {
|
|
|
+ const temp2 = temp.role[0]
|
|
|
+ if (temp2 !== 'sys_admin') this.tabList.pop() // 不是超级管理员
|
|
|
+ }
|
|
|
+ // 获取用户权限数据
|
|
|
+ let temp2 = localStorage.getItem('daliCK_limits')
|
|
|
+ temp2 = JSON.parse(temp2)
|
|
|
+ // console.log(666, this.tabList[1].son, this.tabList[2].son)
|
|
|
+ const tempList1 = []
|
|
|
+ const tempList2 = []
|
|
|
+ temp2.forEach(v => {
|
|
|
+ if (v.authority) {
|
|
|
+ if ((this.tabList[1].son.filter(p => p.ip === v.id))[0]) tempList1.push((this.tabList[1].son.filter(p => p.ip === v.id))[0])
|
|
|
+ if ((this.tabList[2].son.filter(p => p.ip === v.id))[0]) tempList2.push((this.tabList[2].son.filter(p => p.ip === v.id))[0])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tabList[1].son = tempList1
|
|
|
+ this.tabList[2].son = tempList2
|
|
|
+ // console.log(999, temp2)
|
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
beforeMount () {}, // 生命周期 - 挂载之前
|