guhongwei 4 years ago
parent
commit
b02b3fec93

+ 134 - 0
src/layout/adminCenter/menuInfo.vue

@@ -0,0 +1,134 @@
+<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-pie-chart"></i>
+                <span>展会管理</span>
+              </template>
+            </el-menu-item>
+            <el-menu-item index="3">
+              <template slot="title">
+                <i class="el-icon-notebook-1"></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-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';
+const { mapActions: login } = createNamespacedHelpers('login');
+const { mapActions: personalChat } = createNamespacedHelpers('personalchat');
+export default {
+  name: 'menuInfo',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      topUrl: require('@/assets/live/square_big.png'),
+      num: '1',
+      haveMsg: false,
+    };
+  },
+  created() {
+    this.$set(this, `num`, this.$route.query.num);
+  },
+  mounted() {},
+  methods: {
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
+    // 菜单跳转
+    selectMenu(key) {
+      if (key == '6') {
+        this.logout();
+        this.$message({
+          message: '退出登录成功',
+          type: 'success',
+        });
+        this.$router.push({ path: '/newlogin' });
+      } else {
+        this.$router.push({ path: '/adminCenter/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>

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

@@ -12,7 +12,12 @@
           <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' || user.role == '7'">
+              <button
+                type="text"
+                class="userCenter"
+                @click="stnmae"
+                v-if="user.role == '2' || user.role == '3' || user.role == '4' || user.role == '6' || user.role == '7'"
+              >
                 个人中心
               </button>
               <button type="button" class="logininfo" @click="zhuxiao">注销</button>
@@ -102,8 +107,13 @@ export default {
     stnmae() {
       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');
+      } else if (this.user.role == '5') {
+        this.$router.push('/hallList/index');
+      } else if (this.user.role == '4') {
+        this.$router.push({ path: '/adminCenter/index', query: { num: '1' } });
+      } else {
+        this.$router.push('/market/index');
+      }
     },
     async zhuxiao() {
       this.logout();

+ 4 - 3
src/layout/login/loginMain.vue

@@ -17,10 +17,11 @@
                   <el-form-item label="用户类别">
                     <el-radio-group v-model="form.role">
                       <el-radio label="7">临时用户</el-radio>
-                      <el-radio label="2">个人</el-radio>
-                      <el-radio label="3">机构管理员</el-radio>
-                      <el-radio label="6">专家</el-radio>
+                      <el-radio label="2">个人用户</el-radio>
+                      <el-radio label="3">机构用户</el-radio>
+                      <el-radio label="6">专家用户</el-radio>
                       <el-radio label="8">VIP用户</el-radio>
+                      <el-radio label="4">管理用户</el-radio>
                     </el-radio-group>
                   </el-form-item>
                   <el-col :span="24" class="loginSubmit"><el-button type="primary" @click="loginSubmit">登录</el-button></el-col>

+ 53 - 0
src/views/adminCenter/basicInfo/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="leftTop"> <span>|</span> <span>基本信息</span> </el-col>
+        <el-col :span="24" class="info">
+          基本信息
+        </el-col>
+      </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>
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.info {
+  padding: 0 40px 0 0;
+}
+</style>

+ 53 - 0
src/views/adminCenter/dockInfo/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="leftTop"> <span>|</span> <span>展会管理</span> </el-col>
+        <el-col :span="24" class="info">
+          展会管理
+        </el-col>
+      </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>
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.info {
+  padding: 0 40px 0 0;
+}
+</style>

+ 81 - 3
src/views/adminCenter/index.vue

@@ -1,15 +1,68 @@
 <template>
   <div id="index">
-    <p>管理者中心</p>
+    <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'">
+                <dockInfo></dockInfo>
+              </span>
+              <span v-else-if="num == '3'">
+                <transaction></transaction>
+              </span>
+              <span v-else-if="num == '4'">
+                <statisInfo></statisInfo>
+              </span>
+              <span v-else-if="num == '5'">
+                <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/adminCenter/menuInfo.vue';
+import foot from '@/layout/live/foot.vue';
+import basicInfo from './basicInfo/index.vue';
+import transaction from './transaction/index.vue';
+import dockInfo from './dockInfo/index.vue';
+import statisInfo from './statisInfo/index.vue';
+import password from './password/index.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    heads,
+    menuInfo,
+    foot,
+    basicInfo, //个人中心
+    dockInfo, //展会管理
+    transaction, //交易审核
+    statisInfo, //统计报表
+    password, //修改密码
+  },
   data: function() {
     return {};
   },
@@ -17,6 +70,9 @@ export default {
   methods: {},
   computed: {
     ...mapState(['user']),
+    num() {
+      return this.$route.query.num;
+    },
     pageTitle() {
       return `${this.$route.meta.title}`;
     },
@@ -27,4 +83,26 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<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>

+ 98 - 0
src/views/adminCenter/password/index.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="leftTop"> <span>|</span> <span>修改密码</span> </el-col>
+        <el-col :span="24" class="info">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-form-item label="旧密码" prop="oldpasswd">
+              <el-input v-model="form.oldpasswd" placeholder="请输入旧密码" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="新密码" prop="newpasswd">
+              <el-input v-model="form.newpasswd" placeholder="请输入新密码" show-password></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button @click="resetForm('form')">取消</el-button>
+              <el-button type="primary" @click="submitForm('form')">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: password } = createNamespacedHelpers('password');
+const { mapActions: login } = createNamespacedHelpers('login');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      form: {},
+      rules: {
+        oldpasswd: [{ required: true, message: '请输入旧密码', trigger: 'blur' }],
+        newpasswd: [{ required: true, message: '请输入新密码', trigger: 'blur' }],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
+    ...password({ userFetch: 'fetch', userCreate: 'create', userUpdate: 'update' }),
+    resetForm(formName) {
+      this.$refs[formName].resetFields();
+    },
+    async submitForm(formName) {
+      this.$refs[formName].validate(async valid => {
+        if (valid) {
+          this.form.id = this.user.uid;
+          let res = await this.userUpdate(this.form);
+          if (res.errcode === 0) {
+            this.$message({
+              message: '密码修改成功',
+              type: 'success',
+            });
+            this.logout();
+            this.$router.push({ path: '/newlogin' });
+          } else {
+            this.$message.error('密码修改失败');
+          }
+        } else {
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.info {
+  padding: 40px 40px 0 0;
+}
+</style>

+ 53 - 0
src/views/adminCenter/statisInfo/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="leftTop"> <span>|</span> <span>统计报表</span> </el-col>
+        <el-col :span="24" class="info">
+          统计报表
+        </el-col>
+      </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>
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.info {
+  padding: 0 40px 0 0;
+}
+</style>

+ 53 - 0
src/views/adminCenter/transaction/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="leftTop"> <span>|</span> <span>交易审核</span> </el-col>
+        <el-col :span="24" class="info">
+          交易审核
+        </el-col>
+      </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>
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.info {
+  padding: 0 40px 0 0;
+}
+</style>

+ 7 - 11
src/views/hall/direct.vue

@@ -4,22 +4,18 @@
       <el-col :span="24">
         <div class="livetop">
           <div class="w_1200">
-            <!-- <el-col v-if="">
-                <el-col v-else-if="">
-                  <el-col else> -->
             <el-col :span="24" class="title">
-              <!-- 吉林省计算中心对接直播大厅 -->
               <el-col :span="16"> {{ title }} </el-col>
               <el-col :span="8" class="userper" v-if="this.user.uid">
-                <span style="padding:0 10px 0 0 "> {{ user.name }}</span
-                ><span
+                <span style="padding:0 10px 0 0 "> {{ user.name }}</span>
+                <span
                   v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6'"
                   @click="$router.push({ path: '/userCenter/index', query: { num: 1 } })"
-                  >个人中心</span
-                ><span v-if="this.user.role == '4' || this.user.role == '8'" @click="$router.push({ path: '/vipCenter/index', query: { num: 1 } })"
-                  >个人中心</span
-                ></el-col
-              >
+                >
+                  个人中心
+                </span>
+                <span v-if="this.user.role == '4'" @click="$router.push({ path: '/adminCenter/index', query: { num: 1 } })">个人中心</span>
+              </el-col>
             </el-col>
             <el-col :span="24" class="zhuban">
               <span>主办方:</span>