zhuliu 11 月之前
父节点
当前提交
afb7c3796a

+ 6 - 2
src/views/components/import/conditionImport/components/projectListDialog.vue

@@ -258,7 +258,7 @@ export default {
           0: "专题库",
           1: "报告",
           2: "产品",
-          3: '查新检索报告'
+          // 3: '查新检索报告'
         },
       ods:{
           data:[],
@@ -291,7 +291,11 @@ export default {
         ...form,
       };
       if (this.form.importToType) {
-        this.title = `导入到${this.importToTypes[this.form.importToType]}`;
+        if(this.form.importToType == 3){
+          this.title = `导入到查新检索报告`;
+        }else{
+          this.title = `导入到${this.importToTypes[this.form.importToType]}`;
+        }
         this.firstShow = false
         this.rules = {}
       } else {

+ 62 - 11
src/views/components/import/conditionImport/searchResult.vue

@@ -23,7 +23,7 @@
         </div>
         <div>
           <el-button type="primary" size="small" v-if="noveltySearch" @click="reporting">生成报告</el-button>
-          <el-button type="primary" size="small" @click="importToProject">{{condition.isUpdateCriteria?'保存定期更新条件':'导入专利'}}</el-button>
+          <el-button v-if="outside || projectId" type="primary" size="small" @click="importToProject">{{condition.isUpdateCriteria?'保存定期更新条件':'导入专利'}}{{ (!outside && condition.importToType == 3)?'到查新检索报告':'' }}</el-button>
           <el-button size="small" type="warning" @click="handleFieldManage">显示栏位管理</el-button>
         </div>
       </el-header>
@@ -362,17 +362,68 @@ export default {
     },
     //导入到专题库
     importToProject() {
-      var form = {
-        // ...this.searchData,
-        ...this.condition,
-        orderBy: this.queryParams.OrderBy,
-        orderByType: this.queryParams.OrderByType,
-        // startNumber: this.selectedTotal > 0 ? this.startNumber : 1,
-        // endNumber: this.selectedTotal > 0 ? this.endNumber : this.total,
-        patentNos: this.queryParams.isAdd,
-        // isDeletePatentNos: this.queryParams.isDelete,
+      if(this.outside){
+        var form = {
+          // ...this.searchData,
+          ...this.condition,
+          orderBy: this.queryParams.OrderBy,
+          orderByType: this.queryParams.OrderByType,
+          // startNumber: this.selectedTotal > 0 ? this.startNumber : 1,
+          // endNumber: this.selectedTotal > 0 ? this.endNumber : this.total,
+          patentNos: this.queryParams.isAdd,
+          // isDeletePatentNos: this.queryParams.isDelete,
+        }
+        this.$refs.projectListDialog.open(form);
+        return
+      }
+      if(!this.projectId){
+        return 
       }
-      this.$refs.projectListDialog.open(form);
+      var params = {
+        stringRequest:{
+          projectId: this.innerProjectId,
+          searchQuery: this.condition.searchCondition || '',
+          orderDTOList:this.sort,
+        },
+        fromProjectId:this.innerProjectId, //来源专题库项目id
+        toProjectId:this.projectId, //目标报告项目id
+        isAdd:this.queryParams.isAdd, //去除专利号
+      }
+      if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+        var orderDTOList = [
+          {
+            orderBy:this.queryParams.OrderBy,
+            orderType:this.queryParams.OrderByType == 'DESC'?1:0
+          }
+        ]
+        params.stringRequest.orderDTOList = orderDTOList
+      }
+      var message = this.$message({
+        type:'warning',
+        message: '正在将专利导入报告中...',
+        duration: 0 // 设置为0表示不自动关闭
+      })
+
+      this.$api.addProjectPatentToReport(params).then(res=>{
+        if(res.code == 200){
+          message.close()
+          this.$message(
+            {
+              type:'success',
+              message:'导入成功'
+            }
+          )
+        }
+      }).catch(error=>{
+        message.close()
+        this.$message(
+            {
+              type:'error',
+              message:'导入失败'
+            }
+          )
+      })
+      
     },
     //切换页数
     async handleCurrentChange(val) {

+ 6 - 1
src/views/noveltySearch/components/details/components/contrastFile/mixins.js

@@ -66,7 +66,12 @@ export const updateNoveltyCompareFile = {
                         this.$set(row.noveltyCompareRecordVOS[0],'markNoteText',value)
                     }else{
                         params.id = response.data
-                        this.$set(row.noveltyCompareRecordVOS,0,params)
+                        if(!row.noveltyCompareRecordVOS){
+                          this.$set(row,'noveltyCompareRecordVOS',[params])
+                        }else{
+                          row.noveltyCompareRecordVOS.push(params)
+                        }
+                        
                     }
                     this.cancelEdit()
                 }