|
@@ -2,7 +2,14 @@
|
|
|
<div id="index">
|
|
|
<admin-frame @search="search" :limit="limit" :total="total" :useNav="false">
|
|
|
<template v-slot:info>
|
|
|
- <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ <van-tabs v-model="active" @change="changeActive">
|
|
|
+ <van-tab title="成交专利">
|
|
|
+ <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="转让信息">
|
|
|
+ <list-1 :list="list" @detail="detail"></list-1>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
</div>
|
|
@@ -22,9 +29,11 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- list: [],
|
|
|
+ active: 0,
|
|
|
limit: 5,
|
|
|
total: 0,
|
|
|
+ // 转让信息
|
|
|
+ list: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -32,17 +41,31 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...patenttrans(['query']),
|
|
|
- async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
- let res = await this.query({ skip, limit, type: '转让', ...info });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
+ async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
|
+ if (searchName) info.patent_name = searchName;
|
|
|
+ if (this.active == 0) {
|
|
|
+ let res = await this.query({ skip, limit, status: '4', ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ } else if (this.active == 1) {
|
|
|
+ let res = await this.query({ skip, limit, status: '0', ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 详情
|
|
|
detail(data) {
|
|
|
this.$router.push({ path: '/market/transfer/detail', query: { id: data.id } });
|
|
|
},
|
|
|
+ // 选择类型
|
|
|
+ changeActive(value) {
|
|
|
+ this.$set(this, `active`, Number(value));
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|