guhongwei 5 年之前
父節點
當前提交
4efec3da6a

+ 3 - 3
src/layout/live/head.vue

@@ -12,7 +12,7 @@
           <p class="username">
             <span v-if="user.uid">
               {{ user.name }}
-              <button type="text" class="userCenter" @click="stnmae" v-if="user.role == '2' || user.role == '3' || user.role == '6'">
+              <button type="text" class="userCenter" @click="stnmae" v-if="user.role == '2' || user.role == '3' || user.role == '6' || user.role == '7'">
                 个人中心
               </button>
               <button type="button" class="logininfo" @click="zhuxiao">注销</button>
@@ -100,8 +100,8 @@ export default {
       this.$router.push({ path: '/newlogin' });
     },
     stnmae() {
-      if (this.user.role == '2' || this.user.role == '3' || this.user.role == '6') {
-        this.$router.push({ path: '/enterprise/enterprisejb' });
+      if (this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7') {
+        this.$router.push({ path: '/userCenter/index', query: { num: '1' } });
       } else if (this.user.role == '5') this.$router.push('/hallList/index');
       else this.$router.push('/market/index');
     },

+ 82 - 0
src/layout/userCenter/heads.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="heads">
+    <div class="w_0100">
+      <div class="superbanner">
+        <img :src="top_bg" />
+      </div>
+      <div class="supertop">
+        <div class="w_1200">
+          <p>
+            欢迎来到吉林省计算中心科技平台
+          </p>
+          <p>
+            <span v-if="user && user.name"
+              >{{ user.name }}
+
+              <button type="button" class="logininfo" @click="zhuxiao">注销</button>
+            </span>
+          </p>
+        </div>
+      </div>
+      <div class="superlogo">
+        <div class="w_1200">
+          <a href="/platlive">
+            <img :src="logo" />
+            <span>
+              吉林省计算中心科技平台
+            </span>
+          </a>
+        </div>
+      </div>
+      <div class="supermenu">
+        <div class="w_1200"></div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: login } = createNamespacedHelpers('login');
+export default {
+  name: 'heads',
+  props: {},
+  components: {},
+  data: () => {
+    return {
+      top_bg: require('@/assets/live/top_bg.png'),
+      logo: require('@/assets/live/logo.png'),
+    };
+  },
+  created() {},
+  methods: {
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
+    async zhuxiao() {
+      this.logout();
+      this.$message({
+        message: '注销成功',
+        type: 'success',
+      });
+      this.toLogin();
+    },
+    async toLogin() {
+      this.$router.push({ path: '/platlive' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import '~@/style/style.css';
+.logininfo {
+  font-size: 20px;
+  margin: 0 0 0 5px;
+}
+/deep/.superbanner {
+  position: relative;
+  height: 250px;
+  overflow: hidden;
+}
+</style>

+ 125 - 0
src/layout/userCenter/menuInfo.vue

@@ -0,0 +1,125 @@
+<template>
+  <div id="menuInfo">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-image :src="topUrl"></el-image>
+          <span>个人中心</span>
+        </el-col>
+        <el-col :span="24">
+          <el-menu :default-active="num" @select="selectMenu" text-color="#999" active-text-color="#044b79">
+            <!-- <el-menu-item :index="index + ''" v-for="(item, index) in menu" :key="index">
+              <template slot="title">
+                <i class="el-icon-tickets"></i>
+                <span>{{ item.title }}</span>
+              </template>
+            </el-menu-item> -->
+            <el-menu-item index="1">
+              <template slot="title">
+                <i class="el-icon-tickets"></i>
+                <span>基本信息</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="2">
+              <template slot="title">
+                <i class="el-icon-chat-dot-square"></i>
+                <span>消息管理</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="3">
+              <template slot="title">
+                <i class="el-icon-pie-chart"></i>
+                <span>我的发布</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="4">
+              <template slot="title">
+                <i class="el-icon-notebook-1"></i>
+                <span>事项管理</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="5">
+              <template slot="title">
+                <i class="el-icon-video-camera"></i>
+                <span>展会管理</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="6">
+              <template slot="title">
+                <i class="el-icon-edit"></i>
+                <span>修改密码</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="7">
+              <template slot="title">
+                <i class="el-icon-circle-close"></i>
+                <span>退出登录</span>
+              </template>
+            </el-menu-item>
+          </el-menu>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'menuInfo',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      topUrl: require('@/assets/live/square_big.png'),
+      num: '1',
+    };
+  },
+  created() {
+    this.$set(this, `num`, this.$route.query.num);
+  },
+  methods: {
+    selectMenu(key) {
+      this.$router.push({ path: '/userCenter/index', query: { num: key } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 50px;
+  line-height: 50px;
+  text-align: center;
+  border-bottom: 1px solid #2d64b3;
+  .el-image {
+    float: left;
+    padding: 10px 40px;
+    width: 30px;
+    height: 30px;
+  }
+  span {
+    font-size: 24px;
+    color: #92959a;
+    font-weight: 600;
+    float: left;
+    text-align: left;
+  }
+}
+/deep/.el-menu-item {
+  font-weight: bold;
+  font-size: 20px;
+  text-align: center;
+  border-bottom: 1px solid #2d64b3;
+  margin: 0 20px;
+}
+</style>

+ 7 - 2
src/router/index.js

@@ -161,7 +161,6 @@ const live = [
         name: 'live_applys',
         component: () => import('../views/hall/liveApply.vue'),
       },
-
       {
         path: '/market/contact',
         name: 'contact',
@@ -246,7 +245,6 @@ const live = [
     name: 'enterprisefabu',
     component: () => import('../views/enterprise/enterprisefabu.vue'),
   },
-
   {
     path: '/direct',
     name: 'live_direct',
@@ -301,6 +299,13 @@ const live = [
     name: 'home_index',
     component: () => import('../views/home.vue'),
   },
+  // 5-21新增改版个人中心
+  // 基本信息
+  {
+    path: '/userCenter/index',
+    meta: { title: '个人中心', subSite: true },
+    component: () => import('../views/userCenter/index.vue'),
+  },
 ];
 const routes = [...live];
 

File diff suppressed because it is too large
+ 0 - 1237
src/views/direct copy.vue


+ 0 - 152
src/views/enterprise/appointment copy.vue

@@ -1,152 +0,0 @@
-<template>
-  <div id="adviserList">
-    <appointment-detail
-      :liebiaoList="liebiaoList"
-      @query="search"
-      :total="total"
-      :resultTable="resultTable"
-      @onsave="onsaveClick"
-      @success="success"
-      @shibai="shibai"
-      :limit="limit"
-      @handleCurrentChange="handleCurrentChange"
-      :pageSize="pageSize"
-      :display="display"
-      @searchinfo="look"
-    ></appointment-detail>
-  </div>
-</template>
-
-<script>
-import appointmentDetail from '@/components/enterprise/appointment.vue';
-import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: apply } = createNamespacedHelpers('apply');
-const { mapActions: login } = createNamespacedHelpers('login');
-const { mapActions: place } = createNamespacedHelpers('place');
-
-export default {
-  name: 'adviserList',
-  props: {},
-  components: {
-    appointmentDetail,
-  },
-  data: () => ({
-    total: 0,
-    limit: 4,
-    pageSize: 4,
-    info: {},
-    datas: {},
-    display: 'list',
-    liebiaoList: [
-      { name: '基本信息' },
-      { name: '消息管理' },
-      { name: '我的发布' },
-      { name: '事项管理' },
-      { name: '展会管理' },
-      //  // { name: '返回首页' },
-      { name: '修改密码' },
-      { name: '退出账号' },
-    ],
-    resultTable: [],
-    form: {},
-  }),
-  created() {
-    this.search();
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-  methods: {
-    ...dock(['query', 'delete', 'update']),
-    ...apply({ applyupdate: 'update' }),
-    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
-    ...place({ palcequery: 'query', palcefetch: 'fetch' }),
-    //查询
-    async search({ skip = 0, limit = 0 } = { skip: 0, limit: 0 }) {
-      let res = await this.query({ skip, limit });
-      for (const val of res.data) {
-        let parent = val.province;
-        let places = val.place;
-        let reslte = await this.palcequery({ level: 1, parent });
-        let resltes = await this.palcequery({ level: 2, parent });
-        var arr = reslte.data.filter(item => item.code === parent);
-        var cre = resltes.data.filter(item => item.code === places);
-        for (const shi of cre) {
-          val.shi = shi.name;
-        }
-        for (const sheng of arr) {
-          val.sheng = sheng.name;
-        }
-      }
-      this.$set(this, `resultTable`, res.data);
-      this.$set(this, `total`, res.total);
-    },
-
-    //查询
-    async searchinfo({ skip = 0, limit = 0, currentPage } = { skip: 0, limit: 0 }) {
-      this.display = 'dadad';
-      this.$set(this, `total`, this.datas.apply.length);
-      const newProducts = [];
-      for (let index = skip; index < skip + limit; index++) {
-        if (this.datas.apply[index]) {
-          newProducts.push(this.datas.apply[index]);
-        }
-      }
-      this.$set(this, `resultTable`, newProducts);
-    },
-
-    look(row) {
-      this.display = 'dadad';
-      this.$set(this, `datas`, row);
-      this.searchinfo();
-    },
-    async onsaveClick({ id }) {
-      if (id === '基本信息') {
-        this.$router.push({ path: '/enterprise/enterprisejb' });
-      } else if (id === '消息管理') {
-        this.$router.push({ path: '/enterprise/enterprisexx' });
-      } else if (id === '我的发布') {
-        this.$router.push({ path: '/enterprise/enterprisefabu' });
-      } else if (id === '事项管理') {
-        this.$router.push({ path: '/enterprise/enterprisedg' });
-      } else if (id === '展会管理') {
-        this.$router.push({ path: '/enterprise/appointment' });
-      } else if (id === '修改密码') {
-        this.$router.push({ path: '/enterprise/xiugai' });
-      } else if (id === '返回首页') {
-        this.$router.push({ path: '/home' });
-      } else if (id === '退出账号') {
-        this.logout();
-        this.$message({
-          message: '注销成功',
-          type: 'success',
-        });
-        this.toLogin();
-      }
-    },
-    async toLogin() {
-      this.$router.push({ path: '/platlive' });
-    },
-    handleCurrentChange({ currentPage }) {
-      this.searchinfo({ skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
-    },
-    async success(row) {
-      row.status = '1';
-      row.dock_id = this.datas.id;
-      row.id = row._id;
-      let res = await this.applyupdate(row);
-      this.$checkRes(res, '通过审核', '添加失败');
-    },
-    async shibai(row) {
-      row.status = '2';
-      row.dock_id = this.datas.id;
-      row.id = row._id;
-      let res = await this.applyupdate(row);
-      this.$checkRes(res, '审核拒绝', '添加失败');
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 34 - 0
src/views/userCenter/basicInfo/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        基本信息
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 34 - 0
src/views/userCenter/dockInfo/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        展会管理
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 34 - 0
src/views/userCenter/eventInfo/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        事项管理
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 113 - 0
src/views/userCenter/index.vue

@@ -0,0 +1,113 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <heads></heads>
+        </el-col>
+        <el-col :span="24" class="main">
+          <div class="w_1200">
+            <el-col :span="4" class="mainMenu">
+              <menuInfo></menuInfo>
+            </el-col>
+            <el-col :span="19" class="mainMess">
+              <span v-if="num == '1'">
+                <basicInfo></basicInfo>
+              </span>
+              <span v-else-if="num == '2'">
+                <message></message>
+              </span>
+              <span v-else-if="num == '3'">
+                <productInfo></productInfo>
+              </span>
+              <span v-else-if="num == '4'">
+                <eventInfo></eventInfo>
+              </span>
+              <span v-else-if="num == '5'">
+                <dockInfo></dockInfo>
+              </span>
+              <span v-else-if="num == '6'">
+                <password></password>
+              </span>
+              <span v-else>
+                退出登录
+              </span>
+            </el-col>
+          </div>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <foot></foot>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import heads from '@/layout/userCenter/heads.vue';
+import menuInfo from '@/layout/userCenter/menuInfo.vue';
+import foot from '@/layout/live/foot.vue';
+import basicInfo from './basicInfo/index.vue';
+import message from './message/index.vue';
+import productInfo from './productInfo/index.vue';
+import eventInfo from './eventInfo/index.vue';
+import dockInfo from './dockInfo/index.vue';
+import password from './password/index.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    heads,
+    menuInfo,
+    foot,
+    basicInfo, //基本信息
+    message, //消息管理
+    productInfo, //我的发布
+    eventInfo, //事项管理
+    dockInfo, //展会管理
+    password, //修改密码
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    num() {
+      return this.$route.query.num;
+    },
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 80%;
+  margin: 0 auto;
+}
+.info {
+  background-color: #e9edf6;
+}
+.main {
+  min-height: 600px;
+  margin: 15px 0;
+}
+.mainMenu {
+  width: 20%;
+  min-height: 600px;
+  background-color: #fff;
+}
+.mainMess {
+  float: right;
+  min-height: 600px;
+  background-color: #fff;
+}
+</style>

+ 43 - 0
src/views/userCenter/message/index.vue

@@ -0,0 +1,43 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <span v-if="display">
+          <p>消息管理</p>
+          <el-button @click="display = false">添加</el-button>
+        </span>
+        <span v-else>
+          <p>消息管理添加</p>
+          <el-button @click="display = true">返回</el-button>
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      display: true,
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 34 - 0
src/views/userCenter/password/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        修改密码
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 34 - 0
src/views/userCenter/productInfo/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        我的发布
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>