Browse Source

陆运地图修改,首页重置列丢失问题

caojunjie 3 years ago
parent
commit
cfd596fc7f

+ 1 - 1
src/enums/column-name.js

@@ -539,7 +539,7 @@ const columnName = [{
   },
   {
     code: 140,
-    name: '首页'
+    name: '首页-今日业务'
   }
 ]
 export const getColumnName = (key) => {

+ 1 - 1
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -1702,7 +1702,7 @@ export default {
       }else if(value === 1){
         this.goodsForm = {}
         this.$emit('backToList',true)
-      }else if (value === 1){
+      }else if (value === 2){
         this.$router.push({
           path: '/wel/index'
         });

+ 19 - 7
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -15,7 +15,7 @@
           </span>
         </div>
         <div class="content" v-loading="loading">
-          <avue-crud :data="tableData" :option="option" :key="key" ref="dialogColumn" @resetColumn="resetColumn" @saveColumn="saveColumn">
+          <avue-crud :data="tableData" :option="option" :key="key" ref="crud" @resetColumn="resetColumn" @saveColumn="saveColumn">
             <template slot="billNo" slot-scope="{row}">
                 <span class="el-button--text" style="cursor: pointer"
                       @click="openTrack(row,0)">{{ row.billNo }}</span>
@@ -24,6 +24,12 @@
                 <span class="el-button--text" style="cursor: pointer"
                       @click="openTrack(row,1)">{{ row.plateNo }}</span>
             </template>
+            <template slot="addressDetail" slot-scope="{ row,index}">
+              <el-tooltip class="item" effect="dark" placement="top">
+                <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
+                <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
+              </el-tooltip>
+            </template>
             <template slot="status" slot-scope="{row}">
               <span v-if="row.status == 0" style="color: #E45656;">未调度</span>
               <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>
@@ -111,8 +117,7 @@ export default {
             label:'货运地点',
             prop:'addressDetail',
             index:3,
-            width:100,
-            overHidden: true,
+            width:100
           },
           {
             label:'票据号',
@@ -245,10 +250,13 @@ export default {
       const inSave = await this.delColumnData(this.getColumnName(140), this.optionList);
       if (inSave) {
         this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
         for (let item of this.option.column){
-          if (item.prop === 'extraAmountC') return
+          if (item.prop === 'extraAmountC') return false
         }
         if (this.roleName.indexOf('平台') !== -1){
+          console.log(this.option.column)
           this.option.column.push(
               {
                 label:'应付杂费',
@@ -259,7 +267,7 @@ export default {
               }
           )
         }
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.key++
       }
     },
     openTrack(row,index){
@@ -272,7 +280,10 @@ export default {
         gaude({itemId: row.id,plateNo:row.plateNo}).then(res => {
           this.lineArr = res.data.data
           this.dialogVisible = true
-          this.initMap();
+          let this_=this
+          setTimeout(function(){
+            this_.initMap();
+          },100)
         })
         location({itemId: row.id,plateNo:'陕YH0008'}).then(res => {
           // console.log(res.data.data)
@@ -283,7 +294,7 @@ export default {
     initMap() {
       this.map = new AMap.Map("container", {
         resizeEnable: true,
-        center: [120.382891,36.066460],
+        center: this.lineArr.length >0 ?this.lineArr[this.lineArr.length - 1]:[120.382891,36.066460],
         zoom: 17
       });
       let icon = new AMap.Icon({
@@ -301,6 +312,7 @@ export default {
         autoRotation: true,
         angle: -15
       });
+      return
       // 绘制轨迹
       let polyline = new AMap.Polyline({
         map: this.map,