Kaynağa Gözat

接口检索专利的专利详情

zhuliu 1 yıl önce
ebeveyn
işleme
05c9737ca7

+ 1 - 0
src/assets/css/main.scss

@@ -161,6 +161,7 @@
   width: 100%;
   .el-checkbox__label{
     width: 100%;
+    text-align: left;
   }
 }
 .noWord{

+ 7 - 74
src/router/index.js

@@ -358,18 +358,6 @@ const routes = [
             },
             component: () => import('@/views/report/InvalidResponse/components/ManualImport/index.vue'),
           },
-
-          //     //添加无效证据和理由
-          //     {
-          //       path:'/invalidIdexRouter',
-          //       name:'invalidIdexRouter',
-          //       meta:{
-          //         title:'无效证据和理由',
-          //         aside:true,
-          //         showHeader:true,
-          //       },
-          //       component:() => import('@/views/report/InvalidResponse/components/invalidIdexRouter.vue'),
-          //     },
           //导入证据文献
           {
             path: '/evidence',
@@ -381,68 +369,6 @@ const routes = [
             },
             component: () => import('@/views/report/InvalidResponse/components/Evidence/index.vue'),
           },
-          //     //对比任务
-          //     {
-          //       path: '/SelectedPatent',
-          //       name:"SelectedPatent",
-          //       meta:{
-          //         aside:true
-          //       },
-          //       component:() => import('@/views/report/reportDetails/components/SelectedPatent.vue'),
-          //     },
-          //     // 任务分配
-          //     {
-          //       path: '/AssignTasks',
-          //       name:"/AssignTasks",
-          //       meta:{
-          //         aside:true
-          //       },
-          //       component:() => import('@/views/report/Invalid/InvalidPage/AssignTasks.vue'),
-          //     },
-          //     //添加对比文件
-          //     {
-          //       path:'/addPatentList',
-          //       name:'/addPatentList',
-          //       meta:{
-          //         title:'添加对比文件',
-          //         aside:true,
-          //         showHeader:true,
-          //         // hiddenHeader:true
-          //       },
-          //       component:() => import('@/views/report/components/addPatentList'),
-          //     },
-          //     //查看单个专利详情
-          //     {
-          //       path:'/patentDetails',
-          //       name:"patentDetails",
-          //       meta:{
-          //         aside:true
-          //       },
-          //       component:() => import('@/views/components/common/PatentDetails')
-          //     },
-          //     //无效应对证据文献详情
-          //     {
-          //       path:'/checkFileDetails/:key',
-          //       name:'checkFileDetails/:key',
-          //       meta:{
-          //         title:'证据文献详情',
-          //         aside:true,
-          //         showHeader:true,
-          //       },
-          //       component:() => import('@/views/report/InvalidResponse/components/FileDetails/index.vue'),
-          //     },
-          //     //报告任务清单
-          //     {
-          //       path:'/rTaskList',
-          //       name:'rTaskList',
-          //       meta:{
-          //         title:'任务',
-          //         aside:true,
-          //         showHeader:true,
-          //       },
-          //       component: () => import('@/views/report/task/index.vue'),
-          //     },
-          //     // },
         ],
       },
       //任务模块
@@ -613,6 +539,13 @@ const router = new VueRouter({
 })
 
 router.beforeEach((to, from, next) => {
+  if(to.path == '/login'){
+    Cookies.remove("token")
+    localStorage.removeItem('vuex')
+  }
+  if(from.path.indexOf('/patentDetails/')!=-1 && to.path.indexOf('/patentDetails/')==-1){
+    sessionStorage.setItem('search', JSON.stringify({}))
+  }
   if (to.path === '/login' || to.path === '/' || to.path == '/agreeConceal') {
     if (to.meta.title) {
       document.title = to.meta.title;

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

@@ -335,7 +335,7 @@ export default {
                         a = true
                         if(index == 0){
                             if(item.value.length == 1){
-                                str = str +''+ item.field + item.operator  + item.value[0]
+                                str = str +''+ item.field + item.operator  + '(' + item.value[0] + ')'
                             }else{
                                 str = str +''+ item.field + item.operator +'(' + item.value.join(' OR ')+')'
                             }

+ 1 - 1
src/views/components/import/conditionImport/FormSearch.vue

@@ -222,7 +222,7 @@ export default {
                             if(this.form[keys[i]].length>1){
                                 str1 = str1 + keys[i] + '=(' + this.form[keys[i]].join(" OR ") +')'
                             }else{
-                                str1 = str1 + keys[i] + '=' + this.form[keys[i]][0]
+                                str1 = str1 + keys[i] + '=(' + this.form[keys[i]][0] +')'
                             }
                             
                         }

+ 8 - 7
src/views/components/import/conditionImport/searchResult.vue

@@ -29,7 +29,7 @@
       <el-main id="patent-list-container" v-loading="loading">
         <div class="height_100">
           <component ref="patentViewList" :is="viewSelected" :outside="true" :column="columnList" :tableData="tableData"  @clickPatentNo="handleClick"
-            @select-change="handleSelect" :selected.sync="queryParams.selected" :patentNoList.sync="patentNoList"
+            @select-change="handleSelect" :selected.sync="queryParams.selected" :patentNoList.sync="patentNoList" :refresh='true'
             :view-field="patentViewField" @on-sort="handleSort" @addSelect="getChoosePatentNo"></component>
         </div>
       </el-main>
@@ -165,9 +165,6 @@ export default {
   watch: {},
   computed: {
     ...mapGetters(['userinfo']),
-    records() {
-      return this.$store.state.patent.records;
-    },
   },
   created() { },
   async mounted() {
@@ -192,8 +189,12 @@ export default {
       this.$refs.addAndEditSearchRecords.open(form)
     },
     handleClick(row, location) {
+      var params = {
+        ...this.searchData,
+        ...this.queryParams,
+      }
       var search = {
-        searchOption: this.searchOption,
+        searchOption: params,
         location: location,
       }
       this.$s.setSession('search', search)
@@ -373,8 +374,8 @@ export default {
     handleSelectNumber(type) {
       switch (type) {
         case 0: //本页选择
-          this.patentNoList = [...new Set(this.patentNoList.concat(this.$store.state.patent.records.map((item) => item.applicationNo))),];
-          this.queryParams.isAdd = [...new Set(this.queryParams.isAdd.concat(this.$store.state.patent.records.map((item) => item.applicationNo))),];
+          this.patentNoList = [...new Set(this.patentNoList.concat(this.tableData.map((item) => item.patentNo))),];
+          this.queryParams.isAdd = [...new Set(this.queryParams.isAdd.concat(this.tableData.map((item) => item.patentNo))),];
           break;
         case 1: //全部选择
           this.startNumber = 1;

+ 91 - 6
src/views/project/patentDetails/components/menu.vue

@@ -41,7 +41,7 @@
             <PatentLeft :patentList="patentList" :reportType="reportType" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft"></PatentLeft>
           </el-main>
           <el-footer style="text-align: center;" v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">
-            <el-pagination background layout=" prev, pager, next" :current-page.sync="queryParams.current"
+            <el-pagination background layout=" prev, pager, next" :current-page.sync="queryParams.current" :pager-count="5"
               :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
             </el-pagination>
           </el-footer>
@@ -158,6 +158,12 @@ export default {
     value:{
       default:false
     },
+    outside:{
+      default:false
+    },
+    fromPath:{
+      default:''
+    }
   },
   data() {
     return {
@@ -176,15 +182,79 @@ export default {
   },
   watch: {
     isContract(){
-      this.getPatentList()
+      this.getData()
     }
   },
   computed: {},
   created() {},
   mounted() {
-    this.getPatentList()
+    this.getData()
   },
   methods: {
+    getData(){
+      if(this.outside){
+        this.getPatentSelect()
+      }else{
+        this.getPatentList() 
+      }
+    },
+    async getPatentSelect(){
+      this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
+      var prevParams={
+        current:(this.queryParams.current-1) * this.queryParams.size,
+        size:1
+      },
+      params={
+        current:this.queryParams.current,
+        size:this.queryParams.size
+      },
+      nextParams={
+        current:(this.queryParams.current * this.queryParams.size)+1,
+        size:1
+      }
+      this.loading = true
+      const [data1,data2,data3] = await Promise.allSettled([this.getList(prevParams),this.getList(params),this.getList(nextParams)])
+      this.patentList = []
+      var prevData = data1.status =='fulfilled'?data1.value:{}
+      var data = data2.status =='fulfilled'?data2.value:[]
+      var nextData = data3.status =='fulfilled'?data3.value:{}
+      if(Object.keys(prevData).length>0){
+        this.patentList.push(prevData.data[0])
+      }
+      if(Object.keys(data).length>0){
+        this.patentList.push(...data.data)
+        this.total = data.total>(200 * this.queryParams.size)?(200 * this.queryParams.size):data.total
+      }
+      if(Object.keys(nextData).length>0){
+        this.patentList.push(nextData.data[0])
+      }
+      var index = this.patentList.findIndex(item=>{
+            return item.patentNo == this.patentNo
+          })
+          if(index!=-1){
+            this.index = index
+          }
+      this.loading = false
+    },
+    //查询专利
+    getList(queryParams) {
+      if( queryParams.current == 0 && this.isContract){
+        return {}
+      }
+      if(queryParams.size == 1 && !this.isContract){
+        return {}
+      }
+      var params = {
+        CurrentQuery: this.searchOption.searchCondition, //检索式
+        DBType: this.searchOption.DBType, //”CN”或”WD”,表示检索中文库或世界库
+        PageNum: queryParams.current, //页码(最多 200 页)
+        RowCount: queryParams.size, //每页返回条数(最多 50 条)
+        OrderBy: this.searchOption.OrderBy, //排序字段:“AD”,“PD”,“GD”, “ID”(检索引擎自生成字段,排序顺序固定)
+        OrderByType: this.searchOption.OrderByType, //排序方式:“ASC”,“DESC” 即正序倒序
+        retrieveRecordId: this.searchOption.retrieveRecordId
+      };
+      return this.$api.patentSelect(params).then(response=> response.data)
+    },
     getPatentLeft(patentNo,index,sign){
       
       if(sign){
@@ -198,6 +268,7 @@ export default {
     updatePatentNo(patentNo,sign){
       var search = {
         searchOption:this.searchOption,
+        fromPath:this.fromPath,
         location:this.currentLocation
       }
       this.$s.setSession('search',search)
@@ -270,7 +341,7 @@ export default {
     //分页
     handleCurrentChange(val){
         this.queryParams.current = val
-        this.getPatentList()
+        this.getData()
     },
     other(event){
       this.$emit('event',event)
@@ -279,6 +350,13 @@ export default {
     prev(){
       this.index -=1
       this.currentLocation -=1
+      if(this.outside){
+        this.updatePatentNo(this.patentList[this.index].patentNo)
+        if(this.index==-1 &&  this.currentLocation>0){
+          this.getData()
+        }
+        return 
+      }
       var reportType = [1,2,7]
       var index = reportType.findIndex(item=>{
         return item == this.reportType
@@ -289,13 +367,20 @@ export default {
       }
       this.updatePatentNo(this.patentList[this.index].patentNo)
       if(this.index <= 2 && this.currentLocation>2){
-        this.getPatentList()
+        this.getData()
       }
     },
     //下一篇
     next(){
       this.index +=1
       this.currentLocation +=1
+      if(this.outside){
+        this.updatePatentNo(this.patentList[this.index].patentNo)
+        if(this.index==10 &&  this.currentLocation<this.total){
+          this.getData()
+        }
+        return
+      }
       var reportType = [1,2,7]
       var index = reportType.findIndex(item=>{
         return item == this.reportType
@@ -306,7 +391,7 @@ export default {
       }
       this.updatePatentNo(this.patentList[this.index].patentNo)
       if(this.index >= 7  &&  this.currentLocation<this.total-2){
-        this.getPatentList()
+        this.getData()
       }
     }
   },

+ 7 - 2
src/views/project/patentDetails/components/patentDetails.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="height_100">
-    <el-container>
+    <el-container v-loading="loading">
       <el-header style="min-height: 100px !important;height: auto;">
         <div style="width:100%">
           <div style="display: flex;justify-content: space-between;align-items: center;height:50px">
@@ -68,7 +68,7 @@
                 </el-popover>
               </span>
             </el-link>
-            <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :key="item.value"
+            <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :key="item.value" v-if="!outside"
               @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
             <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top">
               <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
@@ -173,6 +173,7 @@ export default {
   },
   data() {
     return {
+      loading:false,
       radio: 1,
       positionList: [
         {
@@ -322,10 +323,14 @@ export default {
       if(this.outside){
         api = 'queryExternalDetail'
       }
+      this.loading=true
       this.$api[api](params).then(response => {
         if (response.code == 200) {
           this.patent = response.data
+          this.loading = false
         }
+      }).catch(error=>{
+        this.loading = false
       })
     },
     // 创建报告:无效分析等点击事件

+ 12 - 8
src/views/project/patentDetails/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="height_100 article" :style="{ 'flex-direction': isRight ? 'row-reverse' : 'row' }">
-    <articleMenu @event="event" :value="showView" :reportType="reportType" :menu="menuList" :isRight="isRight"
-      :projectId="projectId" :taskId="taskId" :searchOption="search.searchOption" :patentNo="patentNo"
+    <articleMenu @event="event" :value="showView" :reportType="reportType" :menu="menuList" :isRight="isRight" :outside="outside"
+      :projectId="projectId" :taskId="taskId" :searchOption="search.searchOption" :patentNo="patentNo" :fromPath="search.fromPath"
       :location="search.location" @getPatentLeft="getPatentLeft" :handlerType="handlerType"></articleMenu>
     <div class="height_100 content">
       <my-View :showView="showView">
@@ -42,7 +42,6 @@ export default {
       showView: false,
       isRight: false,
       patentNo: this.$route.params.patentNo,
-      routeCount: this.$s.getSession('routeCount') || 1,
       components: 'PatentDetails',
       menuList: [],
       evidenceData: {}
@@ -87,6 +86,10 @@ export default {
   },
   created() { },
   mounted() {
+    if(this.search && !this.search.fromPath){
+      this.search.fromPath = window.history.length
+      this.$s.setSession('search',this.search)
+    }
     if (this.evidence) {
       this.evidenceData = JSON.parse(this.evidence)
     } else {
@@ -166,9 +169,12 @@ export default {
     },
     //返回
     goBack() {
-      var a = Number(this.routeCount)
-      window.history.go(-a)
-      this.$s.setSession('routeCount', 1)
+      if(this.search.fromPath){
+        var now = window.history.length
+        var history= this.search.fromPath
+        var len = Number(now) - Number(history) + 1
+        window.history.go(-len)
+      }
     },
     //协同
     coordination() {
@@ -185,8 +191,6 @@ export default {
       } else {
         this.patentNo = val
       }
-      this.routeCount = Number(this.routeCount) + 1
-      this.$s.setSession('routeCount', this.routeCount)
       this.$router.push(
         {
           path: '/patentDetails/' + this.patentNo,