diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 9d3025e..92fbd7c 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -2370,6 +2370,14 @@ background: transparent; } +.vrcode .header .header-right { + width: 500px; +} + +.vrcode .header .header-center { + width: calc(100% - 500px - 373px); +} + .vrcode .el-menu { border-right: none; } @@ -3306,3 +3314,20 @@ .el-button span { 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; +} diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 114a86e..a06272a 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -2538,6 +2538,14 @@ } .vrcode { + .header{ + .header-right{ + width: 500px; + } + .header-center{ + width: calc(100% - 500px - 373px); + } + } .el-menu { border-right: none; } @@ -3498,4 +3506,21 @@ .el-button span { color: #606266; -} \ No newline at end of file +} +.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; + } \ No newline at end of file diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index d84c3ff..96391ba 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -115,7 +115,7 @@ export default { min-width: 1553px; overflow: auto; background: url(../assets/image/background.jpg) no-repeat; - background-size: 1920px 1080px; + background-size:cover; background-position: center top; .return-btn { // width: 120px; diff --git a/src/views/index.vue b/src/views/index.vue index 0f81960..3279e30 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -72,7 +72,7 @@ export default { { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') }, //systemManage systemManage { 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') } ], @@ -90,7 +90,7 @@ export default { loading: true,//页面加载 IDTimer: null, deviceId:'', - limitUserId:'' + limitUserId:[] } }, watch: { @@ -140,7 +140,21 @@ export default { let userId = userInfo.userid this.api.user_getjurisdiction(userId).then(res => { 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 } 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 }) } } else { diff --git a/src/views/vrcode.vue b/src/views/vrcode.vue index be69d1b..821a9a8 100644 --- a/src/views/vrcode.vue +++ b/src/views/vrcode.vue @@ -8,6 +8,7 @@