| | |
| | | <!-- 摄像机 --> |
| | | <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(() => { |