Prechádzať zdrojové kódy

增加租户管理页面

zuohuaijun 3 rokov pred
rodič
commit
e27fa446d6
25 zmenil súbory, kde vykonal 650 pridanie a 661 odobranie
  1. 4 59
      Admin.NET/Admin.NET.Core/Admin.NET.Core.xml
  2. 2 2
      Admin.NET/Admin.NET.Core/Entity/SysTenant.cs
  3. 1 1
      Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
  4. 2 2
      Admin.NET/Admin.NET.Core/SeedData/SysTenantSeedData.cs
  5. 9 62
      Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs
  6. 11 13
      Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
  7. 1 1
      vue-next-admin/.prettierrc.js
  8. 99 147
      vue-next-admin/src/api-services/apis/sys-tenant-api.ts
  9. 27 15
      vue-next-admin/src/api-services/models/add-tenant-input.ts
  10. 1 1
      vue-next-admin/src/api-services/models/delete-tenant-input.ts
  11. 1 1
      vue-next-admin/src/api-services/models/querye-tenant-input.ts
  12. 1 1
      vue-next-admin/src/api-services/models/sys-tenant.ts
  13. 27 21
      vue-next-admin/src/api-services/models/update-tenant-input.ts
  14. 30 27
      vue-next-admin/src/views/system/file/index.vue
  15. 2 2
      vue-next-admin/src/views/system/log/difflog/index.vue
  16. 2 2
      vue-next-admin/src/views/system/log/exlog/index.vue
  17. 2 2
      vue-next-admin/src/views/system/log/oplog/index.vue
  18. 2 2
      vue-next-admin/src/views/system/log/vislog/index.vue
  19. 1 1
      vue-next-admin/src/views/system/role/component/editRole.vue
  20. 1 1
      vue-next-admin/src/views/system/role/component/grantData.vue
  21. 2 2
      vue-next-admin/src/views/system/role/index.vue
  22. 174 0
      vue-next-admin/src/views/system/tenant/component/editTenant.vue
  23. 137 0
      vue-next-admin/src/views/system/tenant/component/grantMenu.vue
  24. 104 289
      vue-next-admin/src/views/system/tenant/index.vue
  25. 7 7
      vue-next-admin/src/views/system/user/index.vue

+ 4 - 59
Admin.NET/Admin.NET.Core/Admin.NET.Core.xml

@@ -1289,7 +1289,7 @@
         </member>
         <member name="P:Admin.NET.Core.SysTenant.Name">
             <summary>
-            公司名称
+            租户名称
             </summary>
         </member>
         <member name="P:Admin.NET.Core.SysTenant.AdminName">
@@ -6416,29 +6416,9 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="T:Admin.NET.Core.Service.TenantInput">
-            <summary>
-            租户管理输入参数
-            </summary>
-        </member>
         <member name="P:Admin.NET.Core.Service.TenantInput.Name">
             <summary>
-            公司名称
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.AdminName">
-            <summary>
-            管理员名称
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.Host">
-            <summary>
-            主机
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.Email">
-            <summary>
-            电子邮箱
+            名称
             </summary>
         </member>
         <member name="P:Admin.NET.Core.Service.TenantInput.Phone">
@@ -6446,24 +6426,9 @@
             电话
             </summary>
         </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.Connection">
-            <summary>
-            数据库连接
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.Schema">
-            <summary>
-            架构
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.TenantInput.Remark">
-            <summary>
-            备注
-            </summary>
-        </member>
         <member name="P:Admin.NET.Core.Service.AddTenantInput.Name">
             <summary>
-            公司名称
+            租户名称
             </summary>
         </member>
         <member name="P:Admin.NET.Core.Service.AddTenantInput.AdminName">
@@ -6471,26 +6436,6 @@
             管理员名称
             </summary>
         </member>
-        <member name="P:Admin.NET.Core.Service.DeleteTenantInput.Id">
-            <summary>
-            Id
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.UpdateTenantInput.Id">
-            <summary>
-            Id
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.UpdateTenantInput.Name">
-            <summary>
-            公司名称
-            </summary>
-        </member>
-        <member name="P:Admin.NET.Core.Service.UpdateTenantInput.AdminName">
-            <summary>
-            管理员名称
-            </summary>
-        </member>
         <member name="T:Admin.NET.Core.Service.SysTenantService">
             <summary>
             系统租户管理服务
@@ -6512,7 +6457,7 @@
         </member>
         <member name="M:Admin.NET.Core.Service.SysTenantService.InitNewTenant(Admin.NET.Core.SysTenant)">
             <summary>
-            初始化新增租户数据
+            新增租户初始化
             </summary>
             <param name="newTenant"></param>
         </member>

+ 2 - 2
Admin.NET/Admin.NET.Core/Entity/SysTenant.cs

