jinlin
2024-02-23 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a
web/src/views/pages/login.vue
@@ -1,6 +1,5 @@
<template>
  <div class="aui-wrapper aui-page__login aui-page__login__border">
    <h2 class="login__h2">{{ $t('brand.lg') }}</h2>
    <div class="aui-content__wrapper">
      <div class="clear"></div>
      <main class="aui-content">
@@ -9,6 +8,7 @@
<!--          <div class="login-header">-->
<!--            &lt;!&ndash;<h3 class="login-title">{{ $t('login.title') }}</h3>&ndash;&gt;-->
<!--          </div>-->
          <h2 class="login__h2">{{ $t('brand.lg') }}</h2>
          <div class="login-body">
<!--            <h3 class="login-title">{{ $t('login.title') }}</h3>-->
            <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="formSubmit()" status-icon>
@@ -45,11 +45,11 @@
                  </el-col>
                </el-row>
              </zt-form-item>
              <el-form-item class="login-form-margin">
         <!--     <el-form-item class="login-form-margin">
                <el-button class="btn" style="margin-bottom:0;float: left" type="primary" @click="changePassword()">修改密码</el-button>
                <el-button class="btn" style="margin-bottom:0;float: right" @click="register">用户注册
                </el-button>
              </el-form-item>
              </el-form-item>-->
              <el-form-item class="login-form-margin">
                <el-button class="btn" style="margin-bottom:0;width: 100%" type="primary" @click="formSubmit()">{{
                  $t('login.clickTitle') }}
@@ -173,20 +173,12 @@
          // console.log(res,'getAdminRoleInfo');
          this.$store.state.user.isAdmin = res.data.isAdmin
          this.$store.state.user.isAssistant = res.data.isAssistant
          this.$store.state.user.isTyRole = res.data.isTyRole
          this.$store.state.user.isCjRole = res.data.isCjRole
          this.$store.state.user.isZcRole = res.data.isZcRole
          this.$store.state.user.isCzRole = res.data.isCzRole
          this.$store.state.user.isBzRole = res.data.isBzRole
          this.$store.state.user.isTzRole = res.data.isTzRole
          this.$store.state.user.isYwzRole = res.data.isYwzRole
          this.$store.state.user.roles = res.data.roles
          this.$store.state.debug = res.data.debug
          this.$store.state.test = res.data.test
          this.$store.state.menuPos = res.data.menuPos
          window.SITE_CONFIG['isAdmin'] = res.data.isAdmin // 权限
          this.loading = false
          console.log(this.$store.state.user.isZcRole, 'this.$store.state.user.isZcRole')
        }).catch(() => {
          console.log('/user/adminRole', 'adminRole')
        })
@@ -220,13 +212,7 @@
                  console.log(res.data.roleName,'res.data.roleName res.data.roleName')
                  if (res.data.roleName != null &&
                    (res.data.roleName.indexOf('系统管理员') >= 0 ||
                      res.data.roleName.indexOf('全部权限') >= 0 ||
                      res.data.roleName.indexOf('总体所角色') >= 0 ||
                      res.data.roleName.indexOf('代表室角色') >= 0 ||
                      res.data.roleName.indexOf('助理角色') >= 0 ||
                      res.data.roleName.indexOf('总厂角色') >= 0 ||
                      res.data.roleName.indexOf('部长角色') >= 0 ||
                      res.data.roleName.indexOf('处长角色') >= 0)
                      res.data.roleName.indexOf('全部权限') >= 0)
                  ) {
                    console.log('TestDjxlHome')
                    // this.$router.push({name: 'TestDjxlHome', params: {roleName: res.data.roleName}})
@@ -237,8 +223,11 @@
                  }
                }
                let roleName = res.data.roleName
                let userSecretClass = res.data.userSecretClass
                localStorage.setItem('roleName', roleName)
                localStorage.setItem('userSecretClass', userSecretClass)
                console.log(localStorage.getItem('roleName'),'localStorage.getItem(\'roleName\')')
                console.log(localStorage.getItem('userSecretClass'),'localStorage.getItem(\'userSecretClass\')')
              }
            }
          })
@@ -250,29 +239,21 @@
<style>
  .login__h2 {
    margin: 0;
    width: 600px;
    position: absolute;
    left:50%;
    top:3%;
    transform: translateX(-50%);
    color: rgba(123, 224, 244, 1);
    font-size: 40px;
    left: -11%;
    top: -10%;
    letter-spacing: 35px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 8px;
  }
  .clear {
    clear: both;
  }
  .login__h2::before,
  .login__h2::after {
    display: inline;
    margin: 5px;
    content: '/////';
    font-size: 25px;
    font-weight: bold;
    font-style: oblique;
  }
  .login-left-bg {
    position: absolute;