| | |
| | | <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> |
| | |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | | distancing:false, |
| | | model: { |
| | | }, |
| | | dataList: [], |
| | |
| | | this.visible = true |
| | | this.model = target |
| | | this.loadList() |
| | | this.distancing =false |
| | | if(this.model.optStatus === 1){ |
| | | this.loadListNew() |
| | | } |
| | |
| | | }, |
| | | initDistance () { |
| | | var that = this |
| | | if(this.distancing){ |
| | | return |
| | | } |
| | | this.distancing=true |
| | | initOriginDistance({ |
| | | id: this.model.id |
| | | }).then(res => { |
| | |
| | | that.model.distance = res.distance |
| | | that.loadList() |
| | | } |
| | | }).catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }).finally(() => { |
| | | that.distancing = false |
| | | }) |
| | | }, |
| | | viewCustomer (row) { |