pull/143/head
parent
4221314e39
commit
4a34accad6
|
@ -123,11 +123,6 @@ export default {
|
|||
{deviceTypeName:'大数据设备信息',router:'dataDevice',index:4},
|
||||
{deviceTypeName:'手机控制模块信息',router:'mobileControl',index:5},
|
||||
] },
|
||||
{ name: '管理员管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [
|
||||
{deviceTypeName:'用户信息管理',router:'userInfoControl',index:6},
|
||||
{deviceTypeName:'设备管理',router:'deviceManage',index:7},
|
||||
// {deviceTypeName:'摄像头信息管理',router:'videoManage',index:8},
|
||||
] },
|
||||
],
|
||||
manageList:['deviceStatusSet',
|
||||
'deviceSet',
|
||||
|
@ -148,7 +143,8 @@ export default {
|
|||
IDTimer: null,
|
||||
deviceId: '',
|
||||
limitUserId: [],
|
||||
statusData: []
|
||||
statusData: [],
|
||||
roleId:2,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -158,7 +154,6 @@ export default {
|
|||
if (!store.equipmentName) {
|
||||
this.getByid()
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
@ -192,11 +187,51 @@ export default {
|
|||
|
||||
// 获取用户id权限
|
||||
this.get_user_getjurisdiction()
|
||||
//获取用户身份
|
||||
this.getRole()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.IDTimer && clearInterval(this.IDTimer)
|
||||
},
|
||||
methods: {
|
||||
getRole(){
|
||||
var user= JSON.parse(localStorage.getItem('userInfo'))
|
||||
this.api.selUserbyid(user.userid).then(res=>{
|
||||
if(res.data.code==200){
|
||||
this.roleId=res.data.data.roleId
|
||||
if(this.roleId==1){
|
||||
this.leftList1= [
|
||||
{ name: '管理', img: require('../assets/image/index-icon.png'), list: [], router: 'manage', isRouter: true, },
|
||||
{ name: '用户管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [
|
||||
{deviceTypeName:'控制器设备状态值设置',router:'deviceStatusSet',index:0},
|
||||
{deviceTypeName:'控制器设备设定值设置',router:'deviceSet',index:1},
|
||||
{deviceTypeName:'设备信息管理',router:'deviceInfoManage',index:2},
|
||||
{deviceTypeName:'设备绑定气象站数据',router:'weatherData',index:3},
|
||||
{deviceTypeName:'大数据设备信息',router:'dataDevice',index:4},
|
||||
{deviceTypeName:'手机控制模块信息',router:'mobileControl',index:5},
|
||||
] },
|
||||
{ name: '管理员管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [
|
||||
{deviceTypeName:'用户信息管理',router:'userInfoControl',index:6},
|
||||
{deviceTypeName:'设备管理',router:'deviceManage',index:7},
|
||||
// {deviceTypeName:'摄像头信息管理',router:'videoManage',index:8},
|
||||
] },
|
||||
]
|
||||
}else{
|
||||
this.leftList1= [
|
||||
{ name: '管理', img: require('../assets/image/index-icon.png'), list: [], router: 'manage', isRouter: true, },
|
||||
{ name: '用户管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [
|
||||
{deviceTypeName:'控制器设备状态值设置',router:'deviceStatusSet',index:0},
|
||||
{deviceTypeName:'控制器设备设定值设置',router:'deviceSet',index:1},
|
||||
{deviceTypeName:'设备信息管理',router:'deviceInfoManage',index:2},
|
||||
{deviceTypeName:'设备绑定气象站数据',router:'weatherData',index:3},
|
||||
{deviceTypeName:'大数据设备信息',router:'dataDevice',index:4},
|
||||
{deviceTypeName:'手机控制模块信息',router:'mobileControl',index:5},
|
||||
] },
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取用户id权限
|
||||
get_user_getjurisdiction() {
|
||||
let userInfo = localStorage.getItem("userInfo") ? JSON.parse(localStorage.getItem("userInfo")) : { userid: -1 };
|
||||
|
|
Loading…
Reference in New Issue