Przeglądaj źródła

对比记录bug

zhuliu 1 rok temu
rodzic
commit
a232ebadf5

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

@@ -147,7 +147,7 @@ export const handleData = {
       })
     },
     //摘要以及原文的数据战术
-    getTranslate(row,key){
+    getTranslate(row,key,type){
       var arr = row[key]
       if (!arr) {
         return ''
@@ -177,7 +177,7 @@ export const handleData = {
            this.getTranslateByTIAndAb(row,key) 
         }
       }
-      return this.getViewDom(text)
+      return this.getViewDom(text,type)
     },
     getView(row, key, type, prop, data) {
       var obj = {

+ 11 - 4
src/views/report/analysisAndOpinion/components/comparisonResults/components/contrastRecord.vue

@@ -19,7 +19,7 @@
         <template slot-scope="scope">
           <span>
             <el-link type="primary" @click="editContrast(scope.row)"
-              >{{ scope.row.type == 0?scope.row.literatureNo:scope.rwo.name }}(D{{ scope.row.sysOrder }})</el-link
+              >{{ scope.row.type == 0?scope.row.literatureNo:scope.row.name }}(D{{ scope.row.sysOrder }})</el-link
             >
           </span>
           <el-tag
@@ -38,7 +38,7 @@
         min-width="300px"
       >
         <template slot-scope="scope">
-          <div v-for="item in scope.row.recordList" :key="item.evidenceId">
+          <div v-for="(item,index1) in getRecordList(scope.row)" :key="index1">
             <p>
                 <span>
                     <el-link style="color:red;margin-left:10px" @click="delContrast(item.evidenceId)">删除</el-link>
@@ -72,8 +72,8 @@
       >
         <template slot-scope="scope">
           <div
-            v-for="item in scope.row.recordList"
-            :key="item.evidenceId"
+            v-for="(item,index2) in scope.row.recordList"
+            :key="index2"
           >
             <p>
               <span>
@@ -130,6 +130,13 @@ export default {
     }
   },
   methods: {
+    getRecordList(row){
+      return row.recordList.filter((item, index, self) =>  
+        index === self.findIndex((t) => (  
+          t.id === item.id  
+        ))  
+      )
+    },
     getData(){
         var data = {}
         for(var i = 0;i<this.tableHeader.length;i++){