瀏覽代碼

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuliu 1 年之前
父節點
當前提交
a5ba7d181a

+ 12 - 3
src/api/newApi/common.js

@@ -157,9 +157,9 @@ export default {
   * @param {*} data 
   * @param {*} data 
   * @returns 
   * @returns 
   */
   */
-  esCountSearch(data) {
-    return axios.post("/xiaoshi/patent/esCountSearch", data);
-  },
+  // esCountSearch(data) {
+  //   return axios.post("/xiaoshi/patent/esCountSearch", data);
+  // },
   /**
   /**
   * 获取检索栏位
   * 获取检索栏位
   * @param {*} data 
   * @param {*} data 
@@ -208,5 +208,14 @@ export default {
   setShowCountColumns(data) {
   setShowCountColumns(data) {
     return axios.post("/xiaoshi/personField/setShowCountColumns", data);
     return axios.post("/xiaoshi/personField/setShowCountColumns", data);
   },
   },
+  /**
+  * 获取统计数据
+  * @param {*} data 
+  * @returns 
+  */
+  esCountAnalysis(data) {
+    return axios.post("/xiaoshi/patent/esCountAnalysis", data);
+  },
+
 
 
 };
 };

+ 1 - 2
src/utils/model/retrieval/search.vue

@@ -99,7 +99,7 @@ export default {
       value: null,
       value: null,
       field: {},
       field: {},
       searchOptions: [],
       searchOptions: [],
-      innerChange:false
+      innerChange: false
     };
     };
   },
   },
   watch: {
   watch: {
@@ -112,7 +112,6 @@ export default {
     searchValue: {
     searchValue: {
       deep: true,
       deep: true,
       handler(n, o) {
       handler(n, o) {
-        console.log(this.SearchFields);
         if (!this.inner) {
         if (!this.inner) {
           this.getSearchOptions()
           this.getSearchOptions()
         } else {
         } else {

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

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div>
   <div>
-    <el-dialog custom-class="myFields" title="显示栏位管理" :visible.sync="dialogVisible" width="300px"
+    <el-dialog custom-class="myFields" :title="sign?'筛选字段':'显示栏位管理'" :visible.sync="dialogVisible" width="300px"
       :before-close="handleClose" :close-on-click-modal="false" :append-to-body="true">
       :before-close="handleClose" :close-on-click-modal="false" :append-to-body="true">
       <div>
       <div>
         <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
         <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
@@ -123,13 +123,16 @@ export default {
         })
         })
       }
       }
       this.loading = true
       this.loading = true
-      console.log(params, apiItem);
-      console.log(apiItem);
       this.$api[apiItem](params).then((response) => {
       this.$api[apiItem](params).then((response) => {
         if (response.code == 200) {
         if (response.code == 200) {
           this.loading = false
           this.loading = false
           this.handleClose()
           this.handleClose()
-          this.$emit('getFieldList', this.filedList)
+          // if (this.sign) {
+          //   this.$emit('getFieldList', this.filedList)
+          // } else {
+            this.$emit('getFieldList', this.filedList)
+          // }
+          
         }
         }
       }).catch(error => {
       }).catch(error => {
         this.loading = false
         this.loading = false

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

@@ -92,54 +92,65 @@ export const handleData = {
         const change2 = row.change2
         const change2 = row.change2
         switch (key) {
         switch (key) {
           case "title":
           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
             break
           case "abstractStr":
           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:
           default:
-            // var text = this.$commonJS.getColumnData(row, obj,prop,data)
+            var text = this.$commonJS.getColumnData(row, obj,prop,data)
             break
             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)
       return this.getViewDom(text,key)
     },
     },
     getViewDom(text, field) {
     getViewDom(text, field) {
@@ -194,6 +205,7 @@ export const handleData = {
 
 
       // } catch (e) {
       // } catch (e) {
       // }
       // }
+      // console.log(text);
       return text
       return text
     },
     },
     //切换原文译文 
     //切换原文译文 

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

@@ -17,27 +17,22 @@
                   <!-- 已读未读 -->
                   <!-- 已读未读 -->
                   <span v-if="projectId">
                   <span v-if="projectId">
                     <!-- patent.read判断已读未读 -->
                     <!-- 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"
                       v-if="$permission('/workspace/folder/isRead')" effect="dark" size="small"
                       @click="handleChangeRead(patent)">{{ readType[patent.read] }}</el-tag>
                       @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>
                   </span>
 
 
                 </div>
                 </div>
                 <div class="picture text-align_center patent-abstract-image-container">
                 <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%' }">
                     :style="{ width: patent.imgWidth ? patent.imgWidth : '100%', height: patent.imgHeight ? patent.imgHeight : '100%' }">
                     <div slot="error" class="image-slot">
                     <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>
                     </div>
                   </el-image>
                   </el-image>
-
                 </div>
                 </div>
                 <div class="patent-abstract-pdf-button-container">
                 <div class="patent-abstract-pdf-button-container">
                   <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small"
                   <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small"
@@ -49,7 +44,7 @@
                 <div class="patent-abstract-title">
                 <div class="patent-abstract-title">
                   <el-link :disabled="!$permission('/workspace/details')"
                   <el-link :disabled="!$permission('/workspace/details')"
                     :class="$permission('/workspace/details') ? '' : 'jinzhi'" type="success"
                     :class="$permission('/workspace/details') ? '' : 'jinzhi'" type="success"
-                    @click.native="handleLink(patent,index)">
+                    @click.native="handleLink(patent, index)">
                     <span v-html="getView(patent, 'patentNo')"></span>
                     <span v-html="getView(patent, 'patentNo')"></span>
                   </el-link>
                   </el-link>
                   <el-tag class="margin-left_10" type="primary" effect="dark" size="small" v-if="patent.simpleStatus">{{
                   <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-row v-if="t()">
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">权利人:</span>
                       <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>
                             <span v-html="getView(item.name)"></span>
                           </el-link>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                           <span class="patent-abstract_semicolon">;</span>
@@ -107,7 +102,7 @@
                       <span class="patent-abstract_label">申请人:</span>
                       <span class="patent-abstract_label">申请人:</span>
                       <span class="patent-abstract_text" v-if="patent.applicant">
                       <span class="patent-abstract_text" v-if="patent.applicant">
                         <span v-for="(item) in patent.applicant.filter(a => a.dataType === 2)" :key="item.name">
                         <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>
                             <span v-html="getView(item.name)"></span>
                           </el-link>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                           <span class="patent-abstract_semicolon">;</span>
@@ -132,20 +127,20 @@
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">IPC分类号:</span>
                       <span class="patent-abstract_label">IPC分类号:</span>
                       <span class="patent-abstract_text">
                       <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>
                       </span>
                     </el-col>
                     </el-col>
                   </el-row>
                   </el-row>
-                  <el-row v-if="t('simpleFamily')">
+                  <!-- 三种同族,若要显示需要后台返回同族专利数组(目前未返回) -->
+                  <!-- <el-row v-if="t('simpleFamily')">
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">简单同族:</span>
                       <span class="patent-abstract_label">简单同族:</span>
                       <span class="patent-abstract_text">
                       <span class="patent-abstract_text">
-                        <!-- <template v-for="(item, index) in patent.family.simple"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
                             <span v-html="getView(item)"></span>
@@ -159,7 +154,6 @@
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">INPADOC同族:</span>
                       <span class="patent-abstract_label">INPADOC同族:</span>
                       <span class="patent-abstract_text">
                       <span class="patent-abstract_text">
-                        <!-- <template v-for="(item, index) in patent.family.inpadoc"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
                             <span v-html="getView(item)"></span>
@@ -173,7 +167,6 @@
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">PatSnap同族:</span>
                       <span class="patent-abstract_label">PatSnap同族:</span>
                       <span class="patent-abstract_text">
                       <span class="patent-abstract_text">
-                        <!-- <template v-for="(item, index) in patent.family.patSnap"> -->
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                         <span v-for="(item) in patent.simpleFamilyNum" :key="item">
                           <el-link type="primary" @click.native="handleFamily(item)">
                           <el-link type="primary" @click.native="handleFamily(item)">
                             <span v-html="getView(item)"></span>
                             <span v-html="getView(item)"></span>
@@ -182,7 +175,7 @@
                         </span>
                         </span>
                       </span>
                       </span>
                     </el-col>
                     </el-col>
-                  </el-row>
+                  </el-row> -->
                   <el-row v-if="t()">
                   <el-row v-if="t()">
                     <el-col :span="24">
                     <el-col :span="24">
                       <span class="patent-abstract_label">摘要:</span>
                       <span class="patent-abstract_label">摘要:</span>
@@ -195,20 +188,7 @@
                       </div>
                       </div>
                     </el-col>
                     </el-col>
                   </el-row>
                   </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>
                 </div>
               </td>
               </td>
             </tr>
             </tr>
@@ -266,17 +246,17 @@ export default {
   methods: {
   methods: {
     // 同族事件
     // 同族事件
     handleFamily(item) {
     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) {
     getColumnValue(patent, column) {
       if (column.key !== 'label') {
       if (column.key !== 'label') {
@@ -314,8 +294,8 @@ export default {
     },
     },
     // 已读未读
     // 已读未读
     handleChangeRead(patent) {
     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;">
           style="width: 100%; white-space: nowrap;overflow-x: hidden;text-overflow: ellipsis;font-size:12px;">
           <div>序号:{{ (index + 1) + ((queryParams.current - 1) * queryParams.size) }}</div>
           <div>序号:{{ (index + 1) + ((queryParams.current - 1) * queryParams.size) }}</div>
           <el-divider></el-divider>
           <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')"
               <el-link :disabled="!$permission('/workspace/details')"
                 :class="$permission('/workspace/details') ? '' : 'jinzhi'" :type="item.read === 1 ? 'success' : 'danger'"
                 :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-link>
 
 
             </el-checkbox> </span>
             </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>
           </el-tooltip>
         </div>
         </div>
         <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">
         <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]"
             :src="item.abstractPath2 ? item.abstractPath2 : getImagePath1(item)" :preview-src-list="[item.abstractPath2]"
             style="margin:0 auto;vertical-align:middle;"
             style="margin:0 auto;vertical-align:middle;"
             :style="{ width: item.imgWidth ? item.imgWidth : '100%', height: item.imgHeight ? item.imgHeight : '100%' }">
             :style="{ width: item.imgWidth ? item.imgWidth : '100%', height: item.imgHeight ? item.imgHeight : '100%' }">
@@ -33,7 +39,7 @@
                 </div>
                 </div>
               </el-image>
               </el-image>
             </div>
             </div>
-          </el-image>
+          </el-image> -->
 
 
         </div>
         </div>
       </el-card>
       </el-card>
@@ -94,4 +100,5 @@ export default {
   .el-card__body {
   .el-card__body {
     padding: 0px !important
     padding: 0px !important
   }
   }
-}</style>
+}
+</style>

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

@@ -1,10 +1,12 @@
 <template>
 <template>
   <div class="patent-table-list-view height_100" v-DivHeight="getDivHeight">
   <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">
       <el-table-column label="#" width="60" type="index" align="center">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <div v-if="refresh">
           <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>
               <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
             </el-checkbox>
             </el-checkbox>
           </div>
           </div>
@@ -14,53 +16,56 @@
         </template>
         </template>
       </el-table-column>
       </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">
         <template slot-scope="scope">
           <div v-if="['patentNo'].includes(item.value)">
           <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="">
                           <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>
           </div>
           <template v-else-if="item.value === 'title'">
           <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>
         </template>
       </el-table-column>
       </el-table-column>
 
 
@@ -69,10 +74,10 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {projectData,handleData} from '../mixins/index'
+import { projectData, handleData } from '../mixins/index'
 import { getTableHeight } from '@/views/components/mixins'
 import { getTableHeight } from '@/views/components/mixins'
 export default {
 export default {
-  mixins: [projectData,handleData,getTableHeight],
+  mixins: [projectData, handleData, getTableHeight],
   components: {
   components: {
 
 
   },
   },
@@ -96,7 +101,7 @@ export default {
     // console.log(this.columnList);
     // console.log(this.columnList);
   },
   },
   methods: {
   methods: {
-    
+
     // 排序
     // 排序
     sortChange({ column, prop, order }) {
     sortChange({ column, prop, order }) {
       this.$emit('on-sort', { column, prop, order })
       this.$emit('on-sort', { column, prop, order })

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

@@ -1,7 +1,15 @@
 <template>
 <template>
   <div class="height_100">
   <div class="height_100">
     <el-container>
     <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-container>
         <el-header style="display:flex;justify-content:space-between">
         <el-header style="display:flex;justify-content:space-between">
           <div style="display:flex">
           <div style="display:flex">
@@ -10,7 +18,11 @@
                 style="font-size: 25px;position: relative; top: 5px; color: #2f2f2f; cursor: pointer"
                 style="font-size: 25px;position: relative; top: 5px; color: #2f2f2f; cursor: pointer"
                 @click="showLeft = !showLeft"></i>
                 @click="showLeft = !showLeft"></i>
             </el-tooltip>
             </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">
             <el-popover placement="bottom" title="关键词高亮" width="320" trigger="click">
               <!-- <patent-keywords-highlight :project-id="projectId" /> -->
               <!-- <patent-keywords-highlight :project-id="projectId" /> -->
               <el-button slot="reference" size="small" type="primary" class="margin-right_10 margin-left_10"
               <el-button slot="reference" size="small" type="primary" class="margin-right_10 margin-left_10"
@@ -30,32 +42,31 @@
               </el-tooltip>
               </el-tooltip>
             </el-button-group>
             </el-button-group>
             <el-dropdown trigger="click" split-button type="primary" size="small">
             <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-menu slot="dropdown" class="text-align_center">
                 <el-dropdown-item @click.native="handleFile">报告文档</el-dropdown-item>
                 <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="handleFieldManage">显示栏位管理</el-dropdown-item>
                 <el-dropdown-item @click.native="exportPDF">导出PDF首页</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>
                   :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-item>
                 <el-dropdown-item>
                   <el-dropdown trigger="hover" placement="right-start">
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       {{ familyObj[queryParams.family] }}<i class="el-icon-arrow-right el-icon--right"></i>
                       {{ familyObj[queryParams.family] }}<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown">
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item v-for="(item, key) in familyObj" :key="key" @click.native="onChangeFamily(key)">{{
                       <el-dropdown-item v-for="(item, key) in familyObj" :key="key" @click.native="onChangeFamily(key)">{{
                         item }}</el-dropdown-item>
                         item }}</el-dropdown-item>
@@ -64,9 +75,9 @@
                 </el-dropdown-item>
                 </el-dropdown-item>
                 <el-dropdown-item :disabled="!$permission('/workspace/folder/merge')">
                 <el-dropdown-item :disabled="!$permission('/workspace/folder/merge')">
                   <el-dropdown trigger="hover" placement="right-start">
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       合并<i class="el-icon-arrow-right el-icon--right"></i>
                       合并<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown">
                     <el-dropdown-menu slot="dropdown">
                       <el-dropdown-item @click.native="handleMerge2"
                       <el-dropdown-item @click.native="handleMerge2"
                         :disabled="!($permission('/workspace/folder/merge/inventorMerge') && $r(projectId, [1, 2]))">发明人</el-dropdown-item>
                         :disabled="!($permission('/workspace/folder/merge/inventorMerge') && $r(projectId, [1, 2]))">发明人</el-dropdown-item>
@@ -77,9 +88,9 @@
                 </el-dropdown-item>
                 </el-dropdown-item>
                 <el-dropdown-item v-if="$permission('/workspace/createReport')">
                 <el-dropdown-item v-if="$permission('/workspace/createReport')">
                   <el-dropdown trigger="hover" placement="right-start">
                   <el-dropdown trigger="hover" placement="right-start">
-                    <span>
+                    <p>
                       创建报告<i class="el-icon-arrow-right el-icon--right"></i>
                       创建报告<i class="el-icon-arrow-right el-icon--right"></i>
-                    </span>
+                    </p>
                     <el-dropdown-menu slot="dropdown" style="margin-top:0px">
                     <el-dropdown-menu slot="dropdown" style="margin-top:0px">
                       <!-- 遍历按钮 -->
                       <!-- 遍历按钮 -->
                       <el-dropdown-item @click.native="handleAnalyses(3)"
                       <el-dropdown-item @click.native="handleAnalyses(3)"
@@ -142,11 +153,12 @@
                 </el-dropdown-menu>
                 </el-dropdown-menu>
               </el-dropdown>
               </el-dropdown>
             </div>
             </div>
-            <div class="margin-left_10">
+            <!-- 编辑暂时隐藏,默认置为true -->
+            <!-- <div class="margin-left_10">
               <el-checkbox @change="changeRefresh" :checked="refresh">
               <el-checkbox @change="changeRefresh" :checked="refresh">
                 <span>编辑</span>
                 <span>编辑</span>
               </el-checkbox>
               </el-checkbox>
-            </div>
+            </div> -->
           </div>
           </div>
           <div>
           <div>
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
@@ -161,6 +173,10 @@
 
 
     <Field-Drawer ref="FieldDrawer"></Field-Drawer>
     <Field-Drawer ref="FieldDrawer"></Field-Drawer>
     <field ref="field" type="patent" @getFieldList="getFieldList"></field>
     <field ref="field" type="patent" @getFieldList="getFieldList"></field>
+    <!-- 报告文档 -->
+    <reportFileDrawer ref="reportFileDrawer"></reportFileDrawer>
+    <!-- 创建FTO报告 -->
+    <addAndEditReport ref="addAndEditReport"></addAndEditReport>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -172,25 +188,33 @@ import PatentTableListView from './components/views/Table.vue'
 import PatentPictureListView from './components/views/Picture'
 import PatentPictureListView from './components/views/Picture'
 // import PatentPDFListView from './components/views/PDF.vue'
 // import PatentPDFListView from './components/views/PDF.vue'
 import field from '@/views/components/dialog/fields.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 {
 export default {
   components: {
   components: {
     FieldDrawer,
     FieldDrawer,
     PatentAbstractListView,
     PatentAbstractListView,
     PatentTableListView,
     PatentTableListView,
     PatentPictureListView,
     PatentPictureListView,
-    field
+    field,
+    customFields,
+    searchPatent,
+    reportFileDrawer,
+    addAndEditReport,
   },
   },
   props: {},
   props: {},
   data() {
   data() {
     return {
     return {
       //是否隐藏左侧
       //是否隐藏左侧
-      showLeft: false,
+      showLeft: true,
       //检索字段
       //检索字段
       searchFiled: [],
       searchFiled: [],
-      //检索条件
-      searchOption: {
-        name: localStorage.searchContent,
-      },
+      // //检索条件
+      // searchOption: {
+      //   name: localStorage.searchContent,
+      // },
       //视图方式
       //视图方式
       viewList: [
       viewList: [
         {
         {
@@ -230,7 +254,8 @@ export default {
       //分页
       //分页
       queryParams: {
       queryParams: {
         current: 1,
         current: 1,
-        size: 10
+        size: 10,
+        family: 0
       },
       },
       //总数
       //总数
       total: 0,
       total: 0,
@@ -246,8 +271,14 @@ export default {
       selectedTotal: 0,
       selectedTotal: 0,
       //选择专利加载
       //选择专利加载
       selectNumberLoading: false,
       selectNumberLoading: false,
-      //是否编辑
-      refresh: false,
+      //是否编辑//编辑按钮暂时隐藏,改为默认为true
+      refresh: true,
+      // 统计勾选的值(专利著录(专利本身))
+      searchPatentCheck: [],
+      // 存放专利本身检索条件
+      searchStr: '',
+      // 存放自定义栏位的检索条件
+      customFields: [],
     };
     };
   },
   },
   watch: {},
   watch: {},
@@ -265,12 +296,50 @@ export default {
     this.getList()
     this.getList()
   },
   },
   methods: {
   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 = {
       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(
       this.$router.push(
         {
         {
           path: '/patentDetails/' + row.patentNo,
           path: '/patentDetails/' + row.patentNo,
@@ -281,16 +350,45 @@ export default {
       )
       )
     },
     },
     //获取table栏位及分组字段、检索字段
     //获取table栏位及分组字段、检索字段
+    //获取检索字段
     async getColumn() {
     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) {
         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',
             label: 'name',
-            value: 'value',
+            value: 'field',
             type: 'type',
             type: 'type',
+            group: 'group',
+            fieldType: 'fieldType',
+            groupBy: 'groupBy',
           })
           })
         }
         }
       })
       })
@@ -335,7 +433,8 @@ export default {
       let params = {
       let params = {
         ...this.queryParams,//分页信息
         ...this.queryParams,//分页信息
         projectId: this.projectId,
         projectId: this.projectId,
-        searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        searchQuery: this.searchStr || '',//检索条件
+        customFields: this.customFields || [],
         orderDTOList: this.sort,//排序信息
         orderDTOList: this.sort,//排序信息
       }
       }
       this.$api.QueryPatent(params).then(res => {
       this.$api.QueryPatent(params).then(res => {
@@ -379,14 +478,39 @@ export default {
     async handleFieldManage() {
     async handleFieldManage() {
       this.$refs.field.open(this.customList)
       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() {
     handleBatch() {
       this.$refs.batchInstructionDialog.open()
       this.$refs.batchInstructionDialog.open()
     },
     },
-    //报告文档
-    handleFile() {
-      this.$refs.projectFileDrawer.open(this.projectId, 1)
-    },
     // 事件按钮
     // 事件按钮
     handleQuestion() {
     handleQuestion() {
       let a = this.$router.resolve({
       let a = this.$router.resolve({
@@ -449,21 +573,7 @@ export default {
     handleMerge2() {
     handleMerge2() {
       this.$refs.patentInventorMergeDrawer.open(this.projectId)
       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) {
     async handleAnalyse(path) {
       this.chartLoading = true
       this.chartLoading = true
@@ -516,10 +626,10 @@ export default {
     },
     },
 
 
     //取消编辑
     //取消编辑
-    changeRefresh() {
-      this.patentNoList = []
-      this.refresh = !this.refresh
-    },
+    // changeRefresh() {
+    //   this.patentNoList = []
+    //   // this.refresh = !this.refresh
+    // },
     //取消选择
     //取消选择
     handleCancelSelectNumber() {
     handleCancelSelectNumber() {
       this.patentNoList = [];
       this.patentNoList = [];
@@ -639,4 +749,5 @@ export default {
       padding: 0 3px;
       padding: 0 3px;
     }
     }
   }
   }
-}</style>
+}
+</style>

+ 0 - 333
src/views/report/components/patentList/components/customFields.vue

@@ -1,333 +0,0 @@
-<template>
-  <div class="patent-tree-filter">
-    <el-container>
-      <el-header class="basic_header">
-        <el-tabs v-model="activeNameTabs" @tab-click="handleClick" type="card" style="width:100%">
-          <el-tab-pane v-for="item in menu" :key='item.path' :label="item.label" :name="item.path"></el-tab-pane>
-        </el-tabs>
-      </el-header>
-      <el-main>
-        <component :is="activeNameTabs" :projectId="projectId" :taskId="taskId" :field="field" :fieldTree="fieldTree"
-          @collapseChange="handleCollapse" @search="handleSearch">
-          <div slot="footerBtn">
-            <el-button type="primary" size="small" @click="handleMore">更多过滤项</el-button>
-          </div>
-        </component>
-      </el-main>
-    </el-container>
-
-    <fieldsVue ref="fieldsVue" type="patent" :projectId="projectId" :taskId="taskId" :sign="true"
-      @getFieldList="getFieldList"></fieldsVue>
-  </div>
-</template>
-
-<script>
-import queryPage from './tab1.vue'
-import selectPage from './tab2.vue'
-import fieldsVue from '@/views/components/dialog/fields.vue'
-export default {
-  props: {
-    projectId: {
-      default: null
-    },
-    taskId: {
-      default: null
-    },
-  },
-  components: {
-    queryPage,
-    selectPage,
-    fieldsVue,
-  },
-  data() {
-    return {
-      activeNameTabs: 'queryPage',
-      menu: [
-        {
-          label: '查询筛选',
-          path: 'queryPage'
-        },
-        {
-          label: '分类选择',
-          path: 'selectPage'
-        },
-      ],
-      // 存放数据
-      field: [],
-      fieldTree: [],
-      // 勾选的数据
-      valObj: {
-        valueOne: '',
-        valueTwo: '',
-      },
-      // 总数据
-      customFields: [],
-      // 是否重新创建dom
-      ifShow: true,
-      // 所有的统计栏位
-      filedAll: [],
-    }
-  },
-  watch: {
-
-  },
-  async mounted() {
-    // 获取显示的统计栏位
-    await this.getShowCountColumns()
-    // 获取所有统计栏位的数据
-    this.getAllCountColumns()
-  },
-  methods: {
-    // 点击面板中的搜索
-    handleSearch({ row, }) {
-      this.getShowCountColumns(row)
-      this.getAllCountColumns(row)
-    },
-    // 点击当前面板
-    async handleCollapse({ row, sign}) {
-      if (row.filedKind == -1) {//专利著录//调用专利著录的统计接口?
-
-      } else if (row.filedKind == 0) {//调用查询自定义字段选项
-        await this.queryCustomOption(row ,sign)
-        this.$nextTick(() => {
-          this.esCountSearch(row)
-        })
-      } else {
-
-      }
-    },
-    // 查询自定义栏位选项数据
-    async queryCustomOption(row,sign) {
-      let params = {
-        customFieldId: row.value,
-      }
-      await this.$api.queryCustomOption(params).then(response => {
-        if (response.code == 200) {
-          if (sign == 'check') {
-            this.$set(row, 'options', response.data.data)
-          } else {
-            this.$set(row, 'child', response.data.data)
-          }
-          this.$set(row,'check',[])
-        }
-      }).catch(error => {
-
-      })
-    },
-    // 获取统计数字
-    esCountSearch(val,sign) {
-      let params = [{
-        field: 'field',
-        fieldId: val.value,
-        valueOne: this.valObj.valueOne || '',
-        valueTwo: this.valObj.valueTwo || '',
-      }]
-      this.$api.esCountSearch(params).then(response => {
-        if (response.code == 200) {
-          this.$set(val, 'nums', response.data.detailDTOS)
-          this.refresh()
-        }
-      }).catch(error => {
-        this.$set(val, 'nums', [])
-      })
-    },
-    // 获取所有的统计栏位
-    getAllCountColumns() {
-      let params = {
-        projectId: this.projectId,
-        taskId: this.taskId,
-      }
-      this.$api.getAllCountColumns(params).then(res => {
-        if (res.code == 200) {
-          this.handleFiled(res.data.data)
-        }
-      })
-    },
-    // 给数据添加ifHidden
-    handleFiled(data) {
-      for (var i = 0; i < data.length; i++) {
-        data[i].ifHidden = true
-        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) {
-            data[i].ifHidden = false
-            break;
-          }
-        }
-      }
-      // 查询筛选:只展示非树类型
-      this.filedAll = data.filter(item => {
-        if (item.filedKind == -1 || (item.filedKind == 0 && item.type != 'tree')) {
-          return item
-        }
-      })
-      // 分类选择:获取树类型
-      this.fieldTree = data.filter(item2 => {
-        if ([7, 8, 9].includes(item2.filedKind) || (item2.filedKind == 0 && item2.type == 'tree')) {
-          return item2
-        }
-      })
-    },
-    // 获取显示的统计栏位
-    async getShowCountColumns() {
-      let params = {
-        projectId: this.projectId,
-        taskId: this.taskId,
-      }
-      await this.$api.getShowCountColumns(params).then(res => {
-        if (res.code == 200) {
-          //filedKind-1专利著录 0自定义字段 7产品 8产品类别 9技术分类
-          var data = res.data.data
-          // 查询筛选:获取非树类型
-          this.field = data.filter(item => {
-            if (item.filedKind == -1 || (item.filedKind == 0 && item.type != 'tree')) {
-              return item
-            }
-          })
-        }
-      })
-    },
-    // 过滤组件传的值
-    getFieldList(val) {
-      this.getShowCountColumns()
-      this.getAllCountColumns()
-    },
-    // 更多过滤项
-    handleMore() {
-      this.$refs.fieldsVue.open(this.filedAll)
-    },
-  }
-}
-</script>
-
-<style lang="scss">
-.patent-tree-filter {
-  height: 100%;
-
-  .patent-tree-filter-main {
-    height: 100%;
-    padding: 10px 0;
-
-    .no-data {
-      text-align: center;
-      color: #6b6868;
-    }
-  }
-
-  .change-show-type {
-    font-size: 13px;
-
-    .change-show-type-info {
-      color: #6b6868;
-      padding-left: 10px;
-    }
-
-    .el-form-item__label {
-      padding: 0 !important;
-      line-height: 20px;
-    }
-
-    .el-form-item__content {
-      height: 30px;
-      line-height: 30px;
-    }
-  }
-}
-
-.patent-query-filter-search {
-  display: flex;
-}
-
-.patent-query-filter-search-input {
-  margin-right: 5px;
-}
-
-.patent-query-filter-search-bottom {
-  text-align: center;
-  margin-top: 10px;
-}
-
-.year-data-picker {
-  width: 200px;
-  display: flex;
-  justify-content: space-between;
-
-  .el-input__prefix {
-    display: none;
-  }
-
-  .el-input__inner {
-    padding: 10px;
-    text-align: center;
-  }
-}
-
-.year-data-input {
-  width: 100px;
-}
-
-.source-checkbox {
-  margin-top: 10px;
-
-  span {
-    display: inline-block;
-    font-size: 13px;
-  }
-
-  .el-checkbox {
-    display: block;
-  }
-
-  .el-checkbox__label {
-    position: relative;
-    top: 5px;
-  }
-
-  .source-checkbox-count {
-    color: #409EFF;
-    position: relative;
-    top: -4px;
-    left: 10px;
-  }
-
-  .source-checkbox-label {
-    max-width: 190px;
-    padding-left: 5px;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-  }
-}
-
-.query-read-status {
-  font-size: 12px;
-  height: 25px;
-  line-height: 25px;
-  cursor: pointer;
-  background: #dcdcdc;
-  border-radius: 3px;
-  padding: 0 5px;
-
-  span {
-    display: inline-block;
-  }
-
-  .a {}
-
-  .b {
-    text-align: center;
-    width: 30px;
-  }
-
-  .c {
-    padding-left: 5px;
-  }
-}
-
-.query-read-status_is-active {
-  background: #409EFF !important;
-  color: #ffffff !important;
-}
-</style>

+ 34 - 0
src/views/report/components/patentList/components/customFields/components/mixins/index.js

@@ -0,0 +1,34 @@
+export default {
+  props: {
+
+  },
+  data() {
+    return {
+      activeNames: [],
+      
+    }
+  },
+  watch: {
+
+  },
+  methods: {
+    // 点击面板
+    handleChange(data, type) {
+      var item = data[data.length - 1]
+      this.$emit('collapseClick', item, this.activeNames, type)
+    },
+    // 处理专利文件数字
+    getCount(field, value) {
+      var num = 0
+      if (field.nums) {
+        var obj = field.nums.find(item => {
+          return item.name == value
+        })
+        if (obj) {
+          num = obj.number
+        }
+        return num
+      }
+    },
+  },
+}

+ 248 - 0
src/views/report/components/patentList/components/customFields/components/tab1.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="customFieldsTab1 height_100">
+    <el-container>
+      <el-main class="" style="overflow-y: auto;">
+        <template v-if="field.length > 0">
+          <el-collapse v-model="activeNames" @change="handleChange" style="margin: 0px 5px 0px 5px;">
+
+            <el-collapse-item v-for="item in field" :title="item.name" :name="item.value + 'a' + item.filedKind"
+              :key="item.value">
+
+              <!-- 自定义字段 -->
+              <template v-if="item.filedKind != -1">
+                <div style="display:flex;margin-bottom: 10px;">
+                  <div v-if="['Integer', 'DateTime'].includes(item.type)" class="year-data-picker">
+                    <template v-if="item.type == 'DateTime'">
+                      <el-date-picker clear-icon v-model="item.valueOne" size="small" type="year" value-format="yyyy"
+                        placeholder="请选择时间"></el-date-picker>
+                      <span style="margin: 5px;">至</span>
+                      <el-date-picker clear-icon v-model="item.valueTwo" size="small" type="year" value-format="yyyy"
+                        placeholder="请选择时间"></el-date-picker>
+                    </template>
+                    <template v-else>
+                      <el-input size="small" v-model="item.valueOne" placeholder="请输入"></el-input>
+                      <span style="margin: 5px;">至</span>
+                      <el-input size="small" v-model="item.valueTwo" placeholder="请输入"></el-input>
+                    </template>
+                    <el-button @click.stop="handleSearch(item)" size="small" type="primary" class="margin-left_10"
+                      icon="el-icon-search" circle></el-button>
+                  </div>
+                </div>
+                <el-checkbox-group v-model="item.check" @change="onChange">
+                  <div class="source-checkbox">
+                    <el-checkbox v-for="source in item.options" :label="source.id || source.name" :key="source.id || source.name">
+                      <el-tooltip :content="source.name" placement="top" effect="light">
+                        <span class="source-checkbox-label text" :title="source.name">{{ source.name }}</span>
+                      </el-tooltip>
+                      <!-- <span class="source-checkbox-label" :title="source.name">{{ source.name }}</span> -->
+                      <span v-if="source.id" class="source-checkbox-count">({{ getCount(item, source.id) }})</span>
+                      <span v-else class="source-checkbox-count">({{ source.number }})</span>
+                    </el-checkbox>
+                  </div>
+                </el-checkbox-group>
+              </template>
+
+              <!-- 专利本身 -->
+              <template v-else>
+                <div v-if="['MC', 'CPC', 'UPC', 'LOC'].includes(item.value)" style="margin-bottom: 10px;">
+                  <el-select v-model="item.select" @change="selectChange($event, item)" placeholder="请选择" size="small">
+                    <el-option v-for="item in special[item.value]" :key="item.value" :label="item.label"
+                      :value="item.value">
+                    </el-option>
+                  </el-select>
+                </div>
+                <div style="display: flex;align-items: center;">
+                  <template v-if="item.type == 'DateTime'">
+                    <el-date-picker clear-icon v-model="item.valueOne" size="small" type="year" value-format="yyyy"
+                      placeholder="请选择时间"></el-date-picker>
+                    <span style="margin: 5px;">至</span>
+                    <el-date-picker clear-icon v-model="item.valueTwo" size="small" type="year" value-format="yyyy"
+                      placeholder="请选择时间"></el-date-picker>
+                  </template>
+                  <template v-else>
+                    <el-input size="small" v-model="item.valueOne" placeholder="请输入内容"></el-input>
+                  </template>
+                  <el-button @click.stop="handleSearch(item)" size="small" type="primary" class="margin-left_10"
+                    icon="el-icon-search" circle></el-button>
+                </div>
+                <el-checkbox-group v-model="item.check" @change="onChange">
+                  <div class="source-checkbox">
+                    {{ item.value }}
+                    <el-checkbox v-for="source in item.options" :label="source.name" :key="source.name">
+                      <el-tooltip :content="source.name" placement="top" effect="light">
+                        <span class="source-checkbox-label text" :title="source.name">
+                        {{ ['LG','PT','SS'].includes(item.value) ? typeStatus[item.value][source.name] : source.name }}
+                        </span>
+                      </el-tooltip>
+                      <span class="source-checkbox-count">({{ source.number }})</span>
+                    </el-checkbox>
+                  </div>
+                </el-checkbox-group>
+              </template>
+
+              <div class="patent-query-filter-search-bottom">
+                <el-button type="success" size="small" @click.stop="handleSelectAll(item)">全选</el-button>
+                <el-button type="danger" size="small" @click.stop="handleSelectCancel(item)">取消</el-button>
+                <el-button v-if="item.isShowBtn" type="primary" size="small"
+                  @click.stop="handleLoading(item)">加载更多</el-button>
+              </div>
+            </el-collapse-item>
+          </el-collapse>
+        </template>
+        <template v-else>
+          <div>暂无数据</div>
+        </template>
+      </el-main>
+      <!-- <el-footer style="display: flex;align-items: center;justify-content: end;">
+        <slot name="footerBtn"></slot>
+
+      </el-footer> -->
+    </el-container>
+
+  </div>
+</template>
+
+<script>
+import mixins from './mixins/index'
+export default {
+  mixins: [mixins],
+  props: {
+    field: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+  },
+  components: {
+
+  },
+  data() {
+    return {
+      // 专利IPC/CPC/UPC/LOC的选项
+      special: {
+        MC: [
+          { value: 'IC', label: '部' },
+          { value: 'IC2', label: '大类' },
+          { value: 'IC3', label: '小类' },
+          { value: 'IC4', label: '大组' },
+          { value: 'IC5', label: '小组' },
+        ],
+        CPC: [
+          { value: 'CPC', label: '部' },
+          { value: 'CPC2', label: '大类' },
+          { value: 'CPC3', label: '小类' },
+          { value: 'CPC4', label: '大组' },
+          { value: 'CPC5', label: '小组' },
+        ],
+        UPC: [
+          // { value: '0', label: '分类号' },//老系统有
+          { value: 'UPC', label: '大类' },
+          { value: 'UPC2', label: '小类' },
+        ],
+        LOC: [
+          // { value: '0', label: '分类号' },//老系统有
+          { value: 'LOC', label: '大类' },
+          { value: 'LOC2', label: '小类' },
+        ],
+      },
+      typeStatus: {
+        LG: {//法律状态暂定
+          1: '有效',
+          2: '无效',
+          3: '审中',
+        },
+        PT: {//专利类型
+          1: '发明',
+          8: '发明',
+          2: '实用新型',
+          9: '实用新型',
+          3: '外观',
+        },
+        SS: {//专利状态
+          1: '有效',
+          2: '无效',
+          3: '审中',
+        },
+      },
+    }
+  },
+  watch: {
+
+  },
+  mounted() {
+
+  },
+  methods: {
+    //  专利IPC/CPC/UPC/LOC的选项变化
+    selectChange(val, data) {
+      this.$emit('selectChange', { val: val, data: data })
+    },
+
+    // 点击折叠面板中的搜索
+    handleSearch(row) {
+      if (row.filedKind == 0) {
+        if (row.valueOne && row.valueTwo) {
+          this.$emit('search', row)
+        } else {
+          this.$message.error('请输入完整的搜索范围')
+          return
+        }
+      } else {
+        this.$emit('search', row)
+      }
+
+    },
+
+    // 选中的数据
+    onChange(data, field) {
+      // console.log(data, field);
+      // var obj = {
+      //   fieldId: field.value,
+      //   fieldType: field.fieldType,
+      //   value: [],
+      //   isStatistic: true,
+      // }
+      // let arr = []
+      // arr.push(obj)
+      // this.$emit('customTab', arr)
+      // console.log(obj);
+    },
+    // 全选
+    handleSelectAll(val) {
+      if (val.id) {//自定义字段的全选
+        val.check = val.options.map(item => {
+          return item.id
+        })
+      } else {//专利本身的全选,没有id
+        val.check = val.options.map(item => {
+          return item.name
+        })
+      }
+
+    },
+    // 取消
+    handleSelectCancel(val) {
+      val.check = []
+    },
+    // 加载更多
+    handleLoading(val) {
+      this.$emit('handleLoading', val)
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.customFieldsTab1 {
+  .text {
+    /* 超出10个字隐藏,之所以设置11em是因为省略号占一个位置 */
+    max-width: 11em;
+    overflow: hidden;
+    /* 显示省略符号来代表被修剪的文本。 */
+    text-overflow: ellipsis;
+    /* 文本不换行 */
+    white-space: nowrap;
+  }
+}
+</style>

+ 94 - 0
src/views/report/components/patentList/components/customFields/components/tab2.vue

@@ -0,0 +1,94 @@
+<template>
+  <div>
+    <template v-if="fieldTree.length > 0">
+      <template>
+        <div style="margin-bottom: 10px;">
+          <span style="font-size: 14px;">开启关联模式</span>
+          <el-switch style="display: block" v-model="ifHaveChild" active-color="#13ce66" inactive-color="#ff4949"
+            active-text="描述:主分类包含子分类" inactive-text="" @change="switchChange">
+          </el-switch>
+        </div>
+      </template>
+      <div>
+        <el-collapse v-model="activeNames" @change="handleChange($event, 2)" style="margin: 0px 5px 0px 5px;">
+          <el-collapse-item v-for="item in fieldTree" :title="item.name" :name="item.value + 'a' + item.filedKind"
+            :key="item.value">
+            <div v-if="ifShow">
+              <el-tree @check-change="onChangeTree($event, item)" :ref="item.value" :data="item.options" node-key="id"
+                check-strictly default-expand-all :props="{ children: 'child', label: 'name' }">
+                <span class="custom-tree-node" slot-scope="{ node, data }">
+                  <el-checkbox-group v-model="item.check">
+                    <el-checkbox :label="data.id">{{ data.name }}({{ getCount(item, data.id) }})</el-checkbox>
+                  </el-checkbox-group>
+                </span>
+              </el-tree>
+            </div>
+
+          </el-collapse-item>
+        </el-collapse>
+      </div>
+
+    </template>
+    <template v-else>
+      <div>暂无数据</div>
+    </template>
+  </div>
+</template>
+
+<script>
+import mixins from './mixins'
+export default {
+  mixins: [mixins],
+  props: {
+    fieldTree: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+  },
+  data() {
+    return {
+      ifShow: true,
+      // 是否关联子分类false不关联,true关联
+      ifHaveChild: false,
+    }
+  },
+  watch: {
+    // fieldTree: {
+    //   handler() {
+    //     this.ifShow = false
+    //     this.$nextTick(() => {
+    //       this.ifShow = true
+    //     })
+    //   },
+    //   deep: true
+    // }
+  },
+  mounted() {
+
+  },
+  methods: {
+    switchChange(val) {
+      this.$emit('switchChange', val)
+    },
+
+    // 选中的值
+    onChangeTree(data, field) {//当前节点的数据,当前栏位的数据 
+      // console.log(data, field);
+      // var obj = {
+      //   fieldId: field.value,
+      //   fieldType: field.fieldType,
+      //   value: [],
+      //   isStatistic:true,
+      // }
+      // let arr = []
+      // arr.push(obj)
+      // this.$emit('customTab',arr)
+      // console.log(obj);
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

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

@@ -0,0 +1,597 @@
+<template>
+  <div class="patent-tree-filter">
+    <el-container>
+      <el-header class="basic_header">
+        <el-tabs v-model="activeNameTabs" type="card" style="width:100%">
+          <el-tab-pane v-for="item in menu" :key='item.path' :label="item.label" :name="item.path"></el-tab-pane>
+        </el-tabs>
+      </el-header>
+      <el-main>
+        <component :is="activeNameTabs" v-on="$listeners" :field="field" :activeName.sync="activeName"
+          :fieldTree="fieldTree" @collapseClick="handleCollapse" @search="handleSearch" @handleLoading="handleLoading"
+          @switchChange="switchChange" @selectChange="selectChange">
+          <!-- <div slot="footerBtn">
+            <el-button type="primary" size="small" @click="handleMore">更多过滤项</el-button>
+          </div> -->
+        </component>
+      </el-main>
+      <el-footer>
+        <div style="display: flex;align-items: center;justify-content: end;">
+          <el-button type="primary" size="small" v-if="activeNameTabs == 'queryPage'"
+            @click="handleMore">更多过滤项</el-button>
+          <el-button type="primary" size="small" @click="sure">确认</el-button>
+        </div>
+
+      </el-footer>
+    </el-container>
+
+    <fieldsVue ref="fieldsVue" type="patent" :projectId="projectId" :taskId="taskId" :sign="true"
+      @getFieldList="getFieldList"></fieldsVue>
+  </div>
+</template>
+
+<script>
+import queryPage from './components/tab1.vue'
+import selectPage from './components/tab2.vue'
+import fieldsVue from '@/views/components/dialog/fields.vue'
+export default {
+  props: {
+    projectId: {
+      default: null
+    },
+    taskId: {
+      default: null
+    },
+    // 检索条件
+    searchOption: {
+      default: () => {
+        return ''
+      }
+    },
+    // 自定义栏位检索条件
+    customFields: {
+      default: () => {
+        return []
+      }
+    },
+    // 检索式的数组数据
+    searchPatentCheck: {
+      default: () => {
+        return []
+      }
+    },
+  },
+  components: {
+    queryPage,
+    selectPage,
+    fieldsVue,
+  },
+  data() {
+    return {
+      activeNameTabs: 'queryPage',
+      menu: [
+        {
+          label: '查询筛选',
+          path: 'queryPage'
+        },
+        {
+          label: '分类选择',
+          path: 'selectPage'
+        },
+      ],
+      //存放可以显示的栏位
+      showField:[],
+      // 存放数据非树
+      field: [],
+      // 存放数据树
+      fieldTree: [],
+      // 所有的统计栏位
+      filedAll: [],
+
+      //已打开过的折叠面板
+      activeName: [],
+      //正在打开的折叠面板
+      activeName2: [],
+      // 树不关联模式
+      ifHaveChild: false,
+    }
+  },
+  watch: {
+    searchOption: {
+      handler() {
+        this.refreshOptions()
+      },
+    },
+  },
+  async mounted() {
+    // 获取显示的统计栏位
+    await this.getShowCountColumns()
+    // 获取所有统计栏位的数据
+    this.getAllCountColumns()
+  },
+  methods: {
+    // 条件改变时刷新已打开的折叠面板
+    refreshOptions() {
+      for (let i = 0; i < this.activeName.length; i++) {
+        var row = this.field.find(item => {
+          return item.value + 'a' + item.filedKind == this.activeName[i]
+        })
+        this.getOptions(row)
+      }
+    },
+    // 检索条件取消时统计勾选项一并取消
+    close() {
+      let data = this.searchPatentCheck
+      // return
+      for (let i = 0; i < data.length; i++) {
+
+        if (data[i].filedKind == 0 && data[i].type == 'tree') {
+          
+        } else {
+          let a = this.field.filter(item => {
+            return item.value == data[i].value
+          })
+          if (a) {
+            a[0].check = data[i].check
+          }
+        }
+
+      }
+    },
+    // 树点击不关联模式
+    async switchChange(val) {
+      this.ifHaveChild = val
+      for (let i = 0; i < this.activeName.length; i++) {
+        var row = this.fieldTree.find(item => {
+          return item.value + 'a' + item.filedKind == this.activeName[i]
+        })
+        await this.getOptions(row)
+      }
+    },
+    // ipc、cpc、loc、upc切换选择
+    selectChange({ val: val, data: data }) {
+      this.getOptions(data)
+    },
+    // 点击面板中的搜索
+    handleSearch(row) {
+      this.getOptions(row)
+    },
+    // 点击当前面板
+    async handleCollapse(current, data, type) {
+      this.activeName = [...new Set(this.activeName.concat(data))]
+      if (current && this.activeName2.indexOf(current) == -1) {
+        this.activeName2.push(current)
+        var currentField = this.filedAll
+        if (type == 2) {
+          currentField = this.fieldTree
+        }
+        var row = currentField.find(item => {
+          return item.value + 'a' + item.filedKind == current
+        })
+        // 设置ipc、cpc、loc、upc选择
+        this.getSelect(row)
+        await this.getOptions(row)
+      }
+    },
+    //获取选项
+    async getOptions(row) {
+      if (row) {
+        if (row.filedKind != -1 && (row.type == 'Array' || row.type == 'tree')) {
+          switch (row.filedKind + '') {
+            case '0':
+              await this.queryCustomOption(row)
+              break;
+            case '7':
+              await this.queryProductCategory(row, 2)
+              break;
+            case '8':
+              await this.queryProductCategory(row, 1)
+              break;
+            case '9':
+              await this.queryProductCategory(row, 3)
+              break;
+          }
+        }
+        //查统计todo统计接口
+        this.esCountAnalysis(row)
+      }
+    },
+    esCountAnalysis(row) {
+      var countVOS = []
+      if (row.filedKind == -1) {//专利本身栏位(专利著录)
+        let value = ['MC', 'CPC', 'UPC', 'LOC'].includes(row.value) ? row.select : row.value
+        countVOS = [
+          {
+            field: value,
+            valueOne: row.valueOne,
+            valueTwo: row.valueTwo,
+            topN: row.topN,
+            // fieldType: row.type
+          }
+        ]
+      } else {//
+        countVOS = [
+          {
+            field: 'field',
+            fieldId: row.value,
+            valueOne: row.valueOne,
+            valueTwo: row.valueTwo,
+            
+            topN: 999,//自定义栏位没有加载更多
+            ifHaveChild: row.type == 'tree' ? this.ifHaveChild : false,
+            fieldType: row.type
+          },
+        ]
+      }
+
+      let params = {
+        condition: this.searchOption || '',//检索条件
+        projectId: this.projectId,//项目id
+        taskId: this.taskId,//任务id
+        countVOS: countVOS,//栏位的聚合入参
+        customFields: this.customFields,//自定义栏位查询
+        // valueOne: row.valueOne,//搜索第一个栏位的值
+        // valueTwo: row.valueTwo,//搜索第二个栏位的值
+        // topN: row.topN,//显示条数
+        // ifHaveChild: this.ifHaveChild,//是否开启不关联模式
+      }
+      this.$api.esCountAnalysis(params).then(res => {
+        if (res.code == 200) {
+          var data = []
+          if (row.type != 'tree') {
+            data = this.field
+          } else {
+            data = this.fieldTree
+          }
+          var index = data.findIndex(item => {
+            return item.value == row.value && item.filedKind == row.filedKind
+          })
+          if (index != -1) {//非专利本身搜索字段
+            if (data[index].filedKind != -1 && (data[index].type == 'Array' || data[index].type == 'tree')) {
+              data[index].nums = []
+              for (let i = 0; i < res.data.detailDTOS.length; i++) {
+                if (!isNaN(parseInt(res.data.detailDTOS[i].name))) {
+                  data[index].nums.push(res.data.detailDTOS[i])
+                } else {
+                  data[index].options.push(res.data.detailDTOS[i])
+                }
+              }
+            } else {//专利本身搜索字段
+              let arr = res.data.detailDTOS.filter(item => {
+                return item.name != '其他'
+              })
+              this.$set(data[index], 'options', arr)
+              this.$set(data[index], 'topN', data[index].options[0].topN)
+              if (data[index].options.length == data[index].topN) {//判断加载更多按钮是否存在
+                this.$set(data[index], 'isShowBtn', true)
+              } else {
+                this.$set(data[index], 'isShowBtn', false)
+              }
+            }
+            // this.$set(data[index], 'check', [])
+
+          }
+        }
+      })
+    },
+    // 查询自定义栏位选项数据
+    async queryCustomOption(row) {
+      let params = {
+        customFieldId: row.value,
+      }
+      await this.$api.queryCustomOption(params).then(response => {
+        if (response.code == 200) {
+          var data = []
+          if (row.type != 'tree') {
+            data = this.field
+          } else {
+            data = this.fieldTree
+          }
+          var index = data.findIndex(item => {
+            return item.value == row.value && item.filedKind == row.filedKind
+          })
+          if (index != -1) {
+            this.$set(data[index], 'options', response.data.data)
+            this.$set(data[index], 'check', [])
+          }
+        }
+      }).catch(error => {
+        this.$set(row, 'option', [])
+        this.$set(row, 'check', [])
+      })
+    },
+    //获取产品或产品类别架构以及技术分类
+    async queryProductCategory(item, type) {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+        type: type,//类型:1产品类别,2产品,3技术分类,4自定义树
+        typeId: item.value,//产品或类别id
+      }
+      await this.$api.queryTreeNodeTree(params).then(res => {
+        if (res.code == 200) {
+          if (row.type != 'tree') {
+            var index = this.fieldTree.findIndex(item => {
+              return item.value == row.value && item.filedKind == row.filedKind
+            })
+            if (index != -1) {
+              this.$set(this.fieldTree[index], 'options', response.data.data)
+              this.$set(this.fieldTree[index], 'check', [])
+            }
+          }
+        }
+      }).catch(err => {
+        this.$set(row, 'option', [])
+        this.$set(row, 'check', [])
+      })
+    },
+
+    // 获取所有的统计栏位
+    getAllCountColumns() {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+      }
+      this.$api.getAllCountColumns(params).then(res => {
+        if (res.code == 200) {
+          this.filedAll = []
+          res.data.data.forEach(item => {
+            if (item.filedKind == -1) {
+              item.value = item.field
+            }
+          })
+          var data = res.data.data
+          this.handleFiled(data)
+        }
+      })
+    },
+    // 给数据添加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])
+          continue;
+        }
+        data[i].ifHidden = true
+        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) {
+        //     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;
+          }
+        }
+        //获取非树(不包括数字、文本)
+        if (data[i].filedKind == 0 && (data[i].type == 'String' || data[i].type == 'Integer')) {
+
+        } else {
+          this.filedAll.push(data[i])
+        }
+
+      }
+    },
+
+    // 获取显示的统计栏位
+    async getShowCountColumns() {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+      }
+      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 => {
+          //   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)
+          // })
+          
+        }
+      })
+    },
+    // 设置ipc、cpc、loc、upc选择默认值
+    getSelect(data) {
+      switch (data.value) {
+        case 'MC':
+          this.$set(data, 'select', 'IC')
+          break;
+        case 'CPC':
+          this.$set(data, 'select', 'CPC')
+          break;
+        case 'UPC':
+          this.$set(data, 'select', 'UPC')
+          break;
+        case 'LOC':
+          this.$set(data, 'select', 'LOC')
+          break;
+
+        default:
+          break;
+      }
+    },
+    // 过滤组件传的值
+    getFieldList(val) {
+      this.filedAll = val
+      this.field = this.filedAll.filter(item => {
+        return item.ifHidden == false
+      })
+    },
+
+    // 更多过滤项
+    handleMore() {
+      var data = JSON.parse(JSON.stringify(this.filedAll))
+      this.$refs.fieldsVue.open(data)
+    },
+    //确认检索
+    sure() {
+      let field = JSON.parse(JSON.stringify(this.field))
+      let fieldTree = JSON.parse(JSON.stringify(this.fieldTree))
+      let arr = field.concat(fieldTree)
+      this.$emit('ifHaveChild', this.ifHaveChild)
+      this.$emit('customTab', arr)
+    },
+    // 加载更多
+    handleLoading(val) {
+      val.topN += 10
+      this.getOptions(val)
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.patent-tree-filter {
+  height: 100%;
+
+  .patent-tree-filter-main {
+    height: 100%;
+    padding: 10px 0;
+
+    .no-data {
+      text-align: center;
+      color: #6b6868;
+    }
+  }
+
+  .change-show-type {
+    font-size: 13px;
+
+    .change-show-type-info {
+      color: #6b6868;
+      padding-left: 10px;
+    }
+
+    .el-form-item__label {
+      padding: 0 !important;
+      line-height: 20px;
+    }
+
+    .el-form-item__content {
+      height: 30px;
+      line-height: 30px;
+    }
+  }
+}
+
+.patent-query-filter-search {
+  display: flex;
+}
+
+.patent-query-filter-search-input {
+  margin-right: 5px;
+}
+
+.patent-query-filter-search-bottom {
+  text-align: center;
+  margin-top: 10px;
+}
+
+.year-data-picker {
+  width: 200px;
+  display: flex;
+  justify-content: space-between;
+
+  .el-input__prefix {
+    display: none;
+  }
+
+  .el-input__inner {
+    padding: 10px;
+    text-align: center;
+  }
+}
+
+.year-data-input {
+  width: 100px;
+}
+
+.source-checkbox {
+  margin-top: 10px;
+
+  span {
+    display: inline-block;
+    font-size: 13px;
+  }
+
+  .el-checkbox {
+    display: block;
+  }
+
+  .el-checkbox__label {
+    position: relative;
+    top: 5px;
+  }
+
+  .source-checkbox-count {
+    color: #409EFF;
+    position: relative;
+    top: -4px;
+    left: 10px;
+  }
+
+  .source-checkbox-label {
+    max-width: 190px;
+    padding-left: 5px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+}
+
+.query-read-status {
+  font-size: 12px;
+  height: 25px;
+  line-height: 25px;
+  cursor: pointer;
+  background: #dcdcdc;
+  border-radius: 3px;
+  padding: 0 5px;
+
+  span {
+    display: inline-block;
+  }
+
+  .a {}
+
+  .b {
+    text-align: center;
+    width: 30px;
+  }
+
+  .c {
+    padding-left: 5px;
+  }
+}
+
+.query-read-status_is-active {
+  background: #409EFF !important;
+  color: #ffffff !important;
+}
+</style>

+ 75 - 54
src/views/report/components/patentList/components/index.vue

@@ -13,9 +13,10 @@
                     @click="showRight = !showRight"></i>
                     @click="showRight = !showRight"></i>
                 </el-tooltip>
                 </el-tooltip>
               </div>
               </div>
-              <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
-              </mySearch>
-              <!-- <searchPopover :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></searchPopover> -->
+              <!-- <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+              </mySearch> -->
+              <searchPatent ref="searchPatent" :searchFiled="searchFiled" :searchPatentCheck="searchPatentCheck"
+                @searchValue="handleSearchValue"></searchPatent>
             </div>
             </div>
             <el-button v-if="taskId" type="primary" size="small" @click="handleFieldManage">显示栏位管理</el-button>
             <el-button v-if="taskId" type="primary" size="small" @click="handleFieldManage">显示栏位管理</el-button>
             <div v-else style="display:flex;align-items:center">
             <div v-else style="display:flex;align-items:center">
@@ -47,7 +48,8 @@
           </el-header>
           </el-header>
           <el-main class="height_100">
           <el-main class="height_100">
             <component :is='components' :tableData="tableData" :column="fieldList" :projectId="projectId"
             <component :is='components' :tableData="tableData" :column="fieldList" :projectId="projectId"
-              @on-sort="handleSort" :queryParams="queryParams" @clickPatentNo="handleClick"></component>
+              @on-sort="handleSort" :queryParams="queryParams" @clickPatentNo="handleClick"
+              @ifHaveChild="handleIfHaveChild"></component>
           </el-main>
           </el-main>
           <el-footer class="pagination">
           <el-footer class="pagination">
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
@@ -58,7 +60,8 @@
         </el-container>
         </el-container>
       </div>
       </div>
       <div class="height_100 right" v-show="showRight">
       <div class="height_100 right" v-show="showRight">
-        <customFields :projectId="projectId" :taskId="taskId" @customFields="handleCustomFields"></customFields>
+        <customFields ref="customFields" :projectId="projectId" :taskId="taskId" :searchOption="searchStr" :customFields="customFields"
+          @customTab="handleCustomFields" :searchPatentCheck="searchPatentCheck"></customFields>
       </div>
       </div>
     </div>
     </div>
 
 
@@ -69,8 +72,8 @@
 <script>
 <script>
 import field from '@/views/components/dialog/fields.vue';
 import field from '@/views/components/dialog/fields.vue';
 import PatentTableListView from '@/views/project/patentCollection/components/views/Table.vue'
 import PatentTableListView from '@/views/project/patentCollection/components/views/Table.vue'
-import customFields from './customFields.vue';
-import searchPopover from './searchPopover.vue'
+import customFields from './customFields/index.vue';
+import searchPatent from './searchPatent.vue'
 export default {
 export default {
   props: {
   props: {
     taskId: {
     taskId: {
@@ -96,7 +99,7 @@ export default {
     PatentTableListView,
     PatentTableListView,
     field,
     field,
     customFields,
     customFields,
-    searchPopover,
+    searchPatent,
   },
   },
   data() {
   data() {
     return {
     return {
@@ -107,7 +110,7 @@ export default {
       //检索字段
       //检索字段
       searchFiled: [],
       searchFiled: [],
       //检索条件
       //检索条件
-      searchOption: {},
+      // searchOption: {},
       //专利数据库数据总数
       //专利数据库数据总数
       total: 0,
       total: 0,
       //分页信息
       //分页信息
@@ -123,7 +126,13 @@ export default {
       tableData: [],
       tableData: [],
       // 获取显示自定义栏位
       // 获取显示自定义栏位
       fieldList: [],
       fieldList: [],
-      // 存放自定义栏位的筛选数据
+      // 统计勾选的值(专利著录(专利本身))
+      searchPatentCheck: [],
+      // 分类选择是否关联子类
+      ifHaveChild: false,
+      // 存放专利本身检索条件
+      searchStr: '',
+      // 存放自定义栏位的检索条件
       customFields: [],
       customFields: [],
     }
     }
   },
   },
@@ -134,15 +143,51 @@ export default {
     await this.getColumn()
     await this.getColumn()
   },
   },
   methods: {
   methods: {
+    // 处理后的条件
+    handleSearchValue({ searchStr, customFields }) {
+      this.searchStr = searchStr
+      this.customFields = customFields
+      this.$refs.customFields.close()
+      this.getList()
+    },
+    // 树类型是否包括子分类
+    handleIfHaveChild(val) {
+      this.ifHaveChild = val
+    },
     // 统计组件传的值
     // 统计组件传的值
     handleCustomFields(val) {
     handleCustomFields(val) {
-      this.customFields = val
-      this.getList()
+      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) {
     handleClick(row, location) {
       var search = {
       var search = {
-        searchOption: this.searchOption,
+        searchOption: this.searchStr,
         location: location
         location: location
       }
       }
       this.$s.setSession('search', search)
       this.$s.setSession('search', search)
@@ -186,62 +231,38 @@ export default {
       await this.$api.getQueryFields(params).then(res => {
       await this.$api.getQueryFields(params).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           let conditionDTOList = JSON.parse(JSON.stringify(res.data.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)
           // 搜索字段
           // 搜索字段
-          let searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+          this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
             label: 'name',
             label: 'name',
             value: 'field',
             value: 'field',
             type: 'type',
             type: 'type',
             group: 'group',
             group: 'group',
-            fieldType:'fieldType'
-          })
-          // 处理自定义栏位筛选
-          this.searchFiled = searchFiled.filter(item => {
-            return item.type != 'tree'
+            fieldType: 'fieldType',
+            groupBy: 'groupBy',
           })
           })
         }
         }
       })
       })
     },
     },
 
 
-    // 搜索
-    search(val) {
-      let params = {}
-      val.forEach(item => {
-        console.log(item)
-        if (item.group != 'nos') {
-          this.customFields = []
-          var obj = {
-            fieldId: item.value,
-            fieldType: item.fieldType,
-            value:item.type=='3'?item.searchValue.map(id=>id.value):[item.searchValue.label]
-          }
-          this.customFields.push(obj)
-        } else {
-          if (item.type == 3) {
-            params[item.value] = item.searchValue.map(itemValue => {
-              return itemValue.value
-            })
-          } else {
-            params[item.value] = item.searchValue.label
-          }
-        }
-        
-      })
-      this.searchOption = params
-      // 调用查询接口
-      this.queryParams.current = 1
-      this.getList()
-    },
-    handleCustom(){
-      
-    },
+
     //获取专利列表
     //获取专利列表
     getList() {
     getList() {
       let params = {
       let params = {
         ...this.queryParams,//分页信息
         ...this.queryParams,//分页信息
         projectId: this.projectId,
         projectId: this.projectId,
         taskId: this.taskId,
         taskId: this.taskId,
-        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
-        customFields: this.customFields,
+        searchQuery: this.searchStr || '',//检索条件
+        customFields: this.customFields || [],
         orderDTOList: this.sort,//排序信息
         orderDTOList: this.sort,//排序信息
       }
       }
       this.$api.QueryPatent(params).then(res => {
       this.$api.QueryPatent(params).then(res => {
@@ -312,7 +333,7 @@ export default {
           path: '/allocationTask',
           path: '/allocationTask',
           query: {
           query: {
             projectId: this.projectId,
             projectId: this.projectId,
-            searchOption: JSON.stringify(this.searchOption),//输入框检索条件
+            searchOption: JSON.stringify(this.searchStr),//输入框检索条件
             customFields: JSON.stringify(this.customFields),//右侧勾选自定义栏位的条件
             customFields: JSON.stringify(this.customFields),//右侧勾选自定义栏位的条件
           }
           }
         }
         }

+ 358 - 0
src/views/report/components/patentList/components/searchPatent.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="searchPatent">
+    <div style="display: flex;align-items: center;">
+      <el-cascader :options="options" @change="cascaderChange" :show-all-levels="false" size="small"
+        style="width: 150px;"></el-cascader>
+
+      <div style="margin: 0px 10px 0px 10px;">
+        <el-input v-if="!isControl.select" v-model="inputValue" size="small"
+          :placeholder="isControl.placeholder"></el-input>
+        <el-select v-else v-model="inputValue" placeholder="请选择" size="small">
+          <el-option v-for="item in typeStatus[isControl.selectCheck]" :key="item.value" :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </div>
+      <el-button @click="search" type="primary" size="small">检索</el-button>
+
+      <el-popover placement="bottom" v-if="searchStorageText.length > 0" width="260" trigger="click">
+        <div style="height: 200px;overflow-x: auto;">
+          <div v-for="(item, index) in searchStorageText" :key="item.value">
+            <div style="margin-bottom:10px;background:#F0F9EB;padding: 10px 5px;">
+              <span>{{ item.label }}</span>
+              <span> = </span>
+              <template v-if="Array.isArray(item.inputValue)">
+                <span>(</span>
+                <template v-if="item.filedKind == 0">
+                  <span v-for="(result, i) in item.checkName" :key="result" @click="resultBtn(item, index, i)"
+                    style="cursor: pointer;">{{ result
+                    }}<i class="el-icon-close"></i>
+                    <b v-if="item.checkName.length - 1 > i"> OR </b>
+                  </span></template>
+                <template v-else>
+                  <span v-for="(result, i) in item.inputValue" :key="result" @click="resultBtn(item, index, i)"
+                    style="cursor: pointer;">{{ result
+                    }}<i class="el-icon-close"></i>
+                    <b v-if="item.inputValue.length - 1 > i"> OR </b>
+                  </span>
+                </template>
+                <span>)</span>
+                <!-- <span>({{ item.result.join(' OR ') }})</span> -->
+              </template>
+              <template v-else>
+                <span @click="resultBtn(item, index, 0)" style="cursor: pointer;">({{ item.inputValue }})<i
+                    class="el-icon-close"></i></span>
+              </template>
+            </div>
+          </div>
+        </div>
+
+        <el-button slot="reference" type="primary" size="small" class="margin-left_10">检索式</el-button>
+      </el-popover>
+
+    </div>
+
+
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    // 所有的检索字段(包含自定义字段)
+    searchFiled: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    searchPatentCheck: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+  },
+  data() {
+    return {
+      // 级联面板数据源
+      options: [],
+      // 存储条件
+      searchStorage: [],
+      searchStorageText: [],
+      // 专利检索式
+      searchStr: '',
+      // 自定义栏位检索式
+      searchCustomStr: '',
+      // 专利IPC/CPC/UPC/LOC的选项
+      special: {
+        MC: [
+          { value: 'ipcLevel1', label: 'IPC部' },
+          { value: 'ipcLevel2', label: 'IPC大类' },
+          { value: 'ipcLevel3', label: 'IPC小类' },
+          { value: 'ipcLevel4', label: 'IPC大组' },
+          { value: 'ipcLevel5', label: 'IPC小组' },
+        ],
+        CPC: [
+          { value: 'cpcLevel1', label: 'CPC部' },
+          { value: 'cpcLevel2', label: 'CPC大类' },
+          { value: 'cpcLevel3', label: 'CPC小类' },
+          { value: 'cpcLevel4', label: 'CPC大组' },
+          { value: 'cpcLevel5', label: 'CPC小组' },
+        ],
+        UPC: [
+          // { value: '0', label: '分类号' },//老系统有
+          { value: 'upcLevel1', label: 'UPC大类' },
+          { value: 'upcLevel2', label: 'UPC小类' },
+        ],
+        LOC: [
+          // { value: '0', label: '分类号' },//老系统有
+          { value: 'locLevel1', label: 'LOC大类' },
+          { value: 'locLevel2', label: 'LOC小类' },
+        ],
+      },
+      // 类型及状态
+      typeStatus: {
+        //法律状态暂定
+        LG: [
+          { value: '1', label: '有效' },
+          { value: '2', label: '无效' },
+          { value: '3', label: '审中' },
+        ],
+        //专利类型
+        PT: [
+          { value: '1 OR 8', label: '发明' },
+          { value: '2 OR 9', label: '实用新型' },
+          { value: '3', label: '外观' },
+        ],
+        //专利状态
+        SS: [
+          { value: '1', label: '有效' },
+          { value: '2', label: '无效' },
+          { value: '3', label: '审中' },
+        ],
+      },
+      // 控制检索式弹窗显示
+      dialogVisible: false,
+      // 选择的cascader
+      casString: null,
+      // 输入框的值
+      inputValue: '',
+      // 控制显示提示及select
+      isControl: {
+        placeholder: '请输入检索内容'
+      },
+    }
+  },
+  watch: {
+    searchFiled: {
+      deep: true,
+      handler() {
+        this.getGroup()
+      },
+    },
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 点击检索式中的检索条件
+    resultBtn(item, index, i) {
+      if (Array.isArray(item.inputValue)) {
+        item.inputValue.splice(i, 1)
+        if (this.searchStorageText[index].inputValue.length == 0) {
+          this.searchStorageText.splice(index, 1)
+          let spliceName = ''
+          if (item.dele == 'storage') {
+            spliceName = 'searchStorage'
+          } else {
+            spliceName = 'searchPatentCheck'
+          }
+          this[spliceName].splice(index, 1)
+        }
+        if (item.checkName && item.checkName.length > 0) {//统计自定义字段
+          item.checkName.splice(i, 1)
+        }
+      } else {
+        let spliceName = ''
+        if (item.dele == 'storage') {
+          spliceName = 'searchStorage'
+        } else {
+          spliceName = 'searchPatentCheck'
+        }
+        let a = this[spliceName].findIndex(itemFind => {
+          return itemFind.inputValue == item.inputValue
+        })
+        if (a != -1) {
+          this[spliceName].splice(a, 1)
+        }
+        this.searchStorageText.splice(index, 1)
+        this.searchStr = ''
+      }
+      this.search2()
+    },
+    // cascader变化事件
+    cascaderChange(val) {
+      this.inputValue = ''
+      let a = this.options.find(item => {
+        return item.value == val[0]
+      })
+      this.isControl = a.children.find(item => {
+        return item.value == val[1]
+      })
+      this.isControl.placeholder = '请输入检索内容'
+      if (this.isControl.type == '2') {
+        this.isControl.placeholder = '请输入日期(格式2020 ~ 2023)'
+      }
+      if (val[0] == 'typeStatus') {
+        this.$set(this.isControl, 'select', true)
+        this.$set(this.isControl, 'selectCheck', val[val.length - 1])
+      }
+    },
+    // 存储条件
+    storage() {
+      this.isControl.inputValue = this.inputValue
+      let isControl = JSON.parse(JSON.stringify(this.isControl))
+      this.searchStorage.push(isControl)
+
+    },
+    getSearchOptionData() {
+      var data = []
+      this.searchStorage.forEach(item => {
+        data.push(
+          {
+            label: item.label,
+            value: item.value,
+            inputValue: item.inputValue,
+            type: item.type,
+            group: item.group,
+            dele: 'storage',
+          }
+        )
+      })
+      this.searchPatentCheck.forEach(item => {
+        var type = 1
+        data.push(
+          {
+            label: item.name,
+            value: item.value,
+            inputValue: item.check,
+            checkName: item.checkName,
+            filedKind: item.filedKind,
+            type: item.type,
+            group: item.filedKind == -1 ? 'nos' : 'customField',
+            dele: 'patentCheck',
+          }
+        )
+      })
+      this.searchStorageText = data
+      return data
+    },
+    // 页面检索按钮
+    search() {
+      this.storage()
+      this.search2()
+    },
+    search2() {
+      this.getSearchOptionData()
+      // return
+      this.getSearchStorage()
+    },
+    // 处理检索条件
+    getSearchStorage() {
+      let customFields = []
+      let count = 0
+      this.searchStorageText.forEach((item, index) => {
+        if (item.group == 'nos') {
+          if (count == 0) {
+            count++
+            if (Array.isArray(item.inputValue)) {
+              this.searchStr = `${item.value} = (${item.inputValue.join(' OR ')})`
+            } else {
+              this.searchStr = `${item.value} = (${item.inputValue})`
+            }
+
+          } else {
+            count++
+            if (Array.isArray(item.inputValue)) {
+              this.searchStr += ` AND ${item.value} = (${item.inputValue.join(' OR ')})`
+            } else {
+              this.searchStr += ` AND ${item.value} = (${item.inputValue})`
+            }
+          }
+        } else {
+          let a = {
+            fieldId: item.value,
+            value: (item.filedKind == 0 || item.filedKind) ? item.inputValue : [this.inputValue],
+          }
+          customFields.push(a)
+        }
+      })
+      if (this.searchStorageText==0) {
+        this.searchStr = ''
+      }
+      // console.log(this.searchStr,customFields,this.searchStorage,this.searchPatentCheck,this.searchStorageText);
+      this.$emit('searchValue', { searchStr: this.searchStr, customFields: customFields, })
+    },
+
+
+    getGroup() {
+      let obj = {
+        text: '文本',
+        number: '号码',
+        typeStatus: '类型及状态',
+        classify: '分类',
+        dateType: '日期',
+        company: '公司/人',
+        typeStatus: '类型及状态',
+        address: '地址',
+        nation: '国家/地区',
+        amount: '引用',
+        customField: '自定义字段',
+      }
+      let filedObj = {}
+      let data = this.searchFiled
+      for (let i = 0; i < data.length; i++) {
+        if (data[i].group == 'nos') {//专利本身
+          if (filedObj[data[i].groupBy]) {
+            filedObj[data[i].groupBy].children.push(data[i])
+          } else {
+            filedObj[data[i].groupBy] = {
+              value: data[i].groupBy,
+              label: obj[data[i].groupBy],
+              children: [
+                data[i]
+              ],
+            }
+          }
+          // 给ipc、cpc、upc、loc添加大小类等
+          if (['MC', 'CPC', 'UPC', 'LOC'].includes(data[i].value)) {
+            for (let j = 0; j < filedObj[data[i].groupBy].children.length; j++) {
+              if (!filedObj[data[i].groupBy].children[j].children) {
+                filedObj[data[i].groupBy].children[j].children = this.special[filedObj[data[i].groupBy].children[j].value]
+              }
+            }
+          }
+        } else {//自定义字段
+          if (filedObj[data[i].group]) {
+            filedObj[data[i].group].children.push(data[i])
+          } else {
+            filedObj[data[i].group] = {
+              value: data[i].group,
+              label: obj[data[i].group],
+              children: [data[i]]
+            }
+          }
+        }
+      }
+      this.options = Object.values(filedObj)
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.searchPatent {
+  // width: 550px;
+}
+</style>

+ 0 - 132
src/views/report/components/patentList/components/searchPopover.vue

@@ -1,132 +0,0 @@
-<template>
-  <div>
-    <template v-if="searchOptions.length > 0">
-      <el-popover placement="bottom" title="" width="300" trigger="hover" class="margin-left_10">
-        <div class="main">
-          <div v-for="(item, index) in searchOptions" :key="item.value" class="box">
-            <el-alert type="success" :closable="false">
-              <div class="content">
-                <span class="color-black">{{ item.label }}</span>
-                <b class="padding_0_5">=</b>
-                <span class="color-black">
-                  <span v-if="item.type == 3">
-                    <span class="padding_0_5">(</span>
-                    <span v-for="(data, i) in item.searchValue" :key="data.label">
-                      <span class="query-data-label" @click="handleCancelQueryParams(item, index, i)">{{ data.label }}<i
-                          class="el-icon-close"></i></span>
-                      <b v-if="item.searchValue.length - 1 > i" class="padding_0_5 color-primary">OR</b>
-                    </span>
-                    <span class="padding_0_5">)</span>
-                  </span>
-                  <span v-else>
-                    <span class="query-data-label" @click="handleCancelQueryParams(item, index)">{{ item.searchValue.label
-                    }}<i class="el-icon-close"></i></span>
-                  </span>
-                </span>
-              </div>
-            </el-alert>
-          </div>
-        </div>
-        <el-button slot="reference" size="small" type="primary" style="width:100%">
-          检索条件<i class="el-icon-arrow-down el-icon--right"></i>
-        </el-button>
-      </el-popover>
-    </template>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    searchValue: {
-      default: () => {
-        return {};
-      },
-    },
-    SearchFields: {
-      default: () => {
-        return [];
-      },
-    },
-  },
-  data() {
-    return {
-      searchOptions: [],
-      inner: false,
-    }
-  },
-  watch: {
-    SearchFields() {
-      // if (this.innerChange) {
-      //   return
-      // }
-      // this.getLabel()
-    },
-    searchValue: {
-      deep: true,
-      handler(n, o) {
-        console.log(n, this.searchValue, this.searchOptions);
-        if (!this.inner) {
-          this.getSearchOptions()
-        } else {
-          this.inner = false
-        }
-
-      }
-    }
-  },
-  mounted() {
-    this.getSearchOptions()
-  },
-  methods: {
-    getSearchOptions() {
-      this.searchOptions = []
-      if (Object.keys(this.searchValue).length > 0) {
-        Object.keys(this.searchValue).forEach(key => {
-          if (this.searchValue[key] || (typeof this.searchValue[key] == 'object' && this.searchValue[key].length > 0)) {
-            var field = this.SearchFields.find(item => {
-              return item.value == key
-            })
-            if (!field) {
-              return false
-            }
-            if (typeof this.searchValue[key] == 'object') {
-              this.searchOptions.push(
-                {
-                  ...field,
-                  searchValue: field.options.filter(item => {
-                    return this.searchValue[key].indexOf(item.value) != -1
-                  })
-                }
-              )
-            } else {
-              this.searchOptions.push(
-                {
-                  ...field,
-                  searchValue: {
-                    label: this.searchValue[key]
-                  }
-                }
-              )
-            }
-          }
-        })
-      }
-    },
-    handleCancelQueryParams(data, index, i) {
-      this.inner = true
-      if (data.type == 3) {
-        data.searchValue.splice(i, 1)
-        if (data.searchValue.length == 0) {
-          this.searchOptions.splice(index, 1)
-        }
-      } else {
-        this.searchOptions.splice(index, 1)
-      }
-      this.$emit('search', this.searchOptions)
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 143
src/views/report/components/patentList/components/tab1.vue

@@ -1,143 +0,0 @@
-<template>
-  <div class="height_100">
-    <el-container>
-      <el-main class="" style="overflow-y: auto;">
-        <template>
-          <el-collapse v-model="activeNames" style="margin: 0px 5px 0px 5px;">
-
-            <el-collapse-item v-for="item in field" :title="item.name" :name="item.value" :key="item.value"
-              @click.native.stop="handleChange(item)">
-
-              <div @click.stop="handleStop">
-                <div style="display:flex;margin-bottom: 10px;">
-                  <div v-if="[1].includes(item.type)" class="year-data-picker">
-                    <el-date-picker clear-icon size="small" type="year" value-format="yyyy"
-                      placeholder="请选择时间"></el-date-picker>
-                    <span style="margin: 5px;">至</span>
-                    <el-date-picker clear-icon size="small" type="year" value-format="yyyy"
-                      placeholder="请选择时间"></el-date-picker>
-                  </div>
-                  <template v-if="![4, 5].includes(item.type)">
-                    <el-input size="small" placeholder="请输入查询内容"></el-input>
-                    <el-button @click.stop="handleSearch(item)" size="small" type="primary" class="margin-left_10"
-                      icon="el-icon-search" circle></el-button>
-                  </template>
-                </div>
-                <el-checkbox-group v-model="item.check" @change.stop="onChange($event, item)">
-                  <div class="source-checkbox" v-if="ifShow">
-                    <el-checkbox v-for="source in item.options" :label="source.id" :key="source.id">
-                      <span class="source-checkbox-label" :title="source.name">{{ source.name }}</span>
-                      <span class="source-checkbox-count">({{ getCount(item, source.id) }})</span>
-                    </el-checkbox>
-                  </div>
-                </el-checkbox-group>
-
-                <div class="patent-query-filter-search-bottom">
-                  <el-button type="success" size="small" @click.stop="handleSelectAll(item)">全选</el-button>
-                  <el-button type="danger" size="small" @click.stop="handleSelectCancel(item)">取消</el-button>
-                </div>
-              </div>
-            </el-collapse-item>
-          </el-collapse>
-        </template>
-      </el-main>
-      <el-footer style="display: flex;align-items: center;justify-content: end;">
-        <slot name="footerBtn"></slot>
-
-      </el-footer>
-    </el-container>
-
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    field: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-    checkArr: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-  },
-  components: {
-
-  },
-  data() {
-    return {
-      activeNames: [],
-      ifShow: true,
-    }
-  },
-  watch: {
-    field: {
-      handler() {
-        this.ifShow = false
-        this.$nextTick(() => {
-          this.ifShow = true
-        })
-      },
-      deep: true
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-    handleStop(){},   
-    // 处理专利文件数字
-    getCount(field, value) {
-      var num = 0
-      if (field.nums) {
-        var obj = field.nums.find(item => {
-          return item.name == value
-        })
-        if (obj) {
-          num = obj.number
-        }
-        return num
-      }
-    },
-    // 点击面板
-    handleChange(row) {
-      console.log(row);
-      this.$emit('collapseChange', { row: row, sign: 'check' })
-    },
-    // 点击折叠面板中的搜索
-    handleSearch(val) {
-      this.$emit('search', { row: val })
-    },
-    // 选中的数据
-    onChange(data, field) {
-      console.log(data, field);
-      var obj = {
-        fieldId: field.value,
-        fieldType: field.fieldType,
-        value: [],
-      }
-      let arr = []
-      arr.push(obj)
-      this.$emit('customTab',arr)
-      console.log(obj);
-    },
-    // 全选
-    handleSelectAll(val) {
-      val.check = val.options.map(item => {
-        return item.id
-      })
-    },
-    // 取消
-    handleSelectCancel(val) {
-      val.check=[]
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 97
src/views/report/components/patentList/components/tab2.vue

@@ -1,97 +0,0 @@
-<template>
-  <div>
-    <template v-if="fieldTree.length > 0">
-      <el-collapse v-model="activeNames" style="margin: 0px 5px 0px 5px;">
-        <el-collapse-item v-for="item in fieldTree" :title="item.name" :name="item.value" :key="item.value"
-          @click.native.stop="handleChange(item)">
-          <div v-if="ifShow">
-            <el-tree @check-change="onChangeTree($event, item.value)" :ref="item.value" :data="item.child" show-checkbox
-              node-key="id" check-strictly default-expand-all :props="{ children: 'child', label: 'name' }">
-              <div class="custom-filter-tree-node" slot-scope="{ node, data }">
-                <span class="name">{{ data.name }}</span>
-                <span class="total">({{ getCount(item, data.id) }})</span>
-              </div>
-            </el-tree>
-          </div>
-
-        </el-collapse-item>
-      </el-collapse>
-    </template>
-    <template v-else>
-      <div>暂无数据</div>
-    </template>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    fieldTree: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-  },
-  data() {
-    return {
-      activeNames: [],
-      ifShow:true,
-    }
-  },
-  watch: {
-    fieldTree: {
-      handler() {
-        this.ifShow = false
-        this.$nextTick(() => {
-          this.ifShow = true
-        })
-      },
-      deep: true
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-    // 处理专利文件数字
-    getCount(field, value) {
-      var num = 0
-      if (field.nums) {
-        var obj = field.nums.find(item => {
-          return item.name == value
-        })
-        if (obj) {
-          num = obj.number
-        }
-        return num
-      }
-    },
-    // 点击面板
-    handleChange(row) {
-      this.$emit('collapseChange', { row: row, sign: 'tree' })
-    },
-    // 选中的值
-    onChangeTree(filed, filedId) {//当前节点的数据,当前栏位的数据 
-      if (this.valObj.treeArr && this.valObj.treeArr.length > 0) {
-        let index = this.valObj.treeArr.findIndex(item => {
-          return item == filed.id
-        })
-        if (index != -1) {
-          this.valObj.treeArr.splice(index, 1)
-        } else {
-          this.valObj.treeArr.push(filed.id)
-        }
-      } else {
-        this.valObj.treeArr.push(filed.id)
-      }
-      let obj = {
-        [filedId]: this.valObj.treeArr
-      }
-      this.handleFiledData(obj, filedId)
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped></style>