123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <div id="clickBtn">
- <el-row>
- <el-col :span="24" class="style">
- <span v-if="user.role == '4' || user.role == '5' || user.role == '6'">
- <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' })" />
- <van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" /> -->
- </span>
- <span v-else>
- <span v-if="user.role == '0'">
- <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
- <van-cell is-link title="展会管理" @click="$router.push({ path: '/adminCenter/duijiehui/index' })" />
- <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
- <van-cell is-link title="交易审核" @click="$router.push({ path: '/adminCenter/transaction/index' })" />
- </span>
- <span v-else-if="user.role == '1'">
- <van-cell is-link title="用户管理" @click="$router.push({ path: '/adminCenter/user/index' })" />
- <van-cell is-link title="审核管理" @click="$router.push({ path: '/adminCenter/enterpriseProduct/index' })" />
- </span>
- <span v-else-if="user.role == '3'">
- 展会负责人
- </span>
- <span v-else-if="user.role == '8'">
- 展会vip用户
- </span>
- </span>
- <van-cell is-link title="退出登录" @click="loginOut()" />
- <van-cell is-link title="修改密码" @click="change()" />
- <!-- <span v-else>
- <span v-else-if="user.role == '3'">
- <van-cell is-link title="展会管理" @click="$router.push({ path: '/dockCenter/dockInfo/index' })" />
- <van-cell is-link title="申请管理" @click="$router.push({ path: '/dockCenter/applyInfo/index' })" />
- <van-cell is-link title="VIP用户" @click="$router.push({ path: '/dockCenter/vipInfo/index' })" />
- <van-cell is-link title="交易备案" @click="$router.push({ path: '/dockCenter/transaction/index' })" />
- <van-cell is-link title="统计报表" @click="$router.push({ path: '/dockCenter/statisInfo/index' })" />
- <van-cell is-link title="动态监测" @click="$router.push({ path: '/dockCenter/dynamicInfo/index' })" />
- </span>
- <span v-else-if="user.role == '8'">
- <van-cell is-link title="统计报表" @click="$router.push({ path: '/vipDockCenter/statisInfo/index' })" />
- <van-cell is-link title="动态监测" @click="$router.push({ path: '/vipDockCenter/dynamicInfo/index' })" />
- </span>
- </span> -->
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- const { mapActions: login } = createNamespacedHelpers('login');
- export default {
- name: 'clickBtn',
- props: {},
- components: {},
- data: function() {
- return {
- oneName: '',
- twoName: '',
- threeName: '',
- fourName: '',
- };
- },
- created() {
- this.searchMenu();
- },
- methods: {
- ...login(['toGetMenu', 'logout']),
- async searchMenu() {
- // console.log(this.user);
- const res = await this.toGetMenu({ id: this.user.uid });
- for (const val of res.data.menus) {
- if (val.role_name == '用户管理') {
- this.$set(this, `oneName`, val.role_name);
- } else if (val.role_name == '对接会') {
- this.$set(this, `twoName`, val.role_name);
- } else if (val.role_name == '产品供求审核管理') {
- this.$set(this, `threeName`, val.role_name);
- } else if (val.role_name == '产品供求交易状态审核管理') {
- this.$set(this, `fourName`, val.role_name);
- }
- }
- },
- // 退出登录
- async loginOut() {
- this.logout();
- this.$notify({
- message: '退出成功',
- type: 'success',
- });
- this.$router.push({ path: '/live/index' });
- },
- //修改密码
- change() {
- this.$router.push({ path: './parts/changePwd' });
- },
- },
- computed: {
- ...mapState(['user']),
- pageTitle() {
- return `${this.$route.meta.title}`;
- },
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- };
- </script>
- <style lang="less" scoped></style>
|