|
@@ -41,7 +41,7 @@
|
|
<PatentLeft :patentList="patentList" :reportType="reportType" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft"></PatentLeft>
|
|
<PatentLeft :patentList="patentList" :reportType="reportType" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft"></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"
|
|
|
|
|
|
+ <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">
|
|
:page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</el-footer>
|
|
</el-footer>
|
|
@@ -158,6 +158,12 @@ export default {
|
|
value:{
|
|
value:{
|
|
default:false
|
|
default:false
|
|
},
|
|
},
|
|
|
|
+ outside:{
|
|
|
|
+ default:false
|
|
|
|
+ },
|
|
|
|
+ fromPath:{
|
|
|
|
+ default:''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -176,15 +182,79 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
isContract(){
|
|
isContract(){
|
|
- this.getPatentList()
|
|
|
|
|
|
+ this.getData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
created() {},
|
|
created() {},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getPatentList()
|
|
|
|
|
|
+ this.getData()
|
|
},
|
|
},
|
|
methods: {
|
|
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){
|
|
getPatentLeft(patentNo,index,sign){
|
|
|
|
|
|
if(sign){
|
|
if(sign){
|
|
@@ -198,6 +268,7 @@ export default {
|
|
updatePatentNo(patentNo,sign){
|
|
updatePatentNo(patentNo,sign){
|
|
var search = {
|
|
var search = {
|
|
searchOption:this.searchOption,
|
|
searchOption:this.searchOption,
|
|
|
|
+ fromPath:this.fromPath,
|
|
location:this.currentLocation
|
|
location:this.currentLocation
|
|
}
|
|
}
|
|
this.$s.setSession('search',search)
|
|
this.$s.setSession('search',search)
|
|
@@ -270,7 +341,7 @@ export default {
|
|
//分页
|
|
//分页
|
|
handleCurrentChange(val){
|
|
handleCurrentChange(val){
|
|
this.queryParams.current = val
|
|
this.queryParams.current = val
|
|
- this.getPatentList()
|
|
|
|
|
|
+ this.getData()
|
|
},
|
|
},
|
|
other(event){
|
|
other(event){
|
|
this.$emit('event',event)
|
|
this.$emit('event',event)
|
|
@@ -279,6 +350,13 @@ export default {
|
|
prev(){
|
|
prev(){
|
|
this.index -=1
|
|
this.index -=1
|
|
this.currentLocation -=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 reportType = [1,2,7]
|
|
var index = reportType.findIndex(item=>{
|
|
var index = reportType.findIndex(item=>{
|
|
return item == this.reportType
|
|
return item == this.reportType
|
|
@@ -289,13 +367,20 @@ export default {
|
|
}
|
|
}
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
if(this.index <= 2 && this.currentLocation>2){
|
|
if(this.index <= 2 && this.currentLocation>2){
|
|
- this.getPatentList()
|
|
|
|
|
|
+ this.getData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//下一篇
|
|
//下一篇
|
|
next(){
|
|
next(){
|
|
this.index +=1
|
|
this.index +=1
|
|
this.currentLocation +=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 reportType = [1,2,7]
|
|
var index = reportType.findIndex(item=>{
|
|
var index = reportType.findIndex(item=>{
|
|
return item == this.reportType
|
|
return item == this.reportType
|
|
@@ -306,7 +391,7 @@ export default {
|
|
}
|
|
}
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
if(this.index >= 7 && this.currentLocation<this.total-2){
|
|
if(this.index >= 7 && this.currentLocation<this.total-2){
|
|
- this.getPatentList()
|
|
|
|
|
|
+ this.getData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|