| | |
| | | <template> |
| | | <div class="s-video-manage"> |
| | | <el-tabs class="video-tab" 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> --> |
| | |
| | | <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> --> |
| | |
| | | <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> |
| | |
| | | // import fTemplate from "@/components/common/fTemplate"; |
| | | // import localSeparate from "@/components/camera/localSeparate"; |
| | | |
| | | //import bus from "@/main"; |
| | | import bus from "@/plugin/bus"; |
| | | //import TreeDataPool from "@/Pool/TreeData"; |
| | | |
| | | export default { |
| | |
| | | CameraInfo, |
| | | DataStackInfo, |
| | | SeparateRules, |
| | | LinkageRule }, |
| | | LinkageRule |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: "camera-info", |
| | |
| | | let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; |
| | | return loginName === "superadmin" || loginName === "basic"; |
| | | } |
| | | |
| | | return false; |
| | | }, |
| | | firstLabeName() { |
| | |
| | | }, |
| | | "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); |
| | |
| | | }) |
| | | }, |
| | | 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; |
| | |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | // bus.$on("addCameraOnTree", node => { |
| | | // this.handAddDevice(node); |
| | | // }); |
| | | // bus.$on("addDirOnTree", node => { |
| | | // this.handAddDIr(node); |
| | | // }); |
| | | // this.TreeDataPool.clean(); |
| | | bus.$on("addCameraOnTree", node => { |
| | | this.handAddDevice(node); |
| | | }); |
| | | bus.$on("addDirOnTree", node => { |
| | | this.handAddDIr(node); |
| | | }); |
| | | 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; |
| | |
| | | <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; |
| | |
| | | .el-tabs--border-card { |
| | | height: 100%; |
| | | width: 100%; |
| | | &.video-tab{ |
| | | &>.el-tabs__header{ |
| | | position: fixed; |
| | | top:0; |
| | | |
| | | width:100%; |
| | | z-index:999; |
| | | &.video-tab { |
| | | & > .el-tabs__header { |
| | | //position: fixed; |
| | | //position: absolute; |
| | | //top:0; |
| | | //left: 0; |
| | | height: 54px; |
| | | overflow-y: hidden; |
| | | } |
| | | } |
| | | .el-tabs__header { |
| | | |
| | | .is-active { |
| | | color: #3d68e1 !important; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | .video-tab>.el-tabs__content { |
| | | .video-tab > .el-tabs__content { |
| | | width: 100%; |
| | | margin-top: 52px; |
| | | //height: calc(100% - 52px); |
| | | //margin-top: 52px; |
| | | height: calc(100% - 36px); |
| | | box-sizing: border-box; |
| | | padding: 13px 0; |
| | | overflow-y: auto; |
| | | padding: 0; |
| | | } |
| | | .video-tab > .el-tabs__content::-webkit-scrollbar { |
| | | /*滚动条整体样式*/ |
| | | width: 6px; /*高宽分别对应横竖滚动条的尺寸*/ |
| | | height: 6px; |
| | | } |
| | | .el-tab-pane { |
| | | width: 100%; |
| | | height: 100%; |
| | | //height: 100%; |
| | | } |
| | | } |
| | | </style> |