From 1560f8ee9307d24e95f4425ab23bc2a9eef24b32 Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 27 Feb 2026 17:42:49 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9B=E9=85=8D=E6=96=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE-=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/formula/formulaConfig/index.vue | 25 +++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/views/formula/formulaConfig/index.vue b/src/views/formula/formulaConfig/index.vue index 75ba37f9..876375ba 100644 --- a/src/views/formula/formulaConfig/index.vue +++ b/src/views/formula/formulaConfig/index.vue @@ -68,7 +68,7 @@ @selection-change="handleSelectionChange" @row-click="handleRowClick" > - + { const list = ref([]) const total = ref(0) +const buildExportParams = () => { + const recipeCode = queryParams.recipeCode?.trim() + const name = queryParams.name?.trim() + const productName = queryParams.productName?.trim() + return { + recipeCode: recipeCode ? recipeCode : undefined, + name: name ? name : undefined, + productName: productName ? productName : undefined + } +} + const buildQueryParams = () => { const recipeCode = queryParams.recipeCode?.trim() const name = queryParams.name?.trim() @@ -376,14 +387,16 @@ const handlePagination = () => { } const handleExport = async () => { - if (!selectedIds.value.length) { - message.error(t('RecipeManagement.RecipeConfig.exportNoSelectionMessage')) - return - } try { await message.exportConfirm() exportLoading.value = true - const data = await RecipeConfigApi.exportRecipeConfig({ ids: selectedIds.value.join(',') }) + const exportParams: any = { + ...buildExportParams() + } + if (selectedIds.value.length) { + exportParams.ids = selectedIds.value.join(',') + } + const data = await RecipeConfigApi.exportRecipeConfig(exportParams) download.excel(data, t('RecipeManagement.RecipeConfig.exportFileName')) } catch { } finally {