| | |
| | | status-icon |
| | | > |
| | | <el-form-item prop="selectInput"> |
| | | <el-select v-model="loginForm.value" placeholder="请选择组织" style="width: 326px" @change="selectchange"> |
| | | <el-select v-model="loginForm.tenantId" placeholder="请选择租户" style="width: 100%" @change="selectchange"> |
| | | <i slot="prefix" class="el-icon-s-operation"/> |
| | | <el-option |
| | | v-for="(item,index) in loginForm.region" |
| | |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | }, |
| | | loginForm: { |
| | | //租户ID |
| | | tenantId: "000000", |
| | | tenantId: "", |
| | | //部门ID |
| | | deptId: "", |
| | | //角色ID |
| | | roleId: "", |
| | | //用户名 |
| | | username: "admin", |
| | | username: "", |
| | | //密码 |
| | | password: "admin", |
| | | password: "", |
| | | selectInput: '', |
| | | //下拉input数据 |
| | | value: '管理组', |
| | |
| | | }, |
| | | value: { |
| | | selectInput: [ |
| | | {required: true, message: "请选择组织", trigger: "blur"} |
| | | {required: true, message: "请选择租户", trigger: "blur"} |
| | | ], |
| | | username: [ |
| | | {required: true, message: "请输入用户名", trigger: "blur"} |
| | |
| | | //在mounted获取首页下拉菜单数据 |
| | | this.$axios.get('/api/ubcs-system/tenant/tenant-map').then(res => { |
| | | if (res.data.code == 200) { |
| | | this.loginForm.tenantId = res.data.data[0].TENANT_ID; |
| | | this.loginForm.region = res.data.data |
| | | } |
| | | }) |
| | |
| | | }, |
| | | handleLogin: function () { |
| | | this.userInfo = this.$store.state.upadatastatus |
| | | console.log(this.userInfo) |
| | | localStorage.setItem('username',this.loginForm.username) |
| | | this.$refs.loginForm.validate(valid => { |
| | | if (valid) { |
| | | const loading = this.$loading({ |
| | |
| | | //把判断密码策略修改的值存进本地,然后再路由权限js文件里面获取再做判断,不然刷新会进入首页(因为在有id和token的情况下,刷新页面或者进入登录页会自动进入首页) |
| | | //index页面也可以用到这个值来判断是否是超管身份登录来判断是否提醒过期时间等 |
| | | localStorage.setItem("updataid",JSON.stringify(this.userInfo)) |
| | | localStorage.setItem("userId",this.userInfo.user_id) |
| | | loading.close(); |
| | | }).catch(() => { |
| | | loading.close(); |