MrShi
15 小时以前 0b8838c8dd02161c5e7577162d8cd3318d133b68
admin/src/components/business/OperaJkSketchLineListWindow.vue
@@ -17,7 +17,8 @@
      <div style="display: flex;margin-top: 20px" class="orange">
        <div style="flex: 1" >线路原始总路程:
          <span  v-if="(model.originDistance ||0) > 0 ||  (model.status||0) != 0" class="red" style="font-weight: bold"> {{((model.originDistance ||0)/1000).toFixed(2)}}</span>
          <span  v-if="(model.originDistance ||0) == 0 && (model.status||0) == 0"  class="blue" style="font-weight: bold;cursor: pointer" @click="initDistance"> 点击获取 </span> 公里;
          <span  v-if="(model.originDistance ||0) == 0 && (model.status||0) == 0 && !distancing"  class="blue" style="font-weight: bold;cursor: pointer" @click="initDistance"> 点击获取 </span>
          <span  v-if="(model.originDistance ||0) == 0 && (model.status||0) == 0 && distancing"  class="red" style="font-weight: bold;cursor: pointer"> 正在获取 </span> 公里;
          <span v-if="model.status ==2">优化后总路程:<span class="green" style="font-weight: bold"> {{((model.distance ||0)/1000).toFixed(2)}} </span> 公里</span>
        </div>
      </div>
@@ -103,6 +104,7 @@
  data () {
    return {
      // 表单数据
      distancing:false,
      model: {
      },
      dataList: [],
@@ -121,6 +123,7 @@
      this.visible = true
      this.model = target
      this.loadList()
      this.distancing =false
      if(this.model.optStatus === 1){
        this.loadListNew()
      }
@@ -143,6 +146,10 @@
    },
    initDistance () {
      var that = this
      if(this.distancing){
        return
      }
      this.distancing=true
      initOriginDistance({
        id: this.model.id
      }).then(res => {
@@ -151,6 +158,10 @@
          that.model.distance = res.distance
          that.loadList()
        }
      }).catch(e => {
            this.$tip.apiFailed(e)
          }).finally(() => {
        that.distancing = false
      })
    },
    viewCustomer (row) {