zhuliu 1 год назад
Родитель
Сommit
ef4e6939f2

+ 16 - 0
src/api/newApi/noveltySearch.js

@@ -39,4 +39,20 @@ export default {
     delCompareFile(data){
         return axios.post('/xiaoshi/noveltyProject/delCompareFile', data)
     },
+
+    //标注
+    //添加或者编辑标注
+    editNoveltyMark(data){
+        return axios.post('/xiaoshi/noveltyMark/edit', data)
+    },
+
+    //对比记录
+    //添加或编辑对比记录
+    editNoveltyCompareRecord(data){
+        return axios.post('/xiaoshi/noveltyCompareRecord/edit', data)
+    },
+    //查询对比记录
+    queryNoveltyCompareRecord(data){
+        return axios.post('/xiaoshi/noveltyCompareRecord/query', data)
+    },
 };

+ 16 - 2
src/views/components/import/conditionImport/searchResult.vue

@@ -31,7 +31,7 @@
         <div class="height_100">
           <component ref="patentViewList" :is="viewSelected" :outside="true" :noveltySearch="noveltySearch" :column="columnList" :tableData="tableData"  @clickPatentNo="handleClick" :canSort="condition.component != 'patentNoSearch'?true:false"
             @select-change="handleSelect" :selected.sync="queryParams.selected" :queryParams="queryParams" :patentNoList.sync="patentNoList" :refresh='true'
-            :view-field="patentViewField" @on-sort="handleSort" @addSelect="getChoosePatentNo" @saveRemark="saveRemark"></component>
+            :view-field="patentViewField" @on-sort="handleSort" @addSelect="getChoosePatentNo" :projectId="projectId" :contrastFileList="saveRemarkList" @saveRemark="saveRemark"></component>
         </div>
       </el-main>
       <el-footer class="workspace-content-patent-page foot-total">
@@ -190,14 +190,28 @@ export default {
   async mounted() {
     this.columnList = await this.$commonJS.getCustomField('patent',{ projectId: 0, taskId: null })
     await this.getList();
+    if(this.noveltySearch){
+      this.queryComparePatent()
+    }
 
   },
   methods: {
+    //查询对比文件
+    queryComparePatent(){
+      var params = {
+        projectId:this.projectId
+      }
+      this.$api.queryComparePatent(params).then(response=>{
+        if(response.code == 200){
+          this.saveRemarkList = response.data.data
+        }
+      })
+    },
     reporting(){
       this.$refs.reportTemplateDialog.open(this.projectId)
     },
     saveRemark(data){
-      this.saveRemarkList.push(data)
+      this.saveRemarkList.unshift(data)
     },
     //保存检索式
     saveSearchCondition(){

+ 28 - 4
src/views/project/patentCollection/components/dialog/addRemark.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <el-dialog custom-class="shakeDialog" title="CN202330726501.8标注" v-draggable :visible.sync="visible" width="400px" 
+    <el-dialog custom-class="shakeDialog" :title="this.form.patentNo+'标注'" v-draggable :visible.sync="visible" width="400px" 
     :before-close="handleClose" :modal="false" :close-on-click-modal="false" :modal-append-to-body="false">
-        <el-input type="textarea" v-model="form.remark"></el-input>
+        <el-input type="textarea" v-model="form.content" placeholder="请输入标注内容"></el-input>
         <span slot="footer" class="dialog-footer">
         <el-button @click="handleClose">取 消</el-button>
         <el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
@@ -15,6 +15,9 @@
 export default {
   components: {},
   props: {
+    projectId:{
+
+    }
   },
   data() {
     return {
@@ -38,8 +41,29 @@ export default {
         this.visible = false
     },
     submit(){
-      this.$emit('saveRemark',this.form)
-      this.handleClose()
+      if(this.form.content.trim() == ''){
+        this.$message.error('请输入标注内容')
+        return
+      }
+      var params = {
+        projectId:this.projectId,
+        ...this.form
+      }
+      this.loading = true
+      this.$api.editNoveltyMark(params).then(response=>{
+        if(response.code == 200){
+          var data = {
+            ...params,
+            id:response.data
+          }
+          this.loading = false
+          this.$emit('saveRemark',data)
+          this.handleClose()
+        }
+      }).catch(error=>{
+        this.loading = false
+      })
+      
     },
   },
 };

+ 1 - 1
src/views/project/patentCollection/components/views/Abstract.vue

@@ -220,7 +220,7 @@
 
 
 
-    <addRemark ref="addRemark" v-on="$listeners"></addRemark>
+    <addRemark ref="addRemark" :projectId="projectId" v-on="$listeners"></addRemark>
   </div>
 </template>