From d4c0d61492e9161eeaa3cd5898ea612fb201d457 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Sun, 14 Sep 2025 11:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E9=87=8F=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=A1=B9=E7=9B=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- src/views/design/billofQuantities/index.vue | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 0422cc2..2bed56d 100644 --- a/.env.development +++ b/.env.development @@ -7,13 +7,13 @@ VITE_APP_ENV = 'development' # 开发环境 # 李陈杰 209 - VITE_APP_BASE_API = 'http://192.168.110.209:8899' +# VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 # VITE_APP_BASE_API = 'http://192.168.110.149:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.188:8899' # 朱银 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.149:8899' #曾涛 # VITE_APP_BASE_API = 'http://192.168.110.171:8899' diff --git a/src/views/design/billofQuantities/index.vue b/src/views/design/billofQuantities/index.vue index 2130d23..e428c0d 100644 --- a/src/views/design/billofQuantities/index.vue +++ b/src/views/design/billofQuantities/index.vue @@ -170,6 +170,7 @@ async function getVersionNums(isSheet = true) { state.loading.versions = true; state.error = null; + console.log('🚀 ~ handleSheetName ~ currentProject.value?.id:', currentProject.value?.id); const res = await obtainAllVersionNumbers({ projectId: currentProject.value?.id, workOrderType: state.work_order_type, @@ -375,6 +376,16 @@ const downloadTemplate = (type) => { alert('下载失败,请重试'); } }; +const resetState = () => { + state.tableData = []; + state.options = []; + state.sheets = []; + state.queryForm.versions = ''; + state.queryForm.sheet = ''; + state.versionsData = {}; + state.error = null; + isExpandAll.value = true; +}; onMounted(async () => { await getVersionNums(); }); @@ -382,6 +393,8 @@ onMounted(async () => { const listeningProject = watch( () => currentProject.value?.id, (nid, oid) => { + resetState(); + state.queryForm.projectId = nid; getVersionNums(); } );