From 9dc6d0078c64b75bdac19ae93f1f34a46276c299 Mon Sep 17 00:00:00 2001 From: zhangsiyu Date: Fri, 22 Sep 2023 13:49:40 +0800 Subject: [PATCH] 1 --- src/views/distribution/reservation/atlas.vue | 36 ++++++++++++++------ vite.config.js | 3 +- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/views/distribution/reservation/atlas.vue b/src/views/distribution/reservation/atlas.vue index 7e26addf..4b9fff68 100644 --- a/src/views/distribution/reservation/atlas.vue +++ b/src/views/distribution/reservation/atlas.vue @@ -8,11 +8,15 @@
- + +
@@ -57,7 +61,7 @@ onMounted(() => { watchEffect(() => { console.log(router.currentRoute.value.query.id); details.item = router.currentRoute.value.query.id; - if(!details.item) return + if (!details.item) return; getReservationAddr(details.item).then(res => { // selectStockArticleAtlasInfo(details.item.id).then(res => { console.log(res.data.data); @@ -89,14 +93,23 @@ function initmap() { }); } function checkgoto() { - let ids = details.item; - router.push({ - path: '/distribution/turndelivery/deliveryMarket', - query: { - id: ids, - name: '市配计划', - }, - }); + let ids = [] + details.datalists.map(item=>{ + if(item.isck){ + ids.push(item.items.id) + } + }) + if(ids.length==0){ + return + } + let stids=ids.join(',') + router.push({ + path: '/distribution/turndelivery/deliveryMarket', + query: { + id: stids, + name: '市配计划', + }, + }); } function init(data) { // maplabel() @@ -173,6 +186,7 @@ function Driving(geocodess) { // console.log(result.routes[0]); item.time = formatSeconds(result.routes[0].time); item.distance = result.routes[0].distance / 1000; + item.isck=true // item.distance=result.routes[0].distance/1000 details.datalists.push(item); } else { diff --git a/vite.config.js b/vite.config.js index 21266574..aff88b43 100644 --- a/vite.config.js +++ b/vite.config.js @@ -16,8 +16,9 @@ export default ({ mode, command }) => { // target: 'http://192.168.10.48:8888', // target: 'http://192.168.10.123:8889', // target: 'http://192.168.10.75:8777', + target: 'http://192.168.10.101:8888', // target: 'http://192.168.10.29:13000', - target: 'http://test.api.huitongys.com', + // target: 'http://test.api.huitongys.com', changeOrigin: true, rewrite: path => path.replace(/^\/api/, ''), },