8a7fdd668f6ed415ff0bfa53d9e759cca73a6dbc..c4d0466cec9c334d9f0e74fe44576364a019aed3
2024-07-16 fuliqi
教师端隐藏管理员列表和教师列表
c4d046 对比 | 目录
2024-07-12 fuliqi
会议样式调整
5bc099 对比 | 目录
4个文件已修改
47 ■■■■ 已修改文件
src/store/getters.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/router.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/meet/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/getters.js
@@ -4,6 +4,7 @@
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,
  userName: state => state.user.userName,
  userInfo: state => state.user.userInfo,
  routes: state => state.router.routes
}
export default getters
src/store/modules/router.js
@@ -1,4 +1,5 @@
import { constantRoutes } from '@/router'
import Cookies from 'js-cookie'
let state = {
  routes: constantRoutes
@@ -7,11 +8,33 @@
const mutations = {
  initRoutes: (state) => {
    state.routes = constantRoutes
    var adminUserInfoString = Cookies.get('adminUserInfo');
    if (adminUserInfoString && JSON.parse(adminUserInfoString).role !== 3) {
      state.routes.forEach(item => {
        if (item.name === 'UserPage') {
          item.children.forEach(child => {
            if (child.name === 'UserTeacherPageList' || child.name === 'UserAdminPageList') {
              child.hidden = true
            }
          })
        }
      })
    }
    if (adminUserInfoString && JSON.parse(adminUserInfoString).role === 3) {
      state.routes.forEach(item => {
        if (item.name === 'UserPage') {
          item.children.forEach(child => {
            if (child.name === 'UserTeacherPageList' || child.name === 'UserAdminPageList') {
              child.hidden = false
            }
          })
        }
      })
    }
  }
}
const actions = {
}
const actions = {}
export default {
  namespaced: true,
src/views/login/index.vue
@@ -115,8 +115,8 @@
        remember: false
      },
      loginRules: {
        userName: [{ required: true, trigger: 'blur'}],
        password: [{ required: true, trigger: 'blur'}]
        userName: [{ required: true, trigger: 'blur' }],
        password: [{ required: true, trigger: 'blur' }]
      },
      passwordType: 'password',
      capsTooltip: false,
@@ -140,7 +140,7 @@
  methods: {
    updatePassword () {
      if (this.updatePasswordForm.newPassword !== this.updatePasswordForm.confirmPassword) {
        this.$message.error("两次输入的密码不一致")
        this.$message.error('两次输入的密码不一致')
        return
      }
      UserApi.updatePassword(this.updatePasswordForm).then(res => {
@@ -189,6 +189,7 @@
            }
            if (result && result.code === 1) {
              _this.setUserName(_this.loginForm.userName)
              _this.setUserInfo(result.data)
              _this.$router.push({ path: '/dashboard' })
            } else {
              _this.loading = false
@@ -205,7 +206,7 @@
        }
      })
    },
    ...mapMutations('user', ['setUserName'])
    ...mapMutations('user', ['setUserName', 'setUserInfo'])
  }
}
</script>
@@ -333,4 +334,3 @@
  }
}
</style>
src/views/meet/index.vue
@@ -1,8 +1,9 @@
<template>
  <div>
    <div style="display: flex; flex-direction: row; position: relative">
      <div id="meet" ref="meet"/>
      <div style="padding-top: 5px; padding-left: 5px; position: absolute;right: 15px">
    <div style="display: flex; flex-direction: row;">
      <div id="meet" ref="meet" style="flex-grow: 1;">
      </div>
      <div style="padding-top: 5px; padding-left: 5px;right: 15px">
        <el-button type="success" size="small" @click="hiddenStudent" >{{getShowText()}}</el-button>
        <el-row v-show="showStudent">
          <el-row :gutter="5">
@@ -127,7 +128,6 @@
    }
  },
  mounted () {
    this.width = window.innerWidth * 0.8
    this.height = window.innerHeight
    this.meetId = this.$route.query.meetId
    this.getStudentList()
@@ -138,7 +138,6 @@
    const userInfo = userInfoStr ? JSON.parse(userInfoStr) : null
    const options = {
      roomName: roomName,
      width: this.width,
      height: this.height,
      parentNode: this.$refs.meet,
      lang: 'zh_CN',