Browse Source

修复一大堆bug

王通 2 years ago
parent
commit
3b1670dce4

+ 1 - 1
src/api/bigdata.js

@@ -49,7 +49,7 @@ export function selectDeviceType() {
   return request({
   return request({
     url: '/center-monitor/camera/selectDeviceType',
     url: '/center-monitor/camera/selectDeviceType',
     method: 'post',
     method: 'post',
-    data:{}
+    data:{type:5}
   })
   })
 }
 }
 
 

+ 41 - 14
src/api/monitor.js

@@ -66,20 +66,20 @@ export function getSensorListByDeptId(deptId) {
     method: 'get',
     method: 'get',
   })
   })
 }
 }
-//根据部门id查询部门及部门以下的数据,没有则默认查询所有
-export function getDlblistBydeptId(deptId) {
-  return request({
-    url: '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId,
-    method: 'get',
-  })
-}
-//根据部门id查询部门及部门以下的数据,没有则默认查询所有
-export function getMonitorDeviceAndDataList(deptId) {
-  return request({
-    url: '/center-monitor/device/getMonitorDeviceAndDataList?deptId='+ deptId,
-    method: 'get',
-  })
-}
+// //根据部门id查询部门及部门以下的数据,没有则默认查询所有
+// export function getDlblistBydeptId(deptId) {
+//   return request({
+//     url: '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId,
+//     method: 'get',
+//   })
+// }
+// //根据部门id查询部门及部门以下的数据,没有则默认查询所有
+// export function getMonitorDeviceAndDataList(deptId) {
+//   return request({
+//     url: '/center-monitor/device/getMonitorDeviceAndDataList?deptId='+ deptId,
+//     method: 'get',
+//   })
+// }
 
 
 
 
 /***********************************和上面方法目前一样只是入参不一样以后可能有不一样的地方 start  所以下面三个方法暂时没用到**********************/
 /***********************************和上面方法目前一样只是入参不一样以后可能有不一样的地方 start  所以下面三个方法暂时没用到**********************/
@@ -110,3 +110,30 @@ export function getMonitorDeviceAndDataList(deptId) {
 //   })
 //   })
 // }
 // }
 /***********************************和上面方法目前一样只是入参不一样以后可能有不一样的地方 end   所以上面三个方法暂时没用到**********************/
 /***********************************和上面方法目前一样只是入参不一样以后可能有不一样的地方 end   所以上面三个方法暂时没用到**********************/
+//根据部门id查询部门及部门以下的数据,没有则默认查询所有
+export function getDlblistBydeptId(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
+  }else{
+    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId';
+  }
+  return request({
+    url: url,
+    method: 'get',
+  })
+}
+
+//根据部门id查询部门及部门以下的数据,没有则默认查询所有
+export function getMonitorDeviceAndDataList(deptId) {
+  let url = "";
+  if(deptId!=null){
+    url= '/center-monitor/device/getMonitorDeviceAndDataList?deptId=' + deptId+"&type=5";
+  }else{
+    url= '/center-monitor/device/getMonitorDeviceAndDataList?type=5';
+  }
+  return request({
+    url: url,
+    method: 'get',
+  })
+}

+ 0 - 1
src/components/supermap.vue

@@ -626,7 +626,6 @@ export default {
     /** ----------------------------------热力图  开始------------------------------------- */
     /** ----------------------------------热力图  开始------------------------------------- */
     clearM: async function(isAggregation) { //清理地图标点
     clearM: async function(isAggregation) { //清理地图标点
       if (isAggregation) {
       if (isAggregation) {
-        debugger
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
           this.isAggregationMyGroup.clearLayers()
           this.isAggregationMyGroup.clearLayers()
           this.map.removeLayer(this.isAggregationLayers)
           this.map.removeLayer(this.isAggregationLayers)

+ 2 - 2
src/router/index.js

@@ -98,7 +98,7 @@ export const constantRoutes = [
     name: 'leader',
     name: 'leader',
     component: () => import('@/views/leader'),
     component: () => import('@/views/leader'),
     meta: {
     meta: {
-      title: '巡查任务'
+      title: '环保巡查'
     }
     }
   },
   },
   {
   {
@@ -182,7 +182,7 @@ export const constantRoutesNew = [{
     name: 'leader',
     name: 'leader',
     component: () => import('@/views/leader'),
     component: () => import('@/views/leader'),
     meta: {
     meta: {
-      title: '巡查任务'
+      title: '环保巡查'
     }
     }
   },
   },
   {
   {

+ 1 - 1
src/views/eventdetailsdialog.vue

@@ -2083,7 +2083,7 @@ console.log(this.dutysystemTableData)
           })
           })
 
 
         } else if (eventStatus == 'gd') {
         } else if (eventStatus == 'gd') {
-          if(that.eventType == 1){
+          if(that.eventTypeXl == 101){
             let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
             let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
             let number = /^[+]{0,1}(\d+)$/g;    //正整数
             let number = /^[+]{0,1}(\d+)$/g;    //正整数
 
 

+ 56 - 36
src/views/firespread.vue

@@ -63,7 +63,7 @@
                 <!-- 地图 -->
                 <!-- 地图 -->
                 <supermapDialog1 ref="supermapDialog1"
                 <supermapDialog1 ref="supermapDialog1"
                                  style="position: absolute; top:0;left: 0;"
                                  style="position: absolute; top:0;left: 0;"
-                                 :mapDiv="'forestWarmSuperMap'"
+                                 :mapDiv="'forestWarmSuperMap1'"
                                  :mapSite="{zoom:16,doubleClickZoom:true,dragging:true,scrollWheelZoom:true}"
                                  :mapSite="{zoom:16,doubleClickZoom:true,dragging:true,scrollWheelZoom:true}"
                                  :codes="['9fa5']"
                                  :codes="['9fa5']"
                                  :isSideBySide="false"
                                  :isSideBySide="false"
@@ -1804,6 +1804,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      eventTypeXl:null,
       isLoading:false,
       isLoading:false,
       //海康
       //海康
       cameraTitle: '',
       cameraTitle: '',
@@ -2630,12 +2631,16 @@ export default {
         if (eventStatus == 'qs') {//签收
         if (eventStatus == 'qs') {//签收
           that.eventConfirmTitle = '事件签收'
           that.eventConfirmTitle = '事件签收'
           let param = { parentId: that.eventType }
           let param = { parentId: that.eventType }
-          await listSJfl(param).then(res => {
-            //事件类型
-            if (res.code == 200) {
-              that.eventTypeList = res.data
-            }
-          })
+          if(that.eventTypeXl != null){
+            that.sendEventType = that.eventTypeXl;
+          }else{
+            await listSJfl(param).then(res => {
+              //事件类型
+              if (res.code == 200) {
+                that.eventTypeList = res.data
+              }
+            })
+          }
           await listYuAn().then(res => {
           await listYuAn().then(res => {
             //关联预案
             //关联预案
             if (res.code == 200) {
             if (res.code == 200) {
@@ -2691,7 +2696,7 @@ export default {
         }
         }
       } else {//事件提交后台
       } else {//事件提交后台
         if (eventStatus == 'ld') {
         if (eventStatus == 'ld') {
-          //事件处理流程--联动
+          //事件处理流程--联动1
           let array = that.$refs.LiandongDept.getCheckedNodes()
           let array = that.$refs.LiandongDept.getCheckedNodes()
           if (array != null && array.length > 0) {
           if (array != null && array.length > 0) {
             for (let i = 0; i < array.length; i++) {
             for (let i = 0; i < array.length; i++) {
@@ -2752,28 +2757,30 @@ export default {
           })
           })
 
 
         } else if (eventStatus == 'gd') {
         } else if (eventStatus == 'gd') {
-          let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
-          let number = /^[+]{0,1}(\d+)$/g;    //正整数
+          if(that.eventTypeXl == 101){
+            let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
+            let number = /^[+]{0,1}(\d+)$/g;    //正整数
 
 
-          if(!double.test(that.table2.areaTotal)){
-            that.$message.error(`面积只能填写到小数后两位!`)
-            return
-          }
-          if(!number.test(that.table2.peopleTotal)){
-            that.$message.error(`人员请填写正整数!`)
-            return
-          }
-          if(that.table2.forestComposition == '' || that.table2.forestComposition==null){
-            that.$message.error(`林木组成不能为空!`)
-            return
-          }
-          if(that.table2.forestToken == '' || that.table2.forestToken==null){
-            that.$message.error(`林令不能为空!`)
-            return
-          }
-          if(that.table2.porosities == '' || that.table2.porosities==null){
-            that.$message.error(`疏密度不能为空!`)
-            return
+            if(!double.test(that.table2.areaTotal)){
+              that.$message.error(`面积只能填写到小数后两位!`)
+              return
+            }
+            if(!number.test(that.table2.peopleTotal)){
+              that.$message.error(`人员请填写正整数!`)
+              return
+            }
+            if(that.table2.forestComposition == '' || that.table2.forestComposition==null){
+              that.$message.error(`林木组成不能为空!`)
+              return
+            }
+            if(that.table2.forestToken == '' || that.table2.forestToken==null){
+              that.$message.error(`林令不能为空!`)
+              return
+            }
+            if(that.table2.porosities == '' || that.table2.porosities==null){
+              that.$message.error(`疏密度不能为空!`)
+              return
+            }
           }
           }
 
 
           //事件处理流程--归档
           //事件处理流程--归档
@@ -2797,8 +2804,17 @@ export default {
               that.$emit('getSupermap', that.calendarDay)
               that.$emit('getSupermap', that.calendarDay)
             }
             }
           })
           })
+        } else if(eventStatus == 'cz'){
+          eventHandling(that.eventId,that.eventCode).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+            }
+          })
         } else {
         } else {
-          if (eventStatus == 'qs') {
+          if (eventStatus == 'qs' ) {
             if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
             if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
               that.$message.error(`请选择部门!`)
               that.$message.error(`请选择部门!`)
               return
               return
@@ -2834,10 +2850,10 @@ export default {
               that.showEventConfirm = false
               that.showEventConfirm = false
               that.$emit('getEventList', that.calendarDay,10,1)
               that.$emit('getEventList', that.calendarDay,10,1)
               that.$emit('getSupermap', that.calendarDay)
               that.$emit('getSupermap', that.calendarDay)
-                if (eventStatus == "cf" || eventStatus == "wb") {
-                  this.eventDialog = false;
-                  return;
-                }
+              if (eventStatus == "cf" || eventStatus == "wb") {
+                this.eventDialog = false;
+                return;
+              }
               that.refreshEvent(that.eventCode)
               that.refreshEvent(that.eventCode)
             }
             }
           })
           })
@@ -3062,9 +3078,12 @@ export default {
       // 获取父标签,意思是这个标签内的 DOM 元素生成图片
       // 获取父标签,意思是这个标签内的 DOM 元素生成图片
       // imageTofile是给截图范围内的父级元素自定义的ref名称
       // imageTofile是给截图范围内的父级元素自定义的ref名称
       // let canvasBox = this.$refs.imageTofile
       // let canvasBox = this.$refs.imageTofile
-      let canvasBox = document.getElementById('forestWarmSuperMap')
+      let canvasBox = document.getElementById('forestWarmSuperMap1')
       let toolbar = document.getElementById('toolbar')
       let toolbar = document.getElementById('toolbar')
-      canvasBox.removeChild(toolbar)
+      if(toolbar!=null)
+      {
+        canvasBox.removeChild(toolbar)
+      }
       // 获取父级的宽高
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)
       const height = parseInt(window.getComputedStyle(canvasBox).height)
@@ -3086,6 +3105,7 @@ export default {
         let dataBase64 = canvas.toDataURL('image/png')
         let dataBase64 = canvas.toDataURL('image/png')
         this.uploadBase64(dataBase64)
         this.uploadBase64(dataBase64)
       })
       })
+
       canvasBox.appendChild(toolbar)
       canvasBox.appendChild(toolbar)
     },
     },
     uploadBase64(dataBase64) {
     uploadBase64(dataBase64) {

+ 93 - 93
src/views/monitor.vue

@@ -50,8 +50,8 @@
                 <div
                 <div
                   class="icon-con w-33 m-btm-no"
                   class="icon-con w-33 m-btm-no"
                   :class="{ on: onLa }"
                   :class="{ on: onLa }"
-                  @click="laClick"
                 >
                 >
+                  <!--                  @click="laClick"-->
                   <div class="icon icon-dot"></div>
                   <div class="icon icon-dot"></div>
                   <div class="icon-text">
                   <div class="icon-text">
                     <h6>{{ loudspeakerNum }}</h6>
                     <h6>{{ loudspeakerNum }}</h6>
@@ -266,7 +266,7 @@ export default {
     this.deptId = Cookies.get("deptId");
     this.deptId = Cookies.get("deptId");
     // this.getSensorListByDeptIds()
     // this.getSensorListByDeptIds()
     this.getMonitorDeviceAndDataLists();
     this.getMonitorDeviceAndDataLists();
-    this.getDlblistBydeptIds();
+    // this.getDlblistBydeptIds();
     // this.chuanSet();
     // this.chuanSet();
     this.selectDeviceType(-1);
     this.selectDeviceType(-1);
     this.bottomMenuList(); //获取底部公共组件消息和任务
     this.bottomMenuList(); //获取底部公共组件消息和任务
@@ -808,7 +808,7 @@ export default {
         //that.getSensorListByDeptId()
         //that.getSensorListByDeptId()
         that.getMonitorDeviceAndDataList();
         that.getMonitorDeviceAndDataList();
       } else if (that.localMark == "la") {
       } else if (that.localMark == "la") {
-        that.getDlblistBydeptId();
+        // that.getDlblistBydeptId();
       }
       }
     },
     },
     sheClick() {
     sheClick() {
@@ -853,96 +853,96 @@ export default {
       });
       });
     },
     },
     // 云广播
     // 云广播
-    getDlblistBydeptId() {
-      let that = this;
-      let markersList = [];
-      getDlblistBydeptId(that.deptId)
-        .then(function (res) {
-          that.loudspeakerNum = res.data.length;
-          that.visuForestCloudCameraBOListSearch = [];
-          if (res.data != null && res.data.length > 0) {
-            for (let j = 0; j < res.data.length; j++) {
-              let dat = {
-                cameraName: res.data[j].name,
-                longitude: res.data[j].longitude,
-                latitude: res.data[j].latitude,
-              };
-              that.visuForestCloudCameraBOListSearch.push(dat);
-            }
-            for (let i = 0; i < res.data.length; i++) {
-              let markersMap = {
-                lng: 124.59,
-                lat: 43.02,
-                icon: "marker",
-                bindPopupHtml:
-                  '<div class="map-tip">' +
-                  "<span>" +
-                  '                  <div class="d-l-con">' +
-                  '                  <div class="d-l-l-text">' +
-                  "                  <h4>名称:" +
-                  (res.data[i].name ? res.data[i].name : "") +
-                  "</h4>" +
-                  "                </div>" +
-                  "                </div>" +
-                  "                </span>" +
-                  "<span>" +
-                  '                  <div class="d-l-con">' +
-                  '                  <div class="d-l-l-text">' +
-                  "                  <h4>位置:" +
-                  (res.data[i].position ? res.data[i].position : "") +
-                  "</h4>" +
-                  "                </div>" +
-                  "                </div>" +
-                  "                </span>" +
-                  "<span>" +
-                  '                  <div class="d-l-con">' +
-                  '                  <div class="d-l-l-text">' +
-                  "                  <h4>备注:" +
-                  (res.data[i].remark ? res.data[i].remark : "") +
-                  "</h4>" +
-                  "                </div>" +
-                  "                </div>" +
-                  "                </span>" +
-                  "<span>" +
-                  '                  <div class="d-l-con">' +
-                  '                  <div class="d-l-l-text">' +
-                  "                  <h4>经纬度:" +
-                  res.data[i].longitude +
-                  "," +
-                  res.data[i].latitude +
-                  "</h4>" +
-                  "                </div>" +
-                  "                </div>" +
-                  "                </span>" +
-                  "</div>",
-                click: "jump",
-                parameter: "",
-                name: "",
-                keepBindPopup: false,
-                isAggregation: false,
-              };
-              markersMap.icon = "big-horn";
-
-              markersMap.lng = res.data[i].longitude;
-              markersMap.lat = res.data[i].latitude;
-              markersList.push(markersMap);
-            }
-            setTimeout(() => {
-              that.$refs.supermap.clearM();
-              that.$refs.supermap.clearMRadius();
-              that.$refs.supermap.setMarkers(markersList);
-            }, 2000);
-          } else {
-            setTimeout(() => {
-              that.$refs.supermap.clearM();
-              that.$refs.supermap.clearMRadius();
-            }, 2000);
-          }
-        })
-        .catch(function (error) {
-          console.error(error);
-        });
-    },
+    // getDlblistBydeptId() {
+    //   let that = this;
+    //   let markersList = [];
+    //   getDlblistBydeptId(that.deptId)
+    //     .then(function (res) {
+    //       that.loudspeakerNum = res.data.length;
+    //       that.visuForestCloudCameraBOListSearch = [];
+    //       if (res.data != null && res.data.length > 0) {
+    //         for (let j = 0; j < res.data.length; j++) {
+    //           let dat = {
+    //             cameraName: res.data[j].name,
+    //             longitude: res.data[j].longitude,
+    //             latitude: res.data[j].latitude,
+    //           };
+    //           that.visuForestCloudCameraBOListSearch.push(dat);
+    //         }
+    //         for (let i = 0; i < res.data.length; i++) {
+    //           let markersMap = {
+    //             lng: 124.59,
+    //             lat: 43.02,
+    //             icon: "marker",
+    //             bindPopupHtml:
+    //               '<div class="map-tip">' +
+    //               "<span>" +
+    //               '                  <div class="d-l-con">' +
+    //               '                  <div class="d-l-l-text">' +
+    //               "                  <h4>名称:" +
+    //               (res.data[i].name ? res.data[i].name : "") +
+    //               "</h4>" +
+    //               "                </div>" +
+    //               "                </div>" +
+    //               "                </span>" +
+    //               "<span>" +
+    //               '                  <div class="d-l-con">' +
+    //               '                  <div class="d-l-l-text">' +
+    //               "                  <h4>位置:" +
+    //               (res.data[i].position ? res.data[i].position : "") +
+    //               "</h4>" +
+    //               "                </div>" +
+    //               "                </div>" +
+    //               "                </span>" +
+    //               "<span>" +
+    //               '                  <div class="d-l-con">' +
+    //               '                  <div class="d-l-l-text">' +
+    //               "                  <h4>备注:" +
+    //               (res.data[i].remark ? res.data[i].remark : "") +
+    //               "</h4>" +
+    //               "                </div>" +
+    //               "                </div>" +
+    //               "                </span>" +
+    //               "<span>" +
+    //               '                  <div class="d-l-con">' +
+    //               '                  <div class="d-l-l-text">' +
+    //               "                  <h4>经纬度:" +
+    //               res.data[i].longitude +
+    //               "," +
+    //               res.data[i].latitude +
+    //               "</h4>" +
+    //               "                </div>" +
+    //               "                </div>" +
+    //               "                </span>" +
+    //               "</div>",
+    //             click: "jump",
+    //             parameter: "",
+    //             name: "",
+    //             keepBindPopup: false,
+    //             isAggregation: false,
+    //           };
+    //           markersMap.icon = "big-horn";
+    //
+    //           markersMap.lng = res.data[i].longitude;
+    //           markersMap.lat = res.data[i].latitude;
+    //           markersList.push(markersMap);
+    //         }
+    //         setTimeout(() => {
+    //           that.$refs.supermap.clearM();
+    //           that.$refs.supermap.clearMRadius();
+    //           that.$refs.supermap.setMarkers(markersList);
+    //         }, 2000);
+    //       } else {
+    //         setTimeout(() => {
+    //           that.$refs.supermap.clearM();
+    //           that.$refs.supermap.clearMRadius();
+    //         }, 2000);
+    //       }
+    //     })
+    //     .catch(function (error) {
+    //       console.error(error);
+    //     });
+    // },
     getDlblistBydeptIds() {
     getDlblistBydeptIds() {
       let that = this;
       let that = this;