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 {