zhongtianhaoyuan 2 лет назад
Родитель
Сommit
ed8c476913

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

@@ -4,7 +4,7 @@
   </div>
 </template>
 <script>
-import { travelpath,travelpathbd } from "@/api/orderManagement";
+import { travelpath, travelpathbd } from "@/api/orderManagement";
 import AMapLoader from "@amap/amap-jsapi-loader";
 export default {
   name: "app",
@@ -40,12 +40,37 @@ export default {
         [91.34669, 44.749086],
         [88.61792, 44.793308],
       ],
+      val1: "",
+      val2: "",
+      currentPage:this.currentPage,
     };
+
   },
-  props: ["radio", "orderid"],
+  props: ["radio", "orderid", "currentPage", "pageSize"],
   watch: {
+    currentPage(val) {
+      this.currentPage = val
+    },
+    pageSize(val) {
+      this.pageSize = val
+    },
     radio: function (val1, val2) {
-      if (val1 == 1) {
+      this.val1 = val1
+      this.val2 = val2
+
+      this.infoList()
+      // this.loadmap();
+    },
+  },
+  methods: {
+    paging(value1,value2){
+      this.currentPage = value1
+      this.pageSize = value2
+      this.infoList()
+    },
+    infoList() {
+      var that = this
+      if (that.val1 == 1) {
         var that = this;
         travelpathbd({ orderId: that.orderid })
           .then((response) => {
@@ -64,13 +89,19 @@ export default {
         // this.path = this.path1
       } else {
         var that = this;
-        travelpath({ orderId: that.orderid })
+        travelpath({
+          orderId: that.orderid,
+          currentPage: that.currentPage,
+          pageSize: that.pageSize
+        })
           .then((response) => {
             that.path2 = [];
-            var patharr = JSON.parse(response.data.longitudeLatitude);
-            // console.log(JSON.parse(response.data.longitudeLatitude),11111111)
-            for (let i = 0; i < patharr.length; i++) {
-              that.path2.push([patharr[i].longitude, patharr[i].latitude]);
+            var patharr = []
+            for (let num = 0; num < response.data.records.length; num++) {
+              patharr = JSON.parse(response.data.records[num].longitudeLatitude);
+              for (let i = 0; i < patharr.length; i++) {
+                that.path2.push([patharr[i].longitude, patharr[i].latitude]);
+              }
             }
             that.path = that.path2;
             that.loadmap();
@@ -85,10 +116,8 @@ export default {
         // })
         // this.path = this.path2
       }
-      // this.loadmap();
+
     },
-  },
-  methods: {
     loadmap() {
       return new Promise((reslove, reject) => {
         AMapLoader.load({
@@ -205,6 +234,6 @@ export default {
 <style scoped>
 #allmap {
   width: 100%;
-  height: calc(100vh - 150px);
+  height: calc(100vh - 207px);
 }
 </style>

+ 78 - 55
src/views/orderManagement/trajectory.vue

@@ -2,80 +2,103 @@
   <div class="center">
     <div class="center_css">
       <div class="top_css">
-         <el-radio v-model="radio" label="1" @change="change('1')">北斗导航</el-radio>
-          <el-radio v-model="radio" label="2" @change="change('2')">平台绘制</el-radio>
+        <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 v-if='querydata.orderStatus=="已完结"'>{{endDate}}</span><span v-else>运输中</span> )</div>
-          <div>发货地:{{querydata.sendPrivate}}{{querydata.sendCity}}{{querydata.sendArea}}{{querydata.sendDetailedAddress}}</div>
-          <div>卸货地:{{querydata.unloadPrivate}}{{querydata.unloadCity}}{{querydata.unloadArea}}{{querydata.unloadDetailedAddress}}</div>
+          <div>订单:{{ querydata.orderNo }}({{ startDate }} ~ <span
+              v-if='querydata.orderStatus == "已完结"'>{{ endDate }}</span><span v-else>运输中</span> )</div>
+          <div>
+            发货地:{{ querydata.sendPrivate }}{{ querydata.sendCity }}{{ querydata.sendArea }}{{ querydata.sendDetailedAddress }}
+          </div>
+          <div>
+            卸货地:{{ querydata.unloadPrivate }}{{ querydata.unloadCity }}{{ querydata.unloadArea }}{{ querydata.unloadDetailedAddress }}
+          </div>
         </div>
       </div>
       <div class="map">
-        <map-drag :radio='radio' :orderid='querydata.id'></map-drag>
+        <map-drag :radio='radio' :orderid='querydata.id' :currentPage="currentPage" :pageSize="pageSize"
+          ref="child"></map-drag>
       </div>
+      <el-pagination :current-page="currentPage" style="text-align: center; margin-top: 10px" v-if="radio==2"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"
+        @size-change="handleSizeChange" @current-change="handleCurrentChange" />
     </div>
   </div>
 </template>
 
 <script>
-  import {
-    travelpath
-  } from '@/api/orderManagement'
-  import mapDrag from '@/components/mapdrag/indexMap'
-  export default {
-    data() {
-      return {
-        radio: '1',
-        querydata:{},
-        endDate:'',
-        startDate:''
-      }
+import {
+  travelpath
+} from '@/api/orderManagement'
+import mapDrag from '@/components/mapdrag/indexMap'
+export default {
+  data() {
+    return {
+      radio: '1',
+      querydata: {},
+      endDate: '',
+      startDate: '',
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 20,
+    }
+  },
+  components: {
+    mapDrag
+  },
+  mounted() {
+    this.querydata = this.$route.query
+    this.getTime()
+  },
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.$refs.child.paging(this.currentPage,this.pageSize)
     },
-    components: {
-      mapDrag
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.$refs.child.paging(this.currentPage,this.pageSize)
     },
-    mounted() {
-      
-      this.querydata=this.$route.query
-      console.log(this.querydata)
-       this.getTime()
+    change(val) {
+      this.getTime()
+      this.currentPage=1
+      this.pageSize=10
+      this.radio = val
     },
-    methods:{
-      change(val){
-       this.getTime()
-        this.radio=val
-      },
-      getTime(){
-        let _obj = {}
-        _obj.orderId = this.querydata.id
-          travelpath(_obj).then(response => {
-            console.log(response)
-            this.startDate=response.data.startDate
-            this.endDate=response.data.endDate
-          })
-          .catch(() => {
-          })
-      }
+    getTime() {
+      let _obj = {}
+      _obj.orderId = this.querydata.id
+      _obj.currentPage = this.currentPage
+      _obj.pageSize = this.pageSize
+      travelpath(_obj).then(response => {
+        this.startDate = response.data.startDate
+        this.endDate = response.data.endDate
+        this.deptBudgetTotal = response.data.total
+      }).catch(() => {})
     }
   }
+}
 </script>
 
 <style lang="scss" scoped>
-  .center {
-    padding: 20px;
-    background: #f5f6f7;
-    height: calc(100vh - 5vh);
-  }
+.center {
+  padding: 20px;
+  background: #f5f6f7;
+  // height: calc(100vh - 5vh);
+}
 
-  .center_css {
-    background: #ffffff;
-    border-radius: 1px;
-    height: 100%;
-  }
+.center_css {
+  background: #ffffff;
+  border-radius: 1px;
+  height: 100%;
+}
 
-  .top_css {
-    padding: 10px;
-    display: flex;
+.top_css {
+  padding: 10px;
+  display: flex;
 
-  }
+}
 </style>

+ 1 - 1
src/views/settlementManagement/driverFeeSettlement.vue

@@ -82,7 +82,7 @@
         </el-table-column>
         <el-table-column label="操作" min-width="50">
           <template slot-scope="scope">
-            <el-link v-if='scope.row.status!="已付款"' target="_blank" type="primary" :underline="false" @click="payment(scope.row)">付款</el-link>
+            <el-link :disabled="scope.row.status!='待支付'" target="_blank" type="primary" :underline="false" @click="payment(scope.row)">付款</el-link>
           </template>
         </el-table-column>
       </el-table>

+ 1 - 1
vue.config.js

@@ -56,7 +56,7 @@ module.exports = {
         },
         proxy: {
             '/pb': {
-                target: 'http://192.168.110.55:8099/', 
+                target: 'http://192.168.110.9:8099/', 
                 // target: 'http://192.168.110.9:8099/',       
                 // target: 'https://apitest.changyuntong56.com',
                 changeOrigin: true, // 开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题