From ccee429d379e0108b7445f72ade8d97c110a6fb3 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 09 十一月 2021 18:01:59 +0800 Subject: [PATCH] 问题修复 --- src/pages/cameraAccess/index/VideoManage.vue | 71 +++++++++++++++++------------------ 1 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/pages/cameraAccess/index/VideoManage.vue b/src/pages/cameraAccess/index/VideoManage.vue index 2cba6b9..217ac51 100644 --- a/src/pages/cameraAccess/index/VideoManage.vue +++ b/src/pages/cameraAccess/index/VideoManage.vue @@ -1,24 +1,30 @@ <template> <div class="s-video-manage"> - <el-tabs class="video-tab" ref="topTab" v-model="activeName" type="border-card" @tab-click="handleClick"> + <el-tabs + class="video-tab" + ref="topTab" + v-model="activeName" + type="border-card" + @tab-click="handleClick" + > <el-tab-pane :label="firstLabeName" name="camera-info" - v-if="this.TreeDataPool.treeActiveName == 'camera' && isShow('VIDEOCAMERA:camera:info')" + v-if="this.TreeDataPool.treeActiveName == 'camera' && isShow('cameraAccess:cameraInfo')" > <camera-info ref="cameraInfo" /> </el-tab-pane> <el-tab-pane :label="firstLabeName" name="camera-info" - v-if="this.TreeDataPool.treeActiveName == 'dataStack' && isShow('VIDEOCAMERA:dataStack:stackInfo')" + v-if="this.TreeDataPool.treeActiveName == 'dataStack' && isShow('dataStack:cameraInfo')" > <data-stack-info ref="dataStackInfo" /> </el-tab-pane> <el-tab-pane label="鐙珛鍦烘櫙" name="separate-rule" - v-if="this.TreeDataPool.treeActiveName == 'camera' && isShow('VIDEOCAMERA:camera:selfRule')" + v-if="this.TreeDataPool.treeActiveName == 'camera' && isShow('cameraAccess:selfRule')" > <separate-rules ref="sepRule" /> <!-- <local-separate ref="localSeparate" v-else></local-separate> --> @@ -26,7 +32,7 @@ <el-tab-pane label="鐙珛鍦烘櫙" name="separate-rule" - v-if="this.TreeDataPool.treeActiveName == 'dataStack' && isShow('VIDEOCAMERA:dataStack:selfRule')" + v-if="this.TreeDataPool.treeActiveName == 'dataStack' && isShow('dataStack:selfRule')" > <separate-rules ref="sepRule" /> <!-- <local-separate ref="localSeparate" v-else></local-separate> --> @@ -34,7 +40,7 @@ <el-tab-pane label="鑱斿姩鍦烘櫙" name="linkage-rule" - v-if="(isShow('VIDEOCAMERA:camera:linkRule') || isShow('VIDEOCAMERA:dataStack:linkRule')) && this.TreeDataPool.treeActiveName == 'camera'" + v-if="(isShow('cameraAccess:linkRule')) && this.TreeDataPool.treeActiveName == 'camera'" > <linkage-rule ref="linkRule" /> </el-tab-pane> @@ -58,7 +64,8 @@ CameraInfo, DataStackInfo, SeparateRules, - LinkageRule }, + LinkageRule + }, data() { return { activeName: "camera-info", @@ -75,6 +82,7 @@ let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; return loginName === "superadmin" || loginName === "basic"; } + return false; }, firstLabeName() { @@ -108,14 +116,11 @@ }, "DataStackPool.selectedDir": { handler(node, oldNode) { - console.log(this.activeName) - console.log(node, '鍕鹃�夋湰鍦拌棰�') if (this.TreeDataPool.treeActiveName !== 'dataStack') { return } this.$nextTick(() => { if (this.activeName == "camera-info") { - console.log("dataStackInfo.selectDir(node)") this.$refs.dataStackInfo.selectDir(node); } else if (this.activeName == "separate-rule" && node.length !== 0) { this.$refs.sepRule.initCameraData(node.id); @@ -124,30 +129,25 @@ }, deep: true }, - + }, created() { if (this.TreeDataPool.treeActiveName == 'camera') { - if (this.isShow('VIDEOCAMERA:camera:info')) { + if (this.isShow('cameraAccess:cameraInfo')) { this.activeName = "camera-info" - } else if (this.isShow('VIDEOCAMERA:camera:selfRule') || this.isShow('VIDEOCAMERA:datastack:selfRule')) { + } else if (this.isShow('cameraAccess:selfRule')) { this.activeName = "separate-rule" - } else if (this.isShow('VIDEOCAMERA:camera:linkRule') || this.isShow('VIDEOCAMERA:datastack:linkRule')) { + } else if (this.isShow('cameraAccess:linkRule')) { this.activeName = "linkage-rule" - } else if (this.isShow('VIDEOCAMERA:camera:resourceCalc') || this.isShow('VIDEOCAMERA:datastack:resourceCalc')) { - this.activeName = "poll-setting" } } else { - if (this.isShow('VIDEOCAMERA:camera:info')) { + if (this.isShow('dataStack:cameraInfo')) { this.activeName = "camera-info" - } else if (this.isShow('VIDEOCAMERA:camera:selfRule') || this.isShow('VIDEOCAMERA:datastack:selfRule')) { + } else if (this.isShow('dataStack:selfRule')) { this.activeName = "separate-rule" - } else if (this.isShow('VIDEOCAMERA:camera:linkRule') || this.isShow('VIDEOCAMERA:datastack:linkRule')) { - this.activeName = "linkage-rule" - } else if (this.isShow('VIDEOCAMERA:camera:resourceCalc') || this.isShow('VIDEOCAMERA:datastack:resourceCalc')) { - this.activeName = "poll-setting" } } + this.TreeDataPool.readonly = true; this.TreeDataPool.gbReadonly = true; this.TreeDataPool.multiple = false; @@ -170,22 +170,15 @@ this.TreeDataPool.clean(); }); - let _this = this + let _this = this; + _this.PollData.statisticTaskInfo(); this.intervalTimer = setInterval(() => { _this.PollData.statisticTaskInfo(); }, 10000) }, methods: { isShow(authority) { - if (this.isAdmin) { - return true; - } else if (this.buttonAuthority.indexOf("," + authority + ",") > -1) { - return true; - } else if ("videoCamera:pollSetting" === authority) { - return true; - } else { - return false; - } + return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1 }, handAddDevice(node) { let _this = this; @@ -229,8 +222,9 @@ <style lang="scss"> .s-video-manage { width: 100%; + min-width: 1599px; height: 100%; - float: right; + float: left; box-sizing: border-box; .el-tabs--border-card { box-shadow: none; @@ -248,8 +242,8 @@ .el-tabs--border-card { height: 100%; width: 100%; - &.video-tab{ - &>.el-tabs__header{ + &.video-tab { + & > .el-tabs__header { //position: fixed; //position: absolute; //top:0; @@ -288,11 +282,16 @@ .video-tab > .el-tabs__content { width: 100%; //margin-top: 52px; - height: calc(100% - 78px); + height: calc(100% - 36px); box-sizing: border-box; overflow-y: auto; padding: 0; } + .video-tab > .el-tabs__content::-webkit-scrollbar { + /*婊氬姩鏉℃暣浣撴牱寮�*/ + width: 6px; /*楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄*/ + height: 6px; + } .el-tab-pane { width: 100%; //height: 100%; -- Gitblit v1.8.0