zhangzengfei
2020-10-15 a2ebd9a92a375b0b6898d532d3fee782b5fd8f49
src/pages/cameraAccess/index/VideoManage.vue
@@ -10,21 +10,21 @@
      <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> -->
@@ -32,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> -->
@@ -40,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>
@@ -81,6 +81,7 @@
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
        return loginName === "superadmin" || loginName === "basic";
      }
      return false;
    },
    firstLabeName() {
@@ -131,26 +132,21 @@
  },
  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;
@@ -181,15 +177,7 @@
  },
  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;