luobang 3 년 전
부모
커밋
37c8c4728a

+ 10 - 3
build/utils.js

@@ -15,9 +15,16 @@ 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 = ['index','sale','queue']
-let devModules = ['all'];
-// let devModules = ['index','queue','sale']
+ let devModules = ['all']
+// let devModules = ['index','appoint','sale','RMS','statisticalReport'];
+// let devModules = ['index','appoint','WMS'];
+// let devModules = ['index','inward','ADMINISTRATORS']
+// let devModules = ['index','sale']
+// let devModules = ['index','SporadicManage','RMS','statisticalReport']
+// let devModules = ['index','inward','statisticalReport']
+//  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
+// let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
+// let devModules = ['index','RMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

BIN
dist.zip


+ 17 - 0
src/utils/sharedJsFile.js

@@ -29,3 +29,20 @@
      return true;
    }
  }
+ export function stringToDate(dateStr, separator) {
+  if (!separator) {
+    separator = '-';
+  }
+  var dateArr = dateStr.split(separator);
+  var year = parseInt(dateArr[0]);
+  var month;
+  // 处理月份为04这样的情况
+  if (dateArr[1].indexOf('0') === 0) {
+    month = parseInt(dateArr[1].substring(1));
+  } else {
+    month = parseInt(dateArr[1]);
+  }
+  var day = parseInt(dateArr[2]);
+  var date = new Date(year, month - 1, day);
+  return date;
+}

+ 29 - 3
src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue

@@ -55,6 +55,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      startTime:null,
+      endTime:null,
       max:null,
       disabled:false,
       //仓库名称
@@ -95,19 +97,43 @@ export default {
     },
   },
   created() {
-      
+      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
+      this.startTime= Date.parse(new Date(strTime));
+      this.endTime=new Date(this.startTime+86400000);
   },
   methods: {
+    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+': 0,
+          'm+': 0,
+          's+': 0
+      }
+      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 : this.padLeftZero(str))
+        }
+            }
+      return fmt
+    },
+    padLeftZero (str) {
+        return ('00' + str).substr(str.length)
+    },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+this.input
+        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
       if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+""
+          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
       }
     },
     // 返回

+ 33 - 0
src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue

@@ -52,7 +52,40 @@ export default {
       },
     }
   },
+   created(){
+    var date = new Date();
+    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
+    
+    this.startTime= Date.parse(new Date(dateStr));
+    this.endTime=new Date(this.startTime+86400000);
+
+    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
+    this.tableShow=true;
+  },
+  
   methods:{
+    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+': 0,
+          'm+': 0,
+          's+': 0
+      }
+      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 : this.padLeftZero(str))
+        }
+            }
+      return fmt
+    },
+    padLeftZero (str) {
+        return ('00' + str).substr(str.length)
+    },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },

+ 29 - 3
src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue

@@ -55,6 +55,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      startTime:null,
+      endTime:null,
       max:null,
       disabled:false,
       //仓库名称
@@ -95,19 +97,43 @@ export default {
     },
   },
   created() {
-      
+      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
+      this.startTime= Date.parse(new Date(strTime));
+      this.endTime=new Date(this.startTime+86400000);
   },
   methods: {
+    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+': 0,
+          'm+': 0,
+          's+': 0
+      }
+      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 : this.padLeftZero(str))
+        }
+            }
+      return fmt
+    },
+    padLeftZero (str) {
+        return ('00' + str).substr(str.length)
+    },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+this.input
+        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
       if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+""
+          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
       }
     },
     // 返回

+ 34 - 1
src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue

@@ -52,7 +52,40 @@ export default {
       },
     }
   },
+  created(){
+    var date = new Date();
+    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
+    
+    this.startTime= Date.parse(new Date(dateStr));
+    this.endTime=new Date(this.startTime+86400000);
+
+    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
+    this.tableShow=true;
+  },
+  
   methods:{
+    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+': 0,
+          'm+': 0,
+          's+': 0
+      }
+      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 : this.padLeftZero(str))
+        }
+            }
+      return fmt
+    },
+    padLeftZero (str) {
+        return ('00' + str).substr(str.length)
+    },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
@@ -89,7 +122,7 @@ export default {
     },
     onreserved(){
       this.$router.push({
-        path: "/bar1_addSteelInbound",
+        path: "/bar2_addSteelInbound",
       });
     }
   }

