王通 преди 1 година
родител
ревизия
dcb9fa1ddf
променени са 4 файла, в които са добавени 233 реда и са изтрити 16 реда
  1. 8 2
      src/components/TVWall.vue
  2. 218 7
      src/views/eventdetailsdialog.vue
  3. 4 4
      src/views/firespread.vue
  4. 3 3
      src/views/monitor.vue

+ 8 - 2
src/components/TVWall.vue

@@ -387,7 +387,7 @@ export default {
           'ctrlCode': 'ctrl1',
           'ctrlProperty': {
             'displayMode': 1,
-            'splitNum': 1,
+            'splitNum': 4,
             'channelList': [
               {
                 'channelId': ''
@@ -398,6 +398,9 @@ export default {
           'domId': 'dom1'
         }
       ]
+      if(array1 != undefined && array1 != null ){
+        params.ctrlProperty.splitNum = (array1.length == 1 ? 1 : 4)
+      }
       this.setPos()
       this.customizeTree(tvListJson);
       _this.ws.createCtrl(params);
@@ -532,7 +535,7 @@ export default {
           'ctrlCode': 'ctrl1',
           'ctrlProperty': {
             'displayMode': 1,
-            'splitNum': 1,
+            'splitNum': 4,
             'channelList': [
               {
                 'channelId': ''
@@ -543,6 +546,9 @@ export default {
           'domId': 'dom1'
         }
       ]
+      if (bfArray != undefined && bfArray != null) {
+        params[0].ctrlProperty.splitNum = (bfArray.length == 1 ? 1 : 4)
+      }
       this.setPos()
       this.customizeTree(tvListJson);
       let length = tvListJson[0].treeLabels.length > 4 ? 5 : tvListJson[0].treeLabels.length;

+ 218 - 7
src/views/eventdetailsdialog.vue

@@ -74,7 +74,7 @@
                    </div> -->
                 <!-- 底部工具栏end -->
                 <div class="fire-m" style="bottom:5rem">
-                  <el-button size="small" icon="el-icon-s-grid" @click="showTVWallDiaLog()">视频联动</el-button>
+                  <el-button size="small" icon="el-icon-s-grid" @click="showTVWallDiaLog()" v-show="eventType==1">视频联动</el-button>
                   <el-button size="small" icon="el-icon-upload" @click="showheatPlotting()" v-show="eventType==1">火灾蔓延
                   </el-button>
                 </div>
@@ -175,7 +175,7 @@
                             </div>
                             <div class="z-info-btm-input">
                               <el-input type="textarea" v-model="eventLog" :autosize="{ minRows: 7, maxRows: 7}"
-                                        placeholder="请输入反馈信息">
+                                        :maxlength='500'     placeholder="请输入反馈信息">
                               </el-input>
                               <div class="z-info-btm-input-btn" v-if="eventStatusValue=='forest_event_status_1'">
                                 <div style="text-align:left">
@@ -283,7 +283,7 @@
                class="top-dialog" @close="cancelEventConfirm()">
       <el-form label-width="80px">
         <el-form-item label="火灾半径" v-if="eventStatusButton=='qs'&&eventTypeXl==null">
-          <el-input type="number" v-model="sendHuoZaiBanJing" placeholder="请输入火灾半径" />
+          <el-input type="number" v-model="sendHuoZaiBanJing" :maxlength='50'  placeholder="请输入火灾半径" />
         </el-form-item>
         <el-form-item
           v-if="eventStatusButton=='wb'||eventStatusButton=='qs'||eventStatusButton=='cf'||eventStatusButton=='ld'"
@@ -309,11 +309,11 @@
           </el-select>
         </el-form-item>
         <el-form-item label="联动标题" v-if="eventStatusButton=='ld'">
-          <el-input v-model="sendTaskTitle" placeholder="请输入联动标题" />
+          <el-input v-model="sendTaskTitle" :maxlength='50'  placeholder="请输入联动标题" />
         </el-form-item>
         <el-form-item label="联动内容" v-if="eventStatusButton=='ld'">
           <el-input type="textarea" v-model="sendTaskContent"  :maxlength='500' :autosize="{ minRows: 7, maxRows: 7}"
-                    placeholder="请输入联动内容">
+                    :maxlength='500'    placeholder="请输入联动内容">
           </el-input>
         </el-form-item>
         <el-form-item label="联动部门" v-if="eventStatusButton=='ld'">
@@ -1097,6 +1097,7 @@ import {
   selectConfigKey
 } from "@/api/system/config";
 import Cookies from 'js-cookie';
+import { getResource,getResourcePoint, } from '@/api/datacenter'
 export default {
   dicts: ['task_source'],
   watch: {
@@ -1625,7 +1626,7 @@ export default {
           type: type,
           radius: this.radius
         }
-        if (type != 'sxt') {
+        if (type != 'sxt'&&this.eventType==1) {
           fireControlViewPoint(param).then(res => {
             if (res.data != null && res.data.pointList.length > 0) {
               this.resourcesListCheck.push(type)
@@ -1682,11 +1683,183 @@ export default {
               }, 1000)
             }
           })
+        }else if(this.eventType!==1)
+        {
+          getResourcePoint(type,undefined).then((res) => {
+            this.resourcesListCheck.push(type)
+            const markersList=[]
+            if (res.data.resourceList != null && res.data.resourceList.length > 0) {
+              for (let i = 0; i < res.data.resourceList.length; i++) {
+                let markersMap = {
+                  lng: 124.59,
+                  lat: 43.02,
+                  icon: "marker",
+                  bindPopupHtml: "",
+                  click: "",
+                  keepBindPopup: false,
+                  isAggregation: false,
+                };
+                markersList.push(
+                  this.getMarkersMap(
+                    type,
+                    markersMap,
+                    res.data.resourceList[i]
+                  )
+                );
+                // that.markersList.push(markersMap)
+              }
+            }
+            console.log("this.markersList",markersList)
+            setTimeout(() => {
+              this.$refs.supermapDialog.setMarkersByType(markersList, type)
+            }, 3000);
+          });
         } else {
           this.listResourceByWz(type);
         }
       }
     },
+    getMarkersMap(resourceTable, markersMap, item) {
+      if (resourceTable == "centerdata_t_environment_key_enterprise") {
+        //重点企业
+        markersMap.icon = "sj-icon-map-centerdata-t-environment-key-enterprise";
+        markersMap.lng = item.longitude ? item.longitude : "";
+        markersMap.lat = item.latitude ? item.latitude : "";
+        markersMap.click = "sewageOutletClick";
+        markersMap.parameter = item;
+        markersMap.bindPopupHtml =
+          '<div class="map-tip">' +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>经纬度:" +
+          (item.longitude ? item.longitude : "") +
+          "," +
+          (item.latitude ? item.latitude : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>企业名称:" +
+          (item.name ? item.name : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>地址:" +
+          (item.address ? item.address : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>企业联系人:" +
+          (item.contacts ? item.contacts : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>联系电话:" +
+          (item.contacts_phone ? item.contacts_phone : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span></div>";
+      } else if (resourceTable == "centerdata_t_environment_source_pollution") {
+        //污染源
+        markersMap.icon =
+          "sj-icon-map-centerdata-t-environment-source-pollution";
+        markersMap.lng = item.longitude ? item.longitude : "";
+        markersMap.lat = item.latitude ? item.latitude : "";
+        markersMap.click = "sewageOutletClick";
+        markersMap.parameter = item;
+        markersMap.bindPopupHtml =
+          '<div class="map-tip">' +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>经纬度:" +
+          (item.longitude ? item.longitude : "") +
+          "," +
+          (item.latitude ? item.latitude : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>污染源名称:" +
+          (item.name ? item.name : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>地址:" +
+          (item.address ? item.address : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          "</div>";
+      } else if (resourceTable == "centerdata_t_environment_sewage_outlet") {
+        //排污口
+        markersMap.icon = "sj-icon-map-centerdata_t_environment_sewage_outlet";
+        markersMap.lng = item.longitude ? item.longitude : "";
+        markersMap.lat = item.latitude ? item.latitude : "";
+        markersMap.click = "sewageOutletClick";
+        markersMap.parameter = item;
+        markersMap.bindPopupHtml =
+          '<div class="map-tip">' +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>经纬度:" +
+          (item.longitude ? item.longitude : "") +
+          "," +
+          (item.latitude ? item.latitude : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>排污口名称:" +
+          (item.name ? item.name : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          "                  <h4>地址:" +
+          (item.address ? item.address : "") +
+          "</h4>" +
+          "                </div>" +
+          "                </div>" +
+          "                </span>" +
+          "<span>" +
+          "</div>";
+      }
+      return markersMap;
+    },
     listResourceByWz(type) {
       if (this.resourcesListCheck.indexOf(type) > -1) {
         this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type), 1)
@@ -2328,7 +2501,7 @@ export default {
       this.eventLogList = []
     },
     showEventDialog(eventCode) {
-      this.fireControlViewList()
+      this.resourcesList = [];
       this.eventCode = eventCode
       let that = this
       //获取事件详情
@@ -2416,6 +2589,13 @@ export default {
           markersMap.lat = res.data.centermonitorTCamera.latitude
           markersMapList.push(markersMap)
         }
+        if(that.eventType==1)
+        {
+          that.fireControlViewList()
+        }else
+        {
+          that.getResource()
+        }
         setTimeout(() => {
           that.$refs.supermapDialog.dynamicPlotting() //弹出动态绘制窗口,防止截图位置改变
           that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
@@ -2531,6 +2711,37 @@ export default {
         this.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo //应急预案
       })
     },
+    getResource() {
+      let that = this;
+      //获取左侧菜单列表
+      getResource().then((res) => {
+       // that.resourcesList = res.data;
+        //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
+        res.data.forEach(function (data, index) {
+          let icon ='sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
+
+          let obj = {};
+          let resourceName = data.name.replaceAll("(个)", "");
+          obj.resourceName = resourceName;
+          obj.type = data.type;
+          obj.count = data.num;
+          obj.icon = icon;
+          that.resourcesList.push(obj)
+          that.$set(
+            that.resourcesList[index],
+            "icon",
+            icon
+          );
+          that.$set(that.resourcesList[index], "bg", getIconBg(icon));
+
+          // if(index < 5){
+          //   // that.fireControlViewPoint(data.type, 'undefined');
+          //   that.indentleftSetMarkers(data.type, '所有');
+          // }
+        });
+        //数据自动落点结束
+      });
+    },
     // 页面元素转图片
     toImage() {
       this.$message.success(`正在上传!请稍后...`)

+ 4 - 4
src/views/firespread.vue

@@ -164,7 +164,7 @@
                             </div>
                             <div class="z-info-btm-input">
                               <el-input type="textarea" v-model="eventLog" :autosize="{ minRows: 7, maxRows: 7}"
-                                        placeholder="请输入反馈信息">
+                                        :maxlength='500'    placeholder="请输入反馈信息">
                               </el-input>
                               <div class="z-info-btm-input-btn" v-if="eventStatusValue=='forest_event_status_1'">
                                 <div style="text-align:left">
@@ -935,7 +935,7 @@
                class="top-dialog" @close="cancelEventConfirm()">
       <el-form label-width="80px">
         <el-form-item label="火灾半径" v-if="eventStatusButton=='qs'&&eventTypeXl==null">
-          <el-input type="number" v-model="sendHuoZaiBanJing" placeholder="请输入火灾半径" />
+          <el-input type="number" v-model="sendHuoZaiBanJing"  :maxlength='50' placeholder="请输入火灾半径" />
         </el-form-item>
         <el-form-item
           v-if="eventStatusButton=='wb'||eventStatusButton=='qs'||eventStatusButton=='cf'||eventStatusButton=='ld'"
@@ -961,11 +961,11 @@
           </el-select>
         </el-form-item>
         <el-form-item label="联动标题" v-if="eventStatusButton=='ld'">
-          <el-input v-model="sendTaskTitle" placeholder="请输入联动标题" />
+          <el-input v-model="sendTaskTitle" :maxlength='50'  placeholder="请输入联动标题" />
         </el-form-item>
         <el-form-item label="联动内容" v-if="eventStatusButton=='ld'">
           <el-input type="textarea" v-model="sendTaskContent" :autosize="{ minRows: 7, maxRows: 7}"
-                    placeholder="请输入联动内容">
+                    :maxlength='500'    placeholder="请输入联动内容">
           </el-input>
         </el-form-item>
         <el-form-item label="联动部门" v-if="eventStatusButton=='ld'">

+ 3 - 3
src/views/monitor.vue

@@ -270,8 +270,8 @@ export default {
       this.getTreeselect();
       this.deptId = Cookies.get("deptId");
       // this.getSensorListByDeptIds()
-      this.getMonitorDeviceAndDataLists(null);
-       this.getDlblistBydeptIds(null);
+      this.getMonitorDeviceAndDataLists();
+       this.getDlblistBydeptIds(this.deptId);
       // this.chuanSet();
       this.selectDeviceType(-1);
     }, 2000)
@@ -900,7 +900,7 @@ export default {
         that.getSensorListByDeptId()
         that.getMonitorDeviceAndDataList(data.id);
       } else if (that.localMark == "la") {
-         that.getDlblistBydeptId();
+         that.getDlblistBydeptId(this.deptId);
       }
     },
     sheClick() {