xuzhancheng há 3 dias atrás
pai
commit
d901a8696c
1 ficheiros alterados com 12 adições e 0 exclusões
  1. 12 0
      yudao-ui-admin-vue3/src/api/pressure2/dynamictb/index.ts

+ 12 - 0
yudao-ui-admin-vue3/src/api/pressure2/dynamictb/index.ts

@@ -104,5 +104,17 @@ export const DynamicTbApi = {
   },
   reject(data:any) {
     return request.post({url: `/pressure2/dynamic-tb/audit/reject`, data})
+  },
+
+  // 导出模板数据为 ZIP 压缩包(支持多选)
+  exportZip: async (ids: string[]) => {
+    return await request.download2({ url: `/pressure2/dynamic-tb/export-zip`, data: { ids } })
+  },
+
+  // 从 ZIP 压缩包导入模板数据
+  importZip: async (file: File) => {
+    const formData = new FormData()
+    formData.append('file', file)
+    return await request.upload({ url: `/pressure2/dynamic-tb/import-zip`, data: formData })
   }
 }