Bläddra i källkod

测报灯害虫统计问题修复

zhangyun 3 år sedan
förälder
incheckning
91e6c7cc67

+ 1 - 1
minggao/config/index.js

@@ -13,7 +13,7 @@ module.exports = {
     proxyTable: {
       '/api': {
         //  target: 'http://192.168.1.17:12345', //翟毅飞
-         target: 'https://www.toreskj.com', //线上
+         target: 'https://www.yhswjc.com', //线上
         // target: 'http://192.168.1.77:12345', //曹世祥
         // target:"http://114.115.147.140:12345",
         changeOrigin: true,

+ 2 - 2
minggao/src/components/DateSearch/index.vue

@@ -263,8 +263,8 @@ export default {
     },
     say() {
       this.num++;
-      // console.log(this.num);
-      if (this.num == 5) {
+      console.log(this.num+"-------------------------------");
+      if (this.num > 5 || this.num == 5) {
         console.log("停止");
         this.num = 0;
       } else {

+ 14 - 12
minggao/src/page/forecasting/cbd/Cbd.vue

@@ -586,16 +586,18 @@
             </el-select>
           </el-form-item>
           <div class="addtrapbox" style="display: flex">
-            <el-form-item label="所在度" prop="lng">
+            <el-form-item label="所在度" prop="lng">
               <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lng, "lng") }}
+                <!-- {{ ToDegrees(ruleForm.lng, "lng") }} -->
+                {{ isNaN(ruleForm.lng)?ToDigital(ruleForm.lng, "lng"):ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
               <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lat, "lat") }}
+                <!-- {{ ToDegrees(ruleForm.lat, "lat") }} -->
+                {{ isNaN(ruleForm.lat)?ToDigital(ruleForm.lat, "lat"):ToDegrees(ruleForm.lat, "lat") }}
               </p>
             </el-form-item>
           </div>
@@ -864,7 +866,7 @@ export default {
       if (e) {
         console.log(this.$data.ruleForm);
         if (this.$data.ruleForm.lat != "" && this.$data.ruleForm.lng != "") {
-          this.city(this.$data.ruleForm.lat, this.$data.ruleForm.lng);
+          this.city(this.ToDigital(this.$data.ruleForm.lat), this.ToDigital(this.$data.ruleForm.lng));
         }
       }
     },
@@ -1134,7 +1136,7 @@ export default {
       // }
       this.ruleForm.org_id = [];
       this.ruleForm.oldorg_id = item.org_list;
-      this.city(this.ruleForm.lat, this.ruleForm.lng);
+      this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       // this.getmon3(item);
       this.operationDialogVisible = true;
     },
@@ -1435,8 +1437,8 @@ export default {
             data: this.qs.stringify({
               org_id: org_id, //                  非必传(num)                诱捕器id 修改项
               point_id: this.ruleForm.point_id, //               必传(string)               设备编号
-              lat: this.ToDigital(this.ruleForm.lat), //                       必传(string)               纬度
-              lng: this.ToDigital(this.ruleForm.lng), //
+              lat: this.ToDegrees(this.ruleForm.lat,"lat"), //                       必传(string)               纬度
+              lng: this.ToDegrees(this.ruleForm.lng,"lng"), //
               device_id: this.ruleForm.device_id,
               device_name: this.ruleForm.device_name,
               city: this.ruleForm.basecity,
@@ -1600,7 +1602,7 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       console.log(this.ruleForm);
-      this.city(this.ruleForm.lat, this.ruleForm.lng);
+      this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       this.addLocationDialogVisible = false;
     },
     addLocationDialogClosed() {
@@ -1625,10 +1627,10 @@ export default {
     },
     dingwei() {
       if (this.ruleForm.lng != "" && this.ruleForm.lng != 0) {
-        this.center[0] = this.ruleForm.lng;
+        this.center[0] = this.ToDigital(this.ruleForm.lng);
       }
       if (this.ruleForm.lat != "" && this.ruleForm.lat != 0) {
-        this.center[1] = this.ruleForm.lat;
+        this.center[1] = this.ToDigital(this.ruleForm.lat);
       }
       this.addLocationDialogVisible = true;
       setTimeout(() => {
@@ -1727,14 +1729,14 @@ export default {
           console.log(this.ruleForm);
         },
         error: function (err) {
-          alert("服务端错误,请刷新浏览器后重试");
+          // alert("服务端错误,请刷新浏览器后重试");
         },
       });
       // return arr;
     },
     latblur() {
       if (this.ruleForm.lat != "" && this.ruleForm.lng != "") {
-        this.city(this.ruleForm.lat, this.ruleForm.lng);
+        this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       }
     },
   },

+ 3 - 119
minggao/src/page/forecasting/cbd/PestsStats.vue

@@ -801,122 +801,6 @@ Viewer.setDefaults({
   // transition: false, //使用 CSS3 过度
   fullscreen: false, //播放时是否全屏
   keyboard: true, //是否支持键盘
-  // ready: function(e) {
-  //   // console.log(e.type, '组件以初始化')
-  // },
-  // show: function(e) {
-  //   // console.log(e.type, '图片显示开始')
-  //   var iconBox = document.getElementById("iconBox");
-  //   iconBox.style.display = "block";
-  // },
-  // shown: function(e) {
-  //   // console.log(e.type, '图片显示结束')
-  // },
-  // hide: function(e) {
-  //   // console.log(e.type, '图片隐藏完成')
-  //   var domData = document.getElementById("reseau");
-  //   var html = "";
-  //   domData.innerHTML = html;
-  //   var iconBox = document.getElementById("iconBox");
-  //   iconBox.style.display = "none";
-  // },
-  // hidden: function(e) {
-  //   // console.log(e.type, '图片隐藏结束')
-  // },
-  // view: function(e) {
-  //   // console.log(e.type, "视图开始");
-  // },
-  // viewed: function(e) {
-  //   var iconDom = document.getElementById("iconDom");
-  //   var j = JSON.stringify(iconDom);
-  //   var g = j.indexOf("icon2");
-  //   if (g !== -1) {
-  //     var b;
-  //     var c;
-  //     var a;
-  //     // var a = e.path[0].ownerDocument.images[20].outerHTML
-  //     var arr = [];
-  //     arr = e.path[0].ownerDocument.images;
-  //     for (var i = 0; i < arr.length; i++) {
-  //       var k = arr[i].outerHTML.indexOf('style="');
-  //       var j = arr[i].outerHTML.indexOf("margin-top:");
-  //       if (k !== -1 && k !== -1) {
-  //         a = arr[i].outerHTML;
-  //       }
-  //     }
-  //     b = a.split('style="');
-  //     c = b[1].split('">');
-  //     var f = c[0];
-  //     var t = f.replace("margin-top", "top");
-  //     var y = t.replace("margin-left", "left");
-  //     var x = y + "z-index:10000;";
-  //     var domData = document.getElementById("reseau");
-  //     var html =
-  //       '<div class="griddingLine" v-show="iconShow">' +
-  //       '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
-  //       'style="' +
-  //       x +
-  //       '"' +
-  //       " />" +
-  //       "</div>";
-  //     domData.innerHTML = html;
-  //   }
-  // },
-  // zoom: function(e) {
-  //   // console.log(e.type, '图片缩放开始')
-  //   var iconDom = document.getElementById("iconDom");
-  //   var j = JSON.stringify(iconDom);
-  //   var g = j.indexOf("icon2");
-  //   console.log(g);
-  //   if (g !== -1) {
-  //     var b;
-  //     var c;
-  //     var a = e.detail.originalEvent.path[0].outerHTML;
-  //     b = a.split('style="');
-  //     c = b[1].split('">');
-  //     var f = c[0];
-  //     var t = f.replace("margin-top", "top");
-  //     var y = t.replace("margin-left", "left");
-  //     var x = y + "z-index:10000;";
-  //     var domData = document.getElementById("reseau");
-  //     var html =
-  //       '<div class="griddingLine" v-show="iconShow">' +
-  //       '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
-  //       'style="' +
-  //       x +
-  //       '"' +
-  //       " />" +
-  //       "</div>";
-  //     domData.innerHTML = html;
-  //   }
-  // },
-  // zoomed: function(e) {
-  //   var iconDom = document.getElementById("iconDom");
-  //   var j = JSON.stringify(iconDom);
-  //   var g = j.indexOf("icon2");
-  //   // console.log(g)
-  //   if (g !== -1) {
-  //     var b;
-  //     var c;
-  //     var a = e.detail.originalEvent.path[0].outerHTML;
-  //     b = a.split('style="');
-  //     c = b[1].split('">');
-  //     var f = c[0];
-  //     var t = f.replace("margin-top", "top");
-  //     var y = t.replace("margin-left", "left");
-  //     var x = y + "z-index:10000;";
-  //     var domData = document.getElementById("reseau");
-  //     var html =
-  //       '<div class="griddingLine" v-show="iconShow">' +
-  //       '<img src="../../../../static/images/gridding.png" alt="" class="" ' +
-  //       'style="' +
-  //       x +
-  //       '"' +
-  //       " />" +
-  //       "</div>";
-  //     domData.innerHTML = html;
-  //   }
-  // }
 });
 
 export default {
@@ -1463,9 +1347,9 @@ export default {
               }
             }
             // 重新请求下
-            if (kk !== 0) {
-              this.getPestAllData();
-            }
+            // if (kk !== 0) {
+            //   this.getPestAllData();
+            // }
           }
         }
       });

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 543 - 205
minggao/src/page/forecasting/cbd/cbdDataPhotos.vue


+ 8 - 6
minggao/src/page/forecasting/maintain/maintain.vue

@@ -89,13 +89,15 @@
             <el-form-item label="所在经度" prop="lng">
               <el-input v-model="ruleForm.lng"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lng, "lng") }}
+                <!-- {{ ToDegrees(ruleForm.lng, "lng") }} -->
+                {{ isNaN(ruleForm.lng)?ToDigital(ruleForm.lng, "lng"):ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
               <el-input v-model="ruleForm.lat"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lat, "lat") }}
+                <!-- {{ ToDegrees(ruleForm.lat, "lat") }} -->
+                {{ isNaN(ruleForm.lat)?ToDigital(ruleForm.lat, "lat"):ToDegrees(ruleForm.lat, "lat") }}
               </p>
             </el-form-item>
           </div>
@@ -307,8 +309,8 @@ export default {
               url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_add",
               data: this.qs.stringify({
                 point_name: this.ruleForm.point_name, //                  非必传(num)                诱捕器id 修改项
-                lat: this.ToDigital(this.ruleForm.lat), //                       必传(string)               纬度
-                lng: this.ToDigital(this.ruleForm.lng), //                       必传(string)               经度
+                lat: this.ToDegrees(this.ruleForm.lat,"lat"), //                       必传(string)               纬度
+                lng: this.ToDegrees(this.ruleForm.lng,"lng"), //                       必传(string)               经度
                 messages: this.ruleForm.messages,
               }),
             }).then((res) => {
@@ -342,8 +344,8 @@ export default {
               data: this.qs.stringify({
                 point_id: this.point_id,
                 point_name: this.ruleForm.point_name, //                  非必传(num)                诱捕器id 修改项
-                lat: this.ToDigital(this.ruleForm.lat), //                       必传(string)               纬度
-                lng: this.ToDigital(this.ruleForm.lng), //                       必传(string)               经度
+                lat: this.ToDegrees(this.ruleForm.lat,"lat"), //                       必传(string)               纬度
+                lng: this.ToDegrees(this.ruleForm.lng,"lng"), //                       必传(string)               经度
                 messages: this.ruleForm.messages,
               }),
             }).then((res) => {

+ 15 - 15
minggao/src/page/forecasting/trap/trap.vue

@@ -189,16 +189,16 @@
             <el-input v-model="ruleForm.trap_number"></el-input>
           </el-form-item>
           <div class="addtrapbox">
-            <el-form-item label="所在度" prop="lng">
+            <el-form-item label="所在度" prop="lng">
               <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lng, "lng") }}
+                {{ isNaN(ruleForm.lng)?ToDigital(ruleForm.lng, "lng"):ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
               <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lat, "lat") }}
+                {{ isNaN(ruleForm.lat)?ToDigital(ruleForm.lat, "lat"):ToDegrees(ruleForm.lat, "lat") }}
               </p>
             </el-form-item>
           </div>
@@ -533,7 +533,7 @@ export default {
       if (e) {
         console.log(this.$data.ruleForm);
         if (this.$data.ruleForm.lat != "" && this.$data.ruleForm.lng != "") {
-          this.city(this.$data.ruleForm.lat, this.$data.ruleForm.lng);
+          this.city(this.ToDigital(this.$data.ruleForm.lat), this.ToDigital(this.$data.ruleForm.lng));
         }
       }
     },
@@ -668,8 +668,8 @@ export default {
             data: this.qs.stringify({
               trap_id: this.ruleForm.trap_id, //                  非必传(num)                诱捕器id 修改项
               trap_number: this.ruleForm.trap_number, //               必传(string)               设备编号
-              lat: this.ToDigital(this.ruleForm.lat), //                       必传(string)               纬度
-              lng: this.ToDigital(this.ruleForm.lng), //                       必传(string)               经度
+              lat: this.ToDegrees(this.ruleForm.lat,"lat"), //                       必传(string)               纬度
+              lng: this.ToDegrees(this.ruleForm.lng,"lng"), //                       必传(string)               经度
               org_id: org_id, //                    必传(string)               所属海关id
               inducer_id: this.ruleForm.inducer_id, //                必传(string)               诱剂id
               point_id: this.ruleForm.point_id, //                  必传(string)               所属监测点id
@@ -744,7 +744,7 @@ export default {
       this.ruleForm.org_id = [];
       this.ruleForm.oldorg_id = e.org_list;
       console.log(this.ruleForm);
-      this.city(e.lat, e.lng);
+      this.city(this.ToDigital(e.lat), this.ToDigital(e.lng));
       // this.getmon3(e);
       this.addtraptf = true;
     },
@@ -981,7 +981,7 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       this.addLocationDialogVisible = false;
-      this.city(this.ruleForm.lat, this.ruleForm.lng);
+      this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
     },
     addLocationDialogClosed() {
       //弹框关闭时
@@ -1006,12 +1006,12 @@ export default {
     dingwei() {
       console.log(this.ruleForm);
       if (this.ruleForm.lng != "" && this.ruleForm.lng != 0) {
-        this.center[0] = this.ruleForm.lng;
+        this.center[0] = this.ToDigital(this.ruleForm.lng);
       } else {
         this.center = [114.05, 22.55];
       }
       if (this.ruleForm.lat != "" && this.ruleForm.lat != 0) {
-        this.center[1] = this.ruleForm.lat;
+        this.center[1] = this.ToDigital(this.ruleForm.lat);
       } else {
         this.center = [114.05, 22.55];
       }
@@ -1020,7 +1020,7 @@ export default {
         this.init();
       }, 500);
     },
-    //度转度°分′秒″
+    //度  度°分′秒″
     ToDegrees(val, type) {
       if (typeof val == "undefined" || val == "" || isNaN(val)) {
         return val;
@@ -1049,10 +1049,10 @@ export default {
           strMiao = parseFloat(strMiao).toFixed(2); //精确小数点后面两位
         }
       }
-      // console.log(strDu, strFen, strMiao);
+      console.log(A);
       return strDu + "°" + strFen + "′" + strMiao + "″" + A;
     },
-    //度°分′秒″转度
+    //度°分′秒″  
     ToDigital(lnglat) {
       if (!isNaN(lnglat)) {
         return lnglat;
@@ -1113,14 +1113,14 @@ export default {
           console.log(this.ruleForm);
         },
         error: function (err) {
-          alert("服务端错误,请刷新浏览器后重试");
+          // alert("服务端错误,请刷新浏览器后重试");
         },
       });
       // return arr;
     },
     latblur() {
       if (this.ruleForm.lat != "" && this.ruleForm.lng != "") {
-        this.city(this.ruleForm.lat, this.ruleForm.lng);
+        this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       }
     },
   },

+ 34 - 24
minggao/src/page/homepage/facilitydistribute.vue

@@ -254,6 +254,37 @@ export default {
   },
   //方法集合
   methods: {
+    ToDigital(lnglat) {
+      // console.log(lnglat);
+      if (!isNaN(lnglat)) {
+        return lnglat;
+      }
+      lnglat = lnglat.toString();
+      var strDu, strFen, strMiao;
+      var duindex = lnglat.indexOf("°"); //字符度的下标
+      var fenindex = lnglat.indexOf("′"); //字符分的下标
+      var miaoindex = lnglat.indexOf("″"); //字符秒的下标
+      strDu = lnglat.slice(0, duindex);
+      strFen = lnglat.slice(duindex + 1, fenindex);
+      strMiao = lnglat.slice(fenindex + 1, miaoindex);
+      // len = len > 6 || typeof len == "undefined" ? 6 : len; //精确到小数点后最多六位
+      strDu =
+        typeof strDu == "undefined" || strDu == "" ? 0 : parseFloat(strDu);
+      strFen =
+        typeof strFen == "undefined" || strFen == ""
+          ? 0
+          : parseFloat(strFen) / 60;
+      strMiao =
+        typeof strMiao == "undefined" || strMiao == ""
+          ? 0
+          : parseFloat(strMiao) / 3600;
+      var digital = strDu + strFen + strMiao;
+      if (digital == 0) {
+        return "";
+      } else {
+        return digital.toFixed(6);
+      }
+    },
     init(data1) {
       var that = this;
       let myChart = echarts.init(document.getElementById("mychart"));
@@ -312,14 +343,15 @@ export default {
       //   }
       //   return res;
       // };
+      var that = this
       function format(city) {
         if (city) {
           var arr = [];
           for (var i = 0; i < city.length; i++) {
             var obj = {};
             obj["value"] = [
-              Number(city[i].lng),
-              Number(city[i].lat),
+              Number(that.ToDigital(city[i].lng)),
+              Number(that.ToDigital(city[i].lat)),
               Number(city[i].device_type_id),
               Number(city[i].d_id),
             ];
@@ -672,29 +704,7 @@ export default {
           type_id: this.typevalue, //                   非必传(num)                  3测报灯  4诱捕器  6监控 搜索项
         }),
       }).then((res) => {
-        // console.log(res.data.data);
-        // var data = res.data.data;
-        // var arr1 = [];
-        // var obj2 = {};
-        // for (var i = 0; i < data.length; i++) {
-        //   var obj = {
-        //     name: data[i].d_id,
-        //     value: data[i].device_type_id,
-        //   };
-        //   arr1.push(obj);
-        //   obj2[data[i].d_id] = [Number(data[i].lat), Number(data[i].lng)];
-        //   // console.log(obj2)
-        // }
-        // console.log(arr1,obj2)
-        // if (document.getElementsByClassName("el-message").length == 0) {
-        //   // this.$message({
-        //   //   showClose: true,
-        //   //   message: "数据获取成功!",
-        //   //   type: "success",
-        //   // });
-        // }
         this.init(res.data.data);
-        // this.inoffoptions = res.data.data.point_data;
       });
     },
     search() {

+ 34 - 3
minggao/src/page/homepage/pestdistribute.vue

@@ -174,6 +174,37 @@ export default {
   },
   //方法集合
   methods: {
+    ToDigital(lnglat) {
+      // console.log(lnglat);
+      if (!isNaN(lnglat)) {
+        return lnglat;
+      }
+      lnglat = lnglat.toString();
+      var strDu, strFen, strMiao;
+      var duindex = lnglat.indexOf("°"); //字符度的下标
+      var fenindex = lnglat.indexOf("′"); //字符分的下标
+      var miaoindex = lnglat.indexOf("″"); //字符秒的下标
+      strDu = lnglat.slice(0, duindex);
+      strFen = lnglat.slice(duindex + 1, fenindex);
+      strMiao = lnglat.slice(fenindex + 1, miaoindex);
+      // len = len > 6 || typeof len == "undefined" ? 6 : len; //精确到小数点后最多六位
+      strDu =
+        typeof strDu == "undefined" || strDu == "" ? 0 : parseFloat(strDu);
+      strFen =
+        typeof strFen == "undefined" || strFen == ""
+          ? 0
+          : parseFloat(strFen) / 60;
+      strMiao =
+        typeof strMiao == "undefined" || strMiao == ""
+          ? 0
+          : parseFloat(strMiao) / 3600;
+      var digital = strDu + strFen + strMiao;
+      if (digital == 0) {
+        return "";
+      } else {
+        return digital.toFixed(6);
+      }
+    },
     init(traparr) {
       //   console.log(trap_data_arr);
       var that = this;
@@ -208,7 +239,7 @@ export default {
         // undefined;
         myChart.resize();
       });
-
+      var that = this
       function citt(trap_data) {
         // console.log(trap_data)
         if (trap_data) {
@@ -216,8 +247,8 @@ export default {
           for (var i = 0; i < trap_data.length; i++) {
             var obj = {
               value: [
-                trap_data[i].lng,
-                trap_data[i].lat,
+                that.ToDigital(trap_data[i].lng),
+                that.ToDigital(trap_data[i].lat),
                 trap_data[i].pest_total,
               ],
               device_id: trap_data[i].device_id,

+ 19 - 16
minggao/src/page/monitor/Monitor.vue

@@ -697,16 +697,19 @@
             </el-select>
           </el-form-item>
           <div class="addtrapbox" style="display: flex">
-            <el-form-item label="所在度" prop="lng">
+            <el-form-item label="所在度" prop="lng">
               <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lng, "lng") }}
+                <!-- {{ ToDegrees(ruleForm.lng, "lng") }} -->
+                {{ isNaN(ruleForm.lng)?ToDigital(ruleForm.lng, "lng"):ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
               <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
-                {{ ToDegrees(ruleForm.lat, "lat") }}
+                <!-- {{ ToDegrees(ruleForm.lat, "lat") }} -->
+                {{ isNaN(ruleForm.lat)?ToDigital(ruleForm.lat, "lat"):ToDegrees(ruleForm.lat, "lat") }}
+                
               </p>
             </el-form-item>
           </div>
@@ -1115,7 +1118,7 @@ export default {
       }
       this.ruleForm.org_id = [];
       this.ruleForm.oldorg_id = e.temp_org_list;
-      this.city(this.ruleForm.lat, this.ruleForm.lng);
+      this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       // this.getmon3(e);
       this.operationDialogVisible = true;
     },
@@ -1242,10 +1245,10 @@ export default {
             movenum: movenum,
           }),
         }).then((res) => {
-          // if (res.data.message == '') {
-          // 	this.$message.success('指令下发成功')
-          // 	// this.stopConfigCamera() //关闭方向
-          // }
+          if (res.data.message == '') {
+          	// this.$message.success('指令下发成功')
+          	this.stopConfigCamera() //关闭方向
+          }
         });
       }
     },
@@ -2029,8 +2032,8 @@ export default {
             data: this.qs.stringify({
               org_id: org_id, //                  非必传(num)                诱捕器id 修改项
               point_id: this.ruleForm.point_id, //               必传(string)               设备编号
-              lat: this.ToDigital(this.ruleForm.lat), //                       必传(string)               纬度
-              lng: this.ToDigital(this.ruleForm.lng), //
+              lat: this.ToDegrees(this.ruleForm.lat,"lat"), //                       必传(string)               纬度
+              lng: this.ToDegrees(this.ruleForm.lng,"lng"), //
               device_id: this.ruleForm.device_id,
               device_name: this.ruleForm.device_name,
               city: this.ruleForm.basecity,
@@ -2193,7 +2196,7 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       this.addLocationDialogVisible = false;
-      this.city(this.ruleForm.lat, this.ruleForm.lng);
+      this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
     },
     addLocationDialogClosed() {
       //弹框关闭时
@@ -2217,10 +2220,10 @@ export default {
     },
     dingwei() {
       if (this.ruleForm.lng != "" && this.ruleForm.lng != 0) {
-        this.center[0] = this.ruleForm.lng;
+        this.center[0] =this.ToDigital(this.ruleForm.lng);
       }
       if (this.ruleForm.lat != "" && this.ruleForm.lat != 0) {
-        this.center[1] = this.ruleForm.lat;
+        this.center[1] = this.ToDigital(this.ruleForm.lat);
       }
       this.addLocationDialogVisible = true;
       setTimeout(() => {
@@ -2312,14 +2315,14 @@ export default {
           console.log(this.ruleForm);
         },
         error: function (err) {
-          alert("服务端错误,请刷新浏览器后重试");
+          // alert("服务端错误,请刷新浏览器后重试");
         },
       });
       // return arr;
     },
     latblur() {
       if (this.ruleForm.lat != "" && this.ruleForm.lng != "") {
-        this.city(this.ruleForm.lat, this.ruleForm.lng);
+        this.city(this.ToDigital(this.ruleForm.lat), this.ToDigital(this.ruleForm.lng));
       }
     },
   },
@@ -2346,7 +2349,7 @@ export default {
       if (e) {
         console.log(this.$data.ruleForm);
         if (this.$data.ruleForm.lat != "" && this.$data.ruleForm.lng != "") {
-          this.city(this.$data.ruleForm.lat, this.$data.ruleForm.lng);
+          this.city(this.ToDigital(this.$data.ruleForm.lat), this.ToDigital(this.$data.ruleForm.lng));
         }
       }
     },

+ 36 - 19
minggao/src/page/monitor/PhotoView.vue

@@ -25,12 +25,18 @@
     </div>
     <el-row :gutter="20">
       <!-- <viewer :images="images" class="images"> -->
-        <!-- <template slot-scope="scope"> -->
-          <el-col :span="6" v-for="(src, index) in images" :key="index">
-            <el-card style="height: 272px">
-              <img v-lazy="src.addr" @click="imgOpen(src, index)" id="viewerDom" v-viewer class="image" />
-              <span class="time">{{ (src.addtime * 1000) | formatTime }}</span>
-              <!-- <span
+      <!-- <template slot-scope="scope"> -->
+      <el-col :span="6" v-for="(src, index) in images" :key="index">
+        <el-card style="height: 272px">
+          <img
+            v-lazy="src.addr"
+            @click="imgOpen(src, index)"
+            id="viewerDom"
+            v-viewer
+            class="image"
+          />
+          <span class="time">{{ (src.addtime * 1000) | formatTime }}</span>
+          <!-- <span
                 class="del iconfont icon-shanchu"
                 @click="delPhoto(src)"
               ></span>
@@ -38,9 +44,9 @@
                 <img src="@/assets/images/forecasting/monitor/icon.png" />
                 病情识别
               </div> -->
-            </el-card>
-          </el-col>
-        <!-- </template> -->
+        </el-card>
+      </el-col>
+      <!-- </template> -->
       <!-- </viewer> -->
 
       <!-- 暂无数据 -->
@@ -64,10 +70,21 @@
       @current-change="changePage"
     ></el-pagination>
 
-
     <!-- 查看大图插件 -->
-    <viewer :images="imgArray" ref="viewer" @inited="inited"  v-show="imgList" class="images">
-      <img v-for="(src, index) in imgArray" :src="src" class="image" :key="index" style="width: 100px; height: auto; display: none;" />
+    <viewer
+      :images="imgArray"
+      ref="viewer"
+      @inited="inited"
+      v-show="imgList"
+      class="images"
+    >
+      <img
+        v-for="(src, index) in imgArray"
+        :src="src"
+        class="image"
+        :key="index"
+        style="width: 100px; height: auto; display: none"
+      />
     </viewer>
     <!-- 查看大图插件 -->
   </div>
@@ -77,7 +94,7 @@
 import Vue from "vue";
 import Viewer from "v-viewer";
 import "viewerjs/dist/viewer.css";
-Vue.use(Viewer)
+Vue.use(Viewer);
 Viewer.setDefaults({
   inline: false,
   button: true, //右上角按钮
@@ -92,7 +109,7 @@ Viewer.setDefaults({
   // transition: false, //使用 CSS3 过度
   fullscreen: false, //播放时是否全屏
   keyboard: true, //是否支持键盘
-})
+});
 
 export default {
   data() {
@@ -218,15 +235,15 @@ export default {
 
     // 打开查看大图插件
     imgOpen(data, index) {
-      this.imgArray = []
+      this.imgArray = [];
       if (this.images.length !== 0) {
         this.images.forEach((item) => {
-          this.imgArray.push(item.addr)
+          this.imgArray.push(item.addr);
         });
-        this.imgList = true
-        this.imgIndexNumber = index
+        this.imgList = true;
+        this.imgIndexNumber = index;
       } else {
-        this.imgList = false
+        this.imgList = false;
       }
     },
     // 查看大图插件初始化

+ 5 - 5
minggao/src/util/http.js

@@ -19,11 +19,11 @@ Vue.prototype.DOMIN = DOMIN
 Vue.prototype.wsUrl = wsUrl // 实时通信Url
 Vue.prototype.mapJson = mapJson //请求地图json,不带端口号
 // console.log(DOMIN)
-axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
-axios.defaults.timeout = 30000;
-axios.defaults.withCredentials = true //axios请求时携带session
-axios.defaults.crossDomain = true
-axios.defaults.baseURL = DOMIN
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
+// axios.defaults.timeout = 30000;
+// axios.defaults.withCredentials = true //axios请求时携带session
+// axios.defaults.crossDomain = true
+// axios.defaults.baseURL = DOMIN
 
 
 // axios请求前的拦截