😎调整职位管理页面vxe-table
This commit is contained in:
parent
4399f07d8f
commit
0646a1a7f3
@ -56,10 +56,11 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
new SysMenu{ Id=1310000000145, Pid=1310000000141, Title="删除", Permission="sysOrg:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000151, Pid=1310000000101, Title="职位管理", Path="/system/pos", Name="sysPos", Component="/system/pos/index",Icon="ele-Mug", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 },
|
||||
new SysMenu{ Id=1310000000152, Pid=1310000000151, Title="查询", Permission="sysPos:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000153, Pid=1310000000151, Title="编辑", Permission="sysPos:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000154, Pid=1310000000151, Title="增加", Permission="sysPos:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000155, Pid=1310000000151, Title="删除", Permission="sysPos:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000152, Pid=1310000000151, Title="查询", Permission="sysPos:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000153, Pid=1310000000151, Title="列表", Permission="sysPos:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000154, Pid=1310000000151, Title="编辑", Permission="sysPos:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000155, Pid=1310000000151, Title="增加", Permission="sysPos:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000156, Pid=1310000000151, Title="删除", Permission="sysPos:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000161, Pid=1310000000101, Title="个人中心", Path="/system/userCenter", Name="sysUserCenter", Component="/system/user/component/userCenter",Icon="ele-Medal", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 },
|
||||
new SysMenu{ Id=1310000000162, Pid=1310000000161, Title="修改密码", Permission="sysUser:changePwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
@ -6,6 +6,19 @@
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
public class PagePosInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
}
|
||||
|
||||
public class PosInput
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@ -7,6 +7,17 @@
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
public class PosOutput : SysPos
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户名称
|
||||
/// </summary>
|
||||
public string TenantName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 职位分页列表输出参数
|
||||
/// </summary>
|
||||
public class PagePosOutput : SysPos
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户名称
|
||||
|
||||
@ -25,6 +25,27 @@ public class SysPosService : IDynamicApiController, ITransient
|
||||
_sysUserExtOrgService = sysUserExtOrgService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取职位分页列表 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取职位分页列表")]
|
||||
public async Task<SqlSugarPagedList<PagePosOutput>> Page(PagePosInput input)
|
||||
{
|
||||
return await _sysPosRep.AsQueryable()
|
||||
.LeftJoin<SysTenant>((u, a) => u.TenantId == a.Id)
|
||||
.LeftJoin<SysOrg>((u, a, b) => a.OrgId == b.Id)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code))
|
||||
.Select((u, a, b) => new PagePosOutput
|
||||
{
|
||||
TenantName = b.Name
|
||||
}, true)
|
||||
.OrderBy(u => u.OrderNo)
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取职位列表 🔖
|
||||
/// </summary>
|
||||
|
||||
@ -19,7 +19,9 @@ import { Configuration } from '../configuration';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AddPosInput } from '../models';
|
||||
import { AdminResultListPosOutput } from '../models';
|
||||
import { AdminResultSqlSugarPagedListPagePosOutput } from '../models';
|
||||
import { DeletePosInput } from '../models';
|
||||
import { PagePosInput } from '../models';
|
||||
import { UpdatePosInput } from '../models';
|
||||
/**
|
||||
* SysPosApi - axios parameter creator
|
||||
@ -176,6 +178,54 @@ export const SysPosApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取职位分页列表 🔖
|
||||
* @param {PagePosInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysPosPagePost: async (body?: PagePosInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysPos/page`;
|
||||
// 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
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
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 更新职位 🔖
|
||||
@ -276,6 +326,20 @@ export const SysPosApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取职位分页列表 🔖
|
||||
* @param {PagePosInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysPosPagePost(body?: PagePosInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListPagePosOutput>>> {
|
||||
const localVarAxiosArgs = await SysPosApiAxiosParamCreator(configuration).apiSysPosPagePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新职位 🔖
|
||||
@ -330,6 +394,16 @@ export const SysPosApiFactory = function (configuration?: Configuration, basePat
|
||||
async apiSysPosListGet(name?: string, code?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListPosOutput>> {
|
||||
return SysPosApiFp(configuration).apiSysPosListGet(name, code, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取职位分页列表 🔖
|
||||
* @param {PagePosInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysPosPagePost(body?: PagePosInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListPagePosOutput>> {
|
||||
return SysPosApiFp(configuration).apiSysPosPagePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新职位 🔖
|
||||
@ -384,6 +458,17 @@ export class SysPosApi extends BaseAPI {
|
||||
public async apiSysPosListGet(name?: string, code?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListPosOutput>> {
|
||||
return SysPosApiFp(this.configuration).apiSysPosListGet(name, code, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取职位分页列表 🔖
|
||||
* @param {PagePosInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysPosApi
|
||||
*/
|
||||
public async apiSysPosPagePost(body?: PagePosInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListPagePosOutput>> {
|
||||
return SysPosApiFp(this.configuration).apiSysPosPagePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新职位 🔖
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SqlSugarPagedListPagePosOutput } from './sql-sugar-paged-list-page-pos-output';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
export interface AdminResultSqlSugarPagedListPagePosOutput {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SqlSugarPagedListPagePosOutput}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
result?: SqlSugarPagedListPagePosOutput;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminResultSqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -63,6 +63,7 @@ export * from './admin-result-sm-key-pair-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-job-detail-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-open-access-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-page-pos-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-page-role-output';
|
||||
export * from './admin-result-sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './admin-result-sql-sugar-paged-list-sys-config';
|
||||
@ -234,6 +235,8 @@ export * from './page-log-input';
|
||||
export * from './page-notice-input';
|
||||
export * from './page-online-user-input';
|
||||
export * from './page-plugin-input';
|
||||
export * from './page-pos-input';
|
||||
export * from './page-pos-output';
|
||||
export * from './page-print-input';
|
||||
export * from './page-region-input';
|
||||
export * from './page-role-input';
|
||||
@ -266,6 +269,7 @@ export * from './sort-version';
|
||||
export * from './sql-sugar-paged-list-job-detail-output';
|
||||
export * from './sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './sql-sugar-paged-list-open-access-output';
|
||||
export * from './sql-sugar-paged-list-page-pos-output';
|
||||
export * from './sql-sugar-paged-list-page-role-output';
|
||||
export * from './sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './sql-sugar-paged-list-sys-config';
|
||||
|
||||
@ -30,12 +30,6 @@ export interface MemberInfo {
|
||||
*/
|
||||
memberType?: MemberTypes;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @memberof MemberInfo
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
/**
|
||||
* @type {Type}
|
||||
* @memberof MemberInfo
|
||||
@ -48,6 +42,12 @@ export interface MemberInfo {
|
||||
*/
|
||||
reflectedType?: Type;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @memberof MemberInfo
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
/**
|
||||
* @type {Module}
|
||||
* @memberof MemberInfo
|
||||
|
||||
78
Web/src/api-services/models/page-pos-input.ts
Normal file
78
Web/src/api-services/models/page-pos-input.ts
Normal file
@ -0,0 +1,78 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @interface PagePosInput
|
||||
*/
|
||||
export interface PagePosInput {
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页码容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
field?: string | null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
order?: string | null;
|
||||
|
||||
/**
|
||||
* 降序排序
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
descStr?: string | null;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosInput
|
||||
*/
|
||||
code?: string | null;
|
||||
}
|
||||
141
Web/src/api-services/models/page-pos-output.ts
Normal file
141
Web/src/api-services/models/page-pos-output.ts
Normal file
@ -0,0 +1,141 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 职位分页列表输出参数
|
||||
*
|
||||
* @export
|
||||
* @interface PagePosOutput
|
||||
*/
|
||||
export interface PagePosOutput {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
remark?: string | null;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
|
||||
/**
|
||||
* 租户名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PagePosOutput
|
||||
*/
|
||||
tenantName?: string | null;
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { PagePosOutput } from './page-pos-output';
|
||||
/**
|
||||
* 分页泛型集合
|
||||
*
|
||||
* @export
|
||||
* @interface SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
export interface SqlSugarPagedListPagePosOutput {
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
total?: number;
|
||||
|
||||
/**
|
||||
* 总页数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
totalPages?: number;
|
||||
|
||||
/**
|
||||
* 当前页集合
|
||||
*
|
||||
* @type {Array<PagePosOutput>}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
items?: Array<PagePosOutput> | null;
|
||||
|
||||
/**
|
||||
* 是否有上一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
hasPrevPage?: boolean;
|
||||
|
||||
/**
|
||||
* 是否有下一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListPagePosOutput
|
||||
*/
|
||||
hasNextPage?: boolean;
|
||||
}
|
||||
@ -1,59 +1,79 @@
|
||||
<template>
|
||||
<div class="sys-pos-container">
|
||||
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
||||
<el-form :model="state.queryParams" ref="queryForm" :inline="true">
|
||||
<el-form-item label="职位名称">
|
||||
<el-input v-model="state.queryParams.name" placeholder="职位名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="职位编码">
|
||||
<el-input v-model="state.queryParams.code" placeholder="职位编码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div class="sys-pos-container" v-loading="options.loading">
|
||||
<el-card shadow="hover" :body-style="{ padding: '5px 5px 0 5px', display: 'flex', width: '100%', height: '100%', alignItems: 'start' }">
|
||||
<el-form :model="state.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true" :label-width="'60px'" style="flex: 1 1 0%">
|
||||
<el-row :gutter="10">
|
||||
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<el-form-item label="职位名称" prop="name">
|
||||
<el-input v-model="state.queryParams.name" placeholder="职位名称" clearable @keyup.enter.native="handleQuery(true)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<el-form-item label="职位编码" prop="code">
|
||||
<el-input v-model="state.queryParams.code" placeholder="职位编码" clearable @keyup.enter.native="handleQuery(true)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-divider style="height: calc(100% - 5px); margin: 0 10px" direction="vertical" />
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysPos:list'"> 查询 </el-button>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery(true)" v-auth="'sysPos:page'"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="ele-Plus" @click="openAddPos" v-auth="'sysPos:add'"> 新增 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<el-table :data="state.posData" style="width: 100%" v-loading="state.loading" border>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="name" label="职位名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="code" label="职位编码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="tenantName" label="租户名称" width="180" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="orderNo" label="排序" width="70" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="状态" width="70" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 1">启用</el-tag>
|
||||
<el-tag type="danger" v-else>禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改记录" width="100" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<ModifyRecord :data="scope.row" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="140" fixed="right" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditPos(scope.row)" v-auth="'sysPos:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text type="danger" @click="delPos(scope.row)" v-auth="'sysPos:delete'"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" @sort-change="sortChange">
|
||||
<template #toolbar_buttons>
|
||||
<el-button type="primary" icon="ele-Plus" @click="handleAdd" v-auth="'sysPos:add'"> 新增 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
<el-empty :image-size="200" />
|
||||
</template>
|
||||
<template #row_status="{ row }">
|
||||
<el-tag v-if="row.status === 1" type="success">启用</el-tag>
|
||||
<el-tag v-else type="danger">禁用</el-tag>
|
||||
</template>
|
||||
<template #row_record="{ row }">
|
||||
<ModifyRecord :data="row" />
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button icon="ele-Edit" text type="primary" v-auth="'sysPos:update'" @click="handleEdit(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button icon="ele-Delete" text type="danger" v-auth="'sysPos:delete'" @click="handleDelete(row)"> </el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template #pager>
|
||||
<vxe-pager
|
||||
:loading="options.loading"
|
||||
v-model:current-page="state.tableParams.page"
|
||||
v-model:page-size="state.tableParams.pageSize"
|
||||
:total="state.tableParams.total"
|
||||
@page-change="pageChange"
|
||||
/>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
|
||||
<EditPos ref="editPosRef" :title="state.editPosTitle" @handleQuery="handleQuery" />
|
||||
<EditPos ref="editPosRef" :title="state.title" @handleSearch="handleQuery" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="sysPos">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxePagerEvents, VxePagerDefines } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/vxeTableOptionsHook';
|
||||
|
||||
import EditPos from '/@/views/system/pos/component/editPos.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
@ -61,50 +81,98 @@ import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysPosApi } from '/@/api-services/api';
|
||||
import { PosOutput } from '/@/api-services/models';
|
||||
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editPosRef = ref<InstanceType<typeof EditPos>>();
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
posData: [] as Array<PosOutput>,
|
||||
queryParams: {
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
},
|
||||
editPosTitle: '',
|
||||
tableParams: {
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
field: 'id', // 默认的排序字段
|
||||
order: 'aes', // 排序方向
|
||||
descStr: 'desc', // 降序排序的关键字符
|
||||
total: 0 as any,
|
||||
},
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
//表格参数配置
|
||||
const options = useVxeTable<PosOutput>({
|
||||
id: 'sysPos',
|
||||
name: '职位',
|
||||
columns: [
|
||||
// { type: 'checkbox', width: 40, fixed: 'left' },
|
||||
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||
{ field: 'name', title: '职位名称', minWidth: 200, showOverflow: 'tooltip', sortable: true },
|
||||
{ field: 'code', title: '职位编码', minWidth: 200, showOverflow: 'tooltip', sortable: true },
|
||||
{ field: 'orderNo', title: '排序', width: 80, showOverflow: 'tooltip', sortable: true },
|
||||
{ field: 'status', title: '状态', width: 80, showOverflow: 'tooltip', sortable: true, slots: { default: 'row_status' } },
|
||||
{ field: '', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ title: '操作', fixed: 'right', width: 100, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
searchCallback: () => handleQuery(),
|
||||
queryAllCallback: () => fetchData({ pageSize: 99999 }),
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
handleQuery();
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
state.loading = true;
|
||||
var res = await getAPI(SysPosApi).apiSysPosListGet(state.queryParams.name, state.queryParams.code);
|
||||
state.posData = res.data.result ?? [];
|
||||
state.loading = false;
|
||||
const handleQuery = async (reset = false) => {
|
||||
options.loading = true;
|
||||
if (reset) state.tableParams.page = 1;
|
||||
var res = await fetchData(null);
|
||||
xGrid.value?.loadData(res.data.result?.items ?? []);
|
||||
state.tableParams.total = res.data.result?.total;
|
||||
options.loading = false;
|
||||
};
|
||||
|
||||
// 获取表数据
|
||||
const fetchData = async (tableParams: any) => {
|
||||
let params = Object.assign(state.queryParams, state.tableParams, tableParams);
|
||||
return getAPI(SysPosApi).apiSysPosPagePost(params);
|
||||
};
|
||||
|
||||
// 重置操作
|
||||
const resetQuery = () => {
|
||||
state.queryParams.name = undefined;
|
||||
state.queryParams.code = undefined;
|
||||
state.queryParams.name = undefined;
|
||||
handleQuery(true);
|
||||
};
|
||||
|
||||
// 改变页码序号或页面容量
|
||||
const pageChange: VxePagerEvents.PageChange = ({ currentPage, pageSize }: VxePagerDefines.PageChangeEventParams) => {
|
||||
state.tableParams.page = currentPage;
|
||||
state.tableParams.pageSize = pageSize;
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
// 列排序
|
||||
const sortChange = (options: any) => {
|
||||
state.tableParams.field = options.field;
|
||||
state.tableParams.order = options.order;
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
// 打开新增页面
|
||||
const openAddPos = () => {
|
||||
state.editPosTitle = '添加职位';
|
||||
const handleAdd = () => {
|
||||
state.title = '添加职位';
|
||||
editPosRef.value?.openDialog({ status: 1, orderNo: 100 });
|
||||
};
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditPos = (row: any) => {
|
||||
state.editPosTitle = '编辑职位';
|
||||
const handleEdit = (row: any) => {
|
||||
state.title = '编辑职位';
|
||||
editPosRef.value?.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delPos = (row: any) => {
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除职位:【${row.name}】?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@ -119,10 +119,11 @@ const state = reactive({
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
//表格参数配置
|
||||
|
||||
// 表格参数配置
|
||||
const options = useVxeTable<PageRoleOutput>({
|
||||
id: 'sysRole',
|
||||
// name: '角色',
|
||||
name: '角色',
|
||||
columns: [
|
||||
// { type: 'checkbox', width: 40, fixed: 'left' },
|
||||
{ type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user