|
@@ -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
|