zhongtianhaoyuan il y a 2 ans
Parent
commit
073af774eb
2 fichiers modifiés avec 10 ajouts et 15 suppressions
  1. 2 12
      src/components/mapdrag/indexMap.vue
  2. 8 3
      src/views/orderManagement/trajectory.vue

+ 2 - 12
src/components/mapdrag/indexMap.vue

@@ -42,7 +42,7 @@ export default {
       ],
       val1: "",
       val2: "",
-      currentPage:this.currentPage,
+      // currentPage:this.currentPage,
     };
 
   },
@@ -57,7 +57,6 @@ export default {
     radio: function (val1, val2) {
       this.val1 = val1
       this.val2 = val2
-
       this.infoList()
       // this.loadmap();
     },
@@ -71,11 +70,10 @@ export default {
     infoList() {
       var that = this
       if (that.val1 == 1) {
-        var that = this;
         travelpathbd({ orderId: that.orderid })
           .then((response) => {
             that.path1 = [];
-            var patharr = response.data
+            var patharr = JSON.parse(response.data.longitudeLatitude) 
             // console.log(JSON.parse(response.data.longitudeLatitude),11111111)
             for (let i = 0; i < patharr.length; i++) {
               that.path1.push([patharr[i].lon, patharr[i].lat]);
@@ -88,7 +86,6 @@ export default {
           });
         // this.path = this.path1
       } else {
-        var that = this;
         travelpath({
           orderId: that.orderid,
           currentPage: that.currentPage,
@@ -109,12 +106,6 @@ export default {
           .catch(() => {
             // console.log(121212)
           });
-        // travelpath({orderId:this.orderid}).then(response => {
-        //   console.log(response)
-        // })
-        // .catch(() => {
-        // })
-        // this.path = this.path2
       }
 
     },
@@ -157,7 +148,6 @@ export default {
           alert("当前环境不支持 Canvas!");
           return;
         }
-
         let pathSimplifierIns = new PathSimplifier({
           zIndex: 100,
           //autoSetFitView:false,

+ 8 - 3
src/views/orderManagement/trajectory.vue

@@ -5,8 +5,11 @@
         <el-radio v-model="radio" label="1" @change="change('1')">北斗导航</el-radio>
         <el-radio v-model="radio" label="2" @change="change('2')">平台绘制</el-radio>
         <div class="order-detail">
-          <div>订单:{{ querydata.orderNo }}({{ startDate }} ~ <span
+          <!-- <div>订单:{{ querydata.orderNo }}({{ startDate }} ~ <span
               v-if='querydata.orderStatus == "已完结"'>{{ endDate }}</span><span v-else>运输中</span> )</div>
+          <div> -->
+            <!-- {{ startDate }} ~ <span>{{ endDate }}</span> -->
+            <div>订单:{{ querydata.orderNo }}(<span>{{ querydata.orderStatus }}</span> )</div>
           <div>
             发货地:{{ querydata.sendPrivate }}{{ querydata.sendCity }}{{ querydata.sendArea }}{{ querydata.sendDetailedAddress }}
           </div>
@@ -74,8 +77,10 @@ export default {
       _obj.currentPage = this.currentPage
       _obj.pageSize = this.pageSize
       travelpath(_obj).then(response => {
-        this.startDate = response.data.startDate
-        this.endDate = response.data.endDate
+        if(response.data.records.length>0){
+          this.startDate = response.data.records[0].startDate
+          this.endDate = response.data.records[0].endDate
+        }
         this.deptBudgetTotal = response.data.total
       }).catch(() => {})
     }