'123'
This commit is contained in:
parent
17720a24bc
commit
447880ef21
|
@ -27,8 +27,8 @@
|
|||
|
||||
|
||||
<el-dialog :title="switchAccountTitle" :visible.sync="switchAccountOpen" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" label-width="100px">
|
||||
<el-form-item label="账号" prop="Name">
|
||||
<el-form ref="form" :model="form":rules="rules" label-width="100px">
|
||||
<el-form-item label="账号" prop="account">
|
||||
<el-input v-model="form.account" placeholder="请输入账号" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -85,7 +85,13 @@ export default {
|
|||
switchAccountTitle: "",
|
||||
// 是否显示弹出层
|
||||
switchAccountOpen: false,
|
||||
form: {}
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
account: [
|
||||
{required: true, message: "账号不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -128,11 +134,15 @@ export default {
|
|||
this.switchAccountTitle = "账号切换";
|
||||
this.switchAccountOpen = true;
|
||||
},
|
||||
switchAccountConfirm(account){
|
||||
//获取 OA登录-token
|
||||
getSwitchAccountToken(account).then(response => {
|
||||
this.switchAccountOpen = false;
|
||||
window.open('http://localhost:3335/ssoLogin?loginid='+account+'&token='+response.token, '_self');
|
||||
switchAccountConfirm(account) {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
//获取 OA登录-token
|
||||
getSwitchAccountToken(account).then(response => {
|
||||
this.switchAccountOpen = false;
|
||||
window.open('http://localhost:3335/ssoLogin?loginid=' + account + '&token=' + response.token, '_self');
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
toggleSideBar() {
|
||||
|
|
Loading…
Reference in New Issue