main
jn517618 2 years ago
parent 3314c88815
commit 07cc682894
  1. BIN
      dist.zip
  2. 27
      src/page/login/userlogin.vue

Binary file not shown.

@ -149,8 +149,8 @@ export default {
]
},
checked: false,
deptData:[],
deptName:'',
deptData: [],
deptName: '',
};
},
created() {
@ -216,7 +216,7 @@ export default {
this.handleLogin();
done();
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
@ -226,10 +226,10 @@ export default {
spinner: "el-icon-loading"
});
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
setStore({ name: 'checked', content: this.checked, type: 'boolean' })
setStore({ name: 'checked', content: this.checked })
if (this.checked) {
setStore({ name: 'username', content: this.loginForm.username, type: 'string' })
setStore({ name: 'password', content: this.loginForm.password, type: 'string' })
setStore({ name: 'username', content: this.loginForm.username })
setStore({ name: 'password', content: this.loginForm.password })
} else {
removeStore({ name: 'username' })
removeStore({ name: 'password' })
@ -248,12 +248,12 @@ export default {
}
}
console.log('user ==========>',this.userInfo)
if(this.userInfo.role_name == '政府大屏'){
console.log('user ==========>', this.userInfo)
if (this.userInfo.role_name == '政府大屏') {
this.$router.push({ path: '/energySourcesProvince/index' });
}else if(this.userInfo.role_name == '厂区大屏'){
this.$router.push({ path: '/energySources/index',query:{deptId:this.userInfo.dept_id} });
}else{
} else if (this.userInfo.role_name == '厂区大屏') {
this.$router.push({ path: '/energySources/index', query: { deptId: this.userInfo.dept_id } });
} else {
this.$router.push({ path: this.tagWel.value });
}
loading.close();
@ -276,11 +276,6 @@ export default {
this.$parent.$refs.login.style.backgroundImage = `url(${data.data.backgroundUrl})`;
}
})
},
onChange(v) {
if (v) {
setStore({ name: 'username', content: this.loginForm.username })
}
}
}
};

Loading…
Cancel
Save