pull/71/head^2
home孙 2023-12-11 10:35:35 +08:00
parent b068c8a833
commit ab9f3d9fd3
5 changed files with 75 additions and 6 deletions

View File

@ -2370,6 +2370,14 @@
background: transparent; background: transparent;
} }
.vrcode .header .header-right {
width: 500px;
}
.vrcode .header .header-center {
width: calc(100% - 500px - 373px);
}
.vrcode .el-menu { .vrcode .el-menu {
border-right: none; border-right: none;
} }
@ -3306,3 +3314,20 @@
.el-button span { .el-button span {
color: #606266; color: #606266;
} }
.return-btn {
margin: 0 8px;
min-width: 120px;
padding: 0 20px;
border-radius: 3px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
cursor: pointer;
background: #00BB88;
}

View File

@ -2538,6 +2538,14 @@
} }
.vrcode { .vrcode {
.header{
.header-right{
width: 500px;
}
.header-center{
width: calc(100% - 500px - 373px);
}
}
.el-menu { .el-menu {
border-right: none; border-right: none;
} }
@ -3498,4 +3506,21 @@
.el-button span { .el-button span {
color: #606266; color: #606266;
} }
.return-btn {
// width: 120px;
margin: 0 8px;
min-width: 120px;
padding: 0 20px;
border-radius: 3px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
cursor: pointer;
background: #00BB88;
}

View File

@ -115,7 +115,7 @@ export default {
min-width: 1553px; min-width: 1553px;
overflow: auto; overflow: auto;
background: url(../assets/image/background.jpg) no-repeat; background: url(../assets/image/background.jpg) no-repeat;
background-size: 1920px 1080px; background-size:cover;
background-position: center top; background-position: center top;
.return-btn { .return-btn {
// width: 120px; // width: 120px;

View File

@ -72,7 +72,7 @@ export default {
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') }, { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') },
//systemManage systemManage //systemManage systemManage
{ name: '管理', router: '', routerList: [''], img: require('../assets/image/header-img6.png') }, { name: '管理', router: '', routerList: [''], img: require('../assets/image/header-img6.png') },
{ name: '生成二维码', router: 'setsuyuan', index: 1, routerList: ['setsuyuan'], img: require('../assets/image/header-img4.png') },
{ name: '大数据', router: 'largeScreen', routerList: ['largeScreen'], img: require('../assets/image/header-img8.png') } { name: '大数据', router: 'largeScreen', routerList: ['largeScreen'], img: require('../assets/image/header-img8.png') }
], ],
@ -90,7 +90,7 @@ export default {
loading: true,// loading: true,//
IDTimer: null, IDTimer: null,
deviceId:'', deviceId:'',
limitUserId:'' limitUserId:[]
} }
}, },
watch: { watch: {
@ -140,7 +140,21 @@ export default {
let userId = userInfo.userid let userId = userInfo.userid
this.api.user_getjurisdiction(userId).then(res => { this.api.user_getjurisdiction(userId).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.limitUserId = res.data.data[0].id; this.limitUserId = res.data.data;
const foundObject = this.limitUserId.find(item => item.id == 3);
const foundName = this.headerList.findIndex(item => item.name == '二维码追溯');
console.log(foundObject,foundName,123456);
if(foundObject){
if(foundName==-1){
this.headerList.push({ name: '二维码追溯', router: 'setsuyuan', index: 1, routerList: ['setsuyuan'], img: require('../assets/image/header-img4.png') })
}
}else{
if(foundName!=-1){
this.headerList.splice(foundName,1)
}
}
} }
}) })
}, },
@ -271,7 +285,8 @@ export default {
return return
} else if (item.router != this.routerNow && !item.http) { } else if (item.router != this.routerNow && !item.http) {
if(this.limitUserId == 0) return this.$message('您当前没有权限查看!') const foundObject = this.limitUserId.find(item => item.id == 2);
if( !foundObject) return this.$message('您当前没有权限查看!')
this.$router.push({ name: item.router }) this.$router.push({ name: item.router })
} }
} else { } else {

View File

@ -8,6 +8,7 @@
</div> </div>
<div class="header-right" v-if="userInfo"> <div class="header-right" v-if="userInfo">
<div class="return-btn" @click="returnBtn"></div>
<img src="../assets/image/avatar.png" alt=""> <img src="../assets/image/avatar.png" alt="">
<div class="user-data"> <div class="user-data">
<div class="name">欢迎{{ userInfo.nickName }}</div> <div class="name">欢迎{{ userInfo.nickName }}</div>
@ -178,6 +179,9 @@ export default {
} }
}) })
}, },
returnBtn(){
this.$router.push({ name: 'realTime' })
},
toHome() { toHome() {
this.$router.push({ name: 'home' }) this.$router.push({ name: 'home' })
}, },