zhuliu 10 月之前
父節點
當前提交
61b6aed3ed

+ 9 - 0
src/api/newApi/patent.js

@@ -360,4 +360,13 @@ export default {
   deletePatents(data) {
     return axios.post("/xiaoshi/patent/deletePatents", data);
   },
+
+  /**
+   * 获取专利相似度(外部检索)
+   * @param {*} data 
+   * @returns 
+   */
+  getPatentSimilarMess(data) {
+    return axios.post("/xiaoshi/patentStar/getPatentSimilarMess", data);
+  },
 }

+ 36 - 0
src/views/components/import/conditionImport/searchResult.vue

@@ -577,6 +577,7 @@ export default {
           this.$store.commit("SET_PATENT_PARAMS", queryParams);
           this.$store.commit("SET_PATENT_RECORDS", records);
           this.getImageAndStatus()
+          this.getPatentSimilarMess()
           this.loading = false;
           if(response.data.redisKey && !this.condition.redisKey){
             this.condition.redisKey = response.data.redisKey
@@ -621,6 +622,41 @@ export default {
       })
       
     },
+    //获取专利相似度
+    getPatentSimilarMess(){
+      if(this.tableData.length == 0 || !this.noveltySearch){
+        return
+      }
+      var params = {
+        projectId:this.projectId,
+        patentScoreDTOList:[]
+      }
+      this.tableData.forEach(item=>{
+        var obj = {
+          patentNo:item.patentNo,
+          appNo:item.appNo,
+          rowApplicationNo:item.rowApplicationNo,
+          publicNo:item.publicNo,
+          grantNo:item.grantNo
+        }
+        params.patentScoreDTOList.push(obj)
+      })
+      this.$api.getPatentSimilarMess(params).then(response=>{
+        if(response.code == 200){
+          var data = response.data.patentScoreDTOList
+          for(var i = 0;i<this.tableData.length;i++){
+            var item = this.tableData[i]
+            var index = data.findIndex(j=>{
+              return j.patentNo == item.patentNo
+            })
+            if(index!=-1){
+              this.$set(item, 'score', data[index].score.toFixed(4))
+              data.splice(index,1)
+            }
+          }
+        }
+      })
+    },
     handleSelect(data) {
       // this.queryParams.selected = data
     },

+ 7 - 0
src/views/project/patentCollection/components/mixins/index.js

@@ -60,6 +60,13 @@ export const projectData = {
 
   data() {
     return {
+      customColors: [
+        { color: '#f56c6c', percentage: 20 },
+        { color: '#e6a23c', percentage: 40 },
+        { color: '#5cb87a', percentage: 60 },
+        { color: '#1989fa', percentage: 80 },
+        { color: '#6f7ad3', percentage: 100 }
+      ],
     }
   },
 

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

@@ -60,6 +60,7 @@
                       simpleStatus[patent.simpleStatus] }}</el-tag>
                     <el-tag class="margin-left_10" style="cursor: pointer;" type="primary" effect="plain" size="small" @click="openAddRemark(patent)" v-if="noveltySearch && !noveltyIsRemark(patent)">添加查新标注</el-tag>
                     <el-tag class="margin-left_10" style="cursor: pointer;" type="primary" effect="plain" size="small"  v-if="noveltySearch && noveltyIsRemark(patent)" @click="openAddRemark(patent)">已标注</el-tag>
+                    <el-progress style="display:inline-block;width:300px;margin-left:20px;" v-if="noveltySearch && patent.score" :text-inside="true" :stroke-width="20"  :percentage="patent.score*100"  :color="customColors" ></el-progress>
                   </div>
                   <div style="font-size: 13px;">
                     <el-row>

+ 3 - 0
src/views/project/patentCollection/components/views/Picture.vue

@@ -28,6 +28,9 @@
           <myTooltip :content="getView(item, 'title')">
             <div class="noWrap" v-html="getView(item, 'title')"></div>
           </myTooltip>
+          <div v-if="noveltySearch && item.score">
+            <span>相关度</span><el-progress style="display:inline-block;width:calc(100% - 50px);margin-left:10px;" v-if="noveltySearch && item.score" :text-inside="true" :stroke-width="20"  :percentage="item.score*100"  :color="customColors" ></el-progress>
+          </div>
         </div>
         <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">
           <el-image fit="contain" :src="outside?item.pictureGuid:$commonJS.checkViewer(item.pictureGuid)"

+ 6 - 0
src/views/project/patentCollection/components/views/Table.vue

@@ -99,6 +99,11 @@
           <div v-else v-html="getView(scope.row, item.value, item.type)"></div>
         </template>
       </el-table-column>
+      <el-table-column v-if="noveltySearch" label="相关度" width="100" fixed="right">
+        <template slot-scope="scope">
+          <el-progress v-if="scope.row.score" :text-inside="true" :stroke-width="20"  :percentage="scope.row.score*100"  :color="customColors"></el-progress>
+        </template>
+      </el-table-column>
     </el-table>
     <addRemark ref="addRemark" :projectId="projectId" v-on="$listeners"></addRemark>
   </div>
@@ -120,6 +125,7 @@ export default {
   },
   data() {
     return {
+      
     }
   },
   watch:{