Browse Source

专利挖掘bug修复

zhuhao 1 year ago
parent
commit
af882371a0

+ 50 - 41
src/views/patentMining/components/details/components/basicMessage.vue

@@ -6,52 +6,52 @@
       <el-divider></el-divider>
       <el-descriptions class="margin-top" title="" :column="column" size="" border>
         <el-descriptions-item>
-          <template slot="label"> 
-            <i class="el-icon-user"></i> 项目名称 
-          </template> 
-          {{ row.name }}
+          <template slot="label">
+            <i class="el-icon-user"></i> 项目名称
+          </template>
+          <span v-html="getColumnData(row, 'name')"></span>
         </el-descriptions-item>
-        <el-descriptions-item> 
-          <template slot="label"> 
+        <el-descriptions-item>
+          <template slot="label">
             <i class="el-icon-mobile-phone"></i> 项目产出
           </template>
-          {{ row.output }}
+          <span v-html="getColumnData(row, 'output')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-location-outline"></i> 技术方向
           </template>
-          {{ row.technicalDirection }}
+          <span v-html="getColumnData(row, 'technicalDirection')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-tickets"></i> 产品阶段
           </template>
-          {{ row.productPhase }}
+          <span v-html="getColumnData(row, 'productPhase')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 是否检索
           </template>
-          <span>{{ getArrJoin(row.ifSearch,{true:'是',false:'否'}) }}</span>
+          <span>{{ getArrJoin(row.ifSearch, { true: '是', false: '否' }) }}</span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 负责人
           </template>
-          {{ row.headName }}
+          <span v-html="getColumnData(row, 'headName')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 相关竞争对手
           </template>
-          {{ row.relatedCompetitors }}
+          <span v-html="getColumnData(row, 'relatedCompetitors')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 技术关键词
           </template>
-          {{ row.technicalKeyword }}
+          <span v-html="getColumnData(row, 'technicalKeyword')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
@@ -59,30 +59,31 @@
           </template>
           <el-tag size="small">{{ row.stateName }}</el-tag>
         </el-descriptions-item>
-        <el-descriptions-item>
+        <!-- <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 审核进度
           </template>
-          <el-tag size="small">{{ row.process }}</el-tag>
-        </el-descriptions-item>
+          <span v-html="getColumnData(row, 'process')"></span>
+        </el-descriptions-item> -->
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 创建人
           </template>
-          {{ row.createName }}
+          <span v-html="getColumnData(row, 'createName')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 参与人
           </template>
-         <!-- <span v-for="item in row.involvedPersons" :key="item.personId">{{ item.personName }}/</span> -->
-         <span>{{ getArrJoin(row.involvedPersons,'personName') }}</span>
+          <span>{{ getArrJoin(row.involvedPersons, 'personName') }}</span>
+          <!-- <span v-html="$commonJS.getColumnData(row.involvedPersons, {name:'参与人',value:'personName'})"></span> -->
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 附件
           </template>
-          <span>{{ getArrJoin(row.systemFileList,'name') }}</span>
+          <span>{{ getArrJoin(row.systemFileList, 'name') }}</span>
+          <!-- <span v-html="$commonJS.getColumnData(row.systemFileList, {name:'附件',value:'name'})"></span> -->
         </el-descriptions-item>
       </el-descriptions>
     </div>
@@ -90,31 +91,31 @@
 </template>
 
 <script>
-import {column} from '../../mixins/index2'
+import { column } from '../../mixins/index2'
 export default {
-  mixins:[column],
+  mixins: [column],
   components: {
   },
-  props:['id'],
+  props: ['id'],
   data() {
     return {
-      column:4,
-      queryParams:{},
-      row:{}
+      column: 4,
+      queryParams: {},
+      row: {}
     }
   },
   mounted() {
     window.addEventListener('resize', (e) => {
       let width = window.innerWidth
-      if (width > 2200) {  
-        this.column = 6;  
-      } else if (width < 1000) {  
-        this.column = 3;  
-      } else if (width < 1400) {  
-        this.column = 4;  
-      } else if (width < 1800) {  
-        this.column = 5;  
-      }  
+      if (width > 2200) {
+        this.column = 6;
+      } else if (width < 1000) {
+        this.column = 3;
+      } else if (width < 1400) {
+        this.column = 4;
+      } else if (width < 1800) {
+        this.column = 5;
+      }
     })
     this.getList()
   },
@@ -123,8 +124,8 @@ export default {
     getList() {
       let params = {
         size: 10,
-        current:1,
-        searchQuery:`id=${this.id}`,
+        current: 1,
+        searchQuery: `id=${this.id}`,
       }
       this.$api.queryPatentDigProject(params).then(response => {
         if (response.code == 200) {
@@ -134,10 +135,18 @@ export default {
         this.row = {}
       })
     },
-    
+    // 处理数据
+    getColumnData(data, key) {
+      if (data && data[key]) {
+        return data[key]
+      } else {
+        return '--'
+      }
+    },
+
   },
-  deactivated(){
-    window.removeEventListener('resize',()=>{})
+  deactivated() {
+    window.removeEventListener('resize', () => { })
   }
 }
 </script>
@@ -150,7 +159,7 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
-.basicMessage{
+.basicMessage {
   width: 100%;
   height: 100%;
 }

+ 1 - 14
src/views/patentMining/components/handleExamine/detailsPage.vue

@@ -51,8 +51,7 @@
               <template slot="label">
                 <i class="el-icon-location-outline"></i> 所属流程
               </template>
-              {{ pathOptions.filter(item => { return item.value == detailsMessage.processId })[0].label }}
-              <!-- {{ detailsMessage.taskPath }} -->
+              {{ pathOptions.filter(item => { return item.value == detailsMessage.processId })[0].label}}
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
@@ -72,22 +71,10 @@
               <template slot-scope="scope">
                 <el-button type="text" @click="handleCommand(1, scope.row)">预览</el-button>
                 <el-button type="text" @click="handleCommand(2, scope.row)">下载</el-button>
-                <!-- <div>
-                  <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
-                    @click="handleQuote(scope.row)">
-                    <span>引 用</span>
-                    <el-dropdown-menu slot="dropdown">
-                      <el-dropdown-item command="1">预览</el-dropdown-item>
-                      <el-dropdown-item command="2">下载</el-dropdown-item>
-                    </el-dropdown-menu>
-                  </el-dropdown>
-                </div> -->
               </template>
             </el-table-column>
           </el-table>
         </div>
-        <!-- <div class="div_margin">说明:</div>
-        <el-input type="textarea" :rows="3" readonly v-model="row.description"></el-input> -->
 
         <div class="history">
           <p>审核历史:</p>

+ 2 - 3
src/views/patentMining/components/mixins/index2.js

@@ -82,8 +82,8 @@ export const column = {
       if (!data) {
         return '--'
       }
-      
-      if (data.constructor == 'Array') {
+
+      if (Array.isArray(data)) {
         if (data.length == 0) {
           return '--'
         }
@@ -92,7 +92,6 @@ export const column = {
         })
         return arr.join('、')
       } else {
-        // console.log(type[data]);
         return type[data]
       }
     },