Pārlūkot izejas kodu

feat: qlm采集页面完善导出函数

cuiyalong 7 mēneši atpakaļ
vecāks
revīzija
37ce05fea4
1 mainītis faili ar 9 papildinājumiem un 9 dzēšanām
  1. 9 9
      frontend/src/views/CollectionList.vue

+ 9 - 9
frontend/src/views/CollectionList.vue

@@ -64,9 +64,9 @@
                             <el-button size="small">结果导出</el-button>
                             <template #dropdown>
                                 <el-dropdown-menu>
-                                    <el-dropdown-item @click="handleExportEpub">导出EPUB格式文件</el-dropdown-item>
-                                    <el-dropdown-item @click="handleExportJson">导出JSON格式文件</el-dropdown-item>
-                                    <el-dropdown-item @click="handleExportExcel">导出Excel格式文件</el-dropdown-item>
+                                    <el-dropdown-item @click="handleExportEpub(scope.row)">导出EPUB格式文件</el-dropdown-item>
+                                    <el-dropdown-item @click="handleExportJson(scope.row)">导出JSON格式文件</el-dropdown-item>
+                                    <el-dropdown-item @click="handleExportExcel(scope.row)">导出Excel格式文件</el-dropdown-item>
                                     <!-- <el-dropdown-item>补录/上推至平台</el-dropdown-item> -->
                                 </el-dropdown-menu>
                             </template>
@@ -580,7 +580,7 @@ const tableActionDisabled = {
 }
 
 //handleExportEpub导出文件
-const handleExportEpub = () => {
+const handleExportEpub = (row) => {
   ElMessageBox.prompt('请输入文件名称', '文件名', {
     confirmButtonText: '确定',
     cancelButtonText: '取消',
@@ -590,7 +590,7 @@ const handleExportEpub = () => {
         console.log("无效的文件存储路径", save2file)
         return
       }
-      ExportEpubFile(value, save2file, formData.value.code).then(d => {
+      ExportEpubFile(value, save2file, row._id).then(d => {
         if (d.err === 1) {
           ElMessage({
             message: d.msg || `导出epub文件${save2file}完成!`,
@@ -609,7 +609,7 @@ const handleExportEpub = () => {
   })
 }
 
-const handleExportJson = () => {
+const handleExportJson = (row) => {
   ElMessageBox.prompt('请输入文件名称', '文件名', {
     confirmButtonText: '确定',
     cancelButtonText: '取消',
@@ -619,7 +619,7 @@ const handleExportJson = () => {
         console.log("无效的文件存储路径", save2file)
         return
       }
-      ExportJsonFile(save2file, formData.value.code).then(d => {
+      ExportJsonFile(save2file, row._id).then(d => {
         if (d.err === 1) {
           ElMessage({
             message: d.msg || `导出excel文件${save2file}完成!`,
@@ -638,7 +638,7 @@ const handleExportJson = () => {
   })
 }
 
-const handleExportExcel = () => {
+const handleExportExcel = (row) => {
   ElMessageBox.prompt('请输入文件名称', '文件名', {
     confirmButtonText: '确定',
     cancelButtonText: '取消',
@@ -648,7 +648,7 @@ const handleExportExcel = () => {
         console.log("无效的文件存储路径", save2file)
         return
       }
-      ExportExcelFile(save2file, formData.value.code).then(d => {
+      ExportExcelFile(save2file, row._id).then(d => {
         if (d.err === 1) {
             ElMessage({
                 message: d.msg || `导出excel文件${save2file}完成!`,