|
@@ -31,7 +31,7 @@
|
|
|
</el-tooltip>
|
|
|
</el-header>
|
|
|
<el-main style="background: #FFFFFF;">
|
|
|
- <PatentLeft :patentList="patentList" :total="total" v-on="$listeners"></PatentLeft>
|
|
|
+ <PatentLeft :patentList="patentList" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft" v-on="$listeners"></PatentLeft>
|
|
|
</el-main>
|
|
|
<el-footer style="text-align: center;">
|
|
|
<el-pagination background layout=" prev, pager, next" :current-page.sync="queryParams.current"
|
|
@@ -74,21 +74,21 @@
|
|
|
<el-tooltip placement="right-end">
|
|
|
<template slot="content">
|
|
|
<div>点击查看上一篇专利</div>
|
|
|
- <div>专利:CN202210250237</div>
|
|
|
- <div>数量:1</div>
|
|
|
+ <div>专利:{{currentLocation - 1!=0? patentList[index-1].patentNo:''}}</div>
|
|
|
+ <div>数量:{{currentLocation - 1}}</div>
|
|
|
</template>
|
|
|
- <div class="articles-Loop">
|
|
|
- <i class="el-icon-arrow-up"></i>
|
|
|
+ <div class="articles-Loop" @click="prev">
|
|
|
+ <i class="el-icon-arrow-up" v-disabled="currentLocation - 1 == 0 || loading"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip placement="right-end">
|
|
|
<template slot="content">
|
|
|
<div>点击查看下一篇专利</div>
|
|
|
- <div>专利:CN202210250237</div>
|
|
|
- <div>数量:1</div>
|
|
|
+ <div>专利:{{total - currentLocation!=0? patentList[index+1].patentNo:''}}</div>
|
|
|
+ <div>数量:{{total - currentLocation}}</div>
|
|
|
</template>
|
|
|
- <div class="articles-Loop" style="">
|
|
|
- <i class="el-icon-arrow-down"></i>
|
|
|
+ <div class="articles-Loop" @click="next">
|
|
|
+ <i class="el-icon-arrow-down" v-disabled="total - currentLocation == 0 || loading"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
@@ -104,43 +104,89 @@ export default {
|
|
|
props: {
|
|
|
projectId:{
|
|
|
default:0
|
|
|
+ },
|
|
|
+ searchOption:{
|
|
|
+ default:()=>{
|
|
|
+ return {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ location:{
|
|
|
+ default:0
|
|
|
+ },
|
|
|
+ patentNo:{
|
|
|
+ default:''
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
value:false,//对比
|
|
|
isRight:false,//是否在右侧
|
|
|
- isContract:false,//是否收缩
|
|
|
+ isContract:true,//是否收缩
|
|
|
queryParams:{
|
|
|
current:1,
|
|
|
size:10,
|
|
|
},
|
|
|
total:0,
|
|
|
- patentList:[]
|
|
|
+ loading:false,
|
|
|
+ patentList:[],
|
|
|
+ currentLocation:this.location,
|
|
|
+ index:0,
|
|
|
+ total:0
|
|
|
};
|
|
|
},
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ isContract(){
|
|
|
+ this.getPatentList()
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
this.getPatentList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getPatentLeft(patentNo,index){
|
|
|
+ this.currentLocation = (index + 1) + ((this.queryParams.current - 1) * this.queryParams.size)
|
|
|
+ this.updatePatentNo(patentNo)
|
|
|
+ },
|
|
|
+ updatePatentNo(patentNo){
|
|
|
+ var search = {
|
|
|
+ searchOption:this.searchOption,
|
|
|
+ location:this.currentLocation
|
|
|
+ }
|
|
|
+ this.$s.setSession('search',search)
|
|
|
+ this.$emit('getPatentLeft',patentNo)
|
|
|
+ },
|
|
|
getPatentList(){
|
|
|
+
|
|
|
+ var api = ''
|
|
|
+ var current = 5
|
|
|
+ if(this.isContract){
|
|
|
+ this.queryParams.current = ((this.currentLocation-1) < current)? 0 : ((this.currentLocation-1) - current)
|
|
|
+
|
|
|
+ api = 'getPatentPageMessage'
|
|
|
+ }else{
|
|
|
+ this.queryParams.current = parseInt((this.currentLocation-1) / this.queryParams.size) + 1
|
|
|
+ api = 'QueryPatent'
|
|
|
+ }
|
|
|
let params = {
|
|
|
...this.queryParams,//分页信息
|
|
|
projectId: this.projectId,
|
|
|
- // searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
|
|
|
+ searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
|
|
|
// orderDTOList: this.sort,//排序信息
|
|
|
}
|
|
|
- this.$api.QueryPatent(params).then(res => {
|
|
|
+ this.loading = true
|
|
|
+ this.$api[api](params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.patentList = res.data.data
|
|
|
this.total = res.data.total
|
|
|
+ this.index = current - 1
|
|
|
+ this.loading = false
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.patentList = []
|
|
|
this.total = 0
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
//分页
|
|
@@ -154,6 +200,25 @@ export default {
|
|
|
contrast(){
|
|
|
this.value = !this.value
|
|
|
this.$emit('contrast',this.value)
|
|
|
+ },
|
|
|
+ //上一篇
|
|
|
+ prev(){
|
|
|
+ this.index -=1
|
|
|
+ this.currentLocation -=1
|
|
|
+ this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
|
+ if(this.index <= 2 && this.currentLocation>2){
|
|
|
+ this.getPatentList()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //下一篇
|
|
|
+ next(){
|
|
|
+ this.index +=1
|
|
|
+ this.currentLocation +=1
|
|
|
+ this.updatePatentNo(this.patentList[this.index].patentNo)
|
|
|
+ if(this.index >= 7 && this.currentLocation<this.total-2){
|
|
|
+ this.getPatentList()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
};
|