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