From e8f3851e1f0bd2d3bc277c2262eef3412c7df7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=96=87=E5=8F=AF?= <1041367524@qq.com> Date: Sat, 21 May 2022 14:45:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=AA=E4=BA=BA=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/index.vue | 1 - src/views/sales/order/index.vue | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 28ecaff..eb865a1 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -199,7 +199,6 @@ // 个人订单 const handleOrder = () => { - console.info(unref(currentSession)); router.push({ name: 'OrderManagement', query: { id: currentSession.value.fromId } }); }; diff --git a/src/views/sales/order/index.vue b/src/views/sales/order/index.vue index f50a7bf..4564265 100644 --- a/src/views/sales/order/index.vue +++ b/src/views/sales/order/index.vue @@ -65,6 +65,7 @@ import OrderTrack from './track.vue'; const { proxy } = getCurrentInstance(); const router = useRouter(); + const route = useRoute(); const store = useStore(); const loading = ref(false); const code = computed(() => store.state.order.code); @@ -79,6 +80,7 @@ /* 查询订单 */ const state = reactive({ condition: { + userId: null, orderNo: null, userPhone: null, orderSource: null, @@ -89,9 +91,19 @@ }, }); watch( - () => state.condition, + () => route.params.id, (value) => { + state.condition.userId = value; + }, + { immediate: true, deep: true } + ); + watch( + () => state.condition, + (value, old) => { store.commit('order/setCondition', _.cloneDeep(value)); + if (value.userId !== old.userId) { + handleSearch(); + } }, { immediate: true, deep: true } ); @@ -104,6 +116,7 @@ ); const handleReset = () => { state.condition = { + userId: null, orderNo: null, userPhone: null, orderSource: null,