| | |
| | | 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'; |
| | |
| | | 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) |
| | |
| | | <!-- 摄像机 --> |
| | | <LinkageCameraBox |
| | | :cameras="item.cameraIds" |
| | | @addLinkageRule="addLinkageRule(item.cameraIds)" |
| | | @addLinkageRule=" |
| | | addLinkageRule(item.cameraIds, item.camera_polygons) |
| | | " |
| | | ></LinkageCameraBox> |
| | | <div class="Anchor" :id="'linkage_camera' + index"></div> |
| | | |
| | |
| | | }, |
| | | showNewLinkage: false, |
| | | newLinkageIds: [], |
| | | newLinkPlg: null, |
| | | |
| | | // swiperOption: { |
| | | // slidesPerView: 5, |
| | |
| | | this.showAddBox = true; |
| | | }, |
| | | |
| | | addLinkageRule(ids) { |
| | | addLinkageRule(ids, camera_polygons) { |
| | | console.log(7979); |
| | | console.log(camera_polygons); |
| | | if (ids.length < 2) { |
| | | this.$message({ |
| | | message: "请至少选择两台摄像机", |
| | |
| | | this.newLinkageIds = ids; |
| | | this.ruleType = "linkage"; |
| | | this.showAddBox = true; |
| | | this.newLinkPlg = camera_polygons; |
| | | }, |
| | | |
| | | //回填新的独立场景 |
| | |
| | | }); |
| | | } else { |
| | | //联动场景 |
| | | if (this.newLinkPlg) { |
| | | newRule.data.camera_polygons = this.newLinkPlg; |
| | | } |
| | | newRule.data.cameraIds = this.newLinkageIds; |
| | | this.linkageRule.push(newRule.data); |
| | | this.$nextTick(() => { |