zhuliu 1 gadu atpakaļ
vecāks
revīzija
0896fbebae

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

@@ -55,6 +55,14 @@ export default {
     return axios.post("/xiaoshi/customField/addCustomField", data);
   },
   /**
+   * 查询自定义栏位
+   * @param {*} data 
+   * @returns 
+   */
+  queryCustomField(data) {
+    return axios.post("/xiaoshi/customField/queryCustomField", data);
+  },
+  /**
    * 更新自定义栏位
    * @param {*} data 
    * @returns 
@@ -62,4 +70,12 @@ export default {
   updateCustomField(data) {
     return axios.post("/xiaoshi/customField/updateCustomField", data);
   },
+  /**
+   * 删除自定义栏位
+   * @param {*} data 
+   * @returns 
+   */
+  deleteCustomField(data) {
+    return axios.post("/xiaoshi/customField/deleteCustomField", data);
+  },
 };

+ 1 - 1
src/utils/model/svg/customSvg.vue

@@ -126,7 +126,7 @@ export default {
 .customSvg{
   position: relative;
   width: 100%;
-  height: 100%;
+  height:calc(100% - 10px);
   .svgDiv{
     position: absolute;
     left: 0; 

+ 25 - 12
src/views/components/drawer/Field.vue

@@ -5,7 +5,7 @@
         <el-header>
           <el-form :inline="true" class="project-field-header-form">
             <el-form-item label="字段名称">
-              <el-input v-model="queryParams.name" size="small" placeholder="请输入字段名称"></el-input>
+              <el-input v-model="searchOption.name" size="small" placeholder="请输入字段名称"></el-input>
             </el-form-item>
             <el-form-item>
               <el-button type="" :disabled="!$permission('/workspace/common/customField/check')" size="small" @click="getList">查询</el-button>
@@ -147,14 +147,20 @@ export default {
       lockOption: false,
       valueChange: false,
       queryParams: {
-        name: '',
-        type: null,
-        status: null,
         size: 10,
         current: 1,
+      },
+      //检索条件
+      searchOption: {
         projectId: 0,
-        order: 'desc'
+        name:'',
       },
+      sort:[
+        {
+          "orderBy": "createTime",
+          "orderType": 1
+        }
+      ],
       projectId: 0,
       typeObj: {
         0: '数字',
@@ -203,7 +209,7 @@ export default {
     open(id) {
       this.projectId = id
       this.drawer = true
-      this.queryParams.projectId = this.projectId
+      this.searchOption.projectId = this.projectId
       this.getList()
     },
     close() {
@@ -376,7 +382,11 @@ export default {
     },
     getList() {
       this.loading = true
-      this.$api.getProjectFieldList(this.queryParams).then(response => {
+      // var params = {
+      //   ...this.queryParams,
+      //   searchQuery:this.$commonJS.
+      // }
+      this.$api.queryCustomField(this.queryParams).then(response => {
         this.tableData = response.data.records
         this.total = response.data.total
         this.loading = false
@@ -420,7 +430,7 @@ export default {
         if (valid) {
           this.btnLoading = true
           if (this.ruleForm.id) {
-            this.$api.editProjectField(this.ruleForm).then(response => {
+            this.$api.updateCustomField(this.ruleForm).then(response => {
               this.$message.success('编辑成功')
               this.btnLoading = false
               this.getList()
@@ -429,7 +439,7 @@ export default {
               this.btnLoading = false
             })
           } else {
-            this.$api.addProjectField(this.ruleForm).then(response => {
+            this.$api.addCustomField(this.ruleForm).then(response => {
               this.$message.success('新增成功')
               this.btnLoading = false
               this.getList()
@@ -445,13 +455,16 @@ export default {
       this.$refs.copyFieldDialog.open(row)
     },
     handleDelete(row) {
-      this.$confirm('确认删除本条数据吗?', '提示', {
+      this.handleDeletes([row.id])
+    },
+    handleDeletes(ids) {
+      this.$confirm('确认删除该数据吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
         this.loading = true
-        this.$api.deleteProjectField({ id: row.id }).then(response => {
+        this.$api.deleteCustomField(ids).then(response => {
           this.$message.success('删除成功')
           this.loading = false
           this.getList()
@@ -459,7 +472,7 @@ export default {
           this.loading = false
         })
       })
-    }
+    },
   }
 }
 </script>

+ 1 - 0
src/views/project/components/view/table.vue

@@ -41,6 +41,7 @@
                 <el-dropdown-item command="8">其他附件</el-dropdown-item>
                 <el-dropdown-item command="9">项目分享</el-dropdown-item>
                 <el-dropdown-item command="10" divided style="color:red">删 除</el-dropdown-item>
+                <el-dropdown-item command="11" divided style="color:red">自定义栏位管理</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
           </template>

+ 6 - 3
src/views/project/index.vue

@@ -71,7 +71,7 @@
     </div>
     <project-form-drawer @submit="getMessage" :common-data="commonData" ref="projectFormDrawer" />
     <field ref="field" type="patentProject" @getFieldList="getFieldList"></field>
-    
+    <customField ref="customField"></customField>
   </div>
 </template>
 
@@ -85,7 +85,7 @@ import mergeTable from "./components/view/MergeTable.vue";
 import ProjectFormDrawer from './components/drawer/form.vue'
 import field from '@/views/components/dialog/fields.vue';
 
-
+import customField from '@/views/components/drawer/Field.vue';
 export default {
   components: {
     TotalChart,
@@ -94,7 +94,7 @@ export default {
     ProjectFormDrawer,
     field,
     mergeTable,
-    
+    customField
   },
   props: {
     isOperate: ''
@@ -441,6 +441,9 @@ export default {
         case 'e'://编辑
           this.handleEdit(row)
           break
+        case '11':
+          this.$refs.customField.open(row.id)
+          break;
       }
     },
     //获取删除的id

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

@@ -0,0 +1,387 @@
+<template>
+  <div class="patent-abstract-list-view">
+    <div class="patent-abstract-card" v-for="(patent, index) in records">
+      <div class="patent-abstract-card-wrapper">
+        <table class="patent-abstract-card-table">
+          <tbody>
+            <tr>
+              <td v-if="refresh"><el-checkbox :label="patent.id" @change="changeSelect(patent)" :checked="selected.indexOf(patent.id) !== -1 || patentNoList.indexOf(patent.patentNo)!== -1"></el-checkbox></td>
+              <td>
+                <div class="patent-abstract-index-container">
+                  <span>{{ (index + 1) + ((params.current - 1) * params.size) }}</span>
+                  <span v-if="projectId">
+                    <el-tag :type="patent.read === 0 ? 'danger' : 'success'" v-if="$permission('/workspace/folder/isRead')" effect="dark" size="small" @click="handleChangeRead(patent)">{{ readType[patent.read] }}</el-tag>
+                    <el-tag type="info" v-else effect="dark" size="small" >{{ readType[patent.read] }}</el-tag>
+                  </span>
+                  
+                </div>
+                <!-- <el-popover placement="right-start" width="600" trigger="hover">
+                  <img :src="getPatentAbstractImage(patent.abstractPath)" height="400" width="100%">
+                  <div class="patent-abstract-image-container" slot="reference">
+                    <img :src="getPatentAbstractImage(patent.abstractPath)">
+                  </div>
+                </el-popover> -->
+                <div class="picture text-align_center patent-abstract-image-container" style="">
+                    <el-image v-if="(!projectId && patent.abstractPath2)||projectId" :src="patent.abstractPath2?patent.abstractPath2:getImagePath1(patent)" :preview-src-list="[patent.abstractPath2]" style="margin:0 auto;vertical-align:middle;" :style="{width:patent.imgWidth?patent.imgWidth:'100%',height:patent.imgHeight?patent.imgHeight:'100%'}">
+                    <div slot="error" class="image-slot">
+                      <el-image :src="getErrorImage(patent)" :preview-src-list="[getErrorImage(patent)]">
+                        <div slot="error" class="image-slot">
+                          <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
+                        </div>
+                      </el-image>
+                    </div>
+                  </el-image>
+
+                </div>
+                <div class="patent-abstract-pdf-button-container">
+                  <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small" type="primary" @click="handleDownload(patent)">PDF 下载</el-button>
+                </div>
+              </td>
+              <td width="850px">
+                <div class="patent-abstract-title">
+                  <el-link :disabled="!$permission('/workspace/details')" :class="$permission('/workspace/details')?'':'jinzhi'" type="success" @click.native="handleLink(patent)">
+                    <span v-html="getViewDom(patent.patentNo)"></span>
+                  </el-link>
+                  <el-tag class="margin-left_10" type="primary" effect="dark" size="small" v-if="patent.simpleStatus">{{ patent.simpleStatus }}</el-tag>
+                </div>
+                <div style="font-size: 13px;">
+                  <el-row>
+                    <el-col :span="24" v-if="t()">
+                      <span class="patent-abstract_label">标题:</span>
+                      <span class="patent-abstract_text">
+                        <span v-html="getViewDom2(patent, 'name')"></span>
+                        <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'name')" style="margin-left: 10px;">
+                          <span v-if="!patent.change">切换译文</span>
+                          <span v-else>切换原文</span>
+                        </el-link>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="8" v-if="t()">
+                      <span class="patent-abstract_label">申请日:</span>
+                      <span class="patent-abstract_text">
+                        <span v-html="getViewDom(patent.applicationDate)"></span>
+                      </span>
+                    </el-col>
+                    <el-col :span="8" v-if="t()">
+                      <span class="patent-abstract_label">公开日:</span>
+                      <span class="patent-abstract_text">
+                        <span v-html="getViewDom(patent.publicDate)"></span>
+                      </span>
+                    </el-col>
+                    <el-col :span="8" v-if="t()">
+                      <span class="patent-abstract_label">申请号:</span>
+                      <span class="patent-abstract_text">
+                        <span v-html="getViewDom(patent.applicationNo)"></span>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t()">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">权利人:</span>
+                      <span class="patent-abstract_text" v-if="patent.applicant">
+                        <template v-for="(item, index) in patent.applicant.filter(a => a.dataType === 1)">
+                          <el-link type="primary">
+                            <span v-html="getViewDom(item.name)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t()">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">申请人:</span>
+                      <span class="patent-abstract_text" v-if="patent.applicant">
+                        <template v-for="(item, index) in patent.applicant.filter(a => a.dataType === 2)">
+                          <el-link type="primary">
+                            <span v-html="getViewDom(item.name)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t()">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">发明人:</span>
+                      <span class="patent-abstract_text">
+                        <template v-for="(item, index) in patent.inventor">
+                          <el-link type="primary">
+                            <span v-html="getViewDom(item.name)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t()">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">IPC分类号:</span>
+                      <span class="patent-abstract_text">
+                        <template v-for="(item, index) in patent.ipcList">
+                          <el-link type="primary">
+                            <span v-html="getViewDom(item)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t('simpleFamily')">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">简单同族:</span>
+                      <span class="patent-abstract_text">
+                        <template v-for="(item, index) in patent.family.simple">
+                          <el-link type="primary" @click.native="handleFamily(item)">
+                            <span v-html="getViewDom(item)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t('inpadocFamily')">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">INPADOC同族:</span>
+                      <span class="patent-abstract_text">
+                        <template v-for="(item, index) in patent.family.inpadoc">
+                          <el-link type="primary" @click.native="handleFamily(item)">
+                            <span v-html="getViewDom(item)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t('patSnapFamily')">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">PatSnap同族:</span>
+                      <span class="patent-abstract_text">
+                        <template v-for="(item, index) in patent.family.patSnap">
+                          <el-link type="primary" @click.native="handleFamily(item)">
+                            <span v-html="getViewDom(item)"></span>
+                          </el-link>
+                          <span class="patent-abstract_semicolon">;</span>
+                        </template>
+                      </span>
+                    </el-col>
+                  </el-row>
+                  <el-row v-if="t()">
+                    <el-col :span="24">
+                      <span class="patent-abstract_label">摘要:</span>
+                      <div>
+                        <span v-html="getViewDom2(patent, 'abstractStr')"></span>
+                        <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'abstractStr')">
+                          <span v-if="!patent.change2">切换译文</span>
+                          <span v-else>切换原文</span>
+                        </el-link>
+                      </div>
+                    </el-col>
+                  </el-row>
+                  <!-- <el-card class="margin-top_10" shadow="never" v-if="customField.length">
+                    <div slot="header" class="clearfix">
+                      <span>自定义字段</span>
+                    </div>
+                    <el-row class="patent-custom-field" v-for="field in customField">
+                      <el-col class="name">{{ field.name }}</el-col>
+                      <el-col class="data">
+                        <div v-for="data in getColumnValue(patent, field)">
+                          <span v-html="getViewDom(data)"></span>
+                        </div>
+                        <el-button v-if="$r(projectId, [1, 2])" type="text" icon="el-icon-edit" @click="handleIndexSetting(patent, field)">编辑</el-button>
+                      </el-col>
+                    </el-row>
+                  </el-card> -->
+                </div>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { commonMixins } from "../../articles/components/mixins"
+import { patentViewList, patentKeywordsHighlight } from '../mixins'
+
+export default {
+  props: ['viewField'],
+  mixins: [patentViewList, patentKeywordsHighlight,commonMixins],
+  data() {
+    return {
+      checkList: [],
+      readType: {
+        1: '已读',
+        0: '未读'
+      },
+      statusType: {
+
+      },
+      row: {}
+    }
+  },
+  watch: {
+    records(val,oldval) {
+      if(val != oldval){
+        this.$nextTick(() => {
+          this.addRecords()
+          this.refreshCheckBox()
+        })
+      }
+      
+    }
+  },
+  computed: {
+    columnList() {
+      return this.viewField.filter(item => !item.hidden)
+    },
+    customField() {
+      return this.viewField.filter(item => !item.hidden && (item.type !== 'list' || item.key === 'label'))
+    },
+  },
+  mounted() {
+
+  },
+  methods: {
+    handleFamily(item) {
+      this.$api.getPatentIdByPatentNo({ patentNo: item }).then(response => {
+        if (response.data === 0) {
+          this.$alert('专利暂未收录', '请求错误', {
+            confirmButtonText: '确定',
+            type: 'error',
+            callback: action => {}
+          });
+        } else {
+          this.handleLink({ id: response.data })
+        }
+      })
+    },
+    getColumnValue(patent, column) {
+      if (column.key !== 'label') {
+        const field = patent.field.find(item => item.id === parseInt(column.key))
+        if (field) {
+          return field.selected
+        }
+      } else {
+        return patent.label.map(item => item.name)
+      }
+      return []
+    },
+    handleIndexSetting(row, field) {
+      this.$emit('index-setting', row, field)
+    },
+    t(key) {
+      if (key) {
+        return this.columnList.map(item => item.key).indexOf(key) !== -1
+      }
+      return true
+    },
+    getPatentAbstractImage(path) {
+      if (!path) {
+        return ''
+      }
+      return this.$p + path
+    },
+    openPatentAbstractImage(abstractPath) {
+      // console.log(abstractPath)
+    },
+    handleDownload(patent) {
+      this.$emit('download', patent)
+    },
+    handleChangeRead(patent) {
+      const status = patent.read === 1 ? 0 : 1
+      this.$emit('change-read', [patent.id], status)
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.patent-abstract-list-view {
+  .patent-abstract-card {
+    width: 100%;
+    border-bottom: 1px solid #e5e5e5;
+    .patent-abstract-card-wrapper {
+      padding: 10px;
+      min-height: 200px;
+      .patent-abstract-card-table {
+        height: 100%;
+        .patent-abstract-index-container {
+          font-size: 13px;
+          padding-left: 10px;
+          margin-bottom: 10px;
+          .el-tag {
+            margin-left: 10px;
+            cursor: pointer;
+          }
+        }
+        .patent-abstract-image-container {
+          // padding: 10px;
+          border: 1px solid #bcc2cc;
+          border-radius: 4px;
+          width: 120px;
+          height: 150px;
+          line-height: 150px;
+          // img {
+          //   width: 100%;
+          //   height: 100%;
+          // }
+        }
+        .patent-abstract-pdf-button-container {
+          text-align: center;
+          margin-top: 10px;
+        }
+        .patent-abstract-title {
+          margin-bottom: 5px;
+        }
+        .patent-custom-field {
+          line-height: 35px;
+          font-size: 14px;
+          border-bottom: 1px solid #ebecf0;
+          .name {
+            width: 200px;
+            float: left;
+          }
+          .data {
+            width: calc(100% - 200px);
+            float: right;
+          }
+        }
+        .patent-abstract_label {
+          color: #495973;
+          padding-right: 8px;
+        }
+        .patent-abstract_text {
+          .el-link {
+            position: relative;
+            top: -2px;
+          }
+        }
+        .patent-abstract_semicolon {
+          padding-left: 5px;
+          padding-right: 5px;
+          display: inline-block;
+          color: #495973;
+        }
+        tbody, tr, td {
+          height: 100%;
+          vertical-align: top;
+        }
+      }
+      .el-checkbox__label {
+        display: none;
+      }
+    }
+  }
+  .el-card__header {
+    font-weight: normal;
+    font-size: 14px;
+    padding: 18px 20px;
+    border-bottom: 1px solid #EBEEF5;
+  }
+}
+</style>

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

@@ -0,0 +1,89 @@
+<template>
+  <div class="pic">
+    <div class="item" style="padding:10px;display: flex;flex-wrap: wrap;">
+      <!-- <el-row :gutter="24" style="padding: 10px;display: flex;flex-wrap: wrap;">
+      <el-col :span="6" v-for="(item,index) in records" class="c"> -->
+        <el-card  shadow="hover" v-for="(item,index) in records" style="width:200px" >
+          <div slot="header" style="width: 100%; white-space: nowrap;overflow-x: hidden;text-overflow: ellipsis;font-size:12px;" >
+            <div>序号:{{ (index + 1) + ((params.current - 1) * params.size) }}</div>
+            <el-divider></el-divider>
+            <!-- <hr style="background-color: #DCDFE6;"> -->
+           <span v-if="refresh"> <el-checkbox :label="item.id" @change="changeSelect(item)" :checked="selected.indexOf(item.id) !== -1 || patentNoList.indexOf(item.patentNo)!== -1">
+              
+                <el-link  :disabled="!$permission('/workspace/details')" :class="$permission('/workspace/details')?'':'jinzhi'" :type="item.read === 1 ? 'success' : 'danger'" @click.native.prevent="handleLink(item)">
+                  <span v-html="getViewDom(item.patentNo)"></span>
+                </el-link>
+              
+            </el-checkbox>  </span>
+            <el-tooltip effect="dark" :content="item.name" placement="top">
+                <span style="" v-html="getViewDom(item.name)"></span>
+              </el-tooltip>
+          </div>
+          <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">
+              <el-image v-if="(!projectId && item.abstractPath2)||projectId" :src="item.abstractPath2?item.abstractPath2:getImagePath1(item)" :preview-src-list="[item.abstractPath2]" style="margin:0 auto;vertical-align:middle;" :style="{width:item.imgWidth?item.imgWidth:'100%',height:item.imgHeight?item.imgHeight:'100%'}">
+              <div slot="error" class="image-slot">
+                <el-image :src="getErrorImage(item)" :preview-src-list="[getErrorImage(item)]">
+                  <div slot="error" class="image-slot">
+                    <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
+                  </div>
+                </el-image>
+              </div>
+            </el-image>
+
+          </div>
+        </el-card>
+<!--      
+      </el-col>
+    </el-row> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { commonMixins } from "../../articles/components/mixins"
+import { patentViewList, patentKeywordsHighlight } from '../mixins'
+export default {
+  props: [],
+  mixins:[commonMixins,patentViewList, patentKeywordsHighlight ],
+  data() {
+    return {
+
+    }
+  },
+  computed: {
+    // records() {
+    //   return this.$store.state.patent.records
+    // }
+  },
+  watch: {
+    records(val,oldval) {
+      if(val != oldval){
+        this.$nextTick(() => {
+          this.addRecords()
+          this.refreshCheckBox()
+        })
+      }
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+
+  },
+}
+</script>
+
+<style lang="scss">
+ .pic{
+  .el-divider{
+    margin: 5px 0px;
+  }
+  .el-card__header{
+    padding:5px !important
+  }
+  .el-card__body{
+    padding:0px !important
+  }
+ }
+</style>

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

@@ -0,0 +1,306 @@
+<template>
+  <div class="patent-table-list-view">
+    <el-table
+        v-if="refreshData"
+        ref="table"
+        class="view-table"
+        :data="records"
+        style=""
+        border
+        :height="tableHeight"
+        header-row-class-name="custom-table-header"
+        @cell-click="handleClick"
+        :cell-class-name="cellClassName"
+    >
+      <el-table-column width="80" align="center">
+        <template slot="header">
+          <patent-table-view-sort prop="id" @on-sort="onSort" />
+        </template>
+        <template slot-scope="scope">
+          <div v-if="refresh">
+            <el-checkbox :label="scope.row.id" @change="changeSelect(scope.row)" :checked="selected.indexOf(scope.row.id) !== -1 || patentNoList.indexOf(scope.row.patentNo)!== -1 || patentNoList.indexOf(scope.row.applicationNo)!== -1 ">
+              <span>{{ (scope.$index + 1) + ((params.current - 1) * params.size) }}</span>
+            </el-checkbox>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="专利号" show-overflow-tooltip align="center" width="180">
+        <template slot="header">
+          <patent-table-view-sort title="专利号" prop="patentNo" @on-sort="onSort" />
+        </template>
+        <template slot-scope="scope">
+          <el-popover placement="right-start" width="500" trigger="hover" >
+            <table class="patent-popover-table" >
+              <tr>  
+                <td>
+                  <div class="patent-abstract-image text-align_center" >
+                    <el-image v-if="(!projectId && scope.row.abstractPath2)||projectId" :src="scope.row.abstractPath2?scope.row.abstractPath2:getImagePath1(scope.row)" :preview-src-list="[scope.row.abstractPath2]" style="vertical-align:middle;" :style="{width:scope.row.imgWidth?scope.row.imgWidth:'100%',height:scope.row.imgHeight?scope.row.imgHeight:'100%'}">
+                      <div slot="error" class="image-slot">
+                        <el-image :src="getErrorImage(scope.row)" :preview-src-list="[getErrorImage(scope.row)]">
+                          <div slot="error" class="image-slot">
+                            <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
+                          </div>
+                        </el-image>
+                      </div>
+                    </el-image>
+                  </div>
+                </td>
+                <td>
+                  <p v-html="getViewDom2(scope.row, 'abstractStr')"></p>
+                  <el-link v-if="projectId" type="primary" @click.native="handleChange(scope.row, 'abstractStr')">
+                    <span v-if="!scope.row.change2">切换译文</span>
+                    <span v-else>切换原文</span>
+                  </el-link>
+                </td>
+              </tr>
+            </table>
+            <el-link slot="reference" :disabled="!$permission('/workspace/details')" :class="$permission('/workspace/details')?'':'jinzhi'" :type="scope.row.read === 1 ? 'success' : 'danger'" @click.native="handleLink(scope.row,scope.$index)">
+              <span v-html="getViewDom(scope.row.patentNo)"></span>
+            </el-link>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column v-for="column in columnList" :label="column.name" show-overflow-tooltip align="center">
+        <template slot="header">
+          <patent-table-view-sort :title="column.name" :prop="column.key" :projectId="projectId" @on-sort="onSort" />
+        </template>
+        <template slot-scope="scope">
+          <div style="" v-for="data in getColumnValue(scope.row, column)">
+            <template v-if="column.key === 'name'">
+              <span v-html="getViewDom2(scope.row, 'name')"></span>
+              <br>
+              <el-link v-if="projectId" type="primary" @click.native="handleChange(scope.row, 'name')">
+                <span v-if="!scope.row.change">切换译文</span>
+                <span v-else>切换原文</span>
+              </el-link>
+            </template>
+            <template v-else-if="column.key === 'abstractStr'">
+              <span v-html="getViewDom2(scope.row, 'abstractStr')"></span>
+              <br>
+              <el-link v-if="projectId" type="primary" @click.native="handleChange(scope.row, 'abstractStr')">
+                <span v-if="!scope.row.change2">切换译文</span>
+                <span v-else>切换原文</span>
+              </el-link>
+            </template>
+            <template v-else>
+              <span v-html="getViewDom(data)"></span>
+            </template>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import { commonMixins } from "../../articles/components/mixins"
+import { patentViewList, patentKeywordsHighlight } from '../mixins'
+import PatentTableViewSort from "./TableSort";
+
+export default {
+  props: ['viewField'],
+  mixins: [patentViewList, patentKeywordsHighlight,commonMixins],
+  components: {
+    PatentTableViewSort
+  },
+  data() {
+    return {
+      tableData: [],
+      tableHeight: null,
+      refreshData: false
+    }
+  },
+  watch: {
+    viewField: {
+      handler(n, o) {
+        this.refreshTable()
+      },
+      deep: true
+    },
+    records(val,oldval) {
+      
+      if(val != oldval){
+        this.$nextTick(() => {
+          this.addRecords()
+          this.refreshCheckBox()
+          this.setHeight()
+        })
+      }
+      
+    },
+    refreshData(val){
+      if(val){
+        this.$nextTick(()=>{
+          this.setHeight()
+        })
+        
+      }
+    }
+  },
+  activated() {
+    // this.refreshTable()
+  },
+  computed: {
+    columnList() {
+      return this.viewField.filter(item => !item.hidden)
+    }
+  },
+  created(){
+
+  },
+  mounted() {
+    if(this.viewField.length>0){
+      this.refreshTable()
+    }
+    this.$nextTick(()=>{
+      this.addRecords()
+    })
+    // console.log(this.columnList);
+  },
+  methods: {
+    getPatentAbstractImage(path) {
+      if (!path) {
+        return ''
+      }
+      return this.$p + path
+    },
+    onSort(data) {
+      this.$emit('on-sort', data)
+    },
+    setHeight() {
+      const offsetTop = window.innerHeight - 225
+      const body = document.querySelector('.el-table__body')
+      if (!body) {
+        return false
+      }
+      const offsetBodyHeight = body.offsetHeight
+      if (this.records.length && offsetBodyHeight < offsetTop) {
+        this.tableHeight = offsetBodyHeight + 75
+      } else if (!this.records.length) {
+        this.tableHeight = null
+      } else {
+        this.tableHeight = offsetTop
+      }
+    },
+    refreshTable() {
+      this.refreshData = false
+      this.$nextTick(() => {
+        this.refreshData = true
+      })
+    },
+    getColumnValue(row, column) {
+      if (column.type !== 'list') {
+        const field = row.field.find(item => item.id === parseInt(column.key))
+        if (field) {
+          return field.selected
+        }
+      } else if (column.key === 'label') {
+        if(row.label)
+        return row.label.map(item => item.name)
+      } else {
+        const value = row[column.key]
+        if (column.key === 'inventor' || column.key === 'agent') {
+          if(value)
+          return value.map(item => item.name)
+        }
+        if (column.key === 'applicant1') {
+          if(row.applicant)
+          return row.applicant.filter(a => a.dataType === 1).map(item => item.shortName)
+        }
+        if (column.key === 'applicant2') {
+          if(row.applicant)
+          return row.applicant.filter(a => a.dataType === 1).map(item => item.name)
+        }
+        if (column.key === 'applicant3') {
+          if(row.applicant)
+          return row.applicant.filter(a => a.dataType === 2).map(item => item.shortName)
+        }
+        if (column.key === 'applicant4') {
+          if(row.applicant)
+          return row.applicant.filter(a => a.dataType === 2).map(item => item.name)
+        }
+        if (column.key === 'simpleFamily') {
+          return [row.family.simple.length]
+        }
+        if (column.key === 'inpadocFamily') {
+          return [row.family.inpadoc.length]
+        }
+        if (column.key === 'patSnapFamily') {
+          return [row.family.patSnap.length]
+        }
+        if (column.key === 'agency' && value) {
+          return [value.name]
+        }
+        if (value instanceof Array) {
+          return value
+        } else if (typeof value === 'string' || typeof value === 'number') {
+          return [value]
+        }
+        return ''
+      }
+    },
+    cellClassName({ row, column, rowIndex, columnIndex }) {
+      if (this.validationCustomField(column.label)) {
+        return 'custom-field-cell'
+      }
+    },
+    validationCustomField(label) {
+      const customField = this.viewField.filter(item => item.type !== 'list' || item.key === 'label')
+      const field = customField.find(item => item.name === label)
+      if (field) {
+        return field
+      }
+      return false
+    },
+    handleClick(row, column, cell,event) {
+      // console.log(document.querySelector('.el-table__body-wrapper').scrollTop)
+      if (!this.$r(this.projectId, [1, 2]) || !this.$permission('/workspace/details/indexing')) {
+        return false
+      }
+      if(!this.projectId){
+        return false
+      }
+      const field = this.validationCustomField(column.label)
+      if (field) {
+        this.$emit('index-setting', row, field)
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.patent-popover-table {
+  tbody, tr, td {
+    height: 100%;
+    vertical-align: top;
+  }
+  p {
+    padding: 0 !important;
+    margin: 0 !important;
+  }
+  .patent-abstract-image {
+    padding: 10px;
+    border: 1px solid #bcc2cc;
+    border-radius: 4px;
+    width: 120px;
+    height: 150px;
+    line-height: 150px;
+    img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+.patent-table-list-view {
+  .view-table {
+    width: 100%;
+  }
+  .el-table .cell {
+    white-space: pre-line !important;
+  }
+  .custom-field-cell {
+    cursor: pointer;
+  }
+}
+</style>

+ 21 - 0
src/views/project/patentCollection/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div></div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {},
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 2 - 1
src/views/visual/title/index.vue

@@ -100,7 +100,7 @@
     position: relative;
     .c-tips {
       position: absolute;
-      // top: 20px;
+      top: 20px;
       right:40px;
       cursor: pointer;
     }
@@ -111,6 +111,7 @@
       z-index: 999;
     }
     .myCustomSvg{
+      
       position: absolute;
       left: 0; 
     //   top: 50px;