zhuliu vor 10 Monaten
Ursprung
Commit
2e3c8c7a19

+ 4 - 0
src/assets/css/main.scss

@@ -1,3 +1,7 @@
+.el-loading-parent--relative{
+  overflow: hidden !important;
+}
+
 .MessageBoxClass{
   color: red;
 }

+ 18 - 0
src/utils/common.js

@@ -7,6 +7,24 @@ import { Base64 } from 'js-base64';
 import Config from '@/config'
 import moment from "moment";
 export default {
+  //滚动到顶部
+  scrollToTop(){
+    setTimeout(()=>{
+      // 假设你有一个元素的ID是'myElement'
+      const elements = document.getElementsByClassName('el-loading-parent--relative');
+      if(elements && elements.length>0){
+        for(var i = 0;i<elements.length;i++){
+          var element = elements[i]
+          element.scrollTo(
+            {
+                top: 0 ,
+                behavior: "instant"
+            }
+          )
+        }
+      }
+     },100)
+  },
   /**
    * 防抖
    * @param {Function} func 

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

@@ -89,7 +89,7 @@
       </span>
     </el-dialog>
     <addAndEditSearchRecords ref="addAndEditSearchRecords" :projectId="condition.importToId"></addAndEditSearchRecords>
-    <inventionPointDialog v-if="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId"  :contrastFileList="saveRemarkList"></inventionPointDialog>
+    <inventionPointDialog v-if="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId"  :contrastFileList="saveRemarkList" @updateInventionPoint="getPatentSimilarMess"></inventionPointDialog>
     <reportTemplateDialog ref="reportTemplateDialog"></reportTemplateDialog>
   </div>
 </template>
@@ -561,6 +561,7 @@ export default {
       this.$store.commit("SET_PATENT_PARAMS", queryParams);
       this.$store.commit("SET_PATENT_RECORDS", []);
       this.loading = true;
+      this.$commonJS.scrollToTop()
       await this.$api.patentSelect(params).then((response) => {
         if (response.code == 200) {
           this.total = response.data.total;
@@ -577,7 +578,7 @@ export default {
           this.$store.commit("SET_PATENT_PARAMS", queryParams);
           this.$store.commit("SET_PATENT_RECORDS", records);
           this.getImageAndStatus()
-          // this.getPatentSimilarMess()
+          this.getPatentSimilarMess()
           this.loading = false;
           if(response.data.redisKey && !this.condition.redisKey){
             this.condition.redisKey = response.data.redisKey
@@ -627,6 +628,37 @@ export default {
       if(this.tableData.length == 0 || !this.noveltySearch){
         return
       }
+      this.tableData.forEach(item=>{
+        var params = {
+          projectId:this.projectId,
+          patentScoreDTOList:[]
+        }
+        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 item1 = this.tableData[i]
+              var index = data.findIndex(j=>{
+                return j.patentNo == item1.patentNo
+              })
+              if(index!=-1){
+                var score = (data[index].score * 100 + '').substring(0, 5)
+                this.$set(item1, 'score', Number(score))
+                data.splice(index,1)
+              }
+            }
+          }
+        })
+      })
+      return
       var params = {
         projectId:this.projectId,
         patentScoreDTOList:[]

+ 1 - 0
src/views/noveltySearch/components/dialog/inventionPoint/inventionPoint.vue

@@ -390,6 +390,7 @@ export default {
           if(!this.technicalCase.projectId){
             this.$emit('getProjectId',response.data.projectId)
           }
+          this.$emit('updateInventionPoint')
           this.technicalCase.technicalCaseId = response.data.technicalCaseId
           this.technicalCase.projectId = response.data.projectId
         }

+ 3 - 0
src/views/noveltySearch/components/noveltySearchCard.vue

@@ -144,6 +144,9 @@ import createNoveltySearch from './dialog/createNoveltySearch.vue';
       },
       //获取数据
       getList(){
+        if(this.tableData.length == 0 && this.queryParams.current!=1){
+          this.queryParams.current -= 1
+        }
         this.loading = true
         var params = {
             ...this.queryParams,

+ 10 - 5
src/views/project/patentCollection/components/mixins/index.js

@@ -61,11 +61,16 @@ 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 }
+        { color: 'rgb(173, 173, 173)', percentage: 10 },
+        { color: 'rgb(130, 220, 130)', percentage: 20 },
+        { color: 'rgb(173, 255, 86)', percentage: 30 },
+        { color: 'rgb(255, 255, 173)', percentage: 40 },
+        { color: 'rgb(255, 255, 0)', percentage: 50 },
+        { color: 'rgb(255, 173, 0)', percentage: 60 },
+        { color: 'rgb(255, 130, 130)', percentage: 70 },
+        { color: 'rgb(220, 86, 86)', percentage: 80 },
+        { color: 'rgb(255, 0, 0)', percentage: 90 },
+        { color: 'rgb(130, 0, 0)', percentage: 100 }
       ],
     }
   },

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

@@ -60,7 +60,11 @@
                       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 v-if="noveltySearch" style="display:inline-block;width:300px;margin-left:20px;height:20px" >
+                      <span v-if="!patent.score" style="font-size:12px;">相关度加载中<i class="el-icon-loading"></i></span>
+                      <el-progress v-else style="display:inline-block;width:300px;margin-left:20px;" text-color="#000000" :text-inside="true" :stroke-width="20"  :percentage="patent.score"  :color="customColors" ></el-progress>
+                    </div>
+                    
                   </div>
                   <div style="font-size: 13px;">
                     <el-row>

+ 2 - 2
src/views/project/patentCollection/components/views/Picture.vue

@@ -28,8 +28,8 @@
           <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 v-if="noveltySearch">
+            <span>相关度</span><span v-if="!item.score"><i class="el-icon-loading"></i></span><el-progress v-else style="display:inline-block;width:calc(100% - 50px);margin-left:10px;" :text-inside="true" :stroke-width="20"  :percentage="item.score"  :color="customColors" ></el-progress>
           </div>
         </div>
         <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">

+ 4 - 3
src/views/project/patentCollection/components/views/Table.vue

@@ -99,11 +99,12 @@
           <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">
+      <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>
+          <el-progress v-if="scope.row.score" :text-inside="true" :stroke-width="20"  :percentage="scope.row.score"  :color="customColors"></el-progress>
+          <span v-else style="font-size:12px;">相关度加载中<i class="el-icon-loading"></i></span>
         </template>
-      </el-table-column> -->
+      </el-table-column>
     </el-table>
     <addRemark ref="addRemark" :projectId="projectId" v-on="$listeners"></addRemark>
   </div>