From 207cf684d5b65c26104c0cc42e9d6a88a4fdb298 Mon Sep 17 00:00:00 2001 From: szdot Date: Tue, 7 Nov 2023 13:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2ui=20=E6=8E=A5=E5=8F=A3=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=EF=BC=9B=20=E8=AE=A2=E5=8D=95=E5=A4=9A=E9=80=89select?= =?UTF-8?q?ion=E6=8E=A7=E4=BB=B6=E7=BC=96=E5=86=99=20;=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E9=95=BF=E6=8C=89=E4=BA=8B=E4=BB=B6=E8=8E=B7=E5=8F=96=E7=BB=8F?= =?UTF-8?q?=E7=BA=AC=E5=BA=A6=EF=BC=88=E7=82=B9=E9=A3=9E=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MapBox.vue | 23 ++ src/components/SelectionOrderBack.vue | 31 +++ src/components/SelectionOrderStatus.vue | 37 +++ src/router/index.js | 23 ++ src/store/index.js | 14 +- src/styles/myIcon.scss | 2 +- .../layout/components/main/home/index.vue | 7 +- .../layout/components/main/order/index.vue | 227 +++--------------- src/views/layout/index.vue | 2 +- 9 files changed, 162 insertions(+), 204 deletions(-) create mode 100644 src/components/SelectionOrderBack.vue create mode 100644 src/components/SelectionOrderStatus.vue diff --git a/src/components/MapBox.vue b/src/components/MapBox.vue index 4b15e7a..23566e3 100644 --- a/src/components/MapBox.vue +++ b/src/components/MapBox.vue @@ -82,6 +82,29 @@ export default { // }) // this.map.setTerrain({ source: 'mapbox-dem', exaggeration: 1.5 }) }) + + // 长按事件 传longPress到组件外部调用 + let pressTimer + this.map.on('mousedown', (event) => { // pc端点击事件 + pressTimer = setTimeout(() => { + const lngLat = this.map.unproject(event.point) + // 将经纬度信息传递到组件外部 + this.$emit('longPress', lngLat) + }, 1000) // 作为长按的时间阈值 + }) + this.map.on('touchstart', (event) => { // 移动端点击事件 + pressTimer = setTimeout(() => { + const lngLat = this.map.unproject(event.point) + // 将经纬度信息传递到组件外部 + this.$emit('longPress', lngLat) + }, 1000) // 作为长按的时间阈值 + }) + // 松手时点击事件不够 清除定时器模拟长按事件 + const clearPressTimer = () => { + clearTimeout(pressTimer) + } + this.map.on('mouseup', clearPressTimer) + this.map.on('touchend', clearPressTimer) }) }, methods: { diff --git a/src/components/SelectionOrderBack.vue b/src/components/SelectionOrderBack.vue new file mode 100644 index 0000000..8e161ae --- /dev/null +++ b/src/components/SelectionOrderBack.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/components/SelectionOrderStatus.vue b/src/components/SelectionOrderStatus.vue new file mode 100644 index 0000000..6962042 --- /dev/null +++ b/src/components/SelectionOrderStatus.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 4c2f5ac..c8f192d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -397,6 +397,29 @@ const routes = [ } ] }, + { + path: '/order', + component: Layout, + redirect: '/order/index', + meta: { + title: '订单管理', + icon: 'iconfont icon-a-SalesOrderManagement', + roles: ['admin', 'editor'], + tapName: 'admin' + }, + children: [ + { + path: '/order/index', + component: () => import('@/views/layout/components/main/order/index'), + meta: { + title: '订单管理', + icon: 'iconfont icon-a-SalesOrderManagement', + roles: ['admin', 'editor'], + tapName: 'admin' + } + } + ] + }, { path: '*', redirect: '/404', diff --git a/src/store/index.js b/src/store/index.js index bbd8473..5cd6f36 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -18,7 +18,7 @@ const store = new Vuex.Store({ categoryList: [], // 分类列表(小程序) spuList: [], // 商品spu列表 skuList: [], // 商品sku列表 - questList: [], // 订单列表 + orderList: [], // 订单列表 logList: [], // 操作日志列表 crosFrequency: null // 对频macadd }, @@ -74,8 +74,8 @@ const store = new Vuex.Store({ /** * @description: 设置订单列表 */ - setQuestList (state, list) { - state.questList = list + setOrderList (state, list) { + state.orderList = list }, /** * @description: 向操作日志列表最后插入新的信息 @@ -889,12 +889,12 @@ const store = new Vuex.Store({ * @description: 获取订单列表 ps:待发货及待收货 并且不是退款成功状态 * @return {*} 列表 */ - async fetchQuestList ({ commit }) { - const res = await api.get('getQuestList') + async fetchOrderList ({ commit }) { + const res = await api.get('getOrderList', 'Admin') if (res.data.status === 1) { - commit('setQuestList', res.data.questList) + commit('setOrderList', res.data.orderList) } else { - commit('setQuestList', []) + commit('setOrderList', []) } return res }, diff --git a/src/styles/myIcon.scss b/src/styles/myIcon.scss index edfe545..84d7804 100644 --- a/src/styles/myIcon.scss +++ b/src/styles/myIcon.scss @@ -1 +1 @@ -@import 'https://at.alicdn.com/t/c/font_3703467_3t3ax3urzwi.css'; //iconfont阿里巴巴 \ No newline at end of file +@import 'https://at.alicdn.com/t/c/font_3703467_d1m3z2xkd1v.css'; //iconfont阿里巴巴 \ No newline at end of file diff --git a/src/views/layout/components/main/home/index.vue b/src/views/layout/components/main/home/index.vue index 0bb018a..5e5a979 100644 --- a/src/views/layout/components/main/home/index.vue +++ b/src/views/layout/components/main/home/index.vue @@ -1,6 +1,6 @@ @@ -29,6 +29,11 @@ export default { } }, methods: { + // 地图长按事件 测试 + handleDemo (lngLat) { + console.log('经度:', lngLat.lng) + console.log('维度:', lngLat.lat) + }, /** * @description: 创建飞机图标 */ diff --git a/src/views/layout/components/main/order/index.vue b/src/views/layout/components/main/order/index.vue index f608a00..b37e333 100644 --- a/src/views/layout/components/main/order/index.vue +++ b/src/views/layout/components/main/order/index.vue @@ -1,247 +1,86 @@