ajax 7 сар өмнө
parent
commit
8963cae435

+ 2 - 1
src/hooks/useDownload.ts

@@ -19,7 +19,7 @@ export const useDownload = async (
   tempName: string,
   params: any = {},
   isNotify: boolean = true,
-  fileType: string = '.xlsx',
+  fileType: string = '.zip',
   fileName?: string
 ) => {
   if (isNotify) {
@@ -40,6 +40,7 @@ export const useDownload = async (
     ElMessage.error(errMsg)
   }
   try {
+    console.log('params ===>', params)
     const data = await api(params)
     const isBlob = await blobValidate(data)
     if (isBlob) {

+ 3 - 2
src/views/demo/data/index.vue

@@ -9,7 +9,7 @@
       <template #tableHeader="scope">
         <el-button type="primary" v-auth="['demo:data:add']" :icon="CirclePlus" @click="openDialog(1, '数据新增')"> 新增 </el-button>
         <el-button type="primary" v-auth="['demo:data:import']" :icon="Upload" plain @click="batchAdd"> 导入数据集 </el-button>
-        <el-button type="primary" v-auth="['demo:data:export']" :icon="Download" plain @click="downloadFile"> 导出 </el-button>
+        <el-button type="primary" v-auth="['demo:data:export']" :icon="Download" plain @click="downloadFile(scope.selectedListIds)"> 导出 </el-button>
         <el-button
           type="danger"
           v-auth="['demo:data:remove']"
@@ -330,7 +330,8 @@ const batchDelete = async (ids: string[]) => {
 }
 
 // 导出数据管理列表
-const downloadFile = async () => {
+const downloadFile = async (ids: string[]) => {
+  proTable.value.searchParam['selectedIds'] = ids
   ElMessageBox.confirm('确认导出数据管理数据?', '温馨提示', { type: 'warning' }).then(() =>
     useDownload(exportDataApi, '数据管理列表', proTable.value?.searchParam)
   )

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 406 - 561
yarn.lock


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно