Sfoglia il codice sorgente

视频联动修改

qinhouyu 2 anni fa
parent
commit
b92ba99822
1 ha cambiato i file con 57 aggiunte e 12 eliminazioni
  1. 57 12
      src/views/eventdetailsdialog.vue

+ 57 - 12
src/views/eventdetailsdialog.vue

@@ -1172,6 +1172,7 @@ export default {
       eventDescription: null, //审核意见
       uploadAttachList: [], //审核上传图片回显集合
       attachExamine: [], //审核图片集合
+      centermonitorTCamera:null,
       defaultProps: {
         children: 'children',
         label: 'label'
@@ -1584,18 +1585,56 @@ export default {
       this.$refs.bottomMenu.showChangChild = false;
     },
     initByCameras() {
-      const params = Object.assign({})
-      params.longitude = this.longitude;
-      params.latitude = this.latitude;
-      params.type = '8'
-      initByCameras(params).then(res => {
-        this.$refs.TVWall.showTVWall1(this.longitude, this.latitude, res.data);
-        this.$refs.bottomMenu.showMeasure = false
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-      })
-
+      // const params = Object.assign({})
+      // params.longitude = this.longitude;
+      // params.latitude = this.latitude;
+      // params.type = '8'
+      // initByCameras(params).then(res => {
+      //   this.$refs.TVWall.showTVWall1(this.longitude, this.latitude, res.data);
+      //   this.$refs.bottomMenu.showMeasure = false
+      //   this.$refs.bottomMenu.showChild = false
+      //   this.$refs.bottomMenu.showBanChild = false
+      //   this.$refs.bottomMenu.showChangChild = false
+      // })
+      let that = this
+      if(that.centermonitorTCamera == null){
+        this.$message.warning("当前事件无绑定摄像头")
+        return
+      }
+      let tvListJson = [{
+        "switchTab": "2",
+        "treeLabels": [{
+          "id": null,
+          "labelCode": "999",
+          "labelName": "电视墙",
+          "cameraType": null,
+          "parentLabelCode": ""
+        },
+          {
+            "id": "spcamera00010",
+            "labelCode": that.centermonitorTCamera.cameraCode,
+            "labelName": that.centermonitorTCamera.cameraName,
+            "cameraType": that.centermonitorTCamera.cameraType,
+            "parentLabelCode": "999"
+          }
+        ],
+        "labelChannels": [{
+          "labelCode": that.centermonitorTCamera.cameraCode,
+          "channelDates": [{
+            "channelCode": that.centermonitorTCamera.cameraCode,
+            "channelName": that.centermonitorTCamera.cameraName,
+            "channelSn": null,
+            "cameraType": that.centermonitorTCamera.cameraType,
+            "online": "1",
+            "cameraCode": null
+          }]
+        }]
+      }]
+      this.$refs.TVWall.showTVWall1(this.longitude, this.latitude, tvListJson);
+      this.$refs.bottomMenu.showMeasure = false
+      this.$refs.bottomMenu.showChild = false
+      this.$refs.bottomMenu.showBanChild = false
+      this.$refs.bottomMenu.showChangChild = false
     },
     showUpdateYjYuAn() {
       listYuAn().then(res => {
@@ -2364,6 +2403,7 @@ export default {
       this.eventLogList = []
     },
     showEventDialog(eventCode) {
+      this.centermonitorTCamera = null
       this.fireControlViewList()
       this.eventCode = eventCode
       let that = this
@@ -2423,6 +2463,9 @@ export default {
         markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
           that.cameraCode = res.data.centermonitorTCamera.id;
+          that.centermonitorTCamera = res.data.centermonitorTCamera;
+          console.log('that.centermonitorTCamera')
+          console.log(that.centermonitorTCamera)
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
@@ -2464,6 +2507,7 @@ export default {
     refreshEvent(eventCode) {
       this.eventCode = eventCode
       let that = this
+      that.centermonitorTCamera = null
       //刷新--事件详情
       getEventDetail({
         eventCode: eventCode
@@ -2520,6 +2564,7 @@ export default {
 
         markersMapList.push(markersMap)
         if (res.data.centermonitorTCamera != null) {
+          that.centermonitorTCamera = res.data.centermonitorTCamera;
           let markersMap = {
             lng: 124.59,
             lat: 43.02,