ZZJ
2022-06-23 f7f0e44c4be8eb0e77fd310296c3b43bde21e4f9
新增联动场景
2个文件已修改
17 ■■■■ 已修改文件
src/main.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hashrate/CameraManage/CameraRules/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts
@@ -8,7 +8,7 @@
import numeral from 'numeral';
import preview from "vue-photo-preview";
import "vue-photo-preview/dist/skin.css";
import * as VueWindow from "@hscmap/vue-window";
//import * as VueWindow from "@hscmap/vue-window";
import VueAwesomeSwiper from "vue-awesome-swiper";
import ToggleButton from 'vue-js-toggle-button';
@@ -24,7 +24,7 @@
Vue.config.productionTip = false;
Vue.mixin(Mixin);
Vue.use(preview);
Vue.use(VueWindow);
//Vue.use(VueWindow);
Vue.use(VueAwesomeSwiper as any);
Vue.use(ToggleButton)
Vue.use(ImageShow)
src/views/hashrate/CameraManage/CameraRules/index.vue
@@ -178,7 +178,9 @@
          <!-- 摄像机 -->
          <LinkageCameraBox
            :cameras="item.cameraIds"
            @addLinkageRule="addLinkageRule(item.cameraIds)"
            @addLinkageRule="
              addLinkageRule(item.cameraIds, item.camera_polygons)
            "
          ></LinkageCameraBox>
          <div class="Anchor" :id="'linkage_camera' + index"></div>
@@ -355,6 +357,7 @@
      },
      showNewLinkage: false,
      newLinkageIds: [],
      newLinkPlg: null,
      // swiperOption: {
      //   slidesPerView: 5,
@@ -807,7 +810,9 @@
      this.showAddBox = true;
    },
    addLinkageRule(ids) {
    addLinkageRule(ids, camera_polygons) {
      console.log(7979);
      console.log(camera_polygons);
      if (ids.length < 2) {
        this.$message({
          message: "请至少选择两台摄像机",
@@ -818,6 +823,7 @@
      this.newLinkageIds = ids;
      this.ruleType = "linkage";
      this.showAddBox = true;
      this.newLinkPlg = camera_polygons;
    },
    //回填新的独立场景
@@ -835,6 +841,9 @@
          });
        } else {
          //联动场景
          if (this.newLinkPlg) {
            newRule.data.camera_polygons = this.newLinkPlg;
          }
          newRule.data.cameraIds = this.newLinkageIds;
          this.linkageRule.push(newRule.data);
          this.$nextTick(() => {