wxy 4 سال پیش
والد
کامیت
9c62dd6f94

+ 131 - 3
src/router/index.js

@@ -64,10 +64,139 @@ const routes = [
     component: () => import('../views/user/index.vue'),
   },
   {
+<<<<<<< HEAD
     path: '/user/detail',
     name: 'user',
     meta: { title: '详情', isleftarrow: true },
     component: () => import('../views/user/detail.vue'),
+=======
+    path: '/account/index',
+    name: 'account_user',
+    meta: { title: '账号管理', isleftarrow: false },
+    component: () => import('../views/account/index.vue'),
+  },
+  // 登录
+  {
+    path: '/login',
+    name: 'login',
+    meta: { title: '登录', isleftarrow: true },
+    component: () => import('../views/login.vue'),
+  },
+  // 第一版个人中心
+  // 个人-机构-专家
+  // 个人中心
+  {
+    path: '/userCenter/user/index',
+    name: 'userCenter',
+    meta: { title: '个人中心', isleftarrow: true },
+    component: () => import('../views/userCenter/user/index.vue'),
+  },
+  // 我的发布
+  {
+    path: '/userCenter/myProduct/index',
+    name: 'userCenter',
+    meta: { title: '我的发布', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/index.vue'),
+  },
+  // 信息发布
+  {
+    path: '/userCenter/myProduct/detail',
+    name: 'userCenter',
+    meta: { title: '信息发布', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/detail.vue'),
+  },
+  // 事项管理
+  {
+    path: '/userCenter/matter/index',
+    name: 'userCenter',
+    meta: { title: '事项管理', isleftarrow: true },
+    component: () => import('../views/userCenter/matter/index.vue'),
+  },
+  // 事项操作
+  {
+    path: '/userCenter/matter/detail',
+    name: 'userCenter',
+    meta: { title: '事项管理', isleftarrow: true },
+    component: () => import('../views/userCenter/matter/detail.vue'),
+  },
+  // 展会管理
+  {
+    path: '/userCenter/dock/index',
+    name: 'userCenter',
+    meta: { title: '展会管理', isleftarrow: true },
+    component: () => import('../views/userCenter/dock/index.vue'),
+  },
+  // 申请参展
+  {
+    path: '/userCenter/dock/detail',
+    name: 'userCenter',
+    meta: { title: '申请参展', isleftarrow: true },
+    component: () => import('../views/userCenter/dock/detail.vue'),
+  },
+  // 修改密码
+  {
+    path: '/updatePwd/index',
+    name: 'userCenter',
+    meta: { title: '修改密码', isleftarrow: true },
+    component: () => import('../views/updatePwd/index.vue'),
+  },
+  // 管理用户个人中心
+  // 用户管理
+  {
+    path: '/adminCenter/user/index',
+    name: 'adminCenter',
+    meta: { title: '用户管理', isleftarrow: true },
+    component: () => import('../views/adminCenter/user/index.vue'),
+  },
+  // 用户审核
+  {
+    path: '/adminCenter/user/detail',
+    name: 'adminCenter',
+    meta: { title: '用户审核', isleftarrow: true },
+    component: () => import('../views/adminCenter/user/detail.vue'),
+  },
+  // 展会管理
+  {
+    path: '/adminCenter/duijiehui/index',
+    name: 'adminCenter',
+    meta: { title: '展会管理', isleftarrow: true },
+    component: () => import('../views/adminCenter/duijiehui/index.vue'),
+  },
+  // 创建展会
+  {
+    path: '/adminCenter/duijiehui/add',
+    name: 'adminCenter',
+    meta: { title: '创建展会', isleftarrow: true },
+    component: () => import('../views/adminCenter/duijiehui/add.vue'),
+  },
+  // 审核管理
+  {
+    path: '/adminCenter/enterpriseProduct/index',
+    name: 'adminCenter',
+    meta: { title: '审核管理', isleftarrow: true },
+    component: () => import('../views/adminCenter/enterpriseProduct/index.vue'),
+  },
+  // 产品审核
+  {
+    path: '/adminCenter/enterpriseProduct/detail',
+    name: 'adminCenter',
+    meta: { title: '产品审核', isleftarrow: true },
+    component: () => import('../views/adminCenter/enterpriseProduct/detail.vue'),
+  },
+  // 交易审核
+  {
+    path: '/adminCenter/transaction/index',
+    name: 'adminCenter',
+    meta: { title: '交易审核', isleftarrow: true },
+    component: () => import('../views/adminCenter/transaction/index.vue'),
+  },
+  // 审核详情
+  {
+    path: '/adminCenter/transaction/detail',
+    name: 'adminCenter',
+    meta: { title: '审核详情', isleftarrow: true },
+    component: () => import('../views/adminCenter/transaction/detail.vue'),
+>>>>>>> 7df36af78f6c28e14120668807c43aedc8e49ed9
   },
   // 公众号第一版结束
   // 公众号第二版开始 viewTwo
@@ -125,7 +254,6 @@ const routes = [
     meta: { title: '培训访谈详情', isleftarrow: true },
     component: () => import('../viewTwo/interview/detail.vue'),
   },
-
   // 项目路演
   {
     path: '/viewTwo/roadshow/index',
@@ -240,7 +368,7 @@ const routes = [
   // 账号管理
   {
     path: '/viewTwo/account/index',
-    name: 'account',
+    name: 'viewTwo_account',
     meta: { title: '账号管理', isleftarrow: false },
     component: () => import('../viewTwo/account/index.vue'),
   },
@@ -254,7 +382,7 @@ const router = new VueRouter({
 });
 
 router.beforeEach(async (to, form, next) => {
-  if (to.name == 'user_index') {
+  if (to.name == 'account_user') {
     let res = await store.dispatch('login/toGetUser');
     if (res && res.uid) {
       next();

+ 100 - 0
src/views/account/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="info">
+            <el-col :span="8" class="img">
+              <el-image :src="imgUrl"></el-image>
+            </el-col>
+            <el-col :span="16" class="name">{{ user.name }}</el-col>
+          </el-col>
+          <el-col :span="24" class="btn">
+            <clickBtn></clickBtn>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import clickBtn from './parts/clickBtn.vue';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    NavBar,
+    // footInfo,
+    clickBtn,
+  },
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      imgUrl: require('@/assets/test.jpg'),
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+}
+.main {
+  min-height: 570px;
+  .info {
+    height: 100px;
+    padding: 10px;
+    .img {
+      text-align: center;
+      .el-image {
+        width: 75%;
+        height: 80px;
+        border-radius: 50%;
+        text-align: center;
+      }
+    }
+    .name {
+      font-size: 18px;
+      font-weight: bolder;
+      margin-top: 20px;
+    }
+  }
+}
+.foot {
+  position: absolute;
+  bottom: 0;
+}
+</style>

+ 110 - 0
src/views/account/parts/clickBtn.vue

@@ -0,0 +1,110 @@
+<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' })" />
+        </span>
+        <span v-else-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>
+        <van-cell is-link title="修改密码" @click="change()" />
+        <van-cell is-link title="退出登录" @click="loginOut()" />
+        <!-- <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() {
+      if (this.user.uid) {
+        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: '/login' });
+    },
+    //修改密码
+    change() {
+      this.$router.push({ path: '/updatePwd/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 1 - 1
src/views/adminCenter/duijiehui/index.vue

@@ -100,7 +100,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/adminCenter/enterpriseProduct/index.vue

@@ -92,7 +92,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/adminCenter/transaction/index.vue

@@ -57,7 +57,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/adminCenter/user/index.vue

@@ -88,7 +88,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 4 - 4
src/views/login.vue

@@ -90,7 +90,7 @@ export default {
       const res = await this.toLogin({ user: data });
       if (res.uid) {
         console.log(res);
-        this.$router.push({ path: '/user/index' });
+        this.$router.push({ path: '/account/index' });
       }
     },
     // 管理登录
@@ -100,18 +100,18 @@ export default {
         data.role = '0';
         const res = await this.toLogin({ user: data });
         if (res.uid) {
-          this.$router.push({ path: '/user/index' });
+          this.$router.push({ path: '/account/index' });
         }
       } else {
         const res = await this.toLogin({ user: data });
         if (res.uid) {
-          this.$router.push({ path: '/user/index' });
+          this.$router.push({ path: '/account/index' });
         }
       }
     },
     // 返回
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.push({ path: '/user/index' });
     },
   },
   computed: {

+ 2 - 2
src/views/updatePwd/index.vue

@@ -80,11 +80,11 @@ export default {
           type: 'danger',
         });
       }
-      this.$router.push({ path: '/live/index' });
+      this.$router.push({ path: '/login' });
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 0 - 3
src/views/user copy/index.vue

@@ -16,9 +16,6 @@
             <clickBtn></clickBtn>
           </el-col>
         </el-col>
-        <!-- <el-col :span="24" class="foot">
-          <footInfo></footInfo>
-        </el-col> -->
       </el-col>
     </el-row>
   </div>

+ 4 - 2
src/views/user/index.vue

@@ -64,6 +64,7 @@ export default {
   methods: {
     // 选择菜单
     chageAcieve(index) {
+<<<<<<< HEAD
       if (index == 0) {
         this.$set(this, `title`, '调查问卷');
       } else if (index == 1) {
@@ -74,6 +75,9 @@ export default {
         console.log('登录');
         this.$set(this, `title`, '账号管理');
       }
+=======
+      if (index == 3) this.$router.push({ path: '/account/index' });
+>>>>>>> 7df36af78f6c28e14120668807c43aedc8e49ed9
     },
     //跳转详情
     btnClick(data) {
@@ -103,8 +107,6 @@ export default {
     position: relative;
     z-index: 999;
   }
-  .info {
-  }
   .foot {
     height: 50px;
     overflow: hidden;

+ 1 - 1
src/views/userCenter/dock/index.vue

@@ -86,7 +86,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/userCenter/matter/index.vue

@@ -118,7 +118,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/userCenter/myProduct/index.vue

@@ -123,7 +123,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   computed: {

+ 1 - 1
src/views/userCenter/user/index.vue

@@ -94,7 +94,7 @@ export default {
     },
     // 返回
     onClickLeft() {
-      this.$router.push({ path: '/user/index' });
+      this.$router.push({ path: '/account/index' });
     },
   },
   mounted() {