😎优化租户管理-增加租管姓名
This commit is contained in:
parent
13876cd372
commit
9d7a249dd4
@ -49,7 +49,7 @@
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.1" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1159" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1160" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -23,6 +23,11 @@ public class TenantOutput : SysTenant
|
||||
/// </summary>
|
||||
public virtual string AdminAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 真实姓名
|
||||
/// </summary>
|
||||
public string RealName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电子邮箱
|
||||
/// </summary>
|
||||
|
||||
@ -78,6 +78,7 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
Name = b.Name,
|
||||
UserId = a.Id,
|
||||
AdminAccount = a.Account,
|
||||
RealName = a.RealName,
|
||||
Phone = a.Phone,
|
||||
Email = a.Email,
|
||||
ExpirationTime = u.ExpirationTime,
|
||||
@ -179,6 +180,7 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
{
|
||||
var tenantId = tenant.Id;
|
||||
var tenantName = tenant.Name;
|
||||
var tenantMark = tenant.Name + "-租管";
|
||||
|
||||
// 初始化机构
|
||||
var newOrg = new SysOrg
|
||||
@ -197,10 +199,10 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
{
|
||||
Id = tenantId,
|
||||
TenantId = tenantId,
|
||||
Name = "租管-" + tenantName,
|
||||
Name = tenantMark,
|
||||
Code = CommonConst.SysAdminRole,
|
||||
DataScope = DataScopeEnum.All,
|
||||
Remark = tenantName
|
||||
Remark = tenantMark
|
||||
};
|
||||
await _sysRoleRep.InsertAsync(newRole);
|
||||
|
||||
@ -209,9 +211,9 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
{
|
||||
Id = tenantId,
|
||||
TenantId = tenantId,
|
||||
Name = "租管-" + tenantName,
|
||||
Name = tenantMark,
|
||||
Code = tenantName,
|
||||
Remark = tenantName,
|
||||
Remark = tenantMark,
|
||||
};
|
||||
await _sysPosRep.InsertAsync(newPos);
|
||||
|
||||
@ -223,15 +225,15 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
TenantId = tenantId,
|
||||
Account = tenant.AdminAccount,
|
||||
Password = CryptogramUtil.Encrypt(password),
|
||||
NickName = "租管",
|
||||
Email = tenant.Email,
|
||||
Phone = tenant.Phone,
|
||||
RealName = tenant.RealName + "-租管",
|
||||
NickName = tenant.RealName + "-租管",
|
||||
AccountType = AccountTypeEnum.SysAdmin,
|
||||
Phone = tenant.Phone,
|
||||
Email = tenant.Email,
|
||||
OrgId = newOrg.Id,
|
||||
PosId = newPos.Id,
|
||||
Birthday = DateTime.Parse("2000-01-01"),
|
||||
RealName = "租管",
|
||||
Remark = "租管" + tenantName,
|
||||
Remark = tenantMark,
|
||||
};
|
||||
await _sysUserRep.InsertAsync(newUser);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.01.08",
|
||||
"lastBuildTime": "2025.01.09",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -102,7 +102,7 @@
|
||||
"rollup-plugin-visualizer": "^5.14.0",
|
||||
"sass": "^1.83.1",
|
||||
"terser": "^5.37.0",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^6.0.7",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression2": "^1.3.3",
|
||||
|
||||
@ -193,6 +193,14 @@ export interface AddTenantInput {
|
||||
*/
|
||||
orgPid?: number;
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddTenantInput
|
||||
*/
|
||||
realName?: string | null;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*
|
||||
|
||||
@ -209,6 +209,14 @@ export interface TenantOutput {
|
||||
*/
|
||||
adminAccount?: string | null;
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TenantOutput
|
||||
*/
|
||||
realName?: string | null;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*
|
||||
|
||||
@ -193,6 +193,14 @@ export interface UpdateTenantInput {
|
||||
*/
|
||||
orgPid?: number;
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateTenantInput
|
||||
*/
|
||||
realName?: string | null;
|
||||
|
||||
/**
|
||||
* 电子邮箱
|
||||
*
|
||||
|
||||
@ -155,6 +155,8 @@ service.interceptors.response.use(
|
||||
if (error.response) {
|
||||
if (error.response.status === 401) {
|
||||
clearAccessTokens();
|
||||
} else if (error.response.statusCode === 404) {
|
||||
ElMessage.error('接口异常,请联系管理员');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="租户名称" prop="name" :rules="[{ required: true, message: '租户名称不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model="state.ruleForm.name" placeholder="租户名称" clearable />
|
||||
</el-form-item>
|
||||
@ -37,6 +37,11 @@
|
||||
<el-input v-model="state.ruleForm.adminAccount" placeholder="租管账号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="租管姓名" prop="realName" :rules="[{ required: true, message: '租管姓名不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model="state.ruleForm.realName" placeholder="租管姓名" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="电话" prop="phone" :rules="[{ required: true, message: '电话号码不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model="state.ruleForm.phone" placeholder="电话" clearable />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user