'del_tenantName'

This commit is contained in:
gtz 2024-02-19 09:08:17 +08:00
parent b0e38a378b
commit b672d0ff57

View File

@ -86,18 +86,18 @@
:model="loginForm" :model="loginForm"
:rules="LoginRules" :rules="LoginRules"
class="login-form"> class="login-form">
<el-form-item prop="tenantName" v-if="tenantEnable"> <!-- <el-form-item prop="tenantName" v-if="tenantEnable">
<el-input <el-input
v-model="loginForm.tenantName" v-model="loginForm.tenantName"
type="text" type="text"
auto-complete="off" auto-complete="off"
placeholder="租户"> placeholder="租户">
<!-- <svg-icon <svg-icon
slot="prefix" slot="prefix"
icon-class="tree" icon-class="tree"
class="el-input__icon input-icon" /> --> class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item> -->
<!-- 账号密码登录 --> <!-- 账号密码登录 -->
<div> <div>
<el-form-item prop="username"> <el-form-item prop="username">
@ -244,25 +244,25 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
tenantName: [ // tenantName: [
{ required: true, trigger: 'blur', message: '租户不能为空' }, // { required: true, trigger: 'blur', message: '' },
{ // {
validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
// debugger // // debugger
getTenantIdByName(value).then((res) => { // getTenantIdByName(value).then((res) => {
const tenantId = res.data; // const tenantId = res.data;
if (tenantId && tenantId >= 0) { // if (tenantId && tenantId >= 0) {
// // //
setTenantId(tenantId); // setTenantId(tenantId);
callback(); // callback();
} else { // } else {
callback('租户不存在'); // callback('');
} // }
}); // });
}, // },
trigger: 'blur', // trigger: 'blur',
}, // },
], // ],
}, },
loading: false, loading: false,
redirect: undefined, redirect: undefined,