luobang 3 лет назад
Родитель
Сommit
65d48c9d2a

+ 2 - 2
build/utils.js

@@ -15,10 +15,10 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-//  let devModules = ['all']
+ let devModules = ['index','queue']
 // let devModules = ['index','appoint','sale','RMS','statisticalReport'];
 // let devModules = ['index','appoint','WMS'];
-let devModules = ['index','inward']
+// let devModules = ['index','inward']
 // let devModules = ['index','sale']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
 // let devModules = ['index','inward','statisticalReport']

+ 1 - 1
config/index.js

@@ -64,7 +64,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
+    target: "http://192.168.1.107:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 6 - 20
src/components/DilCommonUI/packages/table/src/table.vue

@@ -15,6 +15,7 @@
       @selection-change="selectionChange"
       @filter-change="filterChange"
       @row-click="rowClick"
+      @row-dblclick="rowDbClick"
       v-loading="loading"
       element-loading-text="玩命加载中"
       element-loading-spinner="el-icon-loading"
@@ -245,11 +246,6 @@ export default {
         this.dataRadioId = null;
       }
     }
-    // dataTabel: function() {
-    //   this.$nextTick(function() {
-    //     this.$refs.mainTable.setCurrentRow(this.dataTabel[0])
-    //   })
-    // }
   },
   methods: {
     // 刷新表格数据
@@ -258,24 +254,14 @@ export default {
       // 多选表格清空用户的选择
       this.$refs.mainTable.clearSelection();
     },
+    rowDbClick(row) {
+      console.log(row);
+      console.log("我被双击了");
+      this.$emit("rowDbClick", row);
+    },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
     }
-    // objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-    //     if (columnIndex === 0) {
-    //       if (rowIndex % 2 === 0) {
-    //         return {
-    //           rowspan: 2,
-    //           colspan: 1
-    //         };
-    //       } else {
-    //         return {
-    //           rowspan: 0,
-    //           colspan: 0
-    //         };
-    //       }
-    //     }
-    //   }
   }
 };
 </script>

+ 45 - 32
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -477,12 +477,12 @@
       <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
-            >物资名称</label
+            >物资名称/型号</label
           >
         </el-form-item>
         <el-form-item>
           <el-input
-            placeholder="请输入内容"
+            placeholder="请输入物资名称或型号"
             v-model="materialNameText"
             clearable
           ></el-input>
@@ -498,16 +498,6 @@
             ><template slot="prepend">Φ</template></el-input
           >
         </el-form-item>
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">型号</label>
-        </el-form-item>
-        <el-form-item>
-          <el-input
-            placeholder="请输入内容"
-            v-model="materialModelText"
-            clearable
-          ></el-input>
-        </el-form-item>
         <el-button
           type="primary"
           class="btn"
@@ -521,7 +511,11 @@
       </el-form>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="option" @selection-change="selectionChange">
+        <dilTable
+          v-bind.sync="option"
+          @selection-change="selectionChange"
+          @rowDbClick="rowDbClick"
+        >
         </dilTable>
       </div>
     </el-drawer>
@@ -531,12 +525,12 @@
       <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
-            >物资名称</label
+            >物资名称/型号</label
           >
         </el-form-item>
         <el-form-item>
           <el-input
-            placeholder="请输入内容"
+            placeholder="请输入物资名称或型号"
             v-model="materialNameText"
             clearable
           ></el-input>
@@ -552,16 +546,6 @@
             ><template slot="prepend">Φ</template></el-input
           >
         </el-form-item>
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">型号</label>
-        </el-form-item>
-        <el-form-item>
-          <el-input
-            placeholder="请输入内容"
-            v-model="materialModelText"
-            clearable
-          ></el-input>
-        </el-form-item>
         <el-button
           type="primary"
           class="btn"
@@ -914,6 +898,11 @@ export default {
     this.getAllsaleMan();
   },
   methods: {
+    rowDbClick(row) {
+      this.materialList1 = [];
+      this.materialList1.push(row);
+      this.makeSureMaterial();
+    },
     //获取所有的业务员数据
     getAllsaleMan() {
       this.axios.get("/api/v1/uc/getSalerList").then(res => {
@@ -995,6 +984,25 @@ export default {
         .then(res => {
           this.remarks = res.data.data;
         });
+      this.axios
+        .post(
+          "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
+        )
+        .then(res => {
+          console.log("匹配收货地址");
+          console.log(res);
+          const place = res.data.data;
+          console.log(place);
+          this.saleShipperAddressName =
+            place[0].addressProvince +
+            place[0].addressDistrict +
+            place[0].addressTown +
+            place[0].place;
+          this.saleShipperAddressId = place[0].shipperAddressId;
+          this.place1 = place[0].place;
+          this.saleMan = place[0].salerId;
+          this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
+        });
     },
     //以下是收货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
@@ -1036,6 +1044,8 @@ export default {
       } else {
         this.option.requestUrl =
           "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
+        this.materialNameText = null;
+        this.materialSpecificationText = null;
         this.table1 = true;
       }
     },
@@ -1154,6 +1164,7 @@ export default {
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
+      debugger;
       if (this.materialList.length == 0) {
         this.$message.warning("请至少为这一车添加一个物资!");
       } else if (!this.saleShipperAddressName && this.values == "no") {
@@ -1229,6 +1240,8 @@ export default {
       this.option1.requestUrl =
         "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
       this.drawer = true;
+      this.materialNameText = null;
+      this.materialSpecificationText = null;
       this.isOpenDrawer = 1;
       this.indexChangeMaterial = index;
     },
@@ -1477,21 +1490,22 @@ export default {
           "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
           this.materialNameText +
           "&materialSpecificationText=" +
-          this.materialSpecificationText +
-          "&materialModelText=" +
-          this.materialModelText;
+          this.materialSpecificationText;
       } else {
         this.option1.requestUrl =
           "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
           this.materialNameText +
           "&materialSpecificationText=" +
-          this.materialSpecificationText +
-          "&materialModelText=" +
-          this.materialModelText;
+          this.materialSpecificationText;
       }
     },
     // 确定
     makeSure() {
+      console.log(this.selectionList.length);
+      if (this.selectionList.length == 0) {
+        this.$message.warning("请先填写具体信息");
+        return;
+      }
       //获取是否自提字段
       this.options.forEach(e => {
         if (this.values == e.values) {
@@ -1567,7 +1581,6 @@ export default {
         saleRemark: this.remarks,
         mapList: mapList
       };
-      debugger;
       console.log(mapValue);
       //所有列件数都填写
       if (orderPlanWeightAllFill == 0) {

+ 13 - 16
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -57,7 +57,7 @@
                   :fetch-suggestions="querySearch"
                   placeholder="(必填)"
                   :trigger-on-focus="false"
-                  @select="handleSelect"
+                  @select="handleSelect(scope.row, scope.$index)"
                   @blur="checkRelationship(scope.$index)"
                   @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-autocomplete>
@@ -181,6 +181,7 @@ export default {
       carrierNameOptions: [],
       //当前车序号物资
       selectionList: [],
+      driverTel1: null,
       //是否可发送请求
       canSend: 1,
       tableTop: [
@@ -425,22 +426,17 @@ export default {
       }
     },
     //车牌号弹出层
-    handleSelect(item) {
-      console.log("item");
-      // let mapValue = {
-      //   capacityNumber:item.capacityNumber,
-      //   carrierId:this.receiveCarrierId,
-      //   carrierName:this.receiveCarrierName
-      // }
-      // this.axios
-      // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
-      // .then((res)=>{
-      //   if(res.data.code=="201"){
-      //     this.bindRelationship(mapValue);
-      //   }
-      // });
+    handleSelect(row, index) {
+      console.log(index);
+      this.axios
+        .post(
+          "/api/v1/ams/matchingDriverTelRecently?capacityNumber=" +
+            row.capacityNumber
+        )
+        .then(res => {
+          row.driverTel = res.data.data;
+        });
     },
-
     //以下是车牌号边输边查搜索
     querySearch(queryString, cb) {
       this.axios
@@ -538,6 +534,7 @@ export default {
     batchUpdateValue(row, index) {
       for (var i = index; i < this.spanArr[index] + index; i++) {
         this.selectionList[i].capacityNumber = row.capacityNumber;
+        this.selectionList[i].driverTel = this.driverTel1;
       }
     },
     //初始化线路

+ 133 - 110
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -15,8 +15,12 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 已审批 -->
-       <el-tab-pane label="已审批" name="four">
-        <dilTable v-bind.sync="option4" @selection-change="selectionChange" ref="table">
+      <el-tab-pane label="已审批" name="four">
+        <dilTable
+          v-bind.sync="option4"
+          @selection-change="selectionChange"
+          ref="table"
+        >
           <el-table-column fixed="right" label="操作" width="200">
             <template slot-scope="scope">
               <el-button
@@ -34,28 +38,26 @@
             </template>
           </el-table-column>
           <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
-      
     </el-tabs>
     <!-- 承运商模态框 -->
     <el-drawer
@@ -65,16 +67,30 @@
       size="40%"
       :show-close="false"
     >
-      <el-input placeholder="请输入内容" v-model="index"  
-      style="margin-top: 10px; margin-left: 20px;width:250px" clearable> </el-input
-      ><el-button type="primary" class="btn" @click="onclickCarrier" style="margin-left: 4px;">
+      <el-input
+        placeholder="请输入内容"
+        v-model="index"
+        style="margin-top: 10px; margin-left: 20px;width:250px"
+        clearable
+      >
+      </el-input
+      ><el-button
+        type="primary"
+        class="btn"
+        @click="onclickCarrier"
+        style="margin-left: 4px;"
+      >
         <i class="el-icon-search"></i>查询
       </el-button>
       <!-- <el-button @click="open">取消</el-button> -->
       <el-button type="primary" @click="selectMakeSure">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的承运商 -->
-        <dilTable v-bind.sync="carrier" @radio-change="currentRadioChange" :drawer="drawer">
+        <dilTable
+          v-bind.sync="carrier"
+          @radio-change="currentRadioChange"
+          :drawer="drawer"
+        >
         </dilTable>
       </div>
     </el-drawer>
@@ -93,31 +109,28 @@ export default {
       carrierName: null,
       option: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
       },
       option3: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+        requestUrl: "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409"
       },
       option4: {
         // 表格请求数据的地址
         requestUrl:
           "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
-          selectionType: "select",
+        selectionType: "select"
       },
       carrier: {
-					requestUrl: "",
-					selectionType: "radio",
-			},
+        requestUrl: "",
+        selectionType: "radio"
+      },
       mapList: [],
-      mapItemList:[],
+      mapItemList: [],
       //记录旧的row对象 (销售公司已审批)
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
@@ -138,23 +151,23 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       //(销售公司已审批)
       tableData: [],
@@ -163,86 +176,99 @@ export default {
       //(已上报)
       tableData2: [],
       //(未上报)
-      tableData3: [],
+      tableData3: []
     };
   },
   methods: {
-    refresh(){
+    refresh() {
       this.$router.go(0);
     },
     handleClick(tab, event) {
       console.log(tab, event);
     },
     onclick() {
-      if(this.activeName == "first"){
-        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
-      }else if(this.activeName == "second"){
-        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
-      }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      if (this.activeName == "first") {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" + this.input;
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl =
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" + this.input;
+      } else if (this.activeName == "four") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+          this.input;
       }
     },
     //模糊查询承运商
-    onclickCarrier(){
+    onclickCarrier() {
       this.carrier.requestUrl =
-      "/api/v1/uc/getCarrierListByLike?apiId=412&index=" + this.index + "&i=" + new Date();
+        "/api/v1/uc/getCarrierListByLike?apiId=412&index=" +
+        this.index +
+        "&i=" +
+        new Date();
     },
     selectionChange(selection) {
+      this.mapList = [];
       this.mapList = selection;
     },
     currentRadioChange(row) {
-			this.carrierId = row.carrierId,
-      this.carrierName= row.carrierName
-		},
-    empower(){
-      if(this.mapList.length==0){
+      (this.carrierId = row.carrierId), (this.carrierName = row.carrierName);
+    },
+    empower() {
+      if (this.mapList.length == 0) {
         this.$message.warning("请先选择至少一个销售订单");
-      }else{
-        this.carrier.requestUrl = "/api/v1/uc/getCarrierListByLike?apiId=412&i="+new Date();
+      } else {
+        this.carrier.requestUrl =
+          "/api/v1/uc/getCarrierListByLike?apiId=412&i=" + new Date();
         this.drawer = true;
-      }  
+      }
     },
-    selectMakeSure(){
+    selectMakeSure() {
       this.index = null;
       this.drawer = false;
-      this.$confirm("是否确认授权选中的销售订单给承运商:("+this.carrierName+")", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
+      this.$confirm(
+        "是否确认授权选中的销售订单给承运商:(" + this.carrierName + ")",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        }
+      )
         .then(() => {
-          this.mapList.forEach((item) => {
-          //初始化mapItem
-          var mapItem={
-                  //销售订单id
-                  saleOrderId : 0,
-              };
-          mapItem.saleOrderId=item.saleOrderId;
-          this.mapItemList.push(mapItem);
+          this.mapList.forEach(item => {
+            //初始化mapItem
+            var mapItem = {
+              //销售订单id
+              saleOrderId: 0
+            };
+            mapItem.saleOrderId = item.saleOrderId;
+            this.mapItemList = [];
+            this.mapItemList.push(mapItem);
           });
-           //初始化传递的参数
+          //初始化传递的参数
           let mapValue = {
-            saleOrderIds : this.mapItemList,
-            carrierId : this.carrierId
-          }
+            saleOrderIds: this.mapItemList,
+            carrierId: this.carrierId
+          };
           this.axios
-            .post(
-              "/api/v1/ams/saleOrderEmpowerCarrier",mapValue
-            ).then((res) => {
-              if(res.data.code=='0'){
-                this.$message({ type: "success",message: "授权成功!",});
-                this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&i="+new Date();
+            .post("/api/v1/ams/saleOrderEmpowerCarrier", mapValue)
+            .then(res => {
+              if (res.data.code == "0") {
+                this.$message({ type: "success", message: "授权成功!" });
+                this.option4.requestUrl =
+                  "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&i=" +
+                  new Date();
               }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消授权!",
+            message: "取消授权!"
           });
         });
-      
     },
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
@@ -250,7 +276,7 @@ export default {
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },
-    coproductSendClick(saleOrderId){
+    coproductSendClick(saleOrderId) {
       this.$router.push("/addSaleOrderCoproductSend/" + saleOrderId);
     },
     // -------查看物资详情 (已审批)
@@ -278,8 +304,8 @@ export default {
       this.oldRow = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData = res.data.data;
         });
     },
@@ -309,8 +335,8 @@ export default {
       this.oldRow1 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData1 = res.data.data;
         });
     },
@@ -340,8 +366,8 @@ export default {
       this.oldRow2 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
@@ -371,8 +397,8 @@ export default {
       this.oldRow3 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData3 = res.data.data;
         });
     },
@@ -383,18 +409,15 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "上传成功!",
+            message: "上传成功!"
           });
           this.axios
-            .post(
-              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
-                saleOrderId
-            )
+            .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
             .then(() => {
               this.$router.go(0);
             });
@@ -402,7 +425,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消上传!",
+            message: "取消上传!"
           });
         });
     },
@@ -413,12 +436,12 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           this.axios
             .post(
@@ -432,14 +455,14 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
   .top {
     padding: 1.25rem 0.375rem;
@@ -449,4 +472,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 6 - 3
src/views/queue/components/qmsEnFacotory/queueFApply.vue

@@ -18,7 +18,6 @@
       <el-table
         :data="tableData"
         :span-method="objectSpanMethod"
-        :stripe="true"
         fit
         border
         style="width: 100%; margin-top: 20px"
@@ -30,7 +29,11 @@
           label="序号"
           fixed
         ></el-table-column>
-        <el-table-column prop="orderNumber" label="运输订单号">
+        <el-table-column
+          prop="orderNumber"
+          label="运输订单号"
+          show-overflow-tooltip="true"
+        >
         </el-table-column>
         <el-table-column prop="capacityNumber" label="车牌号">
         </el-table-column>
@@ -86,7 +89,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].cxh === data[i - 1].cxh) {
+          if (data[i].orderNumber === data[i - 1].orderNumber) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
           } else {

+ 2 - 3
src/views/queue/components/qmsEnFacotory/queueFCancel.vue

@@ -21,8 +21,7 @@
       <el-table
         :data="tableData"
         :span-method="objectSpanMethod"
-        :stripe="true"
-        fit
+        :fit="true"
         border
         style="width: 100%; margin-top: 20px"
         max-height="250px"
@@ -92,7 +91,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].cxh === data[i - 1].cxh) {
+          if (data[i].orderNumber === data[i - 1].orderNumber) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
           } else {

+ 2 - 3
src/views/queue/components/qmsEnFacotory/queueFEnd.vue

@@ -18,8 +18,7 @@
       <el-table
         :data="tableData"
         :span-method="objectSpanMethod"
-        :stripe="true"
-        fit
+        :fit="true"
         border
         style="width: 100%; margin-top: 20px"
         max-height="250px"
@@ -81,7 +80,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].cxh === data[i - 1].cxh) {
+          if (data[i].orderNumber === data[i - 1].orderNumber) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
           } else {

+ 66 - 38
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -68,16 +68,6 @@
             ><template slot="prepend">Φ</template></el-input
           >
         </el-form-item>
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">型号</label>
-        </el-form-item>
-        <el-form-item>
-          <el-input
-            placeholder="请输入内容"
-            v-model="materialModelText"
-            clearable
-          ></el-input>
-        </el-form-item>
         <el-button
           type="primary"
           class="btn"
@@ -91,17 +81,49 @@
       </el-form>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="optionMa" @selection-change="selectionChange2">
+        <dilTable
+          v-bind.sync="optionMa"
+          @selection-change="selectionChange2"
+          @rowDbClick="rowDbClick"
+        >
         </dilTable>
       </div>
     </el-drawer>
     <div class="tabs">
       <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="单拼车辆排队链表" name="first">
-          <dilTable v-bind.sync="option1" @selection-change="selectionChange">
-            <el-table-column fixed="right" label="操作" width="280">
+          <el-table
+            :data="tableData1"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChange"
+            max-height="500px"
+          >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column type="index" width="50"> </el-table-column>
+            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            </el-table-column>
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="materialName" label="物资名称">
+            </el-table-column>
+            <el-table-column prop="materialSpecification" label="物资规格">
+            </el-table-column>
+            <el-table-column prop="materialModel" label="物资型号">
+            </el-table-column>
+            <el-table-column prop="materialNumber" label="物资件数">
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+            <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
-                <el-select size="mini" fixed="right" v-model="scope.row.id">
+                <el-select size="mini" v-model="scope.row.id">
                   <el-option
                     v-for="item in option"
                     :key="item.id"
@@ -110,12 +132,16 @@
                   >
                   </el-option>
                 </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
               </template>
             </el-table-column>
-          </dilTable>
+          </el-table>
         </el-tab-pane>
         <el-tab-pane label="多拼车辆排队链表" name="second">
           <el-table
@@ -183,7 +209,7 @@ export default {
       inputText: "",
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0",
+        requestUrl: "",
         selectionType: "select"
       },
       optionMa: {
@@ -194,6 +220,7 @@ export default {
       },
       activeName: "first",
       tableData: [],
+      tableData1: [],
       //存放每一行记录的合并数
       spanArr: [],
       maplist: [],
@@ -212,23 +239,26 @@ export default {
     };
   },
   watch: {
-    activeName() {
-      console.log(this.activeName);
-    }
+    activeName() {}
   },
   mounted() {
     this.infomation();
+    this.getSpellingArray();
+    this.getNoSpellingArray();
   },
   methods: {
+    rowDbClick(row) {
+      this.materialList = [];
+      this.materialList.push(row);
+      this.makeSureMaterial();
+    },
     //物资模态框查询
     onclickMaterial1() {
       this.optionMa.requestUrl =
         "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
         this.materialNameText +
         "&materialSpecificationText=" +
-        this.materialSpecificationText +
-        "&materialModelText=" +
-        this.materialModelText;
+        this.materialSpecificationText;
     },
     onclickMaterial() {
       this.table1 = true;
@@ -256,9 +286,11 @@ export default {
       this.materialList = [];
       this.materialList1 = [];
       if (this.activeName == "first") {
-        (this.option1.requestUrl =
-          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0"),
-          map;
+        this.axios
+          .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0", map)
+          .then(res => {
+            this.tableData1 = res.data.data;
+          });
       } else {
         this.axios
           .post("/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1", map)
@@ -285,7 +317,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].capacityNumber === data[i - 1].capacityNumber) {
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
           } else {
@@ -316,13 +348,18 @@ export default {
     },
     handleClick() {
       if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0&i=" +
-          new Date();
+        this.getNoSpellingArray();
       } else {
         this.getSpellingArray();
       }
     },
+    getNoSpellingArray() {
+      this.axios
+        .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=" + new Date())
+        .then(res => {
+          this.tableData1 = res.data.data;
+        });
+    },
     getSpellingArray() {
       this.axios
         .post(
@@ -335,9 +372,6 @@ export default {
           this.getSpanArr(this.tableData);
         });
     },
-    allowEnfactory(scope) {
-      console.log(scope);
-    },
     onclick() {
       if (this.activeName == "first") {
         this.option1.requestUrl =
@@ -363,11 +397,6 @@ export default {
       this.maplist = [];
       this.maplist = selection;
     },
-    selectionChange(selection) {
-      this.maplist = [];
-      console.log(selection);
-      this.maplist = selection;
-    },
     updateBill(scope) {
       console.log(scope.row.capacityId);
       this.$router.push(
@@ -392,7 +421,6 @@ export default {
         }
         this.filterArr(this.maplist[i].resultId);
       }
-      debugger;
       var filterArr2 = [];
       this.filterArr1.forEach(e => {
         if (filterArr2.indexOf(e) === -1) {

+ 780 - 666
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -1,725 +1,839 @@
 <template>
-    <div class="container">
-        <div id="amap-container"></div>
-         <div class="controller">
-             <div class="in_transit_information">
-                <span class="item_details">车牌号:</span> <el-input style="width: 100px;" class="inputStyle" v-model="carNumber"> </el-input>
-             </div>
-             <div class="in_transit_information2">
-                <span class="item_details">时间段:</span>
-                <el-date-picker
-                class="date_picker_style"
-                v-model="time"
-                @change="changeTime"
-                type="datetimerange"
-                format="yyyy-MM-dd HH:mm:ss"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-                </el-date-picker>
-                <el-button type="primary" class="searchstyle" @click="initData">查询</el-button>
-             </div>
-             <div class="driving_information">  
-                <span class="item_details2">时间:{{runRoute.gtm}}</span>
-                <br/>
-                <span class="item_details2" >车速:{{runRoute.spd}}千米/小时</span>
-                <br/>
-             </div>
-              <div class="map-control">
-                <!--播放暂停按钮-->
-                进度:
-                <Icon v-if="!isPlay" class="play-icon play"  type="ios-play" @click="isPlay=true;play();"/>
-                <Icon v-else class="play-icon pause" type="ios-pause" @click="isPlay=false;stop();navgControl('pause')"/>
-                <Icon class="play-icon quickly"  type="ios-play" @click="addProgress()"/>
-                <div class="mySlider"><Slider class="map-slider" v-model="sliderVal" :tip-format="hideFormat" :step="0.0001"></Slider></div>
-                <!--速度-->
-                <div class="mySlider2"><el-slider v-model="speedVal" show-input></el-slider></div>
-            </div>
-            <div class="in_transit_information3" v-if="listPath.length>0">
-                <span class="item_details">停车时长:</span>
-                <el-select style="width:100px" @change="changeParkingTime" v-model="parkingTime" placeholder="停车">
-                <el-option
-                v-for="item in parkingOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
-                </el-option>
-                </el-select>
-            </div>
-            <div class="in_transit_information3" v-if="listPath.length>0">
-                <span class="item_details">离线时长:</span>
-                <el-select style="width:100px" @change="changeLeaveTime" v-model="leaveTime" placeholder="离线">
-                <el-option
-                v-for="item in parkingOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
-                </el-option>
-                </el-select>
-            </div>
-         </div>
+  <div class="container">
+    <div id="amap-container"></div>
+    <div class="controller">
+      <div class="in_transit_information">
+        <span class="item_details">车牌号:</span>
+        <el-input
+          style="width: 100px;"
+          class="inputStyle"
+          v-model="carNumber"
+          clearable
+        >
+        </el-input>
+      </div>
+      <div class="in_transit_information2">
+        <span class="item_details">时间段:</span>
+        <el-date-picker
+          class="date_picker_style"
+          v-model="time"
+          @change="changeTime"
+          type="datetimerange"
+          format="yyyy-MM-dd HH:mm:ss"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+        <el-button type="primary" class="searchstyle" @click="initData"
+          >查询</el-button
+        >
+      </div>
+      <div class="driving_information">
+        <span class="item_details2">时间:{{ runRoute.gtm }}</span>
+        <br />
+        <span class="item_details2">车速:{{ runRoute.spd }}千米/小时</span>
+        <br />
+      </div>
+      <div class="map-control">
+        <!--播放暂停按钮-->
+        进度:
+        <Icon
+          v-if="!isPlay"
+          class="play-icon play"
+          type="ios-play"
+          @click="
+            isPlay = true;
+            play();
+          "
+        />
+        <Icon
+          v-else
+          class="play-icon pause"
+          type="ios-pause"
+          @click="
+            isPlay = false;
+            stop();
+            navgControl('pause');
+          "
+        />
+        <Icon
+          class="play-icon quickly"
+          type="ios-play"
+          @click="addProgress()"
+        />
+        <div class="mySlider">
+          <Slider
+            class="map-slider"
+            v-model="sliderVal"
+            :tip-format="hideFormat"
+            :step="0.0001"
+          ></Slider>
+        </div>
+        <!--速度-->
+        <div class="mySlider2">
+          <el-slider v-model="speedVal" show-input></el-slider>
+        </div>
+      </div>
+      <div class="in_transit_information3" v-if="listPath.length > 0">
+        <span class="item_details">停车时长:</span>
+        <el-select
+          style="width:100px"
+          @change="changeParkingTime"
+          v-model="parkingTime"
+          placeholder="停车"
+        >
+          <el-option
+            v-for="item in parkingOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </div>
+      <div class="in_transit_information3" v-if="listPath.length > 0">
+        <span class="item_details">离线时长:</span>
+        <el-select
+          style="width:100px"
+          @change="changeLeaveTime"
+          v-model="leaveTime"
+          placeholder="离线"
+        >
+          <el-option
+            v-for="item in parkingOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </div>
     </div>
+  </div>
 </template>
 <script>
-import { shallowRef } from '@vue/reactivity'
-import { lazyAMapApiLoaderInstance } from 'vue-amap';
-import { sjTime,stringToDate } from "@/utils/sharedJsFile";
-import Slider from './slider.vue'
-Vue.use(Slider)
-import Vue from 'vue';
+import { shallowRef } from "@vue/reactivity";
+import { lazyAMapApiLoaderInstance } from "vue-amap";
+import { sjTime, stringToDate } from "@/utils/sharedJsFile";
+import Slider from "./slider.vue";
+Vue.use(Slider);
+import Vue from "vue";
 export default {
-    name: "PathView",
-    setup(){
-        const map = shallowRef(null);
-        return{
-            map,
+  name: "PathView",
+  setup() {
+    const map = shallowRef(null);
+    return {
+      map
+    };
+  },
+  watch: {
+    speedVal: {
+      deep: true,
+      handler(val, oldVal) {
+        let that = this;
+        if (that.pathNavigator != null) {
+          that.pathNavigator.setSpeed(100 * val);
         }
-    },
-     watch:{
-        speedVal:{
-            deep: true,
-            handler(val, oldVal) {
-                let that=this;
-                 if(that.pathNavigator!=null){
-                    that.pathNavigator.setSpeed(100*val)
-                }
-            }
-        }
-    },
-    data() {
-        return {
-        //一、 查询相关
-            //选择时间区间
-            time:[],
-            //查询车牌号
-            carNumber:"",
-            //选择停车时长
-            parkingTime:null,
-            //停车时长选择区间
-            parkingOptions: [{
-                value: 600000,
-                label: '10分钟'
-                }, {
-                value: 1200000,
-                label: '20分钟'
-                }, {
-                value: 1800000,
-                label: '30分钟'
-                }, {
-                value: 2400000,
-                label: '40分钟'
-                }, {
-                value: 3000000,
-                label: '50分钟'
-                }
-                , {
-                value: 3600000,
-                label: '60分钟'
-                }
-            ],
-            //选择离线时长
-            leaveTime:null,
-            //离线时长选择区间
-            leaveOptions: [{
-                value: 600000,
-                label: '10分钟'
-                }, {
-                value: 1200000,
-                label: '20分钟'
-                }, {
-                value: 1800000,
-                label: '30分钟'
-                }, {
-                value: 2400000,
-                label: '40分钟'
-                }, {
-                value: 3000000,
-                label: '50分钟'
-                }
-                , {
-                value: 3600000,
-                label: '60分钟'
-                }
-            ],
-        //二、 展示相关
-            //离线图标
-            leaveMark:[],
-            //停车图标
-            parkMark:[],
-            //开始地址
-            startPointName:"",
-            //结束地址
-            endPointName:"",
-            //小车行驶当前点所在的位置
-            runRoute:
-            {
-                //正北方向夹角  
-                agl: "0",
-                //当前的时间
-                gtm: "0",
-                //海拔
-                hgt: "0",
-                //进度
-                lat: "0", 
-                //纬度
-                lon: "0",
-                //累计行驶距离(是车辆GPS安装开始到现在的距离,如果你想要查询范围内的行驶距离,用开始的累计距离和结束点累计距离相减)
-                mil: "0",
-                //这个时间的速度
-                spd: "0"
-            },
-            //小车行驶当前点下标
-            point:"",
-        //三、 播放相关
-            //是否暂停
-            isPlay:true,
-            //播放进度值
-            sliderVal:0,
-            //播放速度值
-            speedVal:10,
-        //四、组件相关
-            //自定义窗体信息
-            // ctmarkes:{
-            //     lat:"33.015888071433764",
-            //     lon : "115.96995235868168",
-            //     title:"豫SE8888",
-            //     details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
-            // },
-        //五、返回值相关
-            //返回值集合
-            listPath:[],
-        //六、地图组件相关值
-            //创建轨迹
-            pathSimplifierIns:{},
-            //巡回器
-            pathNavigator:{},
-            //初始化巡回器速度
-            speed:1000,   
-            //地图解析
-            geocoder:null,
-        };
-    },
-    created(){
-      
-    },
-    mounted() {
-        
-    },
-    methods: {
-    
-        //停车时间改变
-        changeParkingTime(){
-            let that=this;
-            //清除之前的停车点
-            that.hideParkingMark();
-            //计算时间的点
-            let calculationPoint=null;
-            that.listPath[0].runRoute.forEach(function(item,indexOf){      
-                if(indexOf+1<that.listPath[0].runRoute.length){
-                    //判断calculationPoint是否为空,如果是空的说明当前没有在计算停车时间
-                    if(calculationPoint==null&&item.spd=='0.0'){
-                        calculationPoint=item
-                    } else if(calculationPoint!=null&&item.spd!='0.0'){
-                        let beforeTime=that.stringToDate(calculationPoint.gtm)
-                        let item2=that.listPath[0].runRoute[indexOf];
-                        let afterTime=that.stringToDate(item2.gtm);
-                        let second=afterTime-beforeTime;
-                        if(second>that.parkingTime){
-                             let message='停车:'+second/60000;
-                             that.initParkingMarkes(20,35,require('@/assets/img/start.png'),calculationPoint.lon,calculationPoint.lat,message.split('.')[0]+"分钟");
-                        }
-                        calculationPoint=null;
-                    }
-                }
-            });
-        },
-        //停车所有离线图标
-        hideParkingMark(){
-            let that=this;
-            that.parkMark.forEach(function(item,indexOf){    
-                item.hide();
-            });
-        },
-        //离线时间改变时获得超过时间的点信息
-        changeLeaveTime(){
-            let that=this;
-            //关闭所有图标
-            that.hideLeaveMark();
-            that.listPath[0].runRoute.forEach(function(item,indexOf){      
-                if(indexOf+1<that.listPath[0].runRoute.length){
-                    let beforeTime=that.stringToDate(item.gtm)
-                    let item2=that.listPath[0].runRoute[indexOf+1];
-                    let afterTime=that.stringToDate(item2.gtm);
-                    let second=afterTime-beforeTime;
-                    if(second>that.leaveTime){
-                        let message='离线:'+second/60000;
-                        that.initLeaveMarkes(20,35,require('@/assets/img/start.png'),item2.lon,item2.lat,message.split('.')[0]+"分钟");
-                    }
-                }
-            });
+      }
+    }
+  },
+  data() {
+    return {
+      //一、 查询相关
+      //选择时间区间
+      time: [],
+      //查询车牌号
+      carNumber: "",
+      //选择停车时长
+      parkingTime: null,
+      //停车时长选择区间
+      parkingOptions: [
+        {
+          value: 600000,
+          label: "10分钟"
         },
-        //关闭所有离线图标
-        hideLeaveMark(){
-            let that=this;
-            that.leaveMark.forEach(function(item,indexOf){    
-                item.hide();
-            });
+        {
+          value: 1200000,
+          label: "20分钟"
         },
-        //字符串转为Date
-        stringToDate(dateString){
-            let dateStr=dateString.replace('年','-').replace('月','-').replace('日','');   
-            return Date.parse(dateStr);
+        {
+          value: 1800000,
+          label: "30分钟"
         },
-        //校验查询时间
-        changeTime(){
-            let that=this;
-            console.log((that.time[1]-that.time[0])-(86400000*3))
-            if((that.time[1]-that.time[0])>86400000*3){
-                 this.$message.error('时间查询范围不能超过3天');
-                 that.time=[];
-            }
+        {
+          value: 2400000,
+          label: "40分钟"
         },
-        //启动
-        play(){
-            let that =this;
-            that.pathNavigator.resume();
+        {
+          value: 3000000,
+          label: "50分钟"
         },
-        //停止
-        stop(){
-            let that =this;
-            that.pathNavigator.pause();
+        {
+          value: 3600000,
+          label: "60分钟"
+        }
+      ],
+      //选择离线时长
+      leaveTime: null,
+      //离线时长选择区间
+      leaveOptions: [
+        {
+          value: 600000,
+          label: "10分钟"
         },
-        //添加进度
-        addProgress(){
-            let that =this;
-            let increment=(that.listPath[0].runPath.length*0.1)
-            that.pathNavigator.start(((that.point+increment)%that.listPath[0].runPath.length))
+        {
+          value: 1200000,
+          label: "20分钟"
         },
-        //进度监听
-        hideFormat(value){
-            let that=this;
-            that.sliderVal=value;
+        {
+          value: 1800000,
+          label: "30分钟"
         },
-        //获得开始地址
-        getStartPointName(lnglatXY){
-            let that=this;
-            console.log("start",that.geocoder)
-            that.geocoder.getAddress(lnglatXY, function(status, result) {
-                if (status === 'complete' && result.info === 'OK') {
-                    that.startPointName = result.regeocode.formattedAddress;
-                }
-            });  
+        {
+          value: 2400000,
+          label: "40分钟"
         },
-         //获得结束地址
-        getEndPointName(lnglatXY){
-            let that=this;
-            that.geocoder.getAddress(lnglatXY, function(status, result) {
-                if (status === 'complete' && result.info === 'OK') {
-                    that.endPointName = result.regeocode.formattedAddress;
-                    that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")","起点:"+that.startPointName+"<br/>"+"终点:"+that.endPointName,lnglatXY[0],lnglatXY[1])
-                }
-            });  
+        {
+          value: 3000000,
+          label: "50分钟"
         },
-        //初始化数据
-        initData(){
-            let that=this;
-            that.listPath=[];
-            if(that.carNumber==""){
-                this.$message.error('车牌号不能为空!');
-                return;
-            }
-            if(that.time==[]){
-                 this.$message.error('请选择时间');
+        {
+          value: 3600000,
+          label: "60分钟"
+        }
+      ],
+      //二、 展示相关
+      //离线图标
+      leaveMark: [],
+      //停车图标
+      parkMark: [],
+      //开始地址
+      startPointName: "",
+      //结束地址
+      endPointName: "",
+      //小车行驶当前点所在的位置
+      runRoute: {
+        //正北方向夹角
+        agl: "0",
+        //当前的时间
+        gtm: "0",
+        //海拔
+        hgt: "0",
+        //进度
+        lat: "0",
+        //纬度
+        lon: "0",
+        //累计行驶距离(是车辆GPS安装开始到现在的距离,如果你想要查询范围内的行驶距离,用开始的累计距离和结束点累计距离相减)
+        mil: "0",
+        //这个时间的速度
+        spd: "0"
+      },
+      //小车行驶当前点下标
+      point: "",
+      //三、 播放相关
+      //是否暂停
+      isPlay: true,
+      //播放进度值
+      sliderVal: 0,
+      //播放速度值
+      speedVal: 10,
+      //四、组件相关
+      //自定义窗体信息
+      // ctmarkes:{
+      //     lat:"33.015888071433764",
+      //     lon : "115.96995235868168",
+      //     title:"豫SE8888",
+      //     details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
+      // },
+      //五、返回值相关
+      //返回值集合
+      listPath: [],
+      //六、地图组件相关值
+      //创建轨迹
+      pathSimplifierIns: {},
+      //巡回器
+      pathNavigator: {},
+      //初始化巡回器速度
+      speed: 1000,
+      //地图解析
+      geocoder: null
+    };
+  },
+  created() {},
+  mounted() {},
+  methods: {
+    //停车时间改变
+    changeParkingTime() {
+      let that = this;
+      //清除之前的停车点
+      that.hideParkingMark();
+      //计算时间的点
+      let calculationPoint = null;
+      that.listPath[0].runRoute.forEach(function(item, indexOf) {
+        if (indexOf + 1 < that.listPath[0].runRoute.length) {
+          //判断calculationPoint是否为空,如果是空的说明当前没有在计算停车时间
+          if (calculationPoint == null && item.spd == "0.0") {
+            calculationPoint = item;
+          } else if (calculationPoint != null && item.spd != "0.0") {
+            let beforeTime = that.stringToDate(calculationPoint.gtm);
+            let item2 = that.listPath[0].runRoute[indexOf];
+            let afterTime = that.stringToDate(item2.gtm);
+            let second = afterTime - beforeTime;
+            if (second > that.parkingTime) {
+              let message = "停车:" + second / 60000;
+              that.initParkingMarkes(
+                20,
+                35,
+                require("@/assets/img/start.png"),
+                calculationPoint.lon,
+                calculationPoint.lat,
+                message.split(".")[0] + "分钟"
+              );
             }
-            that.axios.post("/api/v1/otms/fullPathVisualizationByCarNumber",{
-                "capacityNumber":that.carNumber,
-                "startTime":that.formatDate(that.time[0],"yyyy-MM-dd hh:mm:ss"),
-                "endTime":that.formatDate(that.time[1],"yyyy-MM-dd hh:mm:ss"),
-            }).then((res) => {
-                 if(res.data.startAndEndRoutes!=''){
-                     that.listPath=res.data.startAndEndRoutes;
-                    that.initMap();
-                 }else{
-                     this.$message.error('车辆没有开启GPS');
-                 }
-            });
-        },
-        //初始化地图
-        initMap(){
-            lazyAMapApiLoaderInstance.load().then(() => {
-                let that=this;
-                that.map = new AMap.Map("amap-container",{  //设置地图容器id
-                    viewMode:"2D",    //是否为2D地图模式
-                    zoom:10,           //初始化地图级别
-                    center:[105.602725,37.076636], //初始化地图中心点位置
-                });
-                //初始化
-                that.initGeocoder();
-                //初始化巡航轨迹和巡航器
-                that.initPathSimplifier();
-                //初始化起点、当前点、当前点
-                that.initThreeMarker();
-                //初始化当前点标记
-                //that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
-                //that.initEndline();
-                
-            });
-        },
-        //结束点
-        initEndline(){
-            let that=this;
-            that.initPolyline(that.listPath[0].estimatePath,"#FF0000");
-        },
-        //创建起点终点当前点
-        initThreeMarker(){
-            let that=this;
-            that.listPath.forEach((element,index) => {
-                 //起点名称
-                that.getStartPointName([element.startPoint.lon,element.startPoint.lat])
-               
-                
-                //开始标记点
-                if(element.startPoint.lon!=''&&element.startPoint.lat!=''){
-                   
-                    that.initMarkes(20,35,require('@/assets/img/start.png'),element.startPoint.lon,element.startPoint.lat,'起点');
-                }
-                //结束标记点
-                if(element.endPoint!={}&&element.endPoint!=''&&element.endPoint!=null){
-                    // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
-                     //终点名称
-                    that.getEndPointName([element.endPoint.lon,element.endPoint.lat]);
-                }else{
-                    // that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
-                     //终点名称
-                    that.getEndPointName([element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat])
-                }
-               
-            });
-           
-        },
-        //初始化窗体
-        initCustomMarkes(title,details,lon,lat){
-             let that=this;
-            //自定义窗体内容
-            var content = [
-                "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>"+title+"</font>",
-                "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>"+details+"</font></div></div>",
-            ];
-            // 创建 infoWindow 实例	
-            var infoWindow = new AMap.InfoWindow({
-                content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
-            });
-            // 打开信息窗体
-            infoWindow.open(that.map,[lon,lat]);
-        },
-        //初始化预计轨迹
-        initPolyline(path,color){
-            let that=this;
-             //预计轨迹
-            var endLine = new AMap.Polyline({
-                map:that.map,//地图组件
-                path: path,//预计轨迹
-                isOutline: true,
-                outlineColor: color,//轨迹颜色
-                borderWeight: 0,
-                strokeColor: "#FF0000", 
-                strokeOpacity: 1,
-                strokeWeight: 5,
-                // 折线样式还支持 'dashed'
-                strokeStyle: "solid",
-                // strokeStyle是dashed时有效
-                strokeDasharray: [10, 5],
-                lineJoin: 'round',
-                lineCap: 'round',
-                zIndex: 50,
-            })
-            that.map.setFitView([[ endLine ]])
-        },
-        initParkingMarkes(weight,height,image,lon,lat,title){
-            let that=this;
-            //图标标记点
-            let pointicon = new AMap.Icon({
-                size: new AMap.Size(weight, height), // 图标尺寸
-                image: image, // Icon的图像
-                imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
-                imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
-            });
-            // 创建一个 Marker 实例:
-            var pointmarker = new AMap.Marker({
-                position: new AMap.LngLat(lon, lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
-                icon: pointicon, 
-                title: title
-            });
-            that.parkMark.push(pointmarker)
-            // 将创建的点标记添加到已有的地图实例:
-            that.map.add(pointmarker);
-        },
-        //创建离线和停车的标记
-        initLeaveMarkes(weight,height,image,lon,lat,title){
-            let that=this;
-            //图标标记点
-            let pointicon = new AMap.Icon({
-                size: new AMap.Size(weight, height), // 图标尺寸
-                image: image, // Icon的图像
-                imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
-                imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
-            });
-            // 创建一个 Marker 实例:
-            var pointmarker = new AMap.Marker({
-                position: new AMap.LngLat(lon, lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
-                icon: pointicon, 
-                title: title
-            });
-            that.leaveMark.push(pointmarker)
-            // 将创建的点标记添加到已有的地图实例:
-            that.map.add(pointmarker);
-        },
-        //创建简单的标记
-        initMarkes(weight,height,image,lon,lat,title){
-            let that=this;
-            //图标标记点
-            let pointicon = new AMap.Icon({
-                size: new AMap.Size(weight, height), // 图标尺寸
-                image: image, // Icon的图像
-                imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
-                imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
-            });
-            // 创建一个 Marker 实例:
-            var pointmarker = new AMap.Marker({
-                position: new AMap.LngLat(lon, lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
-                icon: pointicon, 
-                title: title
-            });
-            // 将创建的点标记添加到已有的地图实例:
-            that.map.add(pointmarker);
-        },
-        //创建轨迹和巡航器
-        initPathSimplifier() {
-            let that=this;
-            // ...你的操作
-            new AMapUI.load(['ui/misc/PathSimplifier'], (PathSimplifier) => {
-                if (!PathSimplifier.supportCanvas) {
-                    alert('当前环境不支持 Canvas!')
-                    return
-                }
-                //创建轨迹和巡航器
-                // 创建组件实例
-                that.pathSimplifierIns = new PathSimplifier({
-                    map: that.map,
-                    zIndex: 100, // 图层叠加顺序
-                    data: that.listPath, // 巡航路径
-                    // 获取巡航路径中的路径坐标数组
-                    getPath: (pathData, pathIndex) => {
-                        return pathData.runPath;
-                    },
-                    //鼠标悬浮停时显示消息
-                    getHoverTitle: function(pathData, pathIndex, pointIndex) {
-                        //返回鼠标悬停时显示的信息
-                        if (pointIndex >= 0) {
-                            if(pathData.runRoute[pointIndex].gtm!=='undefined'){
-                                 //鼠标悬停在某个轨迹节点上
-                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时';
-                            }
-                        }
-                    },
-                    //设置轨迹样式
-                    renderOptions: {
-                        //轨迹线的样式
-                        pathLineStyle: {
-                            strokeStyle: 'black',//路径颜色
-                            lineWidth: 6,
-                            dirArrowStyle: true
-                        }
-                    }
-                })
-                // 创建巡航器
-                that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
-                    loop: true, // 是否循环
-                    speed: that.speed ,// 速度(km/h)
-                    pathNavigatorStyle: {
-                        width: 20,//车辆图片宽度
-                        height: 40,//车辆图片高度
-                        content:PathSimplifier.Render.Canvas.getImageContent( require('@/assets/img/smallcar.png'), onload, onerror),//车辆图片
-                        strokeStyle: null,
-                        fillStyle: null
-                    }
-                })
-                //开启巡航
-                that.pathNavigator.start()
-                
-                //开始事件监听
-                that.pathNavigator.on("start resume", function() {
-                });
-
-                //暂停事件监听
-                that.pathNavigator.on("stop pause", function() {
-                });
+            calculationPoint = null;
+          }
+        }
+      });
+    },
+    //停车所有离线图标
+    hideParkingMark() {
+      let that = this;
+      that.parkMark.forEach(function(item, indexOf) {
+        item.hide();
+      });
+    },
+    //离线时间改变时获得超过时间的点信息
+    changeLeaveTime() {
+      let that = this;
+      //关闭所有图标
+      that.hideLeaveMark();
+      that.listPath[0].runRoute.forEach(function(item, indexOf) {
+        if (indexOf + 1 < that.listPath[0].runRoute.length) {
+          let beforeTime = that.stringToDate(item.gtm);
+          let item2 = that.listPath[0].runRoute[indexOf + 1];
+          let afterTime = that.stringToDate(item2.gtm);
+          let second = afterTime - beforeTime;
+          if (second > that.leaveTime) {
+            let message = "离线:" + second / 60000;
+            that.initLeaveMarkes(
+              20,
+              35,
+              require("@/assets/img/start.png"),
+              item2.lon,
+              item2.lat,
+              message.split(".")[0] + "分钟"
+            );
+          }
+        }
+      });
+    },
+    //关闭所有离线图标
+    hideLeaveMark() {
+      let that = this;
+      that.leaveMark.forEach(function(item, indexOf) {
+        item.hide();
+      });
+    },
+    //字符串转为Date
+    stringToDate(dateString) {
+      let dateStr = dateString
+        .replace("年", "-")
+        .replace("月", "-")
+        .replace("日", "");
+      return Date.parse(dateStr);
+    },
+    //校验查询时间
+    changeTime() {
+      let that = this;
+      console.log(that.time[1] - that.time[0] - 86400000 * 3);
+      if (that.time[1] - that.time[0] > 86400000 * 3) {
+        this.$message.error("时间查询范围不能超过3天");
+        that.time = [];
+      }
+    },
+    //启动
+    play() {
+      let that = this;
+      that.pathNavigator.resume();
+    },
+    //停止
+    stop() {
+      let that = this;
+      that.pathNavigator.pause();
+    },
+    //添加进度
+    addProgress() {
+      let that = this;
+      let increment = that.listPath[0].runPath.length * 0.1;
+      that.pathNavigator.start(
+        (that.point + increment) % that.listPath[0].runPath.length
+      );
+    },
+    //进度监听
+    hideFormat(value) {
+      let that = this;
+      that.sliderVal = value;
+    },
+    //获得开始地址
+    getStartPointName(lnglatXY) {
+      let that = this;
+      console.log("start", that.geocoder);
+      that.geocoder.getAddress(lnglatXY, function(status, result) {
+        if (status === "complete" && result.info === "OK") {
+          that.startPointName = result.regeocode.formattedAddress;
+        }
+      });
+    },
+    //获得结束地址
+    getEndPointName(lnglatXY) {
+      let that = this;
+      that.geocoder.getAddress(lnglatXY, function(status, result) {
+        if (status === "complete" && result.info === "OK") {
+          that.endPointName = result.regeocode.formattedAddress;
+          that.initCustomMarkes(
+            that.carNumber + "(" + that.listPath[0].miled + ")",
+            "起点:" +
+              that.startPointName +
+              "<br/>" +
+              "终点:" +
+              that.endPointName,
+            lnglatXY[0],
+            lnglatXY[1]
+          );
+        }
+      });
+    },
+    //初始化数据
+    initData() {
+      let that = this;
+      that.listPath = [];
+      if (that.carNumber == "") {
+        this.$message.error("车牌号不能为空!");
+        return;
+      }
+      if (that.time == []) {
+        this.$message.error("请选择时间");
+      }
+      that.axios
+        .post("/api/v1/otms/fullPathVisualizationByCarNumber", {
+          capacityNumber: that.carNumber,
+          startTime: that.formatDate(that.time[0], "yyyy-MM-dd hh:mm:ss"),
+          endTime: that.formatDate(that.time[1], "yyyy-MM-dd hh:mm:ss")
+        })
+        .then(res => {
+          if (res.data.startAndEndRoutes != "") {
+            that.listPath = res.data.startAndEndRoutes;
+            that.initMap();
+          } else {
+            this.$message.error("车辆没有开启GPS");
+          }
+        });
+    },
+    //初始化地图
+    initMap() {
+      lazyAMapApiLoaderInstance.load().then(() => {
+        let that = this;
+        that.map = new AMap.Map("amap-container", {
+          //设置地图容器id
+          viewMode: "2D", //是否为2D地图模式
+          zoom: 10, //初始化地图级别
+          center: [105.602725, 37.076636] //初始化地图中心点位置
+        });
+        //初始化
+        that.initGeocoder();
+        //初始化巡航轨迹和巡航器
+        that.initPathSimplifier();
+        //初始化起点、当前点、当前点
+        that.initThreeMarker();
+        //初始化当前点标记
+        //that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
+        //that.initEndline();
+      });
+    },
+    //结束点
+    initEndline() {
+      let that = this;
+      that.initPolyline(that.listPath[0].estimatePath, "#FF0000");
+    },
+    //创建起点终点当前点
+    initThreeMarker() {
+      let that = this;
+      that.listPath.forEach((element, index) => {
+        //起点名称
+        that.getStartPointName([
+          element.startPoint.lon,
+          element.startPoint.lat
+        ]);
 
-                //移动事件监听
-                that.pathNavigator.on('move', function (data,value) {
-                    that.updateLable(value)
-                });
-            })
-        },
-        //实时展示
-        updateLable(value){
-            let that=this;
-            that.point=value.dataItem.pointIndex;
-            that.runRoute=value.dataItem.pathData.runRoute[that.point];
-            that.sliderVal=(value.dataItem.pointIndex/value.dataItem.pathData.runRoute.length)*100;
-        },
-        //逆解码函数
-        initGeocoder(){
-            let that=this;
-            console.log("initGeocoder") ;
-            AMap.plugin('AMap.Geocoder',function(){   
-                that.geocoder = new AMap.Geocoder({
-                    radius: 1000,
-                    extensions: "all"
-                });  
-                
-                console.log(that.geocoder)    
-            })    
-        },
-        //时间格式转换
-        formatDate (date, fmt) {
-            if (/(y+)/.test(fmt)) {
-                fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-            }
-            let o = {
-                'M+': date.getMonth() + 1,
-                'd+': date.getDate(),
-                "h+": date.getHours(),
-                "m+": date.getMinutes(),
-                "s+": date.getSeconds(),
+        //开始标记点
+        if (element.startPoint.lon != "" && element.startPoint.lat != "") {
+          that.initMarkes(
+            20,
+            35,
+            require("@/assets/img/start.png"),
+            element.startPoint.lon,
+            element.startPoint.lat,
+            "起点"
+          );
+        }
+        //结束标记点
+        if (
+          element.endPoint != {} &&
+          element.endPoint != "" &&
+          element.endPoint != null
+        ) {
+          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+          //终点名称
+          that.getEndPointName([element.endPoint.lon, element.endPoint.lat]);
+        } else {
+          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
+          //终点名称
+          that.getEndPointName([
+            element.runRoute[element.runRoute.length - 1].lon,
+            element.runRoute[element.runRoute.length - 1].lat
+          ]);
+        }
+      });
+    },
+    //初始化窗体
+    initCustomMarkes(title, details, lon, lat) {
+      let that = this;
+      //自定义窗体内容
+      var content = [
+        "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>" +
+          title +
+          "</font>",
+        "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>" +
+          details +
+          "</font></div></div>"
+      ];
+      // 创建 infoWindow 实例
+      var infoWindow = new AMap.InfoWindow({
+        content: content.join("<br>") //传入 dom 对象,或者 html 字符串
+      });
+      // 打开信息窗体
+      infoWindow.open(that.map, [lon, lat]);
+    },
+    //初始化预计轨迹
+    initPolyline(path, color) {
+      let that = this;
+      //预计轨迹
+      var endLine = new AMap.Polyline({
+        map: that.map, //地图组件
+        path: path, //预计轨迹
+        isOutline: true,
+        outlineColor: color, //轨迹颜色
+        borderWeight: 0,
+        strokeColor: "#FF0000",
+        strokeOpacity: 1,
+        strokeWeight: 5,
+        // 折线样式还支持 'dashed'
+        strokeStyle: "solid",
+        // strokeStyle是dashed时有效
+        strokeDasharray: [10, 5],
+        lineJoin: "round",
+        lineCap: "round",
+        zIndex: 50
+      });
+      that.map.setFitView([[endLine]]);
+    },
+    initParkingMarkes(weight, height, image, lon, lat, title) {
+      let that = this;
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      });
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      });
+      that.parkMark.push(pointmarker);
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker);
+    },
+    //创建离线和停车的标记
+    initLeaveMarkes(weight, height, image, lon, lat, title) {
+      let that = this;
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      });
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      });
+      that.leaveMark.push(pointmarker);
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker);
+    },
+    //创建简单的标记
+    initMarkes(weight, height, image, lon, lat, title) {
+      let that = this;
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      });
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      });
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker);
+    },
+    //创建轨迹和巡航器
+    initPathSimplifier() {
+      let that = this;
+      // ...你的操作
+      new AMapUI.load(["ui/misc/PathSimplifier"], PathSimplifier => {
+        if (!PathSimplifier.supportCanvas) {
+          alert("当前环境不支持 Canvas!");
+          return;
+        }
+        //创建轨迹和巡航器
+        // 创建组件实例
+        that.pathSimplifierIns = new PathSimplifier({
+          map: that.map,
+          zIndex: 100, // 图层叠加顺序
+          data: that.listPath, // 巡航路径
+          // 获取巡航路径中的路径坐标数组
+          getPath: (pathData, pathIndex) => {
+            return pathData.runPath;
+          },
+          //鼠标悬浮停时显示消息
+          getHoverTitle: function(pathData, pathIndex, pointIndex) {
+            //返回鼠标悬停时显示的信息
+            if (pointIndex >= 0) {
+              if (pathData.runRoute[pointIndex].gtm !== "undefined") {
+                //鼠标悬停在某个轨迹节点上
+                return (
+                  pathData.runRoute[pointIndex].gtm +
+                  ",速度" +
+                  pathData.runRoute[pointIndex].spd +
+                  "千米/小时"
+                );
+              }
             }
-            for (let k in o) {
-                if (new RegExp(`(${k})`).test(fmt)) {
-                    let str = o[k] + ''
-                    fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : ('00' + str).substr(str.length))
-                }
+          },
+          //设置轨迹样式
+          renderOptions: {
+            //轨迹线的样式
+            pathLineStyle: {
+              strokeStyle: "black", //路径颜色
+              lineWidth: 6,
+              dirArrowStyle: true
             }
-            return fmt
-        },         
+          }
+        });
+        // 创建巡航器
+        that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
+          loop: true, // 是否循环
+          speed: that.speed, // 速度(km/h)
+          pathNavigatorStyle: {
+            width: 20, //车辆图片宽度
+            height: 40, //车辆图片高度
+            content: PathSimplifier.Render.Canvas.getImageContent(
+              require("@/assets/img/smallcar.png"),
+              onload,
+              onerror
+            ), //车辆图片
+            strokeStyle: null,
+            fillStyle: null
+          }
+        });
+        //开启巡航
+        that.pathNavigator.start();
+
+        //开始事件监听
+        that.pathNavigator.on("start resume", function() {});
+
+        //暂停事件监听
+        that.pathNavigator.on("stop pause", function() {});
+
+        //移动事件监听
+        that.pathNavigator.on("move", function(data, value) {
+          that.updateLable(value);
+        });
+      });
+    },
+    //实时展示
+    updateLable(value) {
+      let that = this;
+      that.point = value.dataItem.pointIndex;
+      that.runRoute = value.dataItem.pathData.runRoute[that.point];
+      that.sliderVal =
+        (value.dataItem.pointIndex / value.dataItem.pathData.runRoute.length) *
+        100;
+    },
+    //逆解码函数
+    initGeocoder() {
+      let that = this;
+      console.log("initGeocoder");
+      AMap.plugin("AMap.Geocoder", function() {
+        that.geocoder = new AMap.Geocoder({
+          radius: 1000,
+          extensions: "all"
+        });
+
+        console.log(that.geocoder);
+      });
+    },
+    //时间格式转换
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
+      }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": date.getHours(),
+        "m+": date.getMinutes(),
+        "s+": date.getSeconds()
+      };
+      for (let k in o) {
+        if (new RegExp(`(${k})`).test(fmt)) {
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : ("00" + str).substr(str.length)
+          );
+        }
+      }
+      return fmt;
     }
+  }
 };
 </script>
 <style>
-.inputStyle{
-    position: absolute;
-    width: 200px;
-    left: 50px;
+.inputStyle {
+  position: absolute;
+  width: 200px;
+  left: 50px;
 }
 
-.controller{
-    width: 100%; height: 70px;
-    background: white;
-   position: absolute;z-index:99;top:0;left:0;
-   
+.controller {
+  width: 100%;
+  height: 70px;
+  background: white;
+  position: absolute;
+  z-index: 99;
+  top: 0;
+  left: 0;
 }
-.in_transit_information{
-   
-    width: 200px;
-    float: left;
-     height: 40px;
+.in_transit_information {
+  width: 200px;
+  float: left;
+  height: 40px;
 }
-.in_transit_information3{
-    float: right;
-    height: 40px;
-    width: 180px;
+.in_transit_information3 {
+  float: right;
+  height: 40px;
+  width: 180px;
 }
 .in_transit_information2 {
-   
-    height: 40px;
-    float: left;
-    width: 580px;
+  height: 40px;
+  float: left;
+  width: 580px;
 }
-.container{
-    width: 100%;
-	height: 100%;
-    
+.container {
+  width: 100%;
+  height: 100%;
 }
 span.item_details2 {
-    position: relative;
-    top: 20px;
+  position: relative;
+  top: 20px;
 }
-.date_picker_style{
-    position: relative;
-    left: 50px;
+.date_picker_style {
+  position: relative;
+  left: 50px;
 }
 .item_details {
-    position: relative;
-    top: 5px;
-    height: 0px;
-    left: 0px;
+  position: relative;
+  top: 5px;
+  height: 0px;
+  left: 0px;
 }
 #amap-container {
-    position: relative;
-	width: 100%;
-	height: 100%;
-	overflow: hidden;
-	margin: 0;
-	font-family: "微软雅黑";
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  margin: 0;
+  font-family: "微软雅黑";
 }
 
-
 /* 进度条 */
 .mySlider {
-
-    width: 150px;
-    height: 20px;
-    display: inline-block;
-    position: relative;
-    left: 32px;
+  width: 150px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
 }
 /* 进度条 */
 .mySlider2 {
-
-    width: 400px;
-    height: 20px;
-    display: inline-block;
-    position: relative;
-    left: 32px;
+  width: 400px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
 }
 .play {
-    position: relative;
-    left: 28px;
+  position: relative;
+  left: 28px;
 }
-.quickly
-{
-    float: right;
-    position: relative;
-    left: -20px;
-    top: 10px;
+.quickly {
+  float: right;
+  position: relative;
+  left: -20px;
+  top: 10px;
 }
 .pause {
-    position: relative;
-    left: 28px;
+  position: relative;
+  left: 28px;
 }
-.passed-time{
-    position: relative;
-    left: 5px;
+.passed-time {
+  position: relative;
+  left: 5px;
 }
-.end-time{
-    position: relative;
-    left: 5px;
+.end-time {
+  position: relative;
+  left: 5px;
 }
 .map-times {
-    position: relative;
-    width: 40px;
+  position: relative;
+  width: 40px;
 }
-.searchstyle{
-     position: relative;
-    left: 5px;
+.searchstyle {
+  position: relative;
+  left: 5px;
 }
-.map-control{
-     float: left;
-     width: 270px;
+.map-control {
+  float: left;
+  width: 270px;
 }
 .driving_information {
-    height: 40px;
-    width: 240px;
-     float: left;
-     top: 0px;
+  height: 40px;
+  width: 240px;
+  float: left;
+  top: 0px;
 }
-</style>
+</style>