Browse Source

批量上传说明书

zhuliu 1 năm trước cách đây
mục cha
commit
ae9f6d5096

+ 1 - 4
src/api/newApi/file.js

@@ -26,8 +26,5 @@ export default {
       params: params
     })
   },
-  //批量上传说明书
-  batchUploadPatentInstruction(data){
-    return axios.post('/fileManager/batchUploadPatentInstruction', data)
-  }
+  
 };

+ 5 - 0
src/api/newApi/importAndExport.js

@@ -68,5 +68,10 @@ export default {
     refreshPatent(data) {
         return axios.post('/xiaoshi/patent/refreshPatent', data)
     },
+
+    //批量上传说明书
+    batchUploadPatentInstruction(data){
+        return axios.post('/xiaoshi/importTask/addPdfTask', data)
+    }
     
 }

+ 40 - 3
src/utils/model/ImportProgress/index.vue

@@ -117,16 +117,53 @@ export default {
             this.state = 3
             this.record('分片合并完成,等待更新专利说明书')
             let params = {
-              url: response.data[0],
-              type: this.form.type,
-              remark: this.form.remark
+                fileGuid: response.data[0],
+                pdfType: this.form.type,
+                remark: this.form.remark
             }
             await this.$api.batchUploadPatentInstruction(params)
             this.record('开始更新专利说明书')
+            this.getConfirm()
             this.del()
             
           })
     },
+      //弹窗
+      getConfirm() {
+            const h = this.$createElement;
+            this.$msgbox({
+                title: "提示",
+                message: h("p", null, [
+                    h("span", null, "任务正在导入,查看任务进度请前往"),
+                    h(
+                    "span",
+                    {
+                        class: "MessageBoxClass",
+                        on: {
+                        click: () => {
+                            this.toTaskList();
+                            // 通过close关闭消息弹窗,this.$confirm就是this.$confirm.close(false),其他同理
+                            this.$msgbox.close(false);
+                        },
+                        },
+                    },
+                    "任务清单"
+                    ),
+                ]),
+                type: "warning",
+                showConfirmButton: false,
+            }).then((action) => {});
+        },
+        //跳转到任务清单
+        toTaskList() {
+            // 传专题库id是查到当前专题库的导入任务,不传是查看所有导入任务
+            this.$router.push({
+                path: "/taskList",
+                // query:{
+                //     importToId:this.form.importToId
+                // }
+            });
+        },
     record(status, ) {
       this.recordMessage = status
       this.currentIndex += 1

+ 5 - 4
src/views/project/components/dialog/BatchInstruction.vue

@@ -19,8 +19,8 @@
           <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
             <el-form-item label="文档类型" prop="type">
               <el-select v-model="ruleForm.type" class="width_100">
-                <el-option label="公开文档" value="1"></el-option>
-                <el-option label="授权文档" value="2"></el-option>
+                <el-option label="公开文档" value="0"></el-option>
+                <el-option label="授权文档" value="1"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="导入文件" required>
@@ -55,7 +55,7 @@ export default {
       visible: false,
       btnLoading: false,
       ruleForm: {
-        type: '1',
+        type: '0',
         file: null
       },
       rules: {
@@ -103,7 +103,7 @@ export default {
     close() {
       this.visible = false
       this.ruleForm = {
-        type: '1',
+        type: '0',
         file: null
       }
       this.$emit('close')
@@ -151,6 +151,7 @@ export default {
               data:this.ruleForm
             }
           )
+          this.close()
           return
           this.upload = true
           this.record('等待读取文件MD5')