Browse Source

fix(导出功能): 修复导出 Excel 时的对象合并方式,确保正确传递查询参数

PIGCLOUD 4 weeks ago
parent
commit
d3d0c9726e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      multiple/主子表格.vue
  2. 1 1
      single/表格.vue

+ 1 - 1
multiple/主子表格.vue

@@ -233,7 +233,7 @@ const resetQuery = () => {
 
 // 导出excel
 const exportExcel = () => {
-  downBlobFile('/${moduleName}/${functionName}/export', Object.assign(state.queryForm, { ids: selectObjs.value }), '${functionName}.xlsx');
+  downBlobFile('/${moduleName}/${functionName}/export', { ...state.queryForm, ids: selectObjs.value }, '${functionName}.xlsx');
 };
 
 // 多选事件

+ 1 - 1
single/表格.vue

@@ -270,7 +270,7 @@ const resetQuery = () => {
 const exportExcel = () => {
   downBlobFile(
     '/${moduleName}/${functionName}/export',
-    Object.assign(state.queryForm, { ids: selectObjs.value }),
+    { ...state.queryForm, ids: selectObjs.value },
     '${functionName}.xlsx'
   );
 };