ソースを参照

Merge remote-tracking branch 'origin/visu_environment_01_siping_2.5d' into visu_environment_01_siping_2.5d

王通 1 年間 前
コミット
e9c2c76327
2 ファイル変更67 行追加12 行削除
  1. 12 1
      src/views/bigdata/chart-gridStaff.vue
  2. 55 11
      src/views/eventdetailsdialog.vue

+ 12 - 1
src/views/bigdata/chart-gridStaff.vue

@@ -71,7 +71,18 @@
         var option = {
           backgroundColor: '#222',
           tooltip: {
-            trigger: 'item',
+            trigger: 'axis',
+            formatter: function(params) {
+              var result = params[0].name + "<br>";
+              params.forEach(function(item) {
+                if (item.value) {
+                  result += item.marker + " " + item.value + "%</br>";
+                } else {
+                  result += item.marker + " </br>";
+                }
+              });
+              return result;
+            },
             textStyle: {
               fontSize: 16,
               color: '#fff',

+ 55 - 11
src/views/eventdetailsdialog.vue

@@ -1131,6 +1131,7 @@ export default {
   data() {
     return {
       isLoading: false,
+      centermonitorTCamera:null,
       showFindUserByDept: false, //责任人选择框
       //海康
       cameraTitle: '',
@@ -1575,17 +1576,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() {
@@ -2347,6 +2387,7 @@ export default {
       this.eventLogList = []
     },
     showEventDialog(eventCode) {
+      this.centermonitorTCamera = null
       this.fireControlViewList()
       this.eventCode = eventCode
       let that = this
@@ -2406,6 +2447,7 @@ export default {
         markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
           that.cameraCode = res.data.centermonitorTCamera.id;
+          that.centermonitorTCamera = res.data.centermonitorTCamera;
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
@@ -2446,6 +2488,7 @@ export default {
     },
     refreshEvent(eventCode) {
       this.eventCode = eventCode
+      this.centermonitorTCamera = null
       let that = this
       //刷新--事件详情
       getEventDetail({
@@ -2503,6 +2546,7 @@ export default {
 
         markersMapList.push(markersMap)
         if (res.data.centermonitorTCamera != null) {
+          that.centermonitorTCamera = res.data.centermonitorTCamera;
           let markersMap = {
             lng: 124.59,
             lat: 43.02,