| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" @click.native.prevent="handleLogin" class="login-submit">{{ |
| | | $t("login.submit") }} |
| | | $t("login.submit") |
| | | }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | this.getTenant() |
| | | this.refreshCode() |
| | | }, |
| | | mounted () { }, |
| | | mounted() { |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel", "userInfo"]), |
| | | }, |
| | |
| | | this.$store |
| | | .dispatch("LoginByUsername", this.loginForm) |
| | | .then(() => { |
| | | console.log("userInfo",this.userInfo) |
| | | this.$store.dispatch("GetMenu", [this.userInfo, ""]).then((data) => { |
| | | //登录跳转首页改完跳转保安单位情况智能分析 |
| | | let path = this.tagWel.value |
| | | |
| | | console.log(this.userInfo) |
| | | // let path = this.tagWel.value登录跳转首页改完跳转保安单位情况智能分析 |
| | | let path = '/securityAnalysis' |
| | | let menu = data.filter(e => e.path == "/securityAnalysis/index") |
| | | if (menu.length > 0) { |
| | | path = '/securityAnalysis' |
| | | } |
| | | if (this.userInfo.role_name.indexOf("考勤管理员") > -1) { |
| | | path = "check/record" |
| | | } |
| | | this.$router.push({ path: path }) |
| | | loading.close() |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | loading.close() |