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