+ 1 - 1
src/views/WMS/components/steel/bar2_steel/bar2_steel_reserved.vue

@@ -64,7 +64,7 @@ export default {
     },
     onreserved(){
       this.$router.push({
-        path: "/bar1_addSteelReserved",
+        path: "/bar2_addSteelReserved",
       });
     }
   }

+ 7 - 3
src/views/sale/app.js

@@ -25,10 +25,12 @@ Vue.prototype.$XModal = VXETable.modal
 
 
 import AMap from 'vue-amap';
-
+window._AMapSecurityConfig = {
+  securityJsCode:'6a75ec7300ae4ba9f385d1bb452ffd21',
+}
 Vue.use(AMap);
   AMap.initAMapApiLoader({
-    key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
+    key: '168d3d854afba86848eac1b055d53ca3',
     plugin: [
       "AMap.Autocomplete", // 输入提示插件
       "AMap.PlaceSearch", // POI搜索插件
@@ -39,7 +41,9 @@ Vue.use(AMap);
       "AMap.PolyEditor", // 编辑 折线多,边形
       "AMap.CircleEditor", // 圆形编辑器插件
       "AMap.Geolocation", // 定位控件,用来获取和展示用户主机所在的经纬度位置
-      "AMap.ControlBar"   // 缩放、尺寸控制器
+      "AMap.ControlBar" ,  // 缩放、尺寸控制器
+      "AMap.Geocoder",
+      
     ],
     // 默认高德 sdk 版本为 1.4.4
     v: '1.4.15',

+ 362 - 260
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -4,7 +4,6 @@
          <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>
@@ -20,54 +19,56 @@
                 </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" v-show="isActual">
-                    <!--播放暂停按钮-->
-                    进度:
-                  <Icon v-if="!isPlay" class="play-icon play"  type="ios-play" @click="isPlay=true;play();navgControl(playIcon)"/>
-                    <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="addIndex()"/>
-                    <div class="mySlider"><Slider class="map-slider" v-model="sliderVal" :tip-format="hideFormat" :step="0.0001"></Slider></div>
-
-                     <!--播放暂停按钮-->
-                    
-                    <!-- <Icon class="play-icon quickly"  type="ios-play" @click="addIndexSpeed()"/> -->
-                    <!-- <Slider class="map-slider" v-model="speedVal" :tip-format="speedFormat" :step="0.0001"></Slider> -->
-                    <div class="mySlider2"><el-slider
-                    v-model="speedVal"
-                    show-input>
-                    </el-slider></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="map-control" v-show="isActual">
-                   
-                    
+            <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 AMapLoader from '@amap/amap-jsapi-loader';
 import { shallowRef } from '@vue/reactivity'
-import { sjTime } from "@/utils/sharedJsFile";
-import { Loading } from 'element-ui';
 import { lazyAMapApiLoaderInstance } from 'vue-amap';
+import { sjTime,stringToDate } from "@/utils/sharedJsFile";
 import Slider from './slider.vue'
 Vue.use(Slider)
-import AMapJS from "amap-js";
 import Vue from 'vue';
 export default {
     name: "PathView",
-
     setup(){
         const map = shallowRef(null);
         return{
@@ -80,215 +81,247 @@ export default {
             handler(val, oldVal) {
                 let that=this;
                  if(that.pathNavigator!=null){
-                        that.pathNavigator.setSpeed(100*val)
+                    that.pathNavigator.setSpeed(100*val)
                 }
             }
         }
     },
     data() {
         return {
-            startTime:'',
-            endTime:'',
+        //一、 查询相关
+            //选择时间区间
             time:[],
+            //查询车牌号
             carNumber:"",
-            orderNumber:'',
-            ///che
-            isTimesChoose:false,
-            isActual:true,
-            isPlay:true,
-            passedTime:"12:02:10",
-            sliderVal:0,
-            speedVal:10,
-            speed:1000,
-            times:1,
-           
-            totalTime:"11",
-            speedList:["1倍数","2倍数","3倍数"],
-            //已行驶轨迹
+            //选择停车时长
+            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: "44",
-                gtm: "2022年03月09日 16:47:24",
-                hgt: "13",
-                lat: "32.906411535084985",
-                lon: "115.76177868692135",
-                mil: "429409.2",
-                spd: "17.0"
+                //正北方向夹角  
+                agl: "0",
+                //当前的时间
+                gtm: "0",
+                //海拔
+                hgt: "0",
+                //进度
+                lat: "0", 
+                //纬度
+                lon: "0",
+                //累计行驶距离(是车辆GPS安装开始到现在的距离,如果你想要查询范围内的行驶距离,用开始的累计距离和结束点累计距离相减)
+                mil: "0",
+                //这个时间的速度
+                spd: "0"
             },
+            //小车行驶当前点下标
             point:"",
-            pointNext:"",
-            loading : null,
-            navgtrSpeed:1,
-            //地图中心位置
-            centerPoint:{
-                    pointLat:"",
-                    pointLon:""
-            },
+        //三、 播放相关
+            //是否暂停
+            isPlay:true,
+            //播放进度值
+            sliderVal:0,
+            //播放速度值
+            speedVal:10,
+        //四、组件相关
             //自定义窗体信息
-            ctmarkes:{
-                lat:"33.015888071433764",
-                lon : "115.96995235868168",
-                title:"豫SE8888",
-                details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
-            },
-            //运输详情
-            transportDetail:{
-                //车牌号
-                capacityNumber:'',
-                //规划路线
-                estimateRoute:[
-                    {
-                        lat:"33.015888071433764",
-                        lon : "115.96995235868168"
-                    }
-                ],
-                //规划线路
-                estimatePath:[
-                    [
-                        114.03046212985384,
-                        32.49786984660489
-                    ],
-                    
-                ],
-                //已行驶轨迹
-                runRoute:[
-                      {
-                        agl: "44",
-                        gtm: "2022年03月09日 16:47:24",
-                        hgt: "13",
-                        lat: "32.906411535084985",
-                        lon: "115.76177868692135",
-                        mil: "429409.2",
-                        spd: "17.0"
-                    },
-                ],
-                runPath: [
-                    [
-                        114.03922119568348,
-                        32.49746162481379
-                    ],
-                ],
-                //当前位置
-                currentPointName:"中国达州市通川区",
-                //当前位置经纬度
-                currentPoint:{
-                    lat:"",
-                    lon:""
-                },
-                //起点位置
-                startPointName:"中国达州市通川区", 
-                //起点位置经纬度
-                startPoint:{
-                    lon:"114.03922119568348",
-                    lat:"32.49746162481379"
-                },
-                //终点位置
-                endPointName:"中国成都萧山",
-                //终点位置经纬度   
-                endPoint:{
-                    lon:"115.96995737755431",
-                    lat:"33.01595479752097"
-                },
-                //自定义标记
-                content:[],
-                //异常位置
-                abnormalLocation:[],
-            
-            },
-            listPath:[
-                
-            ],
-            //组件
+            // ctmarkes:{
+            //     lat:"33.015888071433764",
+            //     lon : "115.96995235868168",
+            //     title:"豫SE8888",
+            //     details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
+            // },
+        //五、返回值相关
+            //返回值集合
+            listPath:[],
+        //六、地图组件相关值
+            //创建轨迹
             pathSimplifierIns:{},
-            pathNavigator:{}
+            //巡回器
+            pathNavigator:{},
+            //初始化巡回器速度
+            speed:1000,   
+            //地图解析
+            geocoder:null,
         };
     },
     created(){
-        let that=this;
       
     },
     mounted() {
         
     },
     methods: {
-         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 : this.padLeftZero(str))
-        }
-            }
-      return fmt
-    },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
-    },
-        geocoder(){
-            AMap.plugin('AMap.Geocoder', function() {
-            var geocoder = new AMap.Geocoder({
-                // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
-                city: '全球'
-            })
-            
-            var lnglat = [116.396574, 39.992706]
-            console.log("fsdaf")
-            geocoder.getAddress(lnglat, function(status, result) {
-                console.log(result)
-                if (status === 'complete' && result.info === 'OK') {
-                    // result为对应的地理位置详细信息
-                    console.log(result)
+    
+        //停车时间改变
+        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]+"分钟");
+                    }
+                }
+            });
+        },
+        //关闭所有离线图标
+        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();
-            this.geocoder()
-        },
-        addIndexSpeed(){
-
         },
