zhangzengfei
2021-01-28 0f70bb5e95342e1c88e16b4c12609cd45dd1b103
add bhomebus api
10个文件已修改
122 ■■■■ 已修改文件
src/api/area.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/camera.ts 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/treeMenu/jsTree/tree.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/components/CameraInfo.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/components/LinkageRule.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/components/SceneRule.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/index/App.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/index/VideoManage.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/gb28181/index/api.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/area.ts
@@ -11,7 +11,7 @@
export const getGB28181CameraTree = (query: any) => {
  return request({
    url: "/data/api-v/area/gb28181Tree",
    url: "/data/api-v/gb28181/tree",
    method: "get",
    params: query
  });
@@ -51,7 +51,7 @@
export const refreshGB28181Tree = () => {
  return request({
    url: "/data/api-v/area/gb28181RefreshTree",
    url: "/data/api-v/gb28181/treeRefresh",
    method: "post",
  });
};
src/api/camera.ts
@@ -27,8 +27,9 @@
export const getCameraInfo = (id: string) => {
  return request({
    url: "/data/api-v/camera/show/" + id,
    method: "get"
    url: "/data/api-v/camera/show",
    method: "get",
    params: { cid: id }
  });
};
@@ -156,7 +157,7 @@
  })
}
//删除(展区)
export const delArea = (data:any) => {
export const delArea = (data: any) => {
  return request({
    url: "/data/api-v/acp/delete",
    method: "post",
@@ -165,7 +166,7 @@
}
//保存区域编辑
export const saveAreaInfo = (data:any) => {
export const saveAreaInfo = (data: any) => {
  return request({
    url: "/data/api-v/acp/save",
    method: "post",
@@ -174,7 +175,7 @@
}
//获取摄像机的坐标标定信息
export const getCameraMarks = (query:any) => {
export const getCameraMarks = (query: any) => {
  return request({
    url: '/data/api-v/camera/coord',
    method: "get",
@@ -183,7 +184,7 @@
}
//更新摄像机的坐标标定信息
export const updateCameraMarks = (data:any) => {
export const updateCameraMarks = (data: any) => {
  return request({
    url: '/data/api-v/camera/updateCoord',
    method: 'post',
@@ -192,7 +193,7 @@
}
//保存摄像机分组
export const saveCameraGroupInfo = (data:any) => {
export const saveCameraGroupInfo = (data: any) => {
  return request({
    url: '/data/api-v/camera/group/save',
    method: 'post',
@@ -208,9 +209,9 @@
  })
}
export const delCameraGroup = (groupId:string)=>{
export const delCameraGroup = (groupId: string) => {
  return request({
    url:'/data/api-v/camera/group/del?groupId='+groupId,
    url: '/data/api-v/camera/group/del?groupId=' + groupId,
    method: 'post'
  })
}
src/api/system.ts
@@ -24,7 +24,7 @@
export const getGB28181Config = () => {
  return request({
    url: "/data/api-v/sysset/gb28181ConfigShow",
    url: "/data/api-v/gb28181/configShow",
    method: "get"
  });
};
@@ -47,7 +47,7 @@
export const saveGB28181Config = (query: any) => {
  return request({
    url: "/data/api-v/sysset/gb28181ConfEdit",
    url: "/data/api-v/gb28181/configEdit",
    method: "post",
    data: query
  });
src/components/treeMenu/jsTree/tree.vue
@@ -62,7 +62,7 @@
    childrenFieldName: { type: String, default: "children" },
    itemEvents: {
      type: Object,
      default: function() {
      default: function () {
        return {};
      }
    },
@@ -152,29 +152,29 @@
        item
      );
      let self = this;
      node.addBefore = function(data, selectedNode) {
      node.addBefore = function (data, selectedNode) {
        let newItem = self.initializeDataItem(data);
        let index = selectedNode.parentItem.findIndex(t => t.id === node.id);
        selectedNode.parentItem.splice(index, 0, newItem);
      };
      node.addAfter = function(data, selectedNode) {
      node.addAfter = function (data, selectedNode) {
        let newItem = self.initializeDataItem(data);
        let index =
          selectedNode.parentItem.findIndex(t => t.id === node.id) + 1;
        selectedNode.parentItem.splice(index, 0, newItem);
      };
      node.addChild = function(data) {
      node.addChild = function (data) {
        let newItem = self.initializeDataItem(data);
        node.opened = true;
        node[self.childrenFieldName].push(newItem);
      };
      node.openChildren = function() {
      node.openChildren = function () {
        node.opened = true;
        self.handleRecursionNodeChildren(node, node => {
          node.opened = true;
        });
      };
      node.closeChildren = function() {
      node.closeChildren = function () {
        node.opened = false;
        self.handleRecursionNodeChildren(node, node => {
          node.opened = false;
@@ -229,7 +229,7 @@
      oriNode.model.selected = true;
    },
    handleBatchSelectItems(oriNode, oriItem) {
      console.log('oriNode, oriItem',oriNode, oriItem)
      console.log('oriNode, oriItem', oriNode, oriItem)
      this.handleRecursionNodeChilds(oriNode, node => {
        if (!!node.model) {
          if (!!node.model.disabled) return;
@@ -335,7 +335,6 @@
    this.initializeData(this.data);
  },
  mounted() {
    debugger
    if (this.async) {
      this.$set(this.data, 0, this.initializeLoading());
      this.handleAsyncLoad(this.data, this);
src/pages/cameraAccess/components/CameraInfo.vue
@@ -258,6 +258,7 @@
    document.addEventListener("visibilitychange", () => {
      this.visibilitychange();
    });
    debugger
    this.getSounds();
    this.eventAudio.addEventListener("ended", () => {
src/pages/cameraAccess/components/LinkageRule.vue
@@ -17,8 +17,8 @@
          />
        </div>
      </div>
    </div> -->
    <div class="top" >
    </div>-->
    <div class="top">
      <p class="task-css">
        <b style="font-size: 14px; line-height: 18px;">场景</b>
      </p>
@@ -36,7 +36,7 @@
            :ShowLocalVedio="cameraType === 'dataStack'"
            v-if="showSysInfo"
            style="margin-top:-10px"
          /> -->
          />-->
        </div>
      </div>
    </div>
@@ -237,9 +237,9 @@
      }
      this.swipercanvasData = swipers;
    },
    refresh(url,id) {
      this.swipercanvasData.forEach(data=>{
        if(data.cameraId == id){
    refresh(url, id) {
      this.swipercanvasData.forEach(data => {
        if (data.cameraId == id) {
          data.baseImg = url;
        }
      })
@@ -305,9 +305,9 @@
  //height: 100%;
  //padding: 13px 0 20px;
  position: relative;
  .devide{
  .devide {
    height: 10px;
    background: #E9EBF2;
    background: #e9ebf2;
  }
  .top {
    width: 100%;
@@ -405,14 +405,14 @@
      float: right;
      width: 54%;
      height: 144px;
      .card-box{
        width: 54%!important;
      .card-box {
        width: 54% !important;
      }
      .eCharts-box{
      .eCharts-box {
        width: 45%;
        canvas{
          width: 98%!important;
        }
        canvas {
          width: 98% !important;
        }
      }
    }
    .task-css {
@@ -577,7 +577,6 @@
  .add-btn:hover {
    color: #2249b4;
  }
}
</style>
<style lang="scss" scoped>
src/pages/cameraAccess/components/SceneRule.vue
@@ -242,11 +242,11 @@
    }
  },
  methods: {
    getSoundById(id){
      if(id){
        let sound = this.soundList.find(item=>item.id == id);
    getSoundById(id) {
      if (id) {
        let sound = this.soundList.find(item => item.id == id);
        return sound.name
      }else{
      } else {
        return ''
      }
    },
@@ -439,7 +439,7 @@
        .catch(() => { });
    },
    cellStyle(obj) {
      if (obj.column.label == '策略'||obj.column.label == '事件声音') {
      if (obj.column.label == '策略' || obj.column.label == '事件声音') {
        return 'text-align:left;padding-left:8px;'
      }
    }
src/pages/cameraAccess/index/App.vue
@@ -25,17 +25,17 @@
    RightSide
  },
  computed: {
    app () {
    app() {
      return this.getUrlKey() !== null ? "DataStack" : "Camera"
    }
  },
  data () {
  data() {
    return {
      leftWith: 0,
      screenHeight: 0
    }
  },
  mounted () {
  mounted() {
    this.screenHeight = document.documentElement.clientHeight;
    window.onresize = () => {
      return (() => {
@@ -47,10 +47,10 @@
    this.TreeDataPool.readonly = false;
    this.TreeDataPool.gbReadonly = false;
    this.DataStackPool.readonly = false;
    debugger
  },
  methods: {
    getUrlKey () {
    getUrlKey() {
      let name = "dataStack"
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
    }
@@ -134,7 +134,7 @@
  }
  .resize-bar:hover ~ .resize-line::after,
  .resize-bar:active ~ .resize-line::after {
    content: '';
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
src/pages/cameraAccess/index/VideoManage.vue
@@ -65,7 +65,7 @@
    DataStackInfo,
    SeparateRules,
    LinkageRule  },
  data () {
  data() {
    return {
      activeName: "camera-info",
      buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
@@ -73,7 +73,7 @@
    };
  },
  computed: {
    isAdmin () {
    isAdmin() {
      if (
        sessionStorage.getItem("userInfo") &&
        sessionStorage.getItem("userInfo") !== ""
@@ -84,7 +84,7 @@
      return false;
    },
    firstLabeName () {
    firstLabeName() {
      return this.TreeDataPool.treeActiveName === "camera" ? "摄像机信息" : "数据栈信息"
    }
  },
@@ -106,7 +106,7 @@
      }
    },
    "TreeDataPool.selectedNodes": {
      handler (nodes) {
      handler(nodes) {
        if (this.activeName == "linkage-rule") {
          this.$refs.linkRule.initCameraData();
        }
@@ -114,7 +114,7 @@
      deep: true
    },
    "DataStackPool.selectedDir": {
      handler (node, oldNode) {
      handler(node, oldNode) {
        if (this.TreeDataPool.treeActiveName !== 'dataStack') {
          return
        }
@@ -130,7 +130,7 @@
    },
  },
  created () {
  created() {
    if (this.TreeDataPool.treeActiveName == 'camera') {
      if (this.isShow('cameraAccess:cameraInfo')) {
        this.activeName = "camera-info"
@@ -154,11 +154,11 @@
    this.selectedNodes = [];
    this.VideoManageData.init();
  },
  beforeDestroy () {
  beforeDestroy() {
    clearInterval(this.intervalTimer);
    //this.TreeDataPool.treeActiveName = "camera";
  },
  mounted () {
  mounted() {
    this.$nextTick(() => {
      bus.$on("addCameraOnTree", node => {
        this.handAddDevice(node);
@@ -176,24 +176,24 @@
    }, 10000)
  },
  methods: {
    isShow (authority) {
    isShow(authority) {
      return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
    },
    handAddDevice (node) {
    handAddDevice(node) {
      let _this = this;
      setTimeout(() => {
        _this.$refs.cameraInfo.addDevice(node);
        _this.activeName = "camera-info";
      }, 100);
    },
    handAddDIr (node) {
    handAddDIr(node) {
      let _this = this;
      setTimeout(() => {
        _this.$refs.dataStackInfo.addDir(node);
        _this.activeName = "camera-info";
      }, 100);
    },
    handleClick (tab, event) {
    handleClick(tab, event) {
      this.TreeDataPool.multiple = tab.name === "linkage-rule";
      if (tab.name === "camera-info") {
        if (this.TreeDataPool.treeActiveName == 'camera') {
src/pages/gb28181/index/api.ts
@@ -2,7 +2,7 @@
export const getGB28181Config = () => {
  return request({
    url: "/data/api-v/sysset/gb28181ConfigShow",
    url: "/data/api-v/gb28181/configShow",
    method: "get"
  });
};
@@ -10,7 +10,7 @@
export const saveGB28181Config = (query: any) => {
  return request({
    url: "/data/api-v/sysset/gb28181ConfEdit",
    url: "/data/api-v/gb28181/configEdit",
    method: "post",
    data: query
  });