@@ -7,9 +7,9 @@
 public class SysTenant : EntityBase
 {
     /// <summary>
-    /// 公司名称
+    /// 租户名称
     /// </summary>
-    [SugarColumn(ColumnDescription = "公司名称", Length = 64)]
+    [SugarColumn(ColumnDescription = "租户名称", Length = 64)]
     [Required, MaxLength(64)]
     public virtual string Name { get; set; }
 

+ 1 - 1
Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs

@@ -58,7 +58,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
 
             new SysMenu{ Id=252885263002260, Pid=252885263002200, Title="修改密码", Path="/system/password", Name="sysPassword", Component="/system/password/index",Icon="ele-Hide", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=150 },
 
-            new SysMenu{ Id=252885263002300, Pid=0, Title="平台管理", Path="/platform", Name="platform", Component="Layout", Redirect="/platform/config", Icon="ele-Menu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=200 },
+            new SysMenu{ Id=252885263002300, Pid=0, Title="平台管理", Path="/platform", Name="platform", Component="Layout", Redirect="/platform/tenant", Icon="ele-Menu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=200 },
 
             new SysMenu{ Id=252885263002310, Pid=252885263002300, Title="租户管理", Path="/platform/tenant", Name="sysTenant", Component="/system/tenant/index", Icon="ele-School", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
             new SysMenu{ Id=252885263002311, Pid=252885263002310, Title="租户查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },

+ 2 - 2
Admin.NET/Admin.NET.Core/SeedData/SysTenantSeedData.cs

@@ -13,8 +13,8 @@ public class SysTenantSeedData : ISqlSugarEntitySeedData<SysTenant>
     {
         return new[]
         {
-            new SysTenant{ Id=142307070918780, Name="默认租户", AdminName="Administrator", Host="www.dilon.vip", Email="zuohuaijun@163.com", Phone="18020030720", Connection="./Manager.db", Remark="管理租户", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
-            new SysTenant{ Id=142307070918781, Name="测试租户", AdminName="TestAdmin", Host="www.dilon.top", Email="515096995@qq.com", Phone="18020030720", Connection="./Test.db", Remark="测试租户", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+            new SysTenant{ Id=142307070918780, Name="默认租户", AdminName="Administrator", Host="www.dilon.vip", Email="zuohuaijun@163.com", Phone="18020030720", Connection="DataSource=./Admin.NET.db", Remark="默认租户", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+            new SysTenant{ Id=142307070918781, Name="测试租户", AdminName="TestAdmin", Host="www.dilon.top", Email="515096995@qq.com", Phone="18020030720", Connection="DataSource=./Test.db", Remark="测试租户", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
         };
     }
 }

+ 9 - 62
Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs

@@ -1,57 +1,25 @@
 namespace Admin.NET.Core.Service;
 
-/// <summary>
-/// 租户管理输入参数
-/// </summary>
 public class TenantInput : BasePageInput
 {
     /// <summary>
-    /// 公司名称
+    /// 名称
     /// </summary>
     public virtual string Name { get; set; }
 
-    /// <summary>
-    /// 管理员名称
-    /// </summary>
-    public virtual string AdminName { get; set; }
-
-    /// <summary>
-    /// 主机
-    /// </summary>
-    public virtual string Host { get; set; }
-
-    /// <summary>
-    /// 电子邮箱
-    /// </summary>
-    public virtual string Email { get; set; }
-
     /// <summary>
     /// 电话
     /// </summary>
     public virtual string Phone { get; set; }
-
-    /// <summary>
-    /// 数据库连接
-    /// </summary>
-    public virtual string Connection { get; set; }
-
-    /// <summary>
-    /// 架构
-    /// </summary>
-    public virtual string Schema { get; set; }
-
-    /// <summary>
-    /// 备注
-    /// </summary>
-    public virtual string Remark { get; set; }
 }
 
-public class AddTenantInput : TenantInput
+[NotTable]
+public class AddTenantInput : SysTenant
 {
     /// <summary>
-    /// 公司名称
+    /// 租户名称
     /// </summary>
-    [Required(ErrorMessage = "公司名称不能为空"), MinLength(2, ErrorMessage = "公司名称不能少于2个字符")]
+    [Required(ErrorMessage = "租户名称不能为空"), MinLength(2, ErrorMessage = "租户名称不能少于2个字符")]
     public override string Name { get; set; }
 
     /// <summary>
@@ -61,36 +29,15 @@ public class AddTenantInput : TenantInput
     public override string AdminName { get; set; }
 }
 
-public class DeleteTenantInput
+[NotTable]
+public class UpdateTenantInput : AddTenantInput
 {
-    /// <summary>
-    /// Id
-    /// </summary>
-    [Required(ErrorMessage = "Id不能为空")]
-    public long Id { get; set; }
 }
 
-public class UpdateTenantInput : TenantInput
+public class DeleteTenantInput : BaseIdInput
 {
-    /// <summary>
-    /// Id
-    /// </summary>
-    [Required(ErrorMessage = "Id不能为空")]
-    public long Id { get; set; }
-
-    /// <summary>
-    /// 公司名称
-    /// </summary>
-    [Required(ErrorMessage = "公司名称不能为空"), MinLength(2, ErrorMessage = "公司名称不能少于2个字符")]
-    public override string Name { get; set; }
-
-    /// <summary>
-    /// 管理员名称
-    /// </summary>
-    [Required(ErrorMessage = "管理员名称不能为空"), MinLength(3, ErrorMessage = "管理员名称不能少于3个字符")]
-    public override string AdminName { get; set; }
 }
 
-public class QueryeTenantInput : DeleteTenantInput
+public class QueryeTenantInput : BaseIdInput
 {
 }

+ 11 - 13
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -71,7 +71,7 @@ public class SysTenantService : IDynamicApiController, ITransient
     }
 
     /// <summary>
-    /// 初始化新增租户数据
+    /// 新增租户初始化
     /// </summary>
     /// <param name="newTenant"></param>
     private async Task InitNewTenant(SysTenant newTenant)
@@ -79,7 +79,7 @@ public class SysTenantService : IDynamicApiController, ITransient
         long tenantId = newTenant.Id;
         string admin = newTenant.AdminName;
         string companyName = newTenant.Name;
-        // 初始化公司(组织结构)
+        // 初始化租户(组织结构)
         var newOrg = new SysOrg
         {
             TenantId = tenantId,
@@ -94,15 +94,15 @@ public class SysTenantService : IDynamicApiController, ITransient
         {
             TenantId = tenantId,
             Code = CommonConst.SysAdminRoleCode,
-            Name = "系统管理员",
+            Name = "租户管理员",
             DataScope = DataScopeEnum.All
         };
         await _roleRep.InsertAsync(newRole);
 
         var newPos = new SysPos
         {
-            Name = "总经理",
-            Code = "zjl",
+            Name = "租户管理员",
+            Code = "adminTenant",
             TenantId = tenantId
         };
         await _posRep.InsertAsync(newPos);
@@ -119,9 +119,9 @@ public class SysTenantService : IDynamicApiController, ITransient
             UserType = UserTypeEnum.Admin,
             OrgId = newOrg.Id,
             PosId = newPos.Id,
-            Birthday = System.DateTime.Parse("1988-02-03"),
-            RealName = "管理员",
-            Remark = "管理员"
+            Birthday = DateTime.Parse("1986-06-28"),
+            RealName = "租户管理员",
+            Remark = "租户管理员"
         };
         await _userRep.InsertAsync(newUser);
 
@@ -182,7 +182,7 @@ public class SysTenantService : IDynamicApiController, ITransient
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
-    [HttpPost("/sysTenant/edit")]
+    [HttpPost("/sysTenant/update")]
     public async Task UpdateTenant(UpdateTenantInput input)
     {
         var entity = input.Adapt<SysTenant>();
@@ -241,8 +241,7 @@ public class SysTenantService : IDynamicApiController, ITransient
         var tenantAdminUser = await GetTenantAdminUser(input.Id);
         if (tenantAdminUser == null) return new List<SysMenu>();
         var roleIds = await _sysUserRoleService.GetUserRoleIdList(tenantAdminUser.Id);
-        var tenantAdminRoleId = roleIds[0]; // 租户管理员角色Id
-        return await _sysRoleMenuService.GetRoleMenuTree(new List<long> { tenantAdminRoleId });
+        return await _sysRoleMenuService.GetRoleMenuTree(new List<long> { roleIds[0] });
     }
 
     /// <summary>
@@ -256,8 +255,7 @@ public class SysTenantService : IDynamicApiController, ITransient
         var tenantAdminUser = await GetTenantAdminUser(input.Id);
         if (tenantAdminUser == null) return new List<long>();
         var roleIds = await _sysUserRoleService.GetUserRoleIdList(tenantAdminUser.Id);
-        var tenantAdminRoleId = roleIds[0]; // 租户管理员角色Id
-        return await _sysRoleMenuService.GetRoleMenuList(new List<long> { tenantAdminRoleId });
+        return await _sysRoleMenuService.GetRoleMenuList(new List<long> { roleIds[0] });
     }
 
     /// <summary>

+ 1 - 1
vue-next-admin/.prettierrc.js

@@ -1,6 +1,6 @@
 module.exports = {
 	// 一行最多多少个字符
-	printWidth: 300,
+	printWidth: 200,
 	// 指定每个缩进级别的空格数
 	tabWidth: 2,
 	// 使用制表符而不是空格缩进行

+ 99 - 147
vue-next-admin/src/api-services/apis/sys-tenant-api.ts

@@ -116,7 +116,7 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
         /**
          * 
          * @summary 获取租户详情
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -158,47 +158,6 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
                 options: localVarRequestOptions,
             };
         },
-        /**
-         * 
-         * @summary 更新租户
-         * @param {UpdateTenantInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        sysTenantEditPost: async (body?: UpdateTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/sysTenant/edit`;
-            // use dummy base URL string because the URL constructor only accepts absolute URLs.
-            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
-            let baseOptions;
-            if (configuration) {
-                baseOptions = configuration.baseOptions;
-            }
-            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
-            const localVarHeaderParameter = {} as any;
-            const localVarQueryParameter = {} as any;
-
-            // authentication Bearer required
-
-            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
-
-            const query = new URLSearchParams(localVarUrlObj.search);
-            for (const key in localVarQueryParameter) {
-                query.set(key, localVarQueryParameter[key]);
-            }
-            for (const key in options.params) {
-                query.set(key, options.params[key]);
-            }
-            localVarUrlObj.search = (new URLSearchParams(query)).toString();
-            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
-            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
-            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
-
-            return {
-                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
-                options: localVarRequestOptions,
-            };
-        },
         /**
          * 
          * @summary 授权租户管理员角色菜单
@@ -279,7 +238,7 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -324,7 +283,7 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -369,14 +328,8 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
         /**
          * 
          * @summary 获取租户分页列表
-         * @param {string} [name] 公司名称
-         * @param {string} [adminName] 管理员名称
-         * @param {string} [host] 主机
-         * @param {string} [email] 电子邮箱
+         * @param {string} [name] 名称
          * @param {string} [phone] 电话
-         * @param {string} [connection] 数据库连接
-         * @param {string} [schema] 架构
-         * @param {string} [remark] 备注
          * @param {number} [page] 当前页码
          * @param {number} [pageSize] 页码容量
          * @param {string} [field] 排序字段
@@ -385,7 +338,7 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysTenantPageGet: async (name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+        sysTenantPageGet: async (name?: string, phone?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
             const localVarPath = `/sysTenant/page`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -403,34 +356,10 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
                 localVarQueryParameter['Name'] = name;
             }
 
-            if (adminName !== undefined) {
-                localVarQueryParameter['AdminName'] = adminName;
-            }
-
-            if (host !== undefined) {
-                localVarQueryParameter['Host'] = host;
-            }
-
-            if (email !== undefined) {
-                localVarQueryParameter['Email'] = email;
-            }
-
             if (phone !== undefined) {
                 localVarQueryParameter['Phone'] = phone;
             }
 
-            if (connection !== undefined) {
-                localVarQueryParameter['Connection'] = connection;
-            }
-
-            if (schema !== undefined) {
-                localVarQueryParameter['Schema'] = schema;
-            }
-
-            if (remark !== undefined) {
-                localVarQueryParameter['Remark'] = remark;
-            }
-
             if (page !== undefined) {
                 localVarQueryParameter['Page'] = page;
             }
@@ -503,6 +432,47 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
             localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
 
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 更新租户
+         * @param {UpdateTenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysTenantUpdatePost: async (body?: UpdateTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysTenant/update`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                 options: localVarRequestOptions,
@@ -548,7 +518,7 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
         /**
          * 
          * @summary 获取租户详情
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -559,20 +529,6 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
-        /**
-         * 
-         * @summary 更新租户
-         * @param {UpdateTenantInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
-            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantEditPost(body, options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
         /**
          * 
          * @summary 授权租户管理员角色菜单
@@ -603,7 +559,7 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -617,7 +573,7 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -631,14 +587,8 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
         /**
          * 
          * @summary 获取租户分页列表
-         * @param {string} [name] 公司名称
-         * @param {string} [adminName] 管理员名称
-         * @param {string} [host] 主机
-         * @param {string} [email] 电子邮箱
+         * @param {string} [name] 名称
          * @param {string} [phone] 电话
-         * @param {string} [connection] 数据库连接
-         * @param {string} [schema] 架构
-         * @param {string} [remark] 备注
          * @param {number} [page] 当前页码
          * @param {number} [pageSize] 页码容量
          * @param {string} [field] 排序字段
@@ -647,8 +597,8 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
-            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options);
+        async sysTenantPageGet(name?: string, phone?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
+            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantPageGet(name, phone, page, pageSize, field, order, descStr, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -668,6 +618,20 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 更新租户
+         * @param {UpdateTenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantUpdatePost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
     }
 };
 
@@ -700,23 +664,13 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         /**
          * 
          * @summary 获取租户详情
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
         async sysTenantDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysTenant>> {
             return SysTenantApiFp(configuration).sysTenantDetailGet(id, options).then((request) => request(axios, basePath));
         },
-        /**
-         * 
-         * @summary 更新租户
-         * @param {UpdateTenantInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
-            return SysTenantApiFp(configuration).sysTenantEditPost(body, options).then((request) => request(axios, basePath));
-        },
         /**
          * 
          * @summary 授权租户管理员角色菜单
@@ -739,7 +693,7 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -749,7 +703,7 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
-         * @param {number} id Id
+         * @param {number} id 主键Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -759,14 +713,8 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         /**
          * 
          * @summary 获取租户分页列表
-         * @param {string} [name] 公司名称
-         * @param {string} [adminName] 管理员名称
-         * @param {string} [host] 主机
-         * @param {string} [email] 电子邮箱
+         * @param {string} [name] 名称
          * @param {string} [phone] 电话
-         * @param {string} [connection] 数据库连接
-         * @param {string} [schema] 架构
-         * @param {string} [remark] 备注
          * @param {number} [page] 当前页码
          * @param {number} [pageSize] 页码容量
          * @param {string} [field] 排序字段
@@ -775,8 +723,8 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
-            return SysTenantApiFp(configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options).then((request) => request(axios, basePath));
+        async sysTenantPageGet(name?: string, phone?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
+            return SysTenantApiFp(configuration).sysTenantPageGet(name, phone, page, pageSize, field, order, descStr, options).then((request) => request(axios, basePath));
         },
         /**
          * 
@@ -788,6 +736,16 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         async sysTenantResetPwdPost(body?: QueryeTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
             return SysTenantApiFp(configuration).sysTenantResetPwdPost(body, options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 更新租户
+         * @param {UpdateTenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysTenantApiFp(configuration).sysTenantUpdatePost(body, options).then((request) => request(axios, basePath));
+        },
     };
 };
 
@@ -823,7 +781,7 @@ export class SysTenantApi extends BaseAPI {
     /**
      * 
      * @summary 获取租户详情
-     * @param {number} id Id
+     * @param {number} id 主键Id
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysTenantApi
@@ -831,17 +789,6 @@ export class SysTenantApi extends BaseAPI {
     public async sysTenantDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysTenant>> {
         return SysTenantApiFp(this.configuration).sysTenantDetailGet(id, options).then((request) => request(this.axios, this.basePath));
     }
-    /**
-     * 
-     * @summary 更新租户
-     * @param {UpdateTenantInput} [body] 
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysTenantApi
-     */
-    public async sysTenantEditPost(body?: UpdateTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
-        return SysTenantApiFp(this.configuration).sysTenantEditPost(body, options).then((request) => request(this.axios, this.basePath));
-    }
     /**
      * 
      * @summary 授权租户管理员角色菜单
@@ -866,7 +813,7 @@ export class SysTenantApi extends BaseAPI {
     /**
      * 
      * @summary 获取租户管理员角色拥有菜单树
-     * @param {number} id Id
+     * @param {number} id 主键Id
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysTenantApi
@@ -877,7 +824,7 @@ export class SysTenantApi extends BaseAPI {
     /**
      * 
      * @summary 获取租户管理员角色拥有菜单树
-     * @param {number} id Id
+     * @param {number} id 主键Id
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysTenantApi
@@ -888,14 +835,8 @@ export class SysTenantApi extends BaseAPI {
     /**
      * 
      * @summary 获取租户分页列表
-     * @param {string} [name] 公司名称
-     * @param {string} [adminName] 管理员名称
-     * @param {string} [host] 主机
-     * @param {string} [email] 电子邮箱
+     * @param {string} [name] 名称
      * @param {string} [phone] 电话
-     * @param {string} [connection] 数据库连接
-     * @param {string} [schema] 架构
-     * @param {string} [remark] 备注
      * @param {number} [page] 当前页码
      * @param {number} [pageSize] 页码容量
      * @param {string} [field] 排序字段
@@ -905,8 +846,8 @@ export class SysTenantApi extends BaseAPI {
      * @throws {RequiredError}
      * @memberof SysTenantApi
      */
-    public async sysTenantPageGet(name?: string, adminName?: string, host?: string, email?: string, phone?: string, connection?: string, schema?: string, remark?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
-        return SysTenantApiFp(this.configuration).sysTenantPageGet(name, adminName, host, email, phone, connection, schema, remark, page, pageSize, field, order, descStr, options).then((request) => request(this.axios, this.basePath));
+    public async sysTenantPageGet(name?: string, phone?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
+        return SysTenantApiFp(this.configuration).sysTenantPageGet(name, phone, page, pageSize, field, order, descStr, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 
@@ -919,4 +860,15 @@ export class SysTenantApi extends BaseAPI {
     public async sysTenantResetPwdPost(body?: QueryeTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
         return SysTenantApiFp(this.configuration).sysTenantResetPwdPost(body, options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 更新租户
+     * @param {UpdateTenantInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysTenantApi
+     */
+    public async sysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysTenantApiFp(this.configuration).sysTenantUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
+    }
 }

+ 27 - 15
vue-next-admin/src/api-services/models/add-tenant-input.ts

@@ -18,35 +18,41 @@
  */
 export interface AddTenantInput {
     /**
-     * 当前页码
+     * 雪花Id
      * @type {number}
      * @memberof AddTenantInput
      */
-    page?: number;
+    id?: number;
     /**
-     * 页码容量
-     * @type {number}
+     * 创建时间
+     * @type {Date}
      * @memberof AddTenantInput
      */
-    pageSize?: number;
+    createTime?: Date | null;
     /**
-     * 排序字段
-     * @type {string}
+     * 更新时间
+     * @type {Date}
      * @memberof AddTenantInput
      */
-    field?: string | null;
+    updateTime?: Date | null;
     /**
-     * 排序方向
-     * @type {string}
+     * 创建者Id
+     * @type {number}
      * @memberof AddTenantInput
      */
-    order?: string | null;
+    createUserId?: number | null;
     /**
-     * 降序排序
-     * @type {string}
+     * 修改者Id
+     * @type {number}
      * @memberof AddTenantInput
      */
-    descStr?: string | null;
+    updateUserId?: number | null;
+    /**
+     * 软删除
+     * @type {boolean}
+     * @memberof AddTenantInput
+     */
+    isDelete?: boolean;
     /**
      * 主机
      * @type {string}
@@ -77,6 +83,12 @@ export interface AddTenantInput {
      * @memberof AddTenantInput
      */
     schema?: string | null;
+    /**
+     * 排序
+     * @type {number}
+     * @memberof AddTenantInput
+     */
+    order?: number;
     /**
      * 备注
      * @type {string}
@@ -84,7 +96,7 @@ export interface AddTenantInput {
      */
     remark?: string | null;
     /**
-     * 公司名称
+     * 租户名称
      * @type {string}
      * @memberof AddTenantInput
      */

+ 1 - 1
vue-next-admin/src/api-services/models/delete-tenant-input.ts

@@ -18,7 +18,7 @@
  */
 export interface DeleteTenantInput {
     /**
-     * Id
+     * 主键Id
      * @type {number}
      * @memberof DeleteTenantInput
      */

+ 1 - 1
vue-next-admin/src/api-services/models/querye-tenant-input.ts

@@ -18,7 +18,7 @@
  */
 export interface QueryeTenantInput {
     /**
-     * Id
+     * 主键Id
      * @type {number}
      * @memberof QueryeTenantInput
      */

+ 1 - 1
vue-next-admin/src/api-services/models/sys-tenant.ts

@@ -54,7 +54,7 @@ export interface SysTenant {
      */
     isDelete?: boolean;
     /**
-     * 公司名称
+     * 租户名称
      * @type {string}
      * @memberof SysTenant
      */

+ 27 - 21
vue-next-admin/src/api-services/models/update-tenant-input.ts

@@ -18,35 +18,41 @@
  */
 export interface UpdateTenantInput {
     /**
-     * 当前页码
+     * 雪花Id
      * @type {number}
      * @memberof UpdateTenantInput
      */
-    page?: number;
+    id?: number;
     /**
-     * 页码容量
-     * @type {number}
+     * 创建时间
+     * @type {Date}
      * @memberof UpdateTenantInput
      */
-    pageSize?: number;
+    createTime?: Date | null;
     /**
-     * 排序字段
-     * @type {string}
+     * 更新时间
+     * @type {Date}
      * @memberof UpdateTenantInput
      */
-    field?: string | null;
+    updateTime?: Date | null;
     /**
-     * 排序方向
-     * @type {string}
+     * 创建者Id
+     * @type {number}
      * @memberof UpdateTenantInput
      */
-    order?: string | null;
+    createUserId?: number | null;
     /**
-     * 降序排序
-     * @type {string}
+     * 修改者Id
+     * @type {number}
+     * @memberof UpdateTenantInput
+     */
+    updateUserId?: number | null;
+    /**
+     * 软删除
+     * @type {boolean}
      * @memberof UpdateTenantInput
      */
-    descStr?: string | null;
+    isDelete?: boolean;
     /**
      * 主机
      * @type {string}
@@ -78,19 +84,19 @@ export interface UpdateTenantInput {
      */
     schema?: string | null;
     /**
-     * 备注
-     * @type {string}
+     * 排序
+     * @type {number}
      * @memberof UpdateTenantInput
      */
-    remark?: string | null;
+    order?: number;
     /**
-     * Id
-     * @type {number}
+     * 备注
+     * @type {string}
      * @memberof UpdateTenantInput
      */
-    id: number;
+    remark?: string | null;
     /**
-     * 公司名称
+     * 租户名称
      * @type {string}
      * @memberof UpdateTenantInput
      */

+ 30 - 27
vue-next-admin/src/views/system/file/index.vue

@@ -6,12 +6,10 @@
 					<el-input placeholder="文件名称" clearable @keyup.enter="handleQuery" v-model="queryParams.fileName" />
 				</el-form-item>
 				<el-form-item label="开始时间" prop="name">
-					<el-date-picker v-model="queryParams.startTime" type="datetime" placeholder="开始时间"
-						:shortcuts="shortcuts" />
+					<el-date-picker v-model="queryParams.startTime" type="datetime" placeholder="开始时间" :shortcuts="shortcuts" />
 				</el-form-item>
 				<el-form-item label="结束时间" prop="code">
-					<el-date-picker v-model="queryParams.endTime" type="datetime" placeholder="结束时间"
-						:shortcuts="shortcuts" />
+					<el-date-picker v-model="queryParams.endTime" type="datetime" placeholder="结束时间" :shortcuts="shortcuts" />
 				</el-form-item>
 				<el-form-item>
 					<el-button icon="ele-Refresh" @click="resetQuery">重置 </el-button>
@@ -33,9 +31,16 @@
 				<el-table-column prop="sizeKb" label="大小kb" align="center" show-overflow-tooltip> </el-table-column>
 				<el-table-column prop="url" label="预览" align="center" show-overflow-tooltip>
 					<template #default="scope">
-						<el-image style="width: 60px; height: 60px" :src="scope.row.url" :lazy="true"
-							:hide-on-click-modal="true" :preview-src-list="[scope.row.url]" :initial-index="0"
-							:z-index="10000" fit="scale-down" />
+						<el-image
+							style="width: 60px; height: 60px"
+							:src="scope.row.url"
+							:lazy="true"
+							:hide-on-click-modal="true"
+							:preview-src-list="[scope.row.url]"
+							:initial-index="0"
+							:z-index="10000"
+							fit="scale-down"
+						/>
 					</template>
 				</el-table-column>
 				<el-table-column prop="bucketName" label="存储位置" align="center" show-overflow-tooltip> </el-table-column>
@@ -44,23 +49,27 @@
 				<el-table-column prop="createTime" label="创建时间" align="center" show-overflow-tooltip></el-table-column>
 				<el-table-column label="操作" width="140" fixed="right" align="center" show-overflow-tooltip>
 					<template #default="scope">
-						<el-button icon="ele-Download" size="small" text type="primary"
-							@click="downloadFile(scope.row)"> 下载 </el-button>
-						<el-button icon="ele-Delete" size="small" text type="primary" @click="delFile(scope.row)"> 删除
-						</el-button>
+						<el-button icon="ele-Download" size="small" text type="primary" @click="downloadFile(scope.row)"> 下载 </el-button>
+						<el-button icon="ele-Delete" size="small" text type="primary" @click="delFile(scope.row)"> 删除 </el-button>
 					</template>
 				</el-table-column>
 			</el-table>
-			<el-pagination v-model:currentPage="tableParams.page" v-model:page-size="tableParams.pageSize"
-				:total="tableParams.total" :page-sizes="[10, 20, 50, 100]" small background
-				@size-change="handleSizeChange" @current-change="handleCurrentChange"
-				layout="total, sizes, prev, pager, next, jumper" />
+			<el-pagination
+				v-model:currentPage="tableParams.page"
+				v-model:page-size="tableParams.pageSize"
+				:total="tableParams.total"
+				:page-sizes="[10, 20, 50, 100]"
+				small
+				background
+				@size-change="handleSizeChange"
+				@current-change="handleCurrentChange"
+				layout="total, sizes, prev, pager, next, jumper"
+			/>
 		</el-card>
 
 		<el-dialog title="上传文件" v-model="dialogVisible" :lock-scroll="false" width="400px">
 			<div>
-				<el-upload ref="uploadRef" drag :auto-upload="false" :limit="1" :file-list="fileList" action=""
-					:on-change="handleChange" accept=".jpg,.png,.bmp,.gif,.txt,.pdf,.xlsx,.docx">
+				<el-upload ref="uploadRef" drag :auto-upload="false" :limit="1" :file-list="fileList" action="" :on-change="handleChange" accept=".jpg,.png,.bmp,.gif,.txt,.pdf,.xlsx,.docx">
 					<el-icon class="el-icon--upload">
 						<ele-UploadFilled />
 					</el-icon>
@@ -126,13 +135,7 @@ export default defineComponent({
 			if (state.queryParams.startTime == null) state.queryParams.startTime = undefined;
 			if (state.queryParams.endTime == null) state.queryParams.endTime = undefined;
 			state.loading = true;
-			var res = await getAPI(SysFileApi).sysFilePageGet(
-				state.queryParams.fileName,
-				state.queryParams.startTime,
-				state.queryParams.endTime,
-				state.tableParams.page,
-				state.tableParams.pageSize
-			);
+			var res = await getAPI(SysFileApi).sysFilePageGet(state.queryParams.fileName, state.queryParams.startTime, state.queryParams.endTime, state.tableParams.page, state.tableParams.pageSize);
 			state.fileData = res.data.result?.items;
 			state.tableParams.total = res.data.result?.total;
 			state.loading = false;
@@ -177,14 +180,14 @@ export default defineComponent({
 					handleQuery();
 					ElMessage.success('删除成功');
 				})
-				.catch(() => { });
+				.catch(() => {});
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 2 - 2
vue-next-admin/src/views/system/log/difflog/index.vue

@@ -96,12 +96,12 @@ export default defineComponent({
 			ElMessage.success('清空成功');
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 2 - 2
vue-next-admin/src/views/system/log/exlog/index.vue

@@ -96,12 +96,12 @@ export default defineComponent({
 			ElMessage.success('清空成功');
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 2 - 2
vue-next-admin/src/views/system/log/oplog/index.vue

@@ -111,12 +111,12 @@ export default defineComponent({
 			ElMessage.success('清空成功');
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 2 - 2
vue-next-admin/src/views/system/log/vislog/index.vue

@@ -106,12 +106,12 @@ export default defineComponent({
 			ElMessage.success('清空成功');
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 1 - 1
vue-next-admin/src/views/system/role/component/editRole.vue

@@ -84,7 +84,7 @@ export default defineComponent({
 		// 拥有菜单集合
 		ownMenuData: {
 			type: Array,
-			default: () => [252885263003711],
+			default: () => [],
 		},
 	},
 	setup() {

+ 1 - 1
vue-next-admin/src/views/system/role/component/grantData.vue

@@ -55,7 +55,7 @@ export default defineComponent({
 				{ value: 3, label: '本部门数据' },
 				{ value: 4, label: '仅本人数据' },
 				{ value: 5, label: '自定义数据' },
-			], // 数据范围类型
+			],
 		});
 		// 打开弹窗
 		const openDialog = async (row: any) => {

+ 2 - 2
vue-next-admin/src/views/system/role/index.vue

@@ -159,12 +159,12 @@ export default defineComponent({
 				})
 				.catch(() => {});
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

+ 174 - 0
vue-next-admin/src/views/system/tenant/component/editTenant.vue

@@ -0,0 +1,174 @@
+<template>
+	<div class="sys-tenant-container">
+		<el-dialog v-model="isShowDialog" width="769px">
+			<template #header>
+				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">
+					{{ title }}
+				</div>
+			</template>
+			<el-form :model="ruleForm" :rules="ruleRules" ref="ruleFormRef" size="default" label-width="100px">
+				<el-row :gutter="35">
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+						<el-form-item label="租户名称" prop="name">
+							<el-input v-model="ruleForm.name" placeholder="租户名称" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+						<el-form-item label="管理员" prop="adminName">
+							<el-input v-model="ruleForm.adminName" placeholder="管理员" clearable></el-input>
+						</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">
+							<el-input v-model="ruleForm.phone" placeholder="电话" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+						<el-form-item label="主机">
+							<el-input v-model="ruleForm.host" 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="邮箱">
+							<el-input v-model="ruleForm.email" 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="架构">
+							<el-input v-model="ruleForm.schema" placeholder="架构" clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="4" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="数据库连接">
+							<el-input v-model="ruleForm.connection" 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="排序">
+							<el-input-number v-model="ruleForm.order" placeholder="排序" class="w100" />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="备注">
+							<el-input v-model="ruleForm.remark" placeholder="请输入备注内容" clearable type="textarea"> </el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="cancel" size="default">取 消</el-button>
+					<el-button type="primary" @click="submit" size="default">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script lang="ts">
+import { reactive, toRefs, defineComponent, getCurrentInstance, ref } from 'vue';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { SysTenantApi } from '/@/api-services/api';
+
+export default defineComponent({
+	name: 'sysEditTenant',
+	components: {},
+	props: {
+		// 弹窗标题
+		title: {
+			type: String,
+			default: '',
+		},
+	},
+	setup() {
+		const { proxy } = getCurrentInstance() as any;
+		const ruleFormRef = ref();
+		const state = reactive({
+			loading: true,
+			isShowDialog: false,
+			ruleForm: {
+				id: 0, // Id
+				name: '', // 租户名称
+				adminName: '', // 租户编码
+				phone: '', // 电话
+				host: '', // 主机
+				email: '', // 邮箱
+				connection: '', // 数据库连接
+				schema: '', // 架构
+				order: 100, // 排序
+				remark: '', // 备注
+				menuIdList: [] as any, // 菜单权限
+			},
+			ruleRules: {
+				name: [{ required: true, message: '租户名称不能为空', trigger: 'blur' }],
+				adminName: [{ required: true, message: '管理员不能为空', trigger: 'blur' }],
+			},
+		});
+		// 打开弹窗
+		const openDialog = (row: any) => {
+			state.ruleForm = row;
+			state.isShowDialog = true;
+		};
+		// 关闭弹窗
+		const closeDialog = () => {
+			proxy.mittBus.emit('submitRefresh');
+			state.isShowDialog = false;
+		};
+		// 取消
+		const cancel = () => {
+			state.isShowDialog = false;
+		};
+		// 提交
+		const submit = () => {
+			ruleFormRef.value.validate(async (valid: boolean) => {
+				if (!valid) return;
+				if (state.ruleForm.id != undefined && state.ruleForm.id > 0) {
+					await getAPI(SysTenantApi).sysTenantUpdatePost(state.ruleForm);
+				} else {
+					await getAPI(SysTenantApi).sysTenantAddPost(state.ruleForm);
+				}
+				closeDialog();
+			});
+		};
+		return {
+			ruleFormRef,
+			openDialog,
+			closeDialog,
+			cancel,
+			submit,
+			...toRefs(state),
+		};
+	},
+});
+</script>
+
+<style scoped lang="scss">
+.menu-data-tree {
+	width: 100%;
+	border: 1px solid var(--el-border-color);
+	border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
+	padding: 5px;
+}
+
+:deep(.penultimate-node) {
+	.el-tree-node__children {
+		padding-left: 60px;
+		white-space: pre-wrap;
+		line-height: 12px;
+
+		.el-tree-node {
+			display: inline-block;
+		}
+
+		.el-tree-node__content {
+			padding-left: 5px !important;
+			padding-right: 5px;
+
+			.el-tree-node__expand-icon {
+				display: none;
+			}
+		}
+	}
+}
+</style>

+ 137 - 0
vue-next-admin/src/views/system/tenant/component/grantMenu.vue

@@ -0,0 +1,137 @@
+<template>
+	<div class="sys-grantMenu-container">
+		<el-dialog v-model="isShowDialog" width="769px">
+			<template #header>
+				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">授权租户菜单</div>
+			</template>
+			<el-form :model="ruleForm" size="default">
+				<el-row :gutter="35">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24">
+						<el-form-item prop="orgIdList" label="">
+							<el-tree
+								ref="treeRef"
+								:data="menuData"
+								node-key="id"
+								show-checkbox
+								:props="{ children: 'children', label: 'title', class: treeNodeClass }"
+								:default-checked-keys="ownMenuData"
+								highlight-current
+								class="menu-data-tree"
+								icon="ele-Menu"
+								check-strictly
+								default-expand-all
+							/>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="cancel" size="default">取 消</el-button>
+					<el-button type="primary" @click="submit" size="default">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script lang="ts">
+import { reactive, toRefs, defineComponent, ref, onMounted } from 'vue';
+import type { ElTree } from 'element-plus';
+import type Node from 'element-plus/es/components/tree/src/model/node';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { SysMenuApi, SysTenantApi } from '/@/api-services/api';
+
+export default defineComponent({
+	name: 'sysGrantMenu',
+	components: {},
+	setup() {
+		const treeRef = ref<InstanceType<typeof ElTree>>();
+		const state = reactive({
+			loading: true,
+			isShowDialog: false,
+			ruleForm: {
+				id: 0,
+				menuIdList: [] as any, // 菜单集合
+			},
+			menuData: [] as any, // 菜单数据
+			ownMenuData: [] as any, // 拥有菜单
+		});
+		onMounted(async () => {
+			state.loading = true;
+			var res = await getAPI(SysMenuApi).sysMenuListGet();
+			state.menuData = res.data.result;
+			state.loading = false;
+		});
+		// 打开弹窗
+		const openDialog = async (row: any) => {
+			treeRef.value?.setCheckedKeys([]); // 先清空已选择节点
+			state.ruleForm = row;
+			var res = await getAPI(SysTenantApi).sysTenantOwnMenuListGet(row.id);
+			setTimeout(() => {
+				// 延迟传递数据
+				treeRef.value?.setCheckedKeys(res.data.result);
+			}, 100);
+			state.isShowDialog = true;
+		};
+		// 取消
+		const cancel = () => {
+			state.isShowDialog = false;
+		};
+		// 提交
+		const submit = async () => {
+			state.ruleForm.menuIdList = treeRef.value?.getCheckedKeys();
+			await getAPI(SysTenantApi).sysTenantGrantMenuPost(state.ruleForm);
+			state.isShowDialog = false;
+		};
+		// 叶子节点同行显示样式
+		const treeNodeClass = (node: Node) => {
+			if (node.isLeaf) return '';
+			let addClass = true;
+			for (const key in node.childNodes) {
+				if (!node.childNodes[key].isLeaf) addClass = false;
+			}
+			return addClass ? 'penultimate-node' : '';
+		};
+		return {
+			treeRef,
+			openDialog,
+			cancel,
+			submit,
+			treeNodeClass,
+			...toRefs(state),
+		};
+	},
+});
+</script>
+
+<style scoped lang="scss">
+.menu-data-tree {
+	width: 100%;
+	border: 1px solid var(--el-border-color);
+	border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
+	padding: 5px;
+}
+
+:deep(.penultimate-node) {
+	.el-tree-node__children {
+		padding-left: 60px;
+		white-space: pre-wrap;
+		line-height: 12px;
+
+		.el-tree-node {
+			display: inline-block;
+		}
+
+		.el-tree-node__content {
+			padding-left: 5px !important;
+			padding-right: 5px;
+
+			.el-tree-node__expand-icon {
+				display: none;
+			}
+		}
+	}
+}
+</style>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 104 - 289
vue-next-admin/src/views/system/tenant/index.vue


+ 7 - 7
vue-next-admin/src/views/system/user/index.vue

@@ -39,8 +39,8 @@
 						</el-table-column>
 						<el-table-column label="性别" width="70" align="center" show-overflow-tooltip>
 							<template #default="scope">
-								<el-tag v-if="scope.row.sex === 1">男</el-tag>
-								<el-tag type="danger" v-else>女</el-tag>
+								<el-tag v-if="scope.row.sex === 1">  </el-tag>
+								<el-tag type="danger" v-else>  </el-tag>
 							</template>
 						</el-table-column>
 						<el-table-column prop="phone" label="手机号码" width="120" align="center" show-overflow-tooltip> </el-table-column>
@@ -57,7 +57,7 @@
 						<el-table-column label="操作" width="110" align="center" fixed="right" show-overflow-tooltip>
 							<template #default="scope">
 								<el-tooltip content="用户编辑">
-									<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditUser(scope.row)" v-auth="'sysUser:update'">编辑 </el-button>
+									<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditUser(scope.row)" v-auth="'sysUser:update'"> 编辑 </el-button>
 								</el-tooltip>
 								<el-dropdown>
 									<span style="color: var(--el-color-primary); padding-top: 6px; padding-left: 12px">
@@ -67,8 +67,8 @@
 									</span>
 									<template #dropdown>
 										<el-dropdown-menu>
-											<el-dropdown-item icon="ele-OfficeBuilding" @click="openGrantOrg(scope.row)" v-auth="'sysUser:grantData'">数据范围 </el-dropdown-item>
-											<el-dropdown-item icon="ele-RefreshLeft" @click="resetUserPwd(scope.row)" v-auth="'sysUser:resetPwd'">重置密码 </el-dropdown-item>
+											<el-dropdown-item icon="ele-OfficeBuilding" @click="openGrantOrg(scope.row)" v-auth="'sysUser:grantData'"> 数据范围 </el-dropdown-item>
+											<el-dropdown-item icon="ele-RefreshLeft" @click="resetUserPwd(scope.row)" v-auth="'sysUser:resetPwd'"> 重置密码 </el-dropdown-item>
 											<el-dropdown-item icon="ele-Delete" @click="delUser(scope.row)" v-auth="'sysUser:delete'"> 删除账号 </el-dropdown-item>
 										</el-dropdown-menu>
 									</template>
@@ -187,12 +187,12 @@ export default defineComponent({
 				})
 				.catch(() => {});
 		};
-		// 分页改变
+		// 改变页面容量
 		const handleSizeChange = (val: number) => {
 			state.tableParams.pageSize = val;
 			handleQuery();
 		};
-		// 分页改变
+		// 改变页码序号
 		const handleCurrentChange = (val: number) => {
 			state.tableParams.page = val;
 			handleQuery();

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov