|
@@ -3,13 +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">
|
|
|
- <van-tab :title="`专利信息【${oneTotal}】`" name="1">
|
|
|
- <list-1 :list="oneList" @detail="detail"></list-1>
|
|
|
+ <van-tab :title="`专利信息(${oneTotal})`" name="1">
|
|
|
+ <list-1 :list="oneList" @toView="oneView"></list-1>
|
|
|
</van-tab>
|
|
|
- <van-tab :title="`交易公告【${twoTotal}】`" name="2">
|
|
|
+ <van-tab :title="`交易公告(${twoTotal})`" name="2">
|
|
|
<list-2 :list="twoList"></list-2>
|
|
|
</van-tab>
|
|
|
- <van-tab :title="`专利转让【${thrTotal}】`" name="3">
|
|
|
+ <van-tab :title="`专利转让(${thrTotal})`" name="3">
|
|
|
<list-3 :list="thrList" @toView="toView"></list-3>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
@@ -17,18 +17,21 @@
|
|
|
</admin-frame>
|
|
|
<van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
|
|
|
<info-3 :info="info" v-if="dialog.type == '1'"></info-3>
|
|
|
+ <info-1 :info="info" v-else-if="dialog.type == '2'"></info-1>
|
|
|
</van-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import list1 from './parts/list-1.vue';
|
|
|
+import list1 from '@/layout/patentInfo/list-2.vue';
|
|
|
import list2 from './parts/list-2.vue';
|
|
|
import list3 from '@/layout/trans/list-2.vue';
|
|
|
import info3 from '@/layout/trans/info-1.vue';
|
|
|
+import info1 from '@/layout/patentInfo/info-1.vue';
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: patent } = createNamespacedHelpers('patent');
|
|
|
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
|
|
|
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
|
|
|
const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -36,12 +39,14 @@ export default {
|
|
|
components: {
|
|
|
adminFrame,
|
|
|
list1,
|
|
|
+ info1,
|
|
|
list2,
|
|
|
list3,
|
|
|
info3,
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
+ adminInfo: {},
|
|
|
active: '1',
|
|
|
limit: 5,
|
|
|
total: 0,
|
|
@@ -60,15 +65,17 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
+ await this.searchOther();
|
|
|
await this.searchTotal();
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...patent(['query']),
|
|
|
+ ...adminLogin({ adminLoginQuery: 'query' }),
|
|
|
+ ...patentinfo(['query', 'fetch']),
|
|
|
...patenttrans({ transQuery: 'query' }),
|
|
|
async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
if (this.active == '1') {
|
|
|
- let res = await this.query({ skip, limit, ...info });
|
|
|
+ let res = await this.query({ skip, limit, first_apply: this.adminInfo.deptname, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `oneList`, res.data);
|
|
|
this.$set(this, `total`, res.total);
|
|
@@ -89,7 +96,7 @@ export default {
|
|
|
},
|
|
|
// 查询总数
|
|
|
async searchTotal({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
- let res = await this.query({ skip, limit, ...info });
|
|
|
+ let res = await this.query({ skip, limit, first_apply: this.adminInfo.deptname, ...info });
|
|
|
if (this.$checkRes(res)) this.$set(this, `oneTotal`, res.total);
|
|
|
res = await this.transQuery({ ...info });
|
|
|
let p1 = res.data.filter((i) => i.status == '5');
|
|
@@ -98,8 +105,12 @@ export default {
|
|
|
if (p2) this.$set(this, `thrTotal`, p2.length);
|
|
|
},
|
|
|
// 专利详情
|
|
|
- detail(data) {
|
|
|
- this.$router.push({ path: '/patent/market/detail', query: { id: data._id } });
|
|
|
+ async oneView(data) {
|
|
|
+ let res = await this.fetch(data.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `info`, res.data);
|
|
|
+ }
|
|
|
+ this.dialog = { show: true, title: '详细信息', type: '2' };
|
|
|
},
|
|
|
// 交易详情
|
|
|
twoDetail(data) {
|
|
@@ -115,6 +126,13 @@ export default {
|
|
|
this.$set(this, `info`, data);
|
|
|
this.dialog = { show: true, title: '详细信息', type: '1' };
|
|
|
},
|
|
|
+ // 查询其他信息
|
|
|
+ async searchOther() {
|
|
|
+ let res = await this.adminLoginQuery({ code: this.user.code });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `adminInfo`, res.data[0]);
|
|
|
+ }
|
|
|
+ },
|
|
|
// 返回
|
|
|
back() {
|
|
|
this.$router.push({ path: '/patent/index' });
|