Przeglądaj źródła

Merge branch '王立生' of sckj/yl-service into master

sckj 3 miesięcy temu
rodzic
commit
b004b5bd03

+ 12 - 1
ruoyi-ui/src/components/AmApN/index.js

@@ -28,18 +28,29 @@ AmApNew.install = function (Vue) {
     if (typeof cancel !== 'undefined') {
       instanceA.cancel = cancel
     }
+    if (para.para3 && para.para3.length==8)
+    {
+      instanceA.rq = para.para3.substr(0,4)+"-"+ para.para3.substr(4,2)+"-"+ para.para3.substr(6,2);
+    }
+
+    instanceA.gjlx=para.para1;
     getstatisticaldata(para).then((response) => {
       let data = response
       if (data.code == 200) {
         instanceA.para=para;
         instanceA.olddata=data.data[1].rowList;
         instanceA.wldata = [];
+        instanceA.isopen = false;
         instanceA.bjdata = [];
         if (para.para1=="gj") {
           instanceA.wldata = data.data[3].rowList;
           instanceA.bjdata = data.data[5].rowList;
         }
-        instanceA.gjlx=para.para1;
+         let date=new Date()
+         let year = date.getFullYear();
+         let month = String(date.getMonth() + 1).padStart(2, '0');
+         let day = String(date.getDate()).padStart(2, '0');
+
         instanceA.updata();
         instanceA.title = "轨迹"
         instanceA.isShow = true

+ 33 - 19
ruoyi-ui/src/components/AmApN/index.vue

@@ -63,25 +63,27 @@ export default {
 
     rq: {
       handler(newName, oldName) {
-        this.para.para3=newName.replaceAll("-","");
-        getstatisticaldata(this.para).then((response) => {
-          let data = response
-          if (data.code == 200) {
-            this.olddata=data.data[1].rowList;
-            this.wldata = [];
-            this.bjdata = [];
-            if (this.para.para1=="gj") {
-              this.wldata = data.data[3].rowList;
-              this.bjdata = data.data[5].rowList;
-            }
-            this.updata();
-            this.title = "轨迹"
-            this.isShow = true
+        if (this.isopen) {
+          this.para.para3 = newName.replaceAll("-", "");
+          getstatisticaldata(this.para).then((response) => {
+            let data = response
+            if (data.code == 200) {
+              this.olddata = data.data[1].rowList;
+              this.wldata = [];
+              this.bjdata = [];
+              if (this.para.para1 == "gj") {
+                this.wldata = data.data[3].rowList;
+                this.bjdata = data.data[5].rowList;
+              }
+              this.updata();
+              this.title = "轨迹"
+              this.isShow = true
 
-          } else {
-            this.$alert('数据读取错误' + data.msg)
-          }
-        })
+            } else {
+              this.$alert('数据读取错误' + data.msg)
+            }
+          })
+        }
       }
     }
   },
@@ -92,6 +94,7 @@ export default {
       bjdata:[],
       para:{},
       rq:"",
+      isopen:false,
       gjlx:"qt",
       lineArr: [[116.478935,39.997761],[116.478939,39.997825],[116.478912,39.998549],[116.478912,39.998549],[116.478998,39.998555],[116.478998,39.998555],[116.479282,39.99856],[116.479658,39.998528],[116.480151,39.998453],[116.480784,39.998302],[116.480784,39.998302],[116.481149,39.998184],[116.481573,39.997997],[116.481863,39.997846],[116.482072,39.997718],[116.482362,39.997718],[116.483633,39.998935],[116.48367,39.998968],[116.484648,39.999861]],
     }
@@ -154,6 +157,16 @@ export default {
       // let month = String(date.getMonth() + 1).padStart(2, '0');
       // let day = String(date.getDate()).padStart(2, '0');
       //  this.rq=`${year}-${month}-${day}`;
+      this.lineArr=[];
+      this.lineArrSj=[];
+      if (this.marker)
+      {
+        this.marker.stopMove();
+      }
+      if (this.map)
+      {
+        this.map.clearMap();
+      }
       this.close();
     },
     successEvent(row, index) {
@@ -174,7 +187,8 @@ export default {
           version: '2.0'
         }
       }).then((AMap) => {
-
+        this.isopen = true;
+        this.isShow = true;
         const param = {
           resizeEnable: true,
           center: this.lineArr[0],