zhuhao 1 год назад
Родитель
Сommit
5dd9bced37

+ 4 - 4
src/views/components/dialog/fields.vue

@@ -127,11 +127,11 @@ export default {
         if (response.code == 200) {
           this.loading = false
           this.handleClose()
-          if (this.sign) {
-            this.$emit('getFieldList', params.value)
-          } else {
+          // if (this.sign) {
+          //   this.$emit('getFieldList', this.filedList)
+          // } else {
             this.$emit('getFieldList', this.filedList)
-          }
+          // }
           
         }
       }).catch(error => {

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

@@ -92,54 +92,65 @@ export const handleData = {
         const change2 = row.change2
         switch (key) {
           case "title":
-            prop = !change ? "content" : "contentOut"
-            obj.type = 'Object'
-            // var arr = row.title
-            // if(!change){
-            //   var obj = arr.filter(item=>{
-            //     return item.if_origin
-            //   })
-            //   var text = ''
-            //   if(obj){
-            //     text = obj.text_content
-            //   }
-            // }else{
-            //   var obj = arr.filter(item=>{
-            //     return !item.if_origin && item.language == 'CN'
-            //   })
-            //   var text = ''
-            //   if(obj){
-            //     text = obj.text_content
-            //   }
-            // }
+            // prop = !change ? "content" : "contentOut"
+            // obj.type = 'Object'
+            var arr = row.title
+            if(!change){
+              var obj = arr.find(item=>{
+                return item.if_origin
+              })
+              var text = ''
+              if(obj){
+                text = obj.text_content
+              }
+            }else{
+              var obj = arr.find(item=>{
+                return !item.if_origin && item.language == 'CN'
+              })
+              var text = ''
+              if(obj){
+                text = obj.text_content
+              }
+            }
             break
           case "abstractStr":
-            prop = !change2 ? "content" : "contentOut"
-            obj.type = 'Object'
-            // var arr = row.abstractStr
-            // if(!change){
-            //   var obj = arr.filter(item=>{
-            //     return item.if_origin
-            //   })
-            //   var text = ''
-            //   if(obj){
-            //     text = obj.text_content
-            //   }
-            // }else{
-            //   var obj = arr.filter(item=>{
-            //     return !item.if_origin && item.language == 'CN'
-            //   })
-            //   var text = ''
-            //   if(obj){
-            //     text = obj.text_content
-            //   }
-            // }
-            break
+            // prop = !change2 ? "content" : "contentOut"
+            // obj.type = 'Object'
+            var arr = row.abstractStr
+            if(!change2){
+              var obj = arr.find(item=>{
+                return item.if_origin
+              })
+              var text = ''
+              if(obj){
+                text = obj.text_content
+              }
+            }else{
+              var obj = arr.find(item=>{
+                return !item.if_origin && item.language == 'CN'
+              })
+              var text = ''
+              if(obj){
+                text = obj.text_content
+              }
+            }
+            break;
+          case "mipc":
+            let ipcArr=[]
+            for (let k in row[key]) {
+              ipcArr.push(row[key][k])
+            }
+            row[`${key}2`] = ipcArr
+            obj.value = `${key}2`
+            obj.type = 'Array'
+            var text = this.$commonJS.getColumnData(row, obj,prop,data)
+            break;
           default:
-            // var text = this.$commonJS.getColumnData(row, obj,prop,data)
+            var text = this.$commonJS.getColumnData(row, obj,prop,data)
             break
         }
-      var text = this.$commonJS.getColumnData(row, obj,prop,data)
+      // var text = this.$commonJS.getColumnData(row, obj, prop, data)
+      // console.log(text,key);
       return this.getViewDom(text,key)
     },
     getViewDom(text, field) {
@@ -194,6 +205,7 @@ export const handleData = {
 
       // } catch (e) {
       // }
+      // console.log(text);
       return text
     },
     //切换原文译文 

+ 34 - 54
src/views/project/patentCollection/components/views/Abstract.vue

@@ -17,27 +17,22 @@
                   <!-- 已读未读 -->
                   <span v-if="projectId">
                     <!-- patent.read判断已读未读 -->
-                    <el-tag :type="patent.read === 0 ? 'danger' : 'success'"
+                    <!-- <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>
+                    <el-tag type="info" v-else effect="dark" size="small">{{ readType[patent.read] }}</el-tag> -->
                   </span>
 
                 </div>
                 <div class="picture text-align_center patent-abstract-image-container">
-                  <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;"
+                  <el-image :src="$commonJS.checkViewer(patent.pictureGuid)"
+                    :preview-src-list="$commonJS.checkViewer(patent.pictureGuid)"
+                    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>
+                      <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
                     </div>
                   </el-image>
-
                 </div>
                 <div class="patent-abstract-pdf-button-container">
                   <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small"
@@ -49,7 +44,7 @@
                 <div class="patent-abstract-title">
                   <el-link :disabled="!$permission('/workspace/details')"
                     :class="$permission('/workspace/details') ? '' : 'jinzhi'" type="success"
-                    @click.native="handleLink(patent,index)">
+                    @click.native="handleLink(patent, index)">
                     <span v-html="getView(patent, 'patentNo')"></span>
                   </el-link>
                   <el-tag class="margin-left_10" type="primary" effect="dark" size="small" v-if="patent.simpleStatus">{{
@@ -92,9 +87,9 @@
                   <el-row v-if="t()">
                     <el-col :span="24">
                       <span class="patent-abstract_label">权利人:</span>
-                      <span class="patent-abstract_text" v-if="patent.applicant">
-                        <span v-for="(item) in patent.applicant.filter(a => a.dataType === 1)" :key="item.name">
-                          <el-link type="primary" >
+                      <span class="patent-abstract_text" v-if="patent.rightHolder">
+                        <span v-for="(item) in patent.rightHolder.filter(a => a.dataType === 1)" :key="item.name">
+                          <el-link type="primary">
                             <span v-html="getView(item.name)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
@@ -107,7 +102,7 @@
                       <span class="patent-abstract_label">申请人:</span>
                       <span class="patent-abstract_text" v-if="patent.applicant">
                         <span v-for="(item) in patent.applicant.filter(a => a.dataType === 2)" :key="item.name">
-                          <el-link type="primary" >
+                          <el-link type="primary">
                             <span v-html="getView(item.name)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
@@ -132,20 +127,20 @@
                     <el-col :span="24">
                       <span class="patent-abstract_label">IPC分类号:</span>
                       <span class="patent-abstract_text">
-                        <span v-for="(item) in patent.ipcList" :key="item">
-                          <el-link type="primary">
-                            <span v-html="getView(item)"></span>
-                          </el-link>
-                          <span class="patent-abstract_semicolon">;</span>
-                        </span>
+                        <!-- <span v-for="(item) in patent.mipc" :key="item"> -->
+                        <el-link type="primary">
+                          <span v-html="getView(patent, 'mipc')"></span>
+                        </el-link>
+                        <span class="patent-abstract_semicolon">;</span>
+                        <!-- </span> -->
                       </span>
                     </el-col>
                   </el-row>
-                  <el-row v-if="t('simpleFamily')">
+                  <!-- 三种同族,若要显示需要后台返回同族专利数组(目前未返回) -->
+                  <!-- <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"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
@@ -159,7 +154,6 @@
                     <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"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
@@ -173,7 +167,6 @@
                     <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"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
@@ -182,7 +175,7 @@
                         </span>
                       </span>
                     </el-col>
-                  </el-row>
+                  </el-row> -->
                   <el-row v-if="t()">
                     <el-col :span="24">
                       <span class="patent-abstract_label">摘要:</span>
@@ -195,20 +188,7 @@
                       </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="getView(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>
@@ -266,17 +246,17 @@ export default {
   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 })
-        }
-      })
+      // 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') {
@@ -314,8 +294,8 @@ export default {
     },
     // 已读未读
     handleChangeRead(patent) {
-      const status = patent.read === 1 ? 0 : 1
-      this.$emit('change-read', [patent.id], status)
+      // const status = patent.read === 1 ? 0 : 1
+      // this.$emit('change-read', [patent.id], status)
     }
   }
 }

+ 16 - 9
src/views/project/patentCollection/components/views/Picture.vue

@@ -7,22 +7,28 @@
           style="width: 100%; white-space: nowrap;overflow-x: hidden;text-overflow: ellipsis;font-size:12px;">
           <div>序号:{{ (index + 1) + ((queryParams.current - 1) * queryParams.size) }}</div>
           <el-divider></el-divider>
-          <span v-if="refresh"> <el-checkbox :label="item.id" @change="changeSelect(item)"
-             >
+          <span v-if="refresh"> <el-checkbox :label="item.id" @change="changeSelect(item)">
 
               <el-link :disabled="!$permission('/workspace/details')"
                 :class="$permission('/workspace/details') ? '' : 'jinzhi'" :type="item.read === 1 ? 'success' : 'danger'"
-                @click.native.prevent="handleLink(item,index)">
-                <span v-html="getView(item,'patentNo')"></span>
+                @click.native.prevent="handleLink(item, index)">
+                <span v-html="getView(item, 'patentNo')"></span>
               </el-link>
 
             </el-checkbox> </span>
-          <el-tooltip effect="dark" :content="getView(item,'title')" placement="left">
-            <span style="" v-html="getView(item,'title')"></span>
+          <el-tooltip effect="dark" :content="getView(item, 'title')" placement="left">
+            <span style="" v-html="getView(item, 'title')"></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"
+          <el-image :src="$commonJS.checkViewer(item.pictureGuid)"
+            :preview-src-list="$commonJS.checkViewer(item.pictureGuid)" 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">
+              <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
+            </div>
+          </el-image>
+          <!-- <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%' }">
@@ -33,7 +39,7 @@
                 </div>
               </el-image>
             </div>
-          </el-image>
+          </el-image> -->
 
         </div>
       </el-card>
@@ -94,4 +100,5 @@ export default {
   .el-card__body {
     padding: 0px !important
   }
-}</style>
+}
+</style>

+ 52 - 47
src/views/project/patentCollection/components/views/Table.vue

@@ -1,10 +1,12 @@
 <template>
   <div class="patent-table-list-view height_100" v-DivHeight="getDivHeight">
-    <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header" :maxHeight="tableHeight" @sort-change="sortChange">
+    <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header"
+      :maxHeight="tableHeight" @sort-change="sortChange">
       <el-table-column label="#" width="60" type="index" align="center">
         <template slot-scope="scope">
           <div v-if="refresh">
-            <el-checkbox :label="scope.row.id" @change="changeSelect(scope.row)" :checked="patentNoList.filter(item=>{return item==scope.row.patentNo || item == scope.row.appNo}).length>0 ">
+            <el-checkbox :label="scope.row.id" @change="changeSelect(scope.row)"
+              :checked="patentNoList.filter(item => { return item == scope.row.patentNo || item == scope.row.appNo }).length > 0">
               <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
             </el-checkbox>
           </div>
@@ -14,53 +16,56 @@
         </template>
       </el-table-column>
 
-      <el-table-column v-for="item in column.filter(item => !item.ifHidden)" :render-header="$commonJS.renderHeaderMethods"
-        :key="item.value" :prop="item.value" :label="item.name" sortable="custom" align="center">
+      <el-table-column v-for="item in column.filter(item => !item.ifHidden)"
+        :render-header="$commonJS.renderHeaderMethods" :key="item.value" :prop="item.value" :label="item.name"
+        sortable="custom" align="center">
         <template slot-scope="scope">
           <div v-if="['patentNo'].includes(item.value)">
-          <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 :src="$commonJS.checkViewer(scope.row.pictureGuid)" :preview-src-list="[$commonJS.checkViewer(scope.row.pictureGuid)]" 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-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 :src="$commonJS.checkViewer(scope.row.pictureGuid)"
+                        :preview-src-list="[$commonJS.checkViewer(scope.row.pictureGuid)]" 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">
                           <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
-                      </div>
-                    </el-image>
-                  </div>
-                </td>
-                <td>
-                  <p v-html="getView(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"  type="primary" @click="handleClick(scope.row, scope.$index)">
-              <span v-html="getView(scope.row, item.value,item.type)"></span>
-            </el-link>
-          </el-popover>
+                        </div>
+                      </el-image>
+                    </div>
+                  </td>
+                  <td>
+                    <p v-html="getView(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" type="primary" @click="handleClick(scope.row, scope.$index)">
+                <span v-html="getView(scope.row, item.value, item.type)"></span>
+              </el-link>
+            </el-popover>
           </div>
           <template v-else-if="item.value === 'title'">
-              <span v-html="getView(scope.row, 'title')"></span>
-              <br>
-              <el-link v-if="projectId" type="primary" @click.native="handleChange(scope.row, 'title')">
-                <span v-if="!scope.row.change">切换译文</span>
-                <span v-else>切换原文</span>
-              </el-link>
-            </template>
-            <template v-else-if="item.value === 'abstractStr'">
-              <span v-html="getView(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>
-          <div v-else v-html="getView(scope.row, item.value,item.type)"></div>
+            <span v-html="getView(scope.row, 'title')"></span>
+            <br>
+            <el-link v-if="projectId" type="primary" @click.native="handleChange(scope.row, 'title')">
+              <span v-if="!scope.row.change">切换译文</span>
+              <span v-else>切换原文</span>
+            </el-link>
+          </template>
+          <template v-else-if="item.value === 'abstractStr'">
+            <span v-html="getView(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>
+          <div v-else v-html="getView(scope.row, item.value, item.type)"></div>
         </template>
       </el-table-column>
 
@@ -69,10 +74,10 @@
 </template>
 
 <script>
-import {projectData,handleData} from '../mixins/index'
+import { projectData, handleData } from '../mixins/index'
 import { getTableHeight } from '@/views/components/mixins'
 export default {
-  mixins: [projectData,handleData,getTableHeight],
+  mixins: [projectData, handleData, getTableHeight],
   components: {
 
   },
@@ -96,7 +101,7 @@ export default {
     // console.log(this.columnList);
   },
   methods: {
-    
+
     // 排序
     sortChange({ column, prop, order }) {
       this.$emit('on-sort', { column, prop, order })

+ 179 - 68
src/views/project/patentCollection/index.vue

@@ -1,7 +1,15 @@
 <template>
   <div class="height_100">
     <el-container>
-      <el-aside width="200px">Aside</el-aside>
+      <!-- 统计 -->
+      <el-aside class="height_100" :width="showLeft ? '300px' : '0px'" v-show="showLeft">
+        <div class="height_100">
+          <customFields ref="customFields" :projectId="projectId" :searchOption="searchStr" :customFields="customFields"
+            @customTab="handleCustomFields" :searchPatentCheck="searchPatentCheck">
+          </customFields>
+        </div>
+      </el-aside>
+      <!-- 专利列表 -->
       <el-container>
         <el-header style="display:flex;justify-content:space-between">
           <div style="display:flex">
@@ -10,7 +18,11 @@
                 style="font-size: 25px;position: relative; top: 5px; color: #2f2f2f; cursor: pointer"
                 @click="showLeft = !showLeft"></i>
             </el-tooltip>
-            <mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>
+
+            <searchPatent ref="searchPatent" :searchFiled="searchFiled" :searchPatentCheck="searchPatentCheck"
+              @searchValue="handleSearchValue"></searchPatent>
+
+            <!-- <mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch> -->
             <el-popover placement="bottom" title="关键词高亮" width="320" trigger="click">
               <!-- <patent-keywords-highlight :project-id="projectId" /> -->
               <el-button slot="reference" size="small" type="primary" class="margin-right_10 margin-left_10"
@@ -30,32 +42,31 @@
               </el-tooltip>
             </el-button-group>
             <el-dropdown trigger="click" split-button type="primary" size="small">
-              <span @click="handleField"
-                v-disabled="false">自定义栏位管理</span>
+              <span @click="handleField" v-disabled="false">自定义栏位管理</span>
               <el-dropdown-menu slot="dropdown" class="text-align_center">
                 <el-dropdown-item @click.native="handleFile">报告文档</el-dropdown-item>
-                <el-dropdown-item @click.native="handleQuestion" v-if="$permission('/workspace/event')">事
-                  件</el-dropdown-item>
+                <!-- <el-dropdown-item @click.native="handleQuestion" v-if="$permission('/workspace/event')">事
+                  件</el-dropdown-item> -->
                 <el-dropdown-item @click.native="handleFieldManage">显示栏位管理</el-dropdown-item>
                 <el-dropdown-item @click.native="exportPDF">导出PDF首页</el-dropdown-item>
-                <el-dropdown-item @click.native="handleBatch"
+                <!-- <el-dropdown-item @click.native="handleBatch"
                   :disabled="!($permission('/workspace/folder/batchUploadSpecification') && $r(projectId, [1, 2]))">批量上传说明书</el-dropdown-item>
-                <el-dropdown-item>
-                  <el-dropdown trigger="hover" placement="right-start">
-                    <span>
-                      导出专利<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
-                    <el-dropdown-menu slot="dropdown">
-                      <el-dropdown-item @click.native="handleExport(false)">当前全部</el-dropdown-item>
-                      <el-dropdown-item @click.native="handleExport(true)">当前所选</el-dropdown-item>
-                    </el-dropdown-menu>
-                  </el-dropdown>
+                <el-dropdown-item> -->
+                <el-dropdown trigger="hover" placement="right-start">
+                  <p>
+                    导出专利<i class="el-icon-arrow-right el-icon--right"></i>
+                  </p>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item @click.native="handleExport(false)">当前全部</el-dropdown-item>
+                    <el-dropdown-item @click.native="handleExport(true)">当前所选</el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
                 </el-dropdown-item>
                 <el-dropdown-item>
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       {{ familyObj[queryParams.family] }}<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item v-for="(item, key) in familyObj" :key="key" @click.native="onChangeFamily(key)">{{
                         item }}</el-dropdown-item>
@@ -64,9 +75,9 @@
                 </el-dropdown-item>
                 <el-dropdown-item :disabled="!$permission('/workspace/folder/merge')">
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       合并<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item @click.native="handleMerge2"
                         :disabled="!($permission('/workspace/folder/merge/inventorMerge') && $r(projectId, [1, 2]))">发明人</el-dropdown-item>
@@ -77,9 +88,9 @@
                 </el-dropdown-item>
                 <el-dropdown-item v-if="$permission('/workspace/createReport')">
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       创建报告<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown" style="margin-top:0px">
                       <!-- 遍历按钮 -->
                       <el-dropdown-item @click.native="handleAnalyses(3)"
@@ -142,11 +153,12 @@
                 </el-dropdown-menu>
               </el-dropdown>
             </div>
-            <div class="margin-left_10">
+            <!-- 编辑暂时隐藏,默认置为true -->
+            <!-- <div class="margin-left_10">
               <el-checkbox @change="changeRefresh" :checked="refresh">
                 <span>编辑</span>
               </el-checkbox>
-            </div>
+            </div> -->
           </div>
           <div>
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
@@ -161,6 +173,10 @@
 
     <Field-Drawer ref="FieldDrawer"></Field-Drawer>
     <field ref="field" type="patent" @getFieldList="getFieldList"></field>
+    <!-- 报告文档 -->
+    <reportFileDrawer ref="reportFileDrawer"></reportFileDrawer>
+    <!-- 创建FTO报告 -->
+    <addAndEditReport ref="addAndEditReport"></addAndEditReport>
   </div>
 </template>
 
@@ -172,25 +188,33 @@ import PatentTableListView from './components/views/Table.vue'
 import PatentPictureListView from './components/views/Picture'
 // import PatentPDFListView from './components/views/PDF.vue'
 import field from '@/views/components/dialog/fields.vue';
+import customFields from '@/views/report/components/patentList/components/customFields/index.vue';
+import searchPatent from '@/views/report/components/patentList/components/searchPatent.vue';
+import reportFileDrawer from '@/views/report/components/drawer/reportFileDrawer.vue'
+import addAndEditReport from '@/views/report/components/dialog/addAndEditReport.vue'
 export default {
   components: {
     FieldDrawer,
     PatentAbstractListView,
     PatentTableListView,
     PatentPictureListView,
-    field
+    field,
+    customFields,
+    searchPatent,
+    reportFileDrawer,
+    addAndEditReport,
   },
   props: {},
   data() {
     return {
       //是否隐藏左侧
-      showLeft: false,
+      showLeft: true,
       //检索字段
       searchFiled: [],
-      //检索条件
-      searchOption: {
-        name: localStorage.searchContent,
-      },
+      // //检索条件
+      // searchOption: {
+      //   name: localStorage.searchContent,
+      // },
       //视图方式
       viewList: [
         {
@@ -230,7 +254,8 @@ export default {
       //分页
       queryParams: {
         current: 1,
-        size: 10
+        size: 10,
+        family: 0
       },
       //总数
       total: 0,
@@ -246,8 +271,14 @@ export default {
       selectedTotal: 0,
       //选择专利加载
       selectNumberLoading: false,
-      //是否编辑
-      refresh: false,
+      //是否编辑//编辑按钮暂时隐藏,改为默认为true
+      refresh: true,
+      // 统计勾选的值(专利著录(专利本身))
+      searchPatentCheck: [],
+      // 存放专利本身检索条件
+      searchStr: '',
+      // 存放自定义栏位的检索条件
+      customFields: [],
     };
   },
   watch: {},
@@ -265,12 +296,50 @@ export default {
     this.getList()
   },
   methods: {
-    handleClick(row,location) {
+    // 处理后的条件
+    handleSearchValue({ searchStr, customFields }) {
+      this.searchStr = searchStr
+      this.customFields = customFields
+      this.$refs.customFields.close()
+      this.getList()
+    },
+    // 统计组件传的值
+    handleCustomFields(val) {
+      this.searchPatentCheck = []
+      val.forEach(item => {
+        if (item.check && item.check.length > 0) {
+          if (item.filedKind == -1) {
+            this.searchPatentCheck.push(item)
+          } else {
+            var checkName = []
+            if (item.type == 'Array' || item.type == 'tree' || item.type == 'DateTime') {
+              checkName = item.options.filter(item2 => item.check.includes(item2.id || item2.name)).map(item3 => item3.name);
+            }
+            var obj = {
+              value: item.value,
+              name: item.name,
+              filedKind: item.filedKind,
+              check: item.check,
+              checkName: checkName,//自定义栏位多选
+              type: item.type,
+              ifHaveChild: this.ifHaveChild
+            }
+            // return
+            this.searchPatentCheck.push(obj)
+          }
+        }
+      })
+      this.$nextTick(() => {
+        this.$refs.searchPatent.search2()
+      })
+    },
+    // 点击专利号进行跳转
+    handleClick(row, location) {
       var search = {
-        searchOption:this.searchOption,
-        location:location,
+        searchOption: this.searchOption,
+        location: location,
       }
-      this.$s.setSession('search',search)
+      this.$s.setSession('search', search)
       this.$router.push(
         {
           path: '/patentDetails/' + row.patentNo,
@@ -281,16 +350,45 @@ export default {
       )
     },
     //获取table栏位及分组字段、检索字段
+    //获取检索字段
     async getColumn() {
-      let params = ['patent']
-      await this.$api.getParamsCommon(params).then(res => {
+      //   let params = ['patent']//原获取检索字段
+      //   await this.$api.getParamsCommon(params).then(res => {
+      //     if (res.code == 200) {
+      //       let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
+      //       // 搜索字段
+      //       this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+      //         label: 'name',
+      //         value: 'value',
+      //         type: 'type',
+      //       })
+      //     }
+      //   })
+      let params = [{
+        tableName: 'patent',
+        projectId: this.projectId,
+      }]
+      await this.$api.getQueryFields(params).then(res => {
         if (res.code == 200) {
-          let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
+          let conditionDTOList = JSON.parse(JSON.stringify(res.data.data[0].conditionDTOList))
+          let field = conditionDTOList.filter(item => {
+            return item.group == 'nos'
+          })
+          let custom = conditionDTOList.filter(item => {
+            return item.group == 'customField'
+          })
+          let customField = custom.filter(item => {
+            return item.type != 'tree' && item.type != 'Array'
+          })
+          let arr = field.concat(customField)
           // 搜索字段
-          this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+          this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
             label: 'name',
-            value: 'value',
+            value: 'field',
             type: 'type',
+            group: 'group',
+            fieldType: 'fieldType',
+            groupBy: 'groupBy',
           })
         }
       })
@@ -335,7 +433,8 @@ export default {
       let params = {
         ...this.queryParams,//分页信息
         projectId: this.projectId,
-        searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        searchQuery: this.searchStr || '',//检索条件
+        customFields: this.customFields || [],
         orderDTOList: this.sort,//排序信息
       }
       this.$api.QueryPatent(params).then(res => {
@@ -379,14 +478,39 @@ export default {
     async handleFieldManage() {
       this.$refs.field.open(this.customList)
     },
+    //报告文档
+    handleFile() {
+      this.$refs.reportFileDrawer.open(this.projectId)
+    },
+    //创建FTO报告
+    handleAnalyses(type) {
+      var form = {
+        reportType: type,
+        signPatentNo: '',
+        matterId: [],
+        scenarioId: [],
+      }
+      this.$refs.addAndEditReport.open(form)
+    },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     //批量上传说明书
     handleBatch() {
       this.$refs.batchInstructionDialog.open()
     },
-    //报告文档
-    handleFile() {
-      this.$refs.projectFileDrawer.open(this.projectId, 1)
-    },
     // 事件按钮
     handleQuestion() {
       let a = this.$router.resolve({
@@ -449,21 +573,7 @@ export default {
     handleMerge2() {
       this.$refs.patentInventorMergeDrawer.open(this.projectId)
     },
-    //创建FTO报告
-    handleAnalyses(id) {
-      this.$api.getProject({ id: this.projectId }).then(response => {
-        var form = {
-          type: id,
-          projectId: this.projectId,
-          departmentId: response.data[0].departmentId,
-          personId: response.data[0].personnelId,
-          clientId: response.data[0].clientId,
-          proTec: response.data[0].technicalTheme,
-          scenarioList: response.data[0].scenarioList
-        }
-        this.$refs.ReportForm.open(form)
-      })
-    },
+
     //图表分析
     async handleAnalyse(path) {
       this.chartLoading = true
@@ -516,10 +626,10 @@ export default {
     },
 
     //取消编辑
-    changeRefresh() {
-      this.patentNoList = []
-      this.refresh = !this.refresh
-    },
+    // changeRefresh() {
+    //   this.patentNoList = []
+    //   // this.refresh = !this.refresh
+    // },
     //取消选择
     handleCancelSelectNumber() {
       this.patentNoList = [];
@@ -639,4 +749,5 @@ export default {
       padding: 0 3px;
     }
   }
-}</style>
+}
+</style>

+ 36 - 12
src/views/report/components/patentList/components/customFields/index.vue

@@ -79,6 +79,8 @@ export default {
           path: 'selectPage'
         },
       ],
+      //存放可以显示的栏位
+      showField:[],
       // 存放数据非树
       field: [],
       // 存放数据树
@@ -266,8 +268,7 @@ export default {
                 this.$set(data[index], 'isShowBtn', false)
               }
             }
-            this.$set(data[index], 'check', [])
-            // this.$set(data[index], 'allNumber', res.data.allNumber)
+            // this.$set(data[index], 'check', [])
 
           }
         }
@@ -347,6 +348,7 @@ export default {
     // 给数据添加ifHidden
     handleFiled(data) {
       for (var i = 0; i < data.length; i++) {
+        data[i].check = []
         // 分类选择:获取树类型
         if ([7, 8, 9].includes(data[i].filedKind) || (data[i].filedKind == 0 && data[i].type == 'tree')) {
           this.fieldTree.push(data[i])
@@ -356,9 +358,17 @@ export default {
         if (data[i].filedKind != -1 && data[i].filedKind != 0) {
           continue;
         }
-        for (var j = 0; j < this.field.length; j++) {
-          if (data[i].name == this.field[j].name && data[i].filedKind == this.field[j].filedKind) {
+        // for (var j = 0; j < this.field.length; j++) {
+        //   if (data[i].name == this.field[j].name && data[i].filedKind == this.field[j].filedKind) {
+        //     data[i].ifHidden = false
+        //     break;
+        //   }
+        // }
+        for (var j = 0; j < this.showField.length; j++) {
+          if (data[i].name == this.showField[j].name && data[i].filedKind == this.showField[j].filedKind) {
             data[i].ifHidden = false
+            this.field.push(data[i])
+            this.getSelect(data[i])
             break;
           }
         }
@@ -381,16 +391,28 @@ export default {
       await this.$api.getShowCountColumns(params).then(res => {
         if (res.code == 200) {
           //filedKind-1专利著录 0自定义字段 7产品 8产品类别 9技术分类
+          // res.data.data.forEach(item => {
+          //   this.$set(item, 'check', [])
+          //   if (item.filedKind == -1) {
+          //     item.value = item.field
+          //   }
+          // })
           var data = res.data.data
           // 查询筛选:获取非树类型
-          this.field = data.filter(item => {
+          // this.field = data.filter(item => {
+          //   if (item.filedKind == -1 || (item.filedKind == 0 && item.type != 'tree')) {
+          //     return item
+          //   }
+          // })
+          this.showField = data.filter(item => {
             if (item.filedKind == -1 || (item.filedKind == 0 && item.type != 'tree')) {
               return item
             }
           })
-          this.field.forEach(item => {
-            this.getSelect(item)
-          })
+          // this.field.forEach(item => {
+          //   this.getSelect(item)
+          // })
+          
         }
       })
     },
@@ -416,14 +438,16 @@ export default {
     },
     // 过滤组件传的值
     getFieldList(val) {
-      // this.field = val//筛选字段没有更新
-      this.getShowCountColumns()
-      this.getAllCountColumns()
+      this.filedAll = val
+      this.field = this.filedAll.filter(item => {
+        return item.ifHidden == false
+      })
     },
 
     // 更多过滤项
     handleMore() {
-      this.$refs.fieldsVue.open(this.filedAll)
+      var data = JSON.parse(JSON.stringify(this.filedAll))
+      this.$refs.fieldsVue.open(data)
     },
     //确认检索
     sure() {

+ 0 - 2
src/views/report/components/patentList/components/index.vue

@@ -126,8 +126,6 @@ export default {
       tableData: [],
       // 获取显示自定义栏位
       fieldList: [],
-      // 统计勾选的值(自定义字段)
-      statisticsCustom: [],
       // 统计勾选的值(专利著录(专利本身))
       searchPatentCheck: [],
       // 分类选择是否关联子类

+ 1 - 1
src/views/report/components/patentList/components/searchPatent.vue

@@ -353,6 +353,6 @@ export default {
 
 <style lang="scss" scoped>
 .searchPatent {
-  width: 550px;
+  // width: 550px;
 }
 </style>