|
@@ -2,14 +2,22 @@
|
|
|
<div id="clickBtn">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="style">
|
|
|
- <span v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'">
|
|
|
+ <span v-if="user.role == '2' || user.role == '3' || user.role == '6' || user.role == '7'">
|
|
|
<van-cell is-link title="个人信息" @click="$router.push({ path: '/userCenter/user/index' })" />
|
|
|
<van-cell is-link title="我的发布" @click="$router.push({ path: '/userCenter/myProduct/index' })" />
|
|
|
<van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" />
|
|
|
<van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- <van-cell is-link title="个人信息" />
|
|
|
+ <span v-if="user.role == '1'">
|
|
|
+ <van-cell is-link title="用户管理" />
|
|
|
+ <van-cell is-link title="对接会管理" />
|
|
|
+ <van-cell is-link title="产品供求审核管理" />
|
|
|
+ <van-cell is-link title="产品供求交易状态审核管理" />
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ 合作机关管理员。业务管理员
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -18,21 +26,26 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
export default {
|
|
|
name: 'clickBtn',
|
|
|
props: {},
|
|
|
components: {},
|
|
|
data: function() {
|
|
|
- return {
|
|
|
- user: {
|
|
|
- role: '2',
|
|
|
- },
|
|
|
- };
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.searchMenu();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...login(['toGetMenu']),
|
|
|
+ async searchMenu() {
|
|
|
+ const res = await this.toGetMenu({ id: this.user.uid });
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
computed: {
|
|
|
- // ...mapState(['user']),
|
|
|
+ ...mapState(['user']),
|
|
|
pageTitle() {
|
|
|
return `${this.$route.meta.title}`;
|
|
|
},
|