zhuliu 11 tháng trước cách đây
mục cha
commit
deb6db0065

+ 5 - 5
src/api/newApi/patent.js

@@ -13,11 +13,11 @@ export default {
    * @returns 
    */
   QueryPatent(data) {
-    if(!data.projectId && !data.productId){
-      confirm('无效访问')
-      window.history.go(-1)
-      return
-    }
+    // if(!data.projectId && !data.productId){
+    //   confirm('无效访问')
+    //   window.history.go(-1)
+    //   return
+    // }
     return axios.post("/xiaoshi/patent/queryPatent", data);
   },
   /**

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

@@ -1,6 +1,6 @@
 <template>
   <div style="background:white">
-    <search :importData="importData" :editData="editData" :noveltySearch='noveltySearch' :projectId="projectId" :isEdit="isEdit"></search>
+    <search :importData="importData" :editData="editData" :noveltySearch='noveltySearch' :projectId="projectId" :isEdit="isEdit" :innerProjectId1="innerProjectId"></search>
   </div>
 </template>
 
@@ -35,6 +35,9 @@ export default {
     },
     projectId(){
       return this.$route.query.projectId
+    },
+    innerProjectId(){
+      return this.$route.query.innerProjectId
     }
   },
   created() {

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

@@ -6,6 +6,19 @@
                     <el-radio-group v-model="DBType">
                         <el-radio label="CN">中国专利检索</el-radio>
                         <el-radio label="WD">世界专利检索</el-radio>
+                        <el-radio label="inner">
+                            <span v-if="DBType != 'inner'">内部专利检索</span>
+                            <el-select v-else v-model.number="innerProjectId" @change="changeProjectId" filterable remote clearable placeholder="默认全部内部数据检索" v-SelectLazyLoading="lazyLoading" :remote-method="remoteMethod">
+                               
+                                <el-option
+                                    v-for="item in projectQuery.data"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="parseInt(item.id)"
+                                >
+                                </el-option>
+                            </el-select>
+                        </el-radio>
                     </el-radio-group>
                 </div>
                 <div>
@@ -51,13 +64,22 @@ export default {
         createNoveltySearch
     },
     mixins:[mixins],
-    props:['importData','editData','noveltySearch','projectId','isEdit'],
+    props:['importData','editData','noveltySearch','projectId','isEdit','innerProjectId1'],
     data() {
         return {
             isComponent:'customSearch',
             countryList:[],
             DBType:"CN",
-            selected:['US','DE','JP','GB','FR','KR','RU','CH','EP','WO']
+            selected:['US','DE','JP','GB','FR','KR','RU','CH','EP','WO'],
+            innerProjectId:this.innerProjectId1 || null,
+            projectQuery:{
+                queryParams:{
+                    current:1,
+                    size:10
+                },
+                loading:false,
+                data:[]
+            }
         }
     },
     mounted() {
@@ -68,10 +90,75 @@ export default {
             if(this.editData.DBType){
                 this.DBType = this.editData.DBType
             }
+            if(this.editData.innerProjectId){
+                this.innerProjectId = Number(this.editData.innerProjectId)
+            }
         }
         this.getCountry()
     },
+    watch:{
+        DBType(val){
+            if(val == 'inner' && this.projectQuery.data.length == 0){
+                if(this.innerProjectId){
+                    this.projectQuery.id = this.innerProjectId
+                }
+                this.remoteMethod('')
+            }
+        }
+    },
     methods: {
+        changeProjectId(val){
+            if(val==''){
+                this.remoteMethod('')
+            }
+        },
+        //懒加载事件
+        lazyLoading(){
+            var obj = this.projectQuery
+            if(obj.queryParams.current * obj.queryParams.size>=obj.queryParams.total){
+                return false
+            }
+            obj.queryParams.current += 1
+            this.getProject()
+        },
+        //远程搜索
+        remoteMethod(query){
+            var obj = this.projectQuery
+            obj.data=[]
+            obj.queryParams.current = 1
+            obj.name = query
+            this.getProject()
+        },
+        //获取专题库数据
+    async getProject(){
+      var obj = this.projectQuery
+      obj.loading = true;
+      var str = ''
+      if(obj.name){
+        str+=`name=${obj.name}`
+      }
+      if(obj.id){
+         str+=`id=${obj.id}`
+      }
+      let params = {
+        ...obj.queryParams,//分页信息
+        searchQuery:str,//检索条件
+        orderDTOList: [
+          {
+            orderBy: "createTime",
+            orderType: 1
+          },
+        ]//排序
+      }
+      await this.$api.queryPatentProject(params).then(response => {
+        if(response.code == 200){
+          obj.loading = false;
+          obj.data.push(...response.data.data)
+          obj.id = null
+          obj.queryParams.total = response.data.total
+        }
+      })
+    },
         //获取国家
         getCountry(){
             var important = ['CN','US','DE','JP','GB','FR','KR','RU','CH','EP','WO']
@@ -157,9 +244,12 @@ export default {
                 query: {
                     data:JSON.stringify(a),
                     noveltySearch:this.noveltySearch,
-                    projectId:this.projectId
+                    projectId:this.projectId,
+                    outside:this.DBType == 'inner'?false:true,
+                    innerProjectId:this.innerProjectId
                 }
             })
+            data.innerProjectId = this.innerProjectId
             this.$s.setSession('conditionImport',{
                 data:data,
             })
@@ -192,11 +282,15 @@ export default {
         },
         //获取项目id
         getProjectId(projectId){
+            var data = this.importData
+            data.importToId=projectId
+            data.importToType=3
+            data.type=4
             this.$router.replace(
                 {
                     path:'/conditionImport',
                     query:{
-                        'importData':JSON.stringify(this.importData),
+                        'importData':JSON.stringify(data),
                         'isEdit':this.isEdit,
                         'noveltySearch':this.noveltySearch,
                         'projectId':projectId

+ 55 - 1
src/views/components/import/conditionImport/searchResult.vue

@@ -124,7 +124,8 @@ export default {
     outside:{
       type:Boolean,
       default:true
-    }
+    },
+    innerProjectId:{}
   },
   data() {
     return {
@@ -245,6 +246,21 @@ export default {
         searchOption: params,
         location: location,
       }
+      if(!this.outside){
+        search.searchOption = {
+          searchQuery: this.condition.searchCondition || '',
+          moreConditions:true
+        }
+        if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+          var orderDTOList = [
+            {
+              orderBy:this.queryParams.OrderBy,
+              orderType:this.queryParams.OrderByType == 'DESC'?1:0
+            }
+          ]
+          search.searchOption.orderDTOList = orderDTOList
+        }
+      }
       this.$s.setSession('search', search)
       this.$s.setSession('import',this.searchData)
       this.$router.push(
@@ -254,6 +270,7 @@ export default {
             outside:this.outside,
             noveltySearch:this.noveltySearch,
             projectId:this.projectId,
+            innerProjectId:this.innerProjectId || 0,
             retrieveRecordId:this.queryParams.retrieveRecordId
           }
         }
@@ -421,8 +438,45 @@ export default {
         this.queryParams.endNumber = this.total
       }
     },
+    //查询内部数据库数据
+    async getInnerProjectPatent(){
+      let params = {
+        current: this.queryParams.current, //页码(最多 200 页)
+        size: this.queryParams.size, //每页返回条数(最多 50 条)
+        projectId: this.innerProjectId,
+        searchQuery: this.condition.searchCondition || '',//检索条件
+      }
+      if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+        var orderDTOList = [
+          {
+            orderBy:this.queryParams.OrderBy,
+            orderType:this.queryParams.OrderByType == 'DESC'?1:0
+          }
+        ]
+        params.orderDTOList = orderDTOList
+      }
+      this.loading = true;
+      this.$store.commit("SET_PATENT_RECORDS", []);
+      await this.$api.QueryPatent(params).then((response) => {
+        if (response.code == 200) {
+          this.total = response.data.total;
+          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
+          this.tableData = records
+          this.$store.commit("SET_PATENT_RECORDS", records);
+          this.loading = false;
+        }
+      }).catch((error) => {
+          this.loading = false;
+        });
+    },
     //查询专利
     async getList() {
+      if(!this.outside){
+        await this.getInnerProjectPatent()
+        return
+      }
       let queryParams = JSON.parse(JSON.stringify(this.queryParams));
       var params = {
         // CurrentQuery: this.searchData.searchCondition, //检索式

+ 5 - 2
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"></search-Result> 
+    <search-Result :searchData="searchData" :noveltySearch="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId" :outside="outside" :innerProjectId="innerProjectId"></search-Result> 
   </div>
 </template>
 
@@ -32,7 +32,10 @@ export default {
       return this.$route.query.retrieveRecordId
     },
     outside(){
-      return this.$route.query.outside
+      return this.$route.query.outside=='false'?false:true
+    },
+    innerProjectId(){
+      return this.$route.query.innerProjectId
     },
   },
   methods: {},

+ 17 - 0
src/views/noveltySearch/components/noveltySearchCard.vue

@@ -27,6 +27,7 @@
                         </div>
                        
                        <div>
+                        <el-button type="primary" size="mini" @click="handleCommand('createAndCopy',item)">新建并复用</el-button>
                         <el-button type="primary" size="mini" @click="handleItem(item)">详情</el-button>
                         <el-button type="primary" size="mini" @click="handleCommand('search',item)">检索</el-button>
                         <el-button type="primary" size="mini" @click="handleCommand('exportReport',item)">生成报告</el-button>
@@ -187,7 +188,23 @@ import createNoveltySearch from './dialog/createNoveltySearch.vue';
                   break;
               case 'e'://编辑
                   break;
+              case 'createAndCopy'://新建并复用
+                  this.createAndCopy(row)
+                  break;
+          }
+      },
+      //新建并复用
+      createAndCopy(row){
+        const route = this.$router.resolve(
+          {
+            path:'/reuseResults',
+            query:{
+              toProjectId:null,
+              projectId:row.projectId
+            }
           }
+        )
+        window.open(route.href,'_blank')
       },
       //删除查新检索项目
       delProject(row){

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

@@ -132,6 +132,7 @@
                   </el-dropdown>
                 </el-dropdown-item>
                 <!-- <el-dropdown-item @click.native="handleAnalyses">图表分析</el-dropdown-item> -->
+                <el-dropdown-item @click.native="toNoveltySearch">查新检索</el-dropdown-item>
                 <el-dropdown-item @click.native="handleAllocation">任务分配</el-dropdown-item>
                 <el-dropdown-item @click.native="taskList">任务清单</el-dropdown-item>
                 <el-dropdown-item @click.native="importAndExportHistory">导入导出历史</el-dropdown-item>
@@ -813,6 +814,17 @@ export default {
       })
       window.open(router.href, '_blank');
     },
+    //去查新检索
+    toNoveltySearch(){
+      const router = this.$router.resolve({
+        path: '/conditionImport',
+        query:{
+          noveltySearch:true,
+          innerProjectId:this.projectId
+        }
+      })
+      window.open(router.href, '_blank');
+    },
     // 跳转分配任务页面
     async handleAllocation() {
       if(!(await this.$permission.projectPermission(this.projectId))){

+ 3 - 2
src/views/project/patentDetails/components/menu.vue

@@ -166,6 +166,7 @@ export default {
     outside:{
       default:false
     },
+    innerProjectId:{},
     fromPath:{
       default:''
     },
@@ -309,7 +310,7 @@ export default {
       this.$emit('getPatentLeft',patentNo)
     },
     getPatentList(){
-      if(this.noveltySearch){
+      if(this.noveltySearch && !(this.innerProjectId == 0 || this.innerProjectId)){
         var param = {
           projectId:this.projectId
         }
@@ -364,7 +365,7 @@ export default {
       var params = {}
       var params1 = {
         ...this.queryParams,//分页信息
-        projectId: this.projectId,
+        projectId: (this.innerProjectId && this.innerProjectId==0) ? (this.innerProjectId == 0?null:this.innerProjectId) : this.projectId,
         productId:this.productId,
         from:this.productId?'product':null,
         taskId:this.taskId,

+ 5 - 2
src/views/project/patentDetails/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="height_100 article" :style="{ 'flex-direction': isRight ? 'row-reverse' : 'row' }">
-    <articleMenu @event="event" :value="showView" :reportType="reportType" :menu="menuList" :isRight="isRight" :outside="outside" :noveltySearch='noveltySearch'
+    <articleMenu @event="event" :value="showView" :reportType="reportType" :innerProjectId="innerProjectId" :menu="menuList" :isRight="isRight" :outside="outside" :noveltySearch='noveltySearch'
       :projectId="projectId" :productId="productId" :taskId="taskId" :searchOption="search.searchOption" :patentNo="patentNo" :fromPath="search.fromPath"
       :location="search.location" @getPatentLeft="getPatentLeft" :handlerType="handlerType" :projectType="projectType"></articleMenu>
     <div class="height_100 content">
@@ -87,7 +87,10 @@ export default {
       return this.$route.query.signPatentNo
     },
     outside() {
-      return this.$route.query.outside
+      return this.$route.query.outside=="true"?true:false
+    },
+    innerProjectId() {
+      return this.$route.query.innerProjectId
     },
     projectType() {
       return this.$route.query.projectType//判断是不是从专题库进入专利详情1为专题库2为报告(报告未传2)3是产品,4是标注库,5是检索