From 34f6bf65478e071108d5045a02e661b0af502b4a Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 25 Feb 2026 14:38:29 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E9=85=8D=E6=96=B9=E5=BA=93-?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=88=E7=82=B9=E5=87=BB=E8=AF=BB=E5=8F=96=E6=89=93?= =?UTF-8?q?=E5=BC=80=E5=AF=B9=E5=BA=94=E9=A1=B9=E5=AD=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FormulaLibraryDetailTabs.vue | 17 +- src/views/formula/formulaLibrary/index.vue | 182 ++++++------------ 2 files changed, 72 insertions(+), 127 deletions(-) diff --git a/src/views/formula/formulaLibrary/components/FormulaLibraryDetailTabs.vue b/src/views/formula/formulaLibrary/components/FormulaLibraryDetailTabs.vue index c2ab542d..0d5bf4b1 100644 --- a/src/views/formula/formulaLibrary/components/FormulaLibraryDetailTabs.vue +++ b/src/views/formula/formulaLibrary/components/FormulaLibraryDetailTabs.vue @@ -186,20 +186,21 @@ const getList = async () => { if (!props.recipeId) { list.value = [] total.value = 0 + detailList.value = [] + to.value = 0 return } loading.value = true try { if (activeTab.value === 'manual') { const data = await RecipePointRecordApi.getRecipePointRecordPage(buildQueryParams()) - list.value = data.list - total.value = data.total + list.value = data.list + total.value = data.total } else { const d = await RecipeDeviceRecordApi.getRecipeDeviceRecordPage(buildQueryParams()) - detailList.value = d.list - to.value = d.total + detailList.value = d.list + to.value = d.total } - } finally { loading.value = false } @@ -219,15 +220,15 @@ watch( () => props.recipeId, () => { queryParams.pageNo = 1 - // if (activeTab.value === 'manual') getList() - } + }, + { immediate: true } ) watch( () => activeTab.value, (tab) => { - // if (tab === 'manual') + queryParams.pageNo = 1 getList() } ) diff --git a/src/views/formula/formulaLibrary/index.vue b/src/views/formula/formulaLibrary/index.vue index 45113b53..eda13f80 100644 --- a/src/views/formula/formulaLibrary/index.vue +++ b/src/views/formula/formulaLibrary/index.vue @@ -1,44 +1,24 @@