政府角色登录进入大屏页面

main
jinna 2 years ago
parent ee165a6e3b
commit cff22f6338
  1. 29
      src/page/login/userlogin.vue

@ -62,6 +62,7 @@ import { info } from "@/api/system/tenant";
import { getCaptcha } from "@/api/user"; import { getCaptcha } from "@/api/user";
import { getTopUrl } from "@/util/util"; import { getTopUrl } from "@/util/util";
import { setStore, getStore, removeStore } from "@/util/store"; import { setStore, getStore, removeStore } from "@/util/store";
import {getDeptTree} from "@/api/system/dept"
export default { export default {
name: "userlogin", name: "userlogin",
@ -148,7 +149,8 @@ export default {
}, },
] ]
}, },
checked: false checked: false,
deptData:[],
}; };
}, },
created() { created() {
@ -190,6 +192,13 @@ export default {
}, },
props: [], props: [],
methods: { methods: {
// getDept(){
// getDeptTree().then(res => {
// console.log('res ====>',res)
// // const column = this.findObject(this.option.column, "parentId");
// // column.dicData = res.data.data;
// });
// },
refreshCode() { refreshCode() {
if (this.website.captchaMode) { if (this.website.captchaMode) {
getCaptcha().then(res => { getCaptcha().then(res => {
@ -214,6 +223,17 @@ export default {
this.handleLogin(); this.handleLogin();
done(); done();
}, },
// getAllIds(tree, result) {
// // id
// for (const i in tree) {
// result.push(tree[i].id); //
// if (tree[i].children) {
// //
// getAllIds(tree[i].children, result);
// }
// }
// return result;
// },
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
if (valid) { if (valid) {
@ -244,7 +264,12 @@ export default {
return false; return false;
} }
} }
this.$router.push({ path: this.tagWel.value }); // console.log('user ==========>',this.userInfo)
if(this.userInfo.role_name == '政府大屏'){
this.$router.push({ path: '/energySourcesProvince/index' });
}else{
this.$router.push({ path: this.tagWel.value });
}
loading.close(); loading.close();
}).catch(() => { }).catch(() => {
loading.close(); loading.close();

Loading…
Cancel
Save