-        addIndex(){
-            console.log("1123")
-
+        //添加进度
+        addProgress(){
             let that =this;
             let increment=(that.listPath[0].runPath.length*0.1)
             that.pathNavigator.start(((that.point+increment)%that.listPath[0].runPath.length))
         },
-        ///che
-        navgControl(){
-
-        },
-        speedFormat(value){
-             let that=this;
-             that.speedVal=value
-           
-            if(that.pathNavigator!=null){
-               
-                that.pathNavigator.setSpeed(1000*value)
-            }
-           
-        },
+        //进度监听
         hideFormat(value){
             let that=this;
             that.sliderVal=value;
         },
-        initData(orderNumber){
+        //获得开始地址
+        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==""){
@@ -298,67 +331,79 @@ export default {
             if(that.time==[]){
                  this.$message.error('请选择时间');
             }
-             that.axios.post("/api/v1/otms/fullPathVisualizationByCarNumber",
-             {
+            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) => {
+            }).then((res) => {
                  if(res.data.startAndEndRoutes!=''){
-                     that.listPath=res.data.startAndEndRoutes
+                     that.listPath=res.data.startAndEndRoutes;
                     that.initMap();
                  }else{
                      this.$message.error('车辆没有开启GPS');
                  }
             });
         },
-        endline(){
+        //初始化地图
+        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");
         },
         //创建起点终点当前点
-        threeMarker(){
+        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,'起点');
                 }
                 //结束标记点
-                console.log(element.endPoint,"element.endPoint")
                 if(element.endPoint!={}&&element.endPoint!=''&&element.endPoint!=null){
-                    console.log("1111")
-                    that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+                    // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+                     //终点名称
+                    that.getEndPointName([element.endPoint.lon,element.endPoint.lat]);
                 }else{
-                     console.log(element)
-                    that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
+                    // 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])
                 }
+               
             });
            
         },
-        //初始化地图
-        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.initPathSimplifier();
-                that.threeMarker();
-                console.log("that.listPath[0]",that.listPath)
-                that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
-                that.endline();
-            });
-        },
+        //初始化窗体
         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>"
+                "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>"+details+"</font></div></div>",
             ];
             // 创建 infoWindow 实例	
             var infoWindow = new AMap.InfoWindow({
@@ -367,14 +412,15 @@ export default {
             // 打开信息窗体
             infoWindow.open(that.map,[lon,lat]);
         },
+        //初始化预计轨迹
         initPolyline(path,color){
             let that=this;
              //预计轨迹
             var endLine = new AMap.Polyline({
-                map:that.map,
-                path: path,
+                map:that.map,//地图组件
+                path: path,//预计轨迹
                 isOutline: true,
-                outlineColor: color,
+                outlineColor: color,//轨迹颜色
                 borderWeight: 0,
                 strokeColor: "#FF0000", 
                 strokeOpacity: 1,
@@ -389,6 +435,45 @@ export default {
             })
             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;
@@ -433,7 +518,7 @@ export default {
                         if (pointIndex >= 0) {
                             if(pathData.runRoute[pointIndex].gtm!=='undefined'){
                                  //鼠标悬停在某个轨迹节点上
-                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时,点:' + pointIndex + '/' + pathData.runPath.length;
+                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时';
                             }
                         }
                     },
@@ -441,7 +526,7 @@ export default {
                     renderOptions: {
                         //轨迹线的样式
                         pathLineStyle: {
-                            strokeStyle: 'black',
+                            strokeStyle: 'black',//路径颜色
                             lineWidth: 6,
                             dirArrowStyle: true
                         }
@@ -452,9 +537,9 @@ export default {
                     loop: true, // 是否循环
                     speed: that.speed ,// 速度(km/h)
                     pathNavigatorStyle: {
-                        width: 20,
-                        height: 40,
-                        content:PathSimplifier.Render.Canvas.getImageContent( require('@/assets/img/smallcar.png'), onload, onerror),
+                        width: 20,//车辆图片宽度
+                        height: 40,//车辆图片高度
+                        content:PathSimplifier.Render.Canvas.getImageContent( require('@/assets/img/smallcar.png'), onload, onerror),//车辆图片
                         strokeStyle: null,
                         fillStyle: null
                     }
@@ -462,45 +547,60 @@ export default {
                 //开启巡航
                 that.pathNavigator.start()
                 
-                //开始事件
+                //开始事件监听
                 that.pathNavigator.on("start resume", function() {
-                    // that.navgtr._startTime = Date.now();
-                    // that.navgtr._startDist = this.getMovedDistance();
                 });
-                //暂停
+
+                //暂停事件监听
                 that.pathNavigator.on("stop pause", function() {
-                    // that.navgtr._movedTime = Date.now() - that.navgtr._startTime;
-                    // that.navgtr._movedDist = this.getMovedDistance() - that.navgtr._startDist;
                 });
+
+                //移动事件监听
                 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;
         },
-        changeSpeed(value){
-            // console.log(value)
-            // let that=this;
-            // that.times=value;
-            
-        },
-        playIcon(){
-           
-        },
-        changeTime(){
+        //逆解码函数
+        initGeocoder(){
             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=[];
+            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>
@@ -523,6 +623,11 @@ export default {
     float: left;
      height: 40px;
 }
+.in_transit_information3{
+    float: right;
+    height: 40px;
+    width: 180px;
+}
 .in_transit_information2 {
    
     height: 40px;
@@ -616,7 +721,4 @@ span.item_details2 {
     width: 240px;
      float: left;
 }
-
-
-
 </style>

+ 2 - 3
src/views/sale/components/offSiteTransportation/inTransitWarn.vue

@@ -48,12 +48,12 @@ export default {
             type: "success",
             message: "操作成功!",
           });
-          this.$router.go(-1);
+          this.switchEcho();
         });
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      // this.$router.go(-1);
     },
     switchEcho(){
       let that=this;
@@ -61,7 +61,6 @@ export default {
                 if(res.data.status=="succeed"){
                   let arry=res.data.data.switch;
                   this.radio=res.data.data.type;
-                  console.log(this.radio)
                 }
        });
      

+ 62 - 52
src/views/sale/components/offSiteTransportation/mapTest.vue

@@ -1,11 +1,11 @@
 <template>
     <div class="container">
         <div id="amap-container"></div>
-         <div class="controller">
+         <div class="mapcontroller">
              <div class="in_transit_information">
                  <label class="item_details">起点:{{startPointName}}</label>
                  <br/>
-                 <label class="item_details">终点:{{endPointName}}</label>
+                 <label class="item_details">收货地址:{{endPointName}}</label>
                  <br/>
              </div>
              <div class="driving_information">  
@@ -13,7 +13,6 @@
                 <br/>
                 <label class="item_details">车速:{{runRoute.spd}}千米/小时</label>
                 <br/>
-                <!-- <label class="item_details">当前位置:{{transportDetail.currentPointName}}</label>
                 <br/> -->
                 <!--控制条-->
                 <div class="map-control" v-show="isActual">
@@ -22,20 +21,8 @@
                     <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="addIndex()"/>
                     <!--已播放时间-->
-                    <!-- <span class="passed-time">{{passedTime}}</span> -->
                     <!--进度条-->
                     <div class="mySlider"><Slider class="map-slider" v-model="sliderVal" :tip-format="hideFormat" :step="0.0001"></Slider></div>
-                    <!--倍速-->
-                    <!-- <div class="map-times" @mouseenter="isTimesChoose=true" @mouseleave="isTimesChoose=false">
-                        <div class="times-show">倍速 {{times}}</div>
-                        <div class="choose-box">
-                        <ul >
-                            <li v-for="item in speedList" :key="item.value" :class="{active:times==item.value}" @click="changeSpeed(item.value)">{{item.label}}</li>
-                        </ul>
-                        </div>
-                    </div> -->
-                    <!--结束时间-->
-                    <!-- <span class="end-time">{{totalTime}}</span> -->
                 </div>
              </div>
          </div>
@@ -83,7 +70,7 @@ export default {
             ///che
             isTimesChoose:false,
             isActual:true,
-            isPlay:true,
+            isPlay:false,
             passedTime:"12:02:10",
             sliderVal:0,
             times:1,
@@ -92,13 +79,13 @@ export default {
             //已行驶轨迹
             runRoute:
             {
-                agl: "44",
-                gtm: "2022年03月09日 16:47:24",
-                hgt: "13",
-                lat: "32.906411535084985",
-                lon: "115.76177868692135",
-                mil: "429409.2",
-                spd: "17.0"
+                agl: "",
+                gtm: "",
+                hgt: "",
+                lat: "",
+                lon: "",
+                mil: "",
+                spd: ""
             },
             point:"",
             pointNext:"",
@@ -185,7 +172,10 @@ export default {
             ],
             //组件
             pathSimplifierIns:{},
-            pathNavigator:{}
+            pathNavigator:{},
+            //地图解析
+            geocoder:null,
+            currentPointName:""
         };
     },
     created(){
@@ -196,24 +186,7 @@ export default {
         
     },
     methods: {
-        geocoder(){
-            AMap.plugin('AMap.Geocoder', function() {
-            var geocoder = new AMap.Geocoder({
-                // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
-                city: '全球'
-            })
-            
-            var lnglat = [116.396574, 39.992706]
-            console.log("fsdaf")
-            geocoder.getAddress(lnglat, function(status, result) {
-                console.log(result)
-                if (status === 'complete' && result.info === 'OK') {
-                    // result为对应的地理位置详细信息
-                    console.log(result)
-                }
-            })
-            })
-        },
+        
         play(){
             let that =this;
             that.pathNavigator.resume();
@@ -221,7 +194,6 @@ export default {
         stop(){
             let that =this;
             that.pathNavigator.pause();
-            this.geocoder()
         },
         addIndex(){
             console.log("1123")
@@ -241,10 +213,11 @@ export default {
         initData(orderNumber){
             let that=this;
              that.axios.post("/api/v1/otms/fullPath?orderNumber="+orderNumber).then((res) => {
-                 if(res.data.startAndEndRoutes!='0'){
+                 if(res.data.startAndEndRoutes!=null){
                      that.listPath=res.data.startAndEndRoutes
                     that.initMap();
                  }else{
+                     that.listPath=[];
                      this.$message.error('车辆没有开启GPS');
                  }
             });
@@ -261,12 +234,30 @@ export default {
                 if(element.startPoint.lon!=''&&element.startPoint.lat!=''){
                     that.initMarkes(20,35,require('@/assets/img/start.png'),element.startPoint.lon,element.startPoint.lat,'起点');
                 }
+                //当前点
+                that.getCurrentPointName([element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat])
                 //结束标记点
                 if(element.endPoint.lon!=''&&element.endPoint.lat!=''){
                     that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
                 }
             });
-           
+        },
+        //获得结束地址
+        getCurrentPointName(lnglatXY){
+            let that=this;
+            that.geocoder.getAddress(lnglatXY, function(status, result) {
+                if (status === 'complete' && result.info === 'OK') {
+                    that.currentPointName = result.regeocode.formattedAddress;
+                    that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.currentPointName,lnglatXY[0],lnglatXY[1])
+                }
+            });  
+        },
+        //defualt数据
+        defaultDate(){
+            let that=this;
+            that.pathNavigator.start(that.listPath[0].runPath.length)
+            that.pathNavigator.pause();
+            
         },
         //初始化地图
         initMap(){
@@ -277,11 +268,12 @@ export default {
                     zoom:10,           //初始化地图级别
                     center:[105.602725,37.076636], //初始化地图中心点位置
                 });
+                that.initGeocoder();
                 that.initPathSimplifier();
                 that.threeMarker();
-                console.log("that.listPath[0]",that.listPath)
-                that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
+                //that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
                 that.endline();
+                
             });
         },
         initCustomMarkes(title,details,lon,lat){
@@ -364,7 +356,7 @@ export default {
                         if (pointIndex >= 0) {
                             if(pathData.runRoute[pointIndex].gtm!=='undefined'){
                                  //鼠标悬停在某个轨迹节点上
-                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时,点:' + pointIndex + '/' + pathData.runPath.length;
+                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时' ;
                             }
                         }
                     },
@@ -381,7 +373,7 @@ export default {
                 // 创建巡航器
                 that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
                     loop: true, // 是否循环
-                    speed: 1000 ,// 速度(km/h)
+                    speed: 10000 ,// 速度(km/h)
                     pathNavigatorStyle: {
                         width: 20,
                         height: 40,
@@ -392,6 +384,7 @@ export default {
                 })
                 //开启巡航
                 that.pathNavigator.start()
+                that.defaultDate();
                 
                 //开始事件
                 that.pathNavigator.on("start resume", function() {
@@ -422,13 +415,26 @@ export default {
         },
         playIcon(){
             console.log("nihoa")
-        }
+        },
+        //逆解码函数
+        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)    
+            })    
+        },
                   
     }
 };
 </script>
 <style>
-.controller{
+.mapcontroller{
     width: 250px; height: 260px; 
     background: white;
    position: absolute;z-index:99;top:0;left:0
@@ -443,6 +449,7 @@ export default {
     margin-top: 20px;
     position: relative;
     left: 30px;
+    width: 200px;
     height: 0px;
 }
 #amap-container {
@@ -453,7 +460,10 @@ export default {
 	margin: 0;
 	font-family: "微软雅黑";
 }
-
+.driving_information {
+    position: relative;
+    top: 30px;
+}
 
 /* 进度条 */
 .mySlider {

+ 4 - 9
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -24,13 +24,9 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
-      <el-button type="primary" @click="refresh">
-        <i class="el-icon-refresh"></i>刷新
-      </el-button>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
+      <dilTable ref="excelDom" v-bind.sync="option" >
           <el-table-column fixed="right" label="照片游览" width="120">
           <template slot-scope="scope">
             <el-button @click="toPhotoClick(scope.row.orderNumber)" type="text" size="small" style="font-size: 6px">
@@ -58,7 +54,7 @@ export default {
   data() {
     return {
       restaurants: [],
-       tsrcList:[],
+       srcList:[],
        src:"",
        isShow:false,
       input: "",
@@ -66,7 +62,7 @@ export default {
       endTime: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getReceiptResult?apiId=470",
+        requestUrl: "/api/v1/otms/getArrivalResult?apiId=470",
       },
     };
   },
@@ -75,9 +71,8 @@ export default {
   },
   methods: {
      toPhotoClick(orderNumber){
-    
       this.axios
-       .post("/api/v1/tms/getReceiptPhoto?orderNumber="+orderNumber)
+       .post("/api/v1/otms/getArrivalPhoto?orderNumber="+orderNumber)
        .then((res)=>{
           this.srcList=[];
           this.src=res.data.data;

+ 15 - 14
src/views/sale/components/transport_excute/tms-offsite/receiptResult.vue

@@ -24,22 +24,22 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <!-- <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
-      </el-button>
+      </el-button> -->
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
+      <dilTable ref="excelDom" v-bind.sync="option" >
        <el-table-column fixed="right" label="照片游览" width="120">
           <template slot-scope="scope">
             <el-button @click="toPhotoClick(scope.row.orderNumber)" type="text" size="small" style="font-size: 6px">
-                抵达满货照片</el-button>
+                签收照片</el-button>
           </template>
       </el-table-column>
       </dilTable>
     </div>
-    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+     <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
         <div class="demo-image__preview">
           <el-image 
             style=" height:731px;text-align:center"
@@ -66,7 +66,7 @@ export default {
       endTime: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getReceiptResult?apiId=470",
+        requestUrl: "/api/v1/otms/getReceiptResult?apiId=470",
       },
     };
   },
@@ -75,17 +75,18 @@ export default {
   },
   methods: {
      toPhotoClick(orderNumber){
-      console.log(orderNumber)
       this.axios
-       .post("/api/v1/tms/getReceivingPhotoByUrl?orderNumber="+orderNumber)
+       .post("/api/v1/otms/getReceivingPhotoByUrl?orderNumber="+orderNumber)
        .then((res)=>{
-         console.log(res)
+         console.log(res.data)
+          this.isShow=true;
           this.srcList=[];
-          this.src=res.data.data.resultSignedNotePhoto;
-          this.isShow=true;
-          this.srcList.push(res.data.data.resultSignedNotePhoto);
-          this.srcList.push(res.data.data.resultEmptyContainerPhoto);
-          
+          this.src=res.data.resultSignedNotePhoto;
+          this.srcList.push(res.data.resultSignedNotePhoto);
+          this.srcList.push(res.data.resultEmptyContainerPhoto);
+          if(res.data.resultReceiveNotePhoto!=null){
+             this.srcList.push(res.data.resultReceiveNotePhoto);
+          }
        });
        
     },