diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue index 44e11ce..54a2d6c 100644 --- a/src/page/login/userlogin.vue +++ b/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();