Kaynağa Gözat

优化新增修改删除测风塔,风机,项目,场站信息,首页坐标点位不可以自动更新数据功能

zy 1 yıl önce
ebeveyn
işleme
b613544109

+ 12 - 1
neim-ui/src/views/dataQuery/electrucStation/index.vue

@@ -151,7 +151,7 @@ import {
 import {listAllDisabled} from "@/api/biz/dataQuery/windTowerStatusInfo";
 import {infoList} from "@/api/biz/dataQuery/weatherStationInfo";
 import axios from "axios";
-
+import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
 export default {
   name: "WindTowerStatusInfo",
   data() {
@@ -369,12 +369,14 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+              this.getPoint();
             });
           } else {
             addElectricStation(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
+              this.getPoint();
             });
           }
         }
@@ -387,6 +389,7 @@ export default {
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");
+        this.getPoint();
       }).catch(() => {
       });
     },
@@ -414,6 +417,14 @@ export default {
     //   let option = this.status.find(w=>w.value === row.stationStatus)
     //   return option !==undefined?option.label:row.stationStatus
     // },
+    getPoint(){
+      getPointMap().then(res => {
+        sessionStorage.setItem("allPointInfo", JSON.stringify({info: this.allPointInfo}))
+        this.$store.dispatch('equipmentInfo/allPointInfo', JSON.stringify({info: this.allPointInfo}))
+      }).catch(err => {
+        console.log('所有点位坐标:' + err)
+      })
+    }
   }
 };
 </script>

+ 15 - 0
neim-ui/src/views/dataQuery/fengjiInfo/index.vue

@@ -253,6 +253,7 @@ import {
   getProjectInfo,getStationInfo,getFanTowerForProject,getFanTowerForStation,
   saveFanTowerForStationInfo,updateFanTowerForStationInfo,deleteFanTowerForStationInfo,saveFanTowerForProjectInfo,updateFanTowerForProjectInfo,deleteFanTowerForProjectInfo
 } from "@/api/biz/dataQuery/fengjiInfo";
+import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
 export default {
   name: "index",
   data(){
@@ -404,6 +405,7 @@ export default {
               this.getFanTowerForStation()
               this.stationFanOpen = false
               this.$message.success('保存成功')
+              this.getPoint()
             }).catch(err=>{
               this.stationFanOpen = false
               console.log('保存场站风机信息异常:'+err)
@@ -413,6 +415,7 @@ export default {
               this.getFanTowerForStation()
               this.stationFanOpen = false
               this.$message.success('修改成功')
+              this.getPoint()
             }).catch(err=>{
               this.stationFanOpen = false
               console.log('修改场站风机信息异常:'+err)
@@ -433,6 +436,7 @@ export default {
         deleteFanTowerForStationInfo(row).then(res=>{
           this.getFanTowerForStation()
           this.$message.success('删除成功')
+          this.getPoint()
         }).catch(err=>{
           console.log('删除场站风机信息异常:'+err)
         })
@@ -479,6 +483,7 @@ export default {
         deleteFanTowerForProjectInfo(row).then(res=>{
           this.getFanTowerForProject()
           this.$message.success('删除成功')
+          this.getPoint()
         }).catch(err=>{
           console.log('删除项目风机信息异常:'+err)
         })
@@ -499,6 +504,7 @@ export default {
               this.getFanTowerForProject()
               this.projectFanOpen = false
               this.$message.success('保存成功')
+              this.getPoint()
             }).catch(err=>{
               this.projectFanOpen = false
               console.log('保存项目风机信息异常:'+err)
@@ -508,6 +514,7 @@ export default {
               this.getFanTowerForProject()
               this.projectFanOpen = false
               this.$message.success('修改成功')
+              this.getPoint()
             }).catch(err=>{
               this.projectFanOpen = false
               console.log('修改项目风机信息异常:'+err)
@@ -563,6 +570,14 @@ export default {
     handleCurrentChange1(val) {
       this.page1.currentPage = val
     },
+    getPoint(){
+      getPointMap().then(res => {
+        sessionStorage.setItem("allPointInfo", JSON.stringify({info: this.allPointInfo}))
+        this.$store.dispatch('equipmentInfo/allPointInfo', JSON.stringify({info: this.allPointInfo}))
+      }).catch(err => {
+        console.log('所有点位坐标:' + err)
+      })
+    },
   }
 }
 </script>

+ 12 - 2
neim-ui/src/views/dataQuery/project/index.vue

@@ -169,7 +169,7 @@ import {
 } from "@/api/biz/dataQuery/project";
 import {listAllDisabled} from "@/api/biz/dataQuery/windTowerStatusInfo";
 import {companyListInfo} from "@/api/biz/dataQuery/company";
-
+import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
 export default {
   name: "Project",
   data() {
@@ -413,12 +413,14 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+              this.getPoint()
             });
           } else {
             addProject(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
+              this.getPoint();
             });
           }
         }
@@ -431,6 +433,7 @@ export default {
         return delProject(ids);
       }).then(() => {
         this.getList();
+        this.getPoint()
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {
       });
@@ -441,7 +444,14 @@ export default {
     //     ...this.queryParams
     //   }, `project_${new Date().getTime()}.xlsx`)
     // },
-
+    getPoint(){
+      getPointMap().then(res => {
+        sessionStorage.setItem("allPointInfo", JSON.stringify({info: this.allPointInfo}))
+        this.$store.dispatch('equipmentInfo/allPointInfo', JSON.stringify({info: this.allPointInfo}))
+      }).catch(err => {
+        console.log('所有点位坐标:' + err)
+      })
+    },
     formatSort(row) {
       return this.statusSort.find(w => w.value === row.projectSort).label
     },

+ 14 - 2
neim-ui/src/views/dataQuery/windTowerStatusInfo/index.vue

@@ -279,6 +279,7 @@ import {
 } from "@/api/biz/dataQuery/windTowerStatusInfo";
 import defaultOption from "@/api/biz/dataQuery/defaultOption";
 import {listAll} from "@/api/biz/dataQuery/project";
+import {getPointMap} from "@/api/biz/dataQuery/largeScreenPage";
 export default {
   name: "WindTowerStatusInfo",
   data() {
@@ -348,8 +349,8 @@ export default {
       }
       callback()
     }
-    const reg = /^[\-\+]?(0?\d{1,2}(\.\d{1,5})*|1[0-7]?\d{1}(\.\d{1,5})*|180(\.0{1,5})*)$/
-    const reg1 = /^[\-\+]?([0-8]?\d{1}(\.\d{1,5})*|90(\.0{1,5})*)$/
+    const reg = /^[\-\+]?(0?\d{1,2}(\.\d{1,9})*|1[0-7]?\d{1}(\.\d{1,9})*|180(\.0{1,9})*)$/
+    const reg1 = /^[\-\+]?([0-8]?\d{1}(\.\d{1,9})*|90(\.0{1,9})*)$/
     const checkLongitude = (rule, value, callback) => {
       if (!value) {
         callback(new Error('不许为空'))
@@ -595,12 +596,14 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+              this.getPoint()
             });
           } else {
             addWindTowerStatusInfo(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
+              this.getPoint()
             });
           }
         }
@@ -613,6 +616,7 @@ export default {
         return delWindTowerStatusInfo(ids);
       }).then(() => {
         this.getList();
+        this.getPoint()
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {
       });
@@ -665,6 +669,14 @@ export default {
       }
 
     },
+    getPoint(){
+      getPointMap().then(res => {
+        sessionStorage.setItem("allPointInfo", JSON.stringify({info: this.allPointInfo}))
+        this.$store.dispatch('equipmentInfo/allPointInfo', JSON.stringify({info: this.allPointInfo}))
+      }).catch(err => {
+        console.log('所有点位坐标:' + err)
+      })
+    },
     formatStatus(row){
       let option = this.statusOption.find(w=>w.value === row.status)
       return option !==undefined?option.label:row.status