|
@@ -5,8 +5,8 @@
|
|
|
<van-col span="24" class="one">
|
|
|
<van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">我的消息</van-divider>
|
|
|
<van-col span="24" class="one_1">
|
|
|
- <van-col span="8" class="one_1action" @click.native="pathBtn('user/message', 'unRead')">
|
|
|
- <van-goods-action-icon text="未读" badge="0">
|
|
|
+ <van-col span="8" class="one_1action onlyColor" @click.native="pathBtn('user/message', 'unRead')">
|
|
|
+ <van-goods-action-icon text="未读" :badge="numData.message ? numData.message.unread : ''">
|
|
|
<template #icon><i class="iconfont icon-xiaoxi"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
@@ -26,17 +26,17 @@
|
|
|
<van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">我的申请</van-divider>
|
|
|
<van-col span="24" class="one_1">
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/apply', 'apply')">
|
|
|
- <van-goods-action-icon text="专利申请" badge="0">
|
|
|
+ <van-goods-action-icon text="专利申请" :badge="numData.apply ? numData.apply.apply : '0'">
|
|
|
<template #icon><i class="iconfont icon-jiaodi"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/apply', 'analysis')">
|
|
|
- <van-goods-action-icon text="专利分析" badge="0">
|
|
|
+ <van-goods-action-icon text="专利分析" :badge="numData.apply ? numData.apply.analysis : '0'">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/apply', 'assessment')">
|
|
|
- <van-goods-action-icon text="专利评估" badge="0">
|
|
|
+ <van-goods-action-icon text="专利评估" :badge="numData.apply ? numData.apply.access : '0'">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
@@ -46,17 +46,17 @@
|
|
|
<van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">我的专利</van-divider>
|
|
|
<van-col span="24" class="one_1">
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/patent', 'information')">
|
|
|
- <van-goods-action-icon text="专利信息" badge="0">
|
|
|
+ <van-goods-action-icon text="专利信息" :badge="numData.patent ? numData.patent.information : '0'">
|
|
|
<template #icon><i class="iconfont icon-jiaodi"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/patent', 'navigation')">
|
|
|
- <van-goods-action-icon text="专利导航" badge="0">
|
|
|
+ <van-goods-action-icon text="专利导航" badge="">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/patent', 'early')">
|
|
|
- <van-goods-action-icon text="专利预警" badge="0">
|
|
|
+ <van-goods-action-icon text="专利预警" :badge="numData.patent ? numData.patent.early : '0'">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
@@ -66,17 +66,17 @@
|
|
|
<van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">我的交易</van-divider>
|
|
|
<van-col span="24" class="one_1">
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/transaction', 'index', 'type=转让')">
|
|
|
- <van-goods-action-icon text="专利转让" badge="0">
|
|
|
+ <van-goods-action-icon text="专利转让" :badge="numData.transaction ? numData.transaction.trans1 : '0'">
|
|
|
<template #icon><i class="iconfont icon-jiaodi"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/transaction', 'index', 'type=合作')">
|
|
|
- <van-goods-action-icon text="专利合作" badge="0">
|
|
|
+ <van-goods-action-icon text="专利合作" :badge="numData.transaction ? numData.transaction.trans2 : '0'">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
|
<van-col span="8" class="one_1action" @click.native="pathBtn('user/transaction', 'index', 'type=招商')">
|
|
|
- <van-goods-action-icon text="专利招商" badge="0">
|
|
|
+ <van-goods-action-icon text="专利招商" :badge="numData.transaction ? numData.transaction.trans3 : '0'">
|
|
|
<template #icon><i class="iconfont icon-pinggu"></i></template>
|
|
|
</van-goods-action-icon>
|
|
|
</van-col>
|
|
@@ -115,6 +115,7 @@ import patent1 from '../parts/patent-1.vue';
|
|
|
import trans1 from '../parts/trans-1.vue';
|
|
|
import frameChat from '@/layout/chatCommon/chat.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: statistics } = createNamespacedHelpers('statistics');
|
|
|
export default {
|
|
|
name: 'userBtn',
|
|
|
props: {},
|
|
@@ -128,10 +129,20 @@ export default {
|
|
|
return {
|
|
|
chatShow: false,
|
|
|
active: '1',
|
|
|
+ numData: {},
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ if (this.user.id) this.search();
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ ...statistics(['patentUserIndex']),
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ let res = await this.patentUserIndex({ id: this.user.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `numData`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
pathBtn(type, path, query) {
|
|
|
if (this.user) {
|
|
|
this.$router.push({ path: `/service/patent/${type}/${path}?${query}` });
|
|
@@ -212,4 +223,9 @@ export default {
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
|
+.onlyColor {
|
|
|
+ /deep/.van-info {
|
|
|
+ background-color: #ff0000 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|