|
@@ -3,10 +3,13 @@
|
|
|
<admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
|
|
|
<template v-slot:info>
|
|
|
<van-tabs v-model="active" @change="change" color="#409eff">
|
|
|
- <van-tab title="已授权" name="有效">
|
|
|
+ <van-tab :title="`已授权【${oneTotal}】`" name="有效">
|
|
|
<list-1 :list="list" @detail="detail"></list-1>
|
|
|
</van-tab>
|
|
|
- <van-tab title="已受理" name="审中">
|
|
|
+ <van-tab :title="`已受理【${twoTotal}】`" name="审中">
|
|
|
+ <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab :title="`已失效专利【${thrTotal}】`" name="失效">
|
|
|
<list-1 :list="list" @detail="detail"></list-1>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
@@ -33,10 +36,14 @@ export default {
|
|
|
list: [],
|
|
|
limit: 10,
|
|
|
total: 0,
|
|
|
+ oneTotal: 0,
|
|
|
+ twoTotal: 0,
|
|
|
+ thrTotal: 0,
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
await this.search({ term: '有效' });
|
|
|
+ await this.searchTotal();
|
|
|
},
|
|
|
methods: {
|
|
|
...patentinfo(['queryByOrg']),
|
|
@@ -57,8 +64,25 @@ export default {
|
|
|
this.$set(this, `list`, res.data);
|
|
|
this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
+ } else if (this.active == '失效') {
|
|
|
+ info.term = this.active;
|
|
|
+ info.code = this.user.code;
|
|
|
+ let res = await this.queryByOrg({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
+ // 查询总数
|
|
|
+ async searchTotal({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
+ let res = await this.queryByOrg({ skip, limit, term: '有效', code: this.user.code, ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `oneTotal`, res.total);
|
|
|
+ res = await this.queryByOrg({ skip, limit, term: '审中', code: this.user.code, ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `twoTotal`, res.total);
|
|
|
+ res = await this.queryByOrg({ skip, limit, term: '失效', code: this.user.code, ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `thrTotal`, res.total);
|
|
|
+ },
|
|
|
// 详情
|
|
|
detail(data) {
|
|
|
this.$router.push({ path: '/service/patent/mech/patent/information/detail', query: { id: data.id } });
|