|
@@ -38,11 +38,11 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-header>
|
|
</el-header>
|
|
<el-main style="background: #FFFFFF;">
|
|
<el-main style="background: #FFFFFF;">
|
|
- <PatentLeft :patentList="patentList" :reportType="reportType" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft" :noveltySearch="noveltySearch"></PatentLeft>
|
|
|
|
|
|
+ <PatentLeft :patentList="patentList" :loading="loading" :reportType="reportType" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft" :noveltySearch="noveltySearch"></PatentLeft>
|
|
</el-main>
|
|
</el-main>
|
|
<el-footer style="text-align: center;" v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">
|
|
<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" :pager-count="5"
|
|
|
|
- :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
|
|
|
|
|
|
+ <el-pagination background layout=" prev, pager, next" :current-page.sync="queryParams.current" :pager-count="5" :page-count="getPageCount()"
|
|
|
|
+ :page-size.sync="queryParams.size" @current-change="handleCurrentChange">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</el-footer>
|
|
</el-footer>
|
|
</el-container>
|
|
</el-container>
|
|
@@ -87,26 +87,30 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<template v-if="patentList.length>1">
|
|
<template v-if="patentList.length>1">
|
|
<el-tooltip placement="right-end">
|
|
<el-tooltip placement="right-end">
|
|
- <template slot="content" v-if="patentList[index-1]">
|
|
|
|
|
|
+ <template slot="content" >
|
|
<div>点击查看上一篇文献</div>
|
|
<div>点击查看上一篇文献</div>
|
|
- <div v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">专利:{{index!=0? patentList[index-1].patentNo:''}}</div>
|
|
|
|
- <div v-else>文献:{{index!=0? patentList[index-1].name:''}}</div>
|
|
|
|
|
|
+ <!-- <div v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">
|
|
|
|
+ 专利:{{index!=0? patentList[index-1].patentNo:""}}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>文献:{{index!=0? patentList[index-1].name:''}}</div> -->
|
|
<div>数量:{{currentLocation - 1}}</div>
|
|
<div>数量:{{currentLocation - 1}}</div>
|
|
</template>
|
|
</template>
|
|
- <div class="articles-Loop">
|
|
|
|
|
|
+ <div class="articles-Loop" v-loading="loading">
|
|
<div @click="prev" v-disabled="currentLocation - 1 == 0 || loading">
|
|
<div @click="prev" v-disabled="currentLocation - 1 == 0 || loading">
|
|
<i class="el-icon-arrow-up" ></i>
|
|
<i class="el-icon-arrow-up" ></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip placement="right-end">
|
|
<el-tooltip placement="right-end">
|
|
- <template slot="content" v-if="patentList[index+1]">
|
|
|
|
|
|
+ <template slot="content">
|
|
<div>点击查看下一篇文献</div>
|
|
<div>点击查看下一篇文献</div>
|
|
- <div v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">专利:{{(total - currentLocation!=0 && total!=0)? patentList[index+1].patentNo:''}}</div>
|
|
|
|
- <div v-else>文献:{{(total - currentLocation!=0 && total!=0)? patentList[index+1].name:''}}</div>
|
|
|
|
|
|
+ <!-- <div v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">
|
|
|
|
+ 专利:{{(total - currentLocation!=0 && total!=0)? patentList[index+1].patentNo:''}}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>文献:{{(total - currentLocation!=0 && total!=0)? patentList[index+1].name:''}}</div> -->
|
|
<div>数量:{{total - currentLocation}}</div>
|
|
<div>数量:{{total - currentLocation}}</div>
|
|
</template>
|
|
</template>
|
|
- <div class="articles-Loop" >
|
|
|
|
|
|
+ <div class="articles-Loop" v-loading="loading">
|
|
<div @click="next" v-disabled="total - currentLocation == 0 || loading">
|
|
<div @click="next" v-disabled="total - currentLocation == 0 || loading">
|
|
<i class="el-icon-arrow-down"></i>
|
|
<i class="el-icon-arrow-down"></i>
|
|
</div>
|
|
</div>
|
|
@@ -182,23 +186,22 @@ export default {
|
|
isContract:true,//是否收缩
|
|
isContract:true,//是否收缩
|
|
queryParams:{
|
|
queryParams:{
|
|
current:1,
|
|
current:1,
|
|
- size:10,
|
|
|
|
|
|
+ size:50,
|
|
},
|
|
},
|
|
total:0,
|
|
total:0,
|
|
loading:false,
|
|
loading:false,
|
|
patentList:[],
|
|
patentList:[],
|
|
currentLocation:this.location,
|
|
currentLocation:this.location,
|
|
index:0,
|
|
index:0,
|
|
- total:0
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- isContract(){
|
|
|
|
- if(this.projectType != 4){
|
|
|
|
- this.setQueryParams()
|
|
|
|
- this.getData()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // isContract(){
|
|
|
|
+ // if(this.projectType != 4){
|
|
|
|
+ // this.setQueryParams()
|
|
|
|
+ // this.getData()
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
created() {},
|
|
created() {},
|
|
@@ -211,69 +214,92 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
setQueryParams(){
|
|
setQueryParams(){
|
|
if(!this.outside){
|
|
if(!this.outside){
|
|
- if(this.isContract){
|
|
|
|
- this.queryParams.current = ((this.currentLocation-1) <= 5)? 1 : ((this.currentLocation-1) - 5)
|
|
|
|
- }else{
|
|
|
|
- this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
|
|
- }
|
|
|
|
|
|
+ // if(this.isContract){
|
|
|
|
+ // this.queryParams.current = ((this.currentLocation-1) <= 5)? 1 : ((this.currentLocation-1) - 5)
|
|
|
|
+ // }else{
|
|
|
|
+ // this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
|
|
+ // }
|
|
|
|
+ this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
}else{
|
|
}else{
|
|
this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
- getData(){
|
|
|
|
|
|
+ async getData(){
|
|
if(this.outside){
|
|
if(this.outside){
|
|
- this.getPatentSelect()
|
|
|
|
|
|
+ await this.getPatentSelect()
|
|
}else{
|
|
}else{
|
|
this.getPatentList()
|
|
this.getPatentList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //获取最大页数
|
|
|
|
+ getPageCount() {
|
|
|
|
+ if(this.outside){
|
|
|
|
+ var a = Math.ceil(Number(this.total) / Number(this.queryParams.size))
|
|
|
|
+ return a > 200 ? 200 : a
|
|
|
|
+ }else{
|
|
|
|
+ return Math.ceil(Number(this.total) / Number(this.queryParams.size))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
async getPatentSelect(){
|
|
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={
|
|
|
|
|
|
+ var params = {
|
|
current:this.queryParams.current,
|
|
current:this.queryParams.current,
|
|
size:this.queryParams.size
|
|
size:this.queryParams.size
|
|
- },
|
|
|
|
- nextParams={
|
|
|
|
- current:(this.queryParams.current * this.queryParams.size)+1,
|
|
|
|
- size:1
|
|
|
|
}
|
|
}
|
|
this.loading = true
|
|
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>10000?10000: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.$commonJS.scrollToTop()
|
|
|
|
+ const [data] = await Promise.allSettled([this.getList(params)])
|
|
|
|
+ this.patentList=data.status =='fulfilled'?data.value.data:[]
|
|
|
|
+ this.total = data.value.total
|
|
this.loading = false
|
|
this.loading = false
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 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>10000?10000: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) {
|
|
getList(queryParams) {
|
|
- if( queryParams.current == 0 && this.isContract){
|
|
|
|
- return {}
|
|
|
|
- }
|
|
|
|
- if(queryParams.size == 1 && !this.isContract){
|
|
|
|
- return {}
|
|
|
|
- }
|
|
|
|
|
|
+ // if( queryParams.current == 0 && this.isContract){
|
|
|
|
+ // return {}
|
|
|
|
+ // }
|
|
|
|
+ // if(queryParams.size == 1 && !this.isContract){
|
|
|
|
+ // return {}
|
|
|
|
+ // }
|
|
var params = {
|
|
var params = {
|
|
CurrentQuery: this.searchOption.searchCondition, //检索式
|
|
CurrentQuery: this.searchOption.searchCondition, //检索式
|
|
DBType: this.searchOption.DBType, //”CN”或”WD”,表示检索中文库或世界库
|
|
DBType: this.searchOption.DBType, //”CN”或”WD”,表示检索中文库或世界库
|
|
@@ -287,7 +313,7 @@ export default {
|
|
return this.$api.patentSelect(params).then(response=> response.data)
|
|
return this.$api.patentSelect(params).then(response=> response.data)
|
|
},
|
|
},
|
|
getPatentLeft(patentNo,index,sign){
|
|
getPatentLeft(patentNo,index,sign){
|
|
-
|
|
|
|
|
|
+ this.index = index
|
|
if(sign){
|
|
if(sign){
|
|
this.currentLocation = index + 1
|
|
this.currentLocation = index + 1
|
|
this.updatePatentNo(patentNo,sign)
|
|
this.updatePatentNo(patentNo,sign)
|
|
@@ -410,16 +436,19 @@ export default {
|
|
other(event){
|
|
other(event){
|
|
this.$emit('event',event)
|
|
this.$emit('event',event)
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
//上一篇
|
|
//上一篇
|
|
- prev(){
|
|
|
|
- this.index -=1
|
|
|
|
|
|
+ async prev(){
|
|
|
|
+ if(this.index == 0){
|
|
|
|
+ this.queryParams.current -= 1
|
|
|
|
+ await this.getData()
|
|
|
|
+ this.index = this.patentList.length
|
|
|
|
+ }
|
|
|
|
+ this.index -= 1
|
|
this.currentLocation -=1
|
|
this.currentLocation -=1
|
|
if(this.outside){
|
|
if(this.outside){
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
- if(this.index==0 && this.currentLocation>0){
|
|
|
|
- this.setQueryParams()
|
|
|
|
- this.getData()
|
|
|
|
- }
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var reportType = [1,2,7]
|
|
var reportType = [1,2,7]
|
|
@@ -431,21 +460,26 @@ export default {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
- if(this.index <= 2 && this.currentLocation>2){
|
|
|
|
- this.setQueryParams()
|
|
|
|
- this.getData()
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
//下一篇
|
|
//下一篇
|
|
- next(){
|
|
|
|
|
|
+ async next(){
|
|
|
|
+ if(this.index == this.patentList.length - 1){
|
|
|
|
+ if(this.queryParams.current * this.queryParams.size >= this.total){
|
|
|
|
+ this.$message.warning('已经是最后一件专利')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.outside && this.queryParams.current>=200){
|
|
|
|
+ this.$message.warning('无法查看更多专利详情')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.queryParams.current += 1
|
|
|
|
+ await this.getData()
|
|
|
|
+ this.index = -1
|
|
|
|
+ }
|
|
this.index +=1
|
|
this.index +=1
|
|
this.currentLocation +=1
|
|
this.currentLocation +=1
|
|
if(this.outside){
|
|
if(this.outside){
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
- if(this.index==10 && this.currentLocation<this.total){
|
|
|
|
- this.setQueryParams()
|
|
|
|
- this.getData()
|
|
|
|
- }
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var reportType = [1,2,7]
|
|
var reportType = [1,2,7]
|
|
@@ -457,11 +491,62 @@ export default {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
- if(this.index >= 7 && this.currentLocation<this.total-2){
|
|
|
|
- this.setQueryParams()
|
|
|
|
- this.getData()
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //上一篇
|
|
|
|
+ // prev(){
|
|
|
|
+ // this.index -=1
|
|
|
|
+ // this.currentLocation -=1
|
|
|
|
+ // if(this.outside){
|
|
|
|
+ // this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
|
|
+ // if(this.index==0 && this.currentLocation>0){
|
|
|
|
+ // this.setQueryParams()
|
|
|
|
+ // this.getData()
|
|
|
|
+ // }
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // var reportType = [1,2,7]
|
|
|
|
+ // var index = reportType.findIndex(item=>{
|
|
|
|
+ // return item == this.reportType
|
|
|
|
+ // })
|
|
|
|
+ // if(index !=-1){
|
|
|
|
+ // this.updatePatentNo(this.patentList[this.index],true)
|
|
|
|
+ // return false
|
|
|
|
+ // }
|
|
|
|
+ // this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
|
|
+ // if(this.index <= 2 && this.currentLocation>2){
|
|
|
|
+ // this.setQueryParams()
|
|
|
|
+ // 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.setQueryParams()
|
|
|
|
+ // this.getData()
|
|
|
|
+ // }
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // var reportType = [1,2,7]
|
|
|
|
+ // var index = reportType.findIndex(item=>{
|
|
|
|
+ // return item == this.reportType
|
|
|
|
+ // })
|
|
|
|
+ // if(index !=-1){
|
|
|
|
+ // this.updatePatentNo(this.patentList[this.index],true)
|
|
|
|
+ // return false
|
|
|
|
+ // }
|
|
|
|
+ // this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
|
|
+ // if(this.index >= 7 && this.currentLocation<this.total-2){
|
|
|
|
+ // this.setQueryParams()
|
|
|
|
+ // this.getData()
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|