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

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 { getTopUrl } from "@/util/util";
import { setStore, getStore, removeStore } from "@/util/store";
import {getDeptTree} from "@/api/system/dept"
export default {
name: "userlogin",
@ -148,7 +149,8 @@ export default {
},
]
},
checked: false
checked: false,
deptData:[],
};
},
created() {
@ -190,6 +192,13 @@ export default {
},
props: [],
methods: {
// getDept(){
// getDeptTree().then(res => {
// console.log('res ====>',res)
// // const column = this.findObject(this.option.column, "parentId");
// // column.dicData = res.data.data;
// });
// },
refreshCode() {
if (this.website.captchaMode) {
getCaptcha().then(res => {
@ -214,6 +223,17 @@ export default {
this.handleLogin();
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() {
this.$refs.loginForm.validate(valid => {
if (valid) {
@ -244,7 +264,12 @@ export default {
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();
}).catch(() => {
loading.close();

Loading…
Cancel
Save