zhuliu 10 месяцев назад
Родитель
Сommit
a07aeed9a3

+ 4 - 1
src/views/components/import/conditionImport/customSearch.vue

@@ -23,7 +23,7 @@
         </el-aside>
         <el-main>
             <div>
-                <myFormSearch :list="(editData && editData.component == 'customSearch')?editData.data:list" :field="field" :searchValue="true" @search="search"></myFormSearch>
+                <myFormSearch ref="myFormSearch" :list="(editData && editData.component == 'customSearch')?editData.data:list" :field="field" :searchValue="true" @search="search"></myFormSearch>
             </div>
         </el-main>
     </el-container>
@@ -148,6 +148,9 @@ export default {
       }
       
     },
+    search1(){
+      this.$refs.myFormSearch.search2()
+    },
     change(val){
       if(val){
         this.checkList = this.countryList1.filter(item=>item.value!='CN').map(item=>item.value)

+ 17 - 4
src/views/components/import/conditionImport/search.vue

@@ -35,11 +35,11 @@
         <div style="display:flex;align-items:start;height:calc(100% - 60px);overflow-y:auto">
             <div style="width:15%;height:100%"></div>
             <div style="width:70%;height:100%;">
-                <component :is='isComponent' @search="search" :editData="editData" :countryList="countryList" :DBType="DBType" :selected="selected"></component>
+                <component ref="componentsSearch" :is='isComponent' @search="search" :editData="editData" :countryList="countryList" :DBType="DBType" :selected="selected"></component>
             </div>  
             <div style="width:15%;height:100%">
                 <!-- <createNoveltySearch ref="createNoveltySearch" width="15%" :show="true" :position="{right:0,top:'120px'}"></createNoveltySearch> -->
-                <inventionPointDialog type="plus" :projectId="projectId" :btns="[1,2,3]" v-if="noveltySearch" @getProjectId="getProjectId"></inventionPointDialog>
+                <inventionPointDialog type="plus" :projectId="projectId" :DBType="DBType" :btns="[1,2,3]" v-if="noveltySearch" @getProjectId="getProjectId" @searchByInventionPoint="searchByInventionPoint"></inventionPointDialog>
             </div>
         </div>
         
@@ -79,7 +79,8 @@ export default {
                 },
                 loading:false,
                 data:[]
-            }
+            },
+            semanteme:''
         }
     },
     mounted() {
@@ -221,6 +222,14 @@ export default {
         changeComponent(val){
             this.isComponent = val
         },
+        searchByInventionPoint(val){
+            this.semanteme = val
+            if(this.DBType == 'customSearch'){
+                this.$refs.componentsSearch.search1()
+            }else{
+                this.$refs.componentsSearch.search()
+            }
+        },
         async search(val,data){
             if(val == '' && data.component!='patentNoSearch'){
                 this.$message.error('检索信息不能为空')
@@ -251,13 +260,17 @@ export default {
                     noveltySearch:this.noveltySearch,
                     projectId:this.projectId,
                     outside:this.DBType == 'inner'?false:true,
-                    innerProjectId:this.innerProjectId
+                    innerProjectId:this.innerProjectId,
+                    semanteme:this.semanteme
                 }
             })
             data.innerProjectId = this.innerProjectId
             this.$s.setSession('conditionImport',{
                 data:data,
             })
+            if(this.semanteme){
+                this.semanteme = ''
+            }
         },
         openHistory(){
             const router = this.$router.resolve({

+ 11 - 3
src/views/components/import/conditionImport/searchResult.vue

@@ -29,7 +29,7 @@
       </el-header>
       <el-main id="patent-list-container" v-loading="loading">
         <div class="height_100">
-          <component ref="patentViewList" :is="viewSelected" :outside="outside" :retrieveRecordId="retrieveRecordId"  :noveltySearch="noveltySearch" :column="columnList" :tableData="tableData"  @clickPatentNo="handleClick" :canSort="condition.component != 'patentNoSearch'?true:false"
+          <component ref="patentViewList" :is="viewSelected" :semanteme="semanteme" :outside="outside" :retrieveRecordId="retrieveRecordId"  :noveltySearch="noveltySearch" :column="columnList" :tableData="tableData"  @clickPatentNo="handleClick" :canSort="condition.component != 'patentNoSearch'?true:false"
             @select-change="handleSelect" :selected.sync="queryParams.selected" :queryParams="queryParams" :patentNoList.sync="patentNoList" :refresh='true'
             :view-field="patentViewField" @on-sort="handleSort" @addSelect="getChoosePatentNo" :projectId="projectId" :contrastFileList="saveRemarkList" @saveRemark="saveRemark"></component>
         </div>
@@ -125,7 +125,8 @@ export default {
       type:Boolean,
       default:true
     },
-    innerProjectId:{}
+    innerProjectId:{},
+    semanteme:''
   },
   data() {
     return {
@@ -503,6 +504,7 @@ export default {
         size: this.queryParams.size, //每页返回条数(最多 50 条)
         projectId: this.innerProjectId,
         searchQuery: this.condition.searchCondition || '',//检索条件
+        semanteme:this.semanteme
       }
       if(this.queryParams.OrderBy && this.queryParams.OrderByType){
         var orderDTOList = [
@@ -521,6 +523,12 @@ export default {
           this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
           this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
           let records = response.data.data
+          if(params.semanteme){
+            records.forEach(item=>{
+              var score = (item.score * 100 + '').substring(0, 5)
+              item.score =  Number(score)
+            })
+          }
           this.tableData = records
           this.$store.commit("SET_PATENT_RECORDS", records);
           this.loading = false;
@@ -549,7 +557,7 @@ export default {
 
         //专利号检索
         numberQuery:this.condition.NO,
-        redisKey:this.condition.redisKey
+        redisKey:this.condition.redisKey,
       };
       if(!this.queryParams.retrieveRecordId){
         params.projectId = this.projectId

+ 4 - 1
src/views/components/import/conditionImport/searchResultIndex.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <search-Result :searchData="searchData" :noveltySearch="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId" :outside="outside" :innerProjectId="innerProjectId"></search-Result> 
+    <search-Result :searchData="searchData" :semanteme="semanteme" :noveltySearch="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId" :outside="outside" :innerProjectId="innerProjectId"></search-Result> 
   </div>
 </template>
 
@@ -37,6 +37,9 @@ export default {
     innerProjectId(){
       return this.$route.query.innerProjectId
     },
+    semanteme(){
+      return this.$route.query.semanteme
+    },
   },
   methods: {},
   created() {},

+ 9 - 0
src/views/noveltySearch/components/dialog/inventionPoint/inventionPoint.vue

@@ -16,6 +16,7 @@
           </div>
           <div>
             <!-- <el-button  type="text"  size="mini"  :loading="loading" v-if="btns.indexOf(1)!=-1"  @click="submit(1)">关键词</el-button> -->
+            <el-button  type="text"  size="mini"  v-if="DBType == 'inner'"  @click="search()">检索</el-button>
             <el-button  type="text"  size="mini"  :loading="loading" v-if="btns.indexOf(2)!=-1"  @click="submit(2)">相似案件</el-button>
             <el-button  type="text"  size="mini"  :loading="loading" v-if="btns.indexOf(3)!=-1"  @click="submit(3)">保存</el-button>
           </div>
@@ -191,6 +192,10 @@ export default {
     miniStyle:{
       type:String,
       default:''
+    },
+    DBType:{
+      type:String,
+      default:''
     }
   },
   data() {
@@ -412,6 +417,10 @@ export default {
     exportReport(){
       this.$refs.reportTemplateDialog.open(this.projectId)
     },
+    //检索
+    search(){
+      this.$emit('searchByInventionPoint',this.technicalCase.inventionPoint)
+    }
   },
 };
 </script>

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

@@ -55,7 +55,8 @@ export const projectData = {
       default: () => {
         return []
       }
-    }
+    },
+    semanteme:''
   },
 
   data() {

+ 1 - 1
src/views/project/patentCollection/components/views/Abstract.vue

@@ -60,7 +60,7 @@
                       simpleStatus[patent.simpleStatus] }}</el-tag>
                     <el-tag class="margin-left_10" style="cursor: pointer;" type="primary" effect="plain" size="small" @click="openAddRemark(patent)" v-if="noveltySearch && !noveltyIsRemark(patent)">添加查新标注</el-tag>
                     <el-tag class="margin-left_10" style="cursor: pointer;" type="primary" effect="plain" size="small"  v-if="noveltySearch && noveltyIsRemark(patent)" @click="openAddRemark(patent)">已标注</el-tag>
-                    <div v-if="noveltySearch" style="display:inline-block;width:300px;margin-left:20px;height:20px" >
+                    <div v-if="outside || semanteme" style="display:inline-block;width:300px;margin-left:20px;height:20px" >
                       <span v-if="!patent.score" style="font-size:12px;">相关度加载中<i class="el-icon-loading"></i></span>
                       <el-progress v-else style="display:inline-block;width:300px;margin-left:20px;" text-color="#000000" :text-inside="true" :stroke-width="20"  :percentage="patent.score"  :color="customColors" ></el-progress>
                     </div>

+ 1 - 1
src/views/project/patentCollection/components/views/Picture.vue

@@ -28,7 +28,7 @@
           <myTooltip :content="getView(item, 'title')">
             <div class="noWrap" v-html="getView(item, 'title')"></div>
           </myTooltip>
-          <div v-if="noveltySearch">
+          <div v-if="outside || semanteme">
             <span>相关度</span><span v-if="!item.score"><i class="el-icon-loading"></i></span><el-progress v-else style="display:inline-block;width:calc(100% - 50px);margin-left:10px;" :text-inside="true" :stroke-width="20"  :percentage="item.score"  :color="customColors" ></el-progress>
           </div>
         </div>

+ 1 - 1
src/views/project/patentCollection/components/views/Table.vue

@@ -99,7 +99,7 @@
           <div v-else v-html="getView(scope.row, item.value, item.type)"></div>
         </template>
       </el-table-column>
-      <el-table-column v-if="noveltySearch" label="相关度" width="100" fixed="right">
+      <el-table-column v-if="outside || semanteme" label="相关度" width="100" fixed="right">
         <template slot-scope="scope">
           <el-progress v-if="scope.row.score" :text-inside="true" :stroke-width="20"  :percentage="scope.row.score"  :color="customColors"></el-progress>
           <span v-else style="font-size:12px;">相关度加载中<i class="el-icon-loading"></i></span>

+ 56 - 4
src/views/project/patentCollection/index.vue

@@ -21,16 +21,18 @@
 
             <searchPatent ref="searchPatent" :searchFiled="searchFiled" :searchPatentCheck="searchPatentCheck"
               @searchValue="handleSearchValue"></searchPatent>
+            
+            <el-button size="mini" type="primary" class="margin-left_10" @click="semanticRetrieval">语义检索</el-button>
 
             <!-- <mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch> -->
             <el-popover placement="bottom" title="关键词高亮" width="320" trigger="click">
               <patent-keywords-highlight :project-id="projectId" />
-              <el-button slot="reference" size="small" type="primary" class="margin-right_10 margin-left_10">
+              <el-button slot="reference" size="small" type="primary" class="margin-left_10">
                 高亮<i class="el-icon-arrow-down el-icon--right"></i>
               </el-button>
             </el-popover>
 
-            <el-button size="small" type="success" @click="handleAnalyses" style="font-size:16px;padding:0px 9px;font-wight:0"><i class="el-icon-s-data" style="font-size:18px;"></i> 图表分析</el-button>
+            <el-button size="small" type="success" @click="handleAnalyses" class="margin-left_10" style="font-size:16px;padding:0px 9px;font-wight:0"><i class="el-icon-s-data" style="font-size:18px;"></i> 图表分析</el-button>
 
           </div>
           <div style="display:flex;align-items:center;">
@@ -143,7 +145,7 @@
         </el-header>
         <el-main v-loading="loading">
           <div class="height_100">
-            <component ref="patentViewList" :is="viewSelected" @download="handleDownload" @change-read="handleChangeRead"
+            <component ref="patentViewList" :is="viewSelected" :semanteme="semanteme" @download="handleDownload" @change-read="handleChangeRead"
               :projectId="projectId" :patentNoList.sync="patentNoList" @addSelect="getChoosePatentNo"
               @clickPatentNo="handleClick" :column="customList" @index-setting="handleIndexSetting" @on-sort="handleSort"
               :queryParams="queryParams" :tableData="tableData" :refresh='refresh'></component>
@@ -316,6 +318,7 @@ export default {
       searchStr: '',
       // 存放自定义栏位的检索条件
       customFields: [],
+      semanteme:''
     };
   },
   watch: {},
@@ -342,7 +345,48 @@ export default {
     this.getList()
   },
   methods: {
-    
+    //语义检索
+    semanticRetrieval(){
+      var _this = this;
+      const h = _this.$createElement;
+      _this.$msgbox({
+          title: '语义检索',
+          message: h('div', {
+              attrs: {
+                  class: 'el-textarea',
+              },
+          }, [
+              h('textarea', {
+                  attrs: {
+                      class: 'el-textarea__inner',
+                      autocomplete: 'off',
+                      rows: 4,
+                      id:'commentContent'
+                  },
+                  value: _this.semanteme,
+                  on: { change: _this.onCommentInputChange }
+              })
+          ]),
+          showCancelButton: true,
+          confirmButtonText: '检索',
+          cancelButtonText: '取消',
+          beforeClose: (action, instance, done) => {
+              if (action === 'confirm') {
+                  instance.confirmButtonLoading = true;
+                  _this.getList()
+                  done();
+                  instance.confirmButtonLoading = false;
+              } else {
+                  done();
+              }
+          }
+        }).then(action => {
+           
+        });
+    },
+    onCommentInputChange() {
+      this.semanteme = document.getElementById("commentContent").value;
+    },
     // 处理后的条件
     handleSearchValue({ searchStr, customFields }) {
       this.searchStr = searchStr
@@ -524,6 +568,7 @@ export default {
         searchQuery: this.searchStr || '',//检索条件
         customFields: this.customFields,
         orderDTOList: this.sort,//排序信息
+        semanteme:this.semanteme
       }
       this.loading = true
       this.$commonJS.scrollToTop()
@@ -531,7 +576,14 @@ export default {
       this.$store.commit("SET_PATENT_RECORDS", []);
       this.$api.QueryPatent(params).then(res => {
         if (res.code == 200) {
+          if(params.semanteme){
+            res.data.data.forEach(item=>{
+              var score = (item.score * 100 + '').substring(0, 5)
+              item.score =  Number(score)
+            })
+          }
           this.tableData = res.data.data
+          
           this.total = res.data.total