郑渤旭[Irelia]
1 year ago
36 changed files with 3009 additions and 67 deletions
@ -0,0 +1,33 @@ |
|||||
|
using System; |
||||
|
using Faster.Zheng.Winin.Enums; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class CreateUpdateExportCustomUserSettingDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
using System; |
||||
|
using Faster.Zheng.Winin.Enums; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
[Serializable] |
||||
|
public class ExportCustomUserSettingDto : AuditedEntityDto<Guid> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel; |
||||
|
using Faster.Zheng.Winin.Enums; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class ExportCustomUserSettingGetListInput : PagedAndSortedResultRequestDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting? CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public interface IExportCustomUserSettingAppService : |
||||
|
ICrudAppService< |
||||
|
ExportCustomUserSettingDto, |
||||
|
Guid, |
||||
|
ExportCustomUserSettingGetListInput, |
||||
|
CreateUpdateExportCustomUserSettingDto, |
||||
|
CreateUpdateExportCustomUserSettingDto> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 根据用户和表名获取个性化导出
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId, string exportTableName); |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Faster.Zheng.Winin.Permissions; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public class ExportCustomUserSettingAppService : CrudAppService<ExportCustomUserSetting, ExportCustomUserSettingDto, Guid, ExportCustomUserSettingGetListInput, CreateUpdateExportCustomUserSettingDto, CreateUpdateExportCustomUserSettingDto>, |
||||
|
IExportCustomUserSettingAppService |
||||
|
{ |
||||
|
protected override string GetPolicyName { get; set; } = WininPermissions.ExportCustomUserSetting.Default; |
||||
|
protected override string GetListPolicyName { get; set; } = WininPermissions.ExportCustomUserSetting.Default; |
||||
|
protected override string CreatePolicyName { get; set; } = WininPermissions.ExportCustomUserSetting.Create; |
||||
|
protected override string UpdatePolicyName { get; set; } = WininPermissions.ExportCustomUserSetting.Update; |
||||
|
protected override string DeletePolicyName { get; set; } = WininPermissions.ExportCustomUserSetting.Delete; |
||||
|
|
||||
|
private readonly IExportCustomUserSettingRepository _repository; |
||||
|
|
||||
|
public ExportCustomUserSettingAppService(IExportCustomUserSettingRepository repository) : base(repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
|
||||
|
protected override async Task<IQueryable<ExportCustomUserSetting>> CreateFilteredQueryAsync(ExportCustomUserSettingGetListInput input) |
||||
|
{ |
||||
|
// TODO: AbpHelper generated
|
||||
|
return (await base.CreateFilteredQueryAsync(input)) |
||||
|
.WhereIf(input.ExportUserId != null, x => x.ExportUserId == input.ExportUserId) |
||||
|
.WhereIf(!input.ExportUserName.IsNullOrWhiteSpace(), x => x.ExportUserName.Contains(input.ExportUserName)) |
||||
|
.WhereIf(!input.ExportColumnName.IsNullOrWhiteSpace(), x => x.ExportColumnName.Contains(input.ExportColumnName)) |
||||
|
.WhereIf(!input.ExportTableName.IsNullOrWhiteSpace(), x => x.ExportTableName.Contains(input.ExportTableName)) |
||||
|
.WhereIf(input.CustomUserSetting != null, x => x.CustomUserSetting == input.CustomUserSetting) |
||||
|
; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据用户和表名获取个性化导出
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("get-by-user-and-table-name")] |
||||
|
public virtual async Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId, string exportTableName) |
||||
|
{ |
||||
|
var entitys= await _repository.GetListAsync(p => p.ExportUserId == userId && p.ExportTableName == exportTableName); |
||||
|
|
||||
|
return ObjectMapper.Map<List<ExportCustomUserSetting>, List<ExportCustomUserSettingDto>>(entitys); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public interface IExportCustomUserSettingRepository : IRepository<ExportCustomUserSetting, Guid> |
||||
|
{ |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using System.Linq; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public static class ExportCustomUserSettingEfCoreQueryableExtensions |
||||
|
{ |
||||
|
public static IQueryable<ExportCustomUserSetting> IncludeDetails(this IQueryable<ExportCustomUserSetting> queryable, bool include = true) |
||||
|
{ |
||||
|
if (!include) |
||||
|
{ |
||||
|
return queryable; |
||||
|
} |
||||
|
|
||||
|
return queryable |
||||
|
// .Include(x => x.xxx) // TODO: AbpHelper generated
|
||||
|
; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Faster.Zheng.Winin.EntityFrameworkCore; |
||||
|
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
public class ExportCustomUserSettingRepository : EfCoreRepository<WininDbContext, ExportCustomUserSetting, Guid>, IExportCustomUserSettingRepository |
||||
|
{ |
||||
|
public ExportCustomUserSettingRepository(IDbContextProvider<WininDbContext> dbContextProvider) : base(dbContextProvider) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public override async Task<IQueryable<ExportCustomUserSetting>> WithDetailsAsync() |
||||
|
{ |
||||
|
return (await GetQueryableAsync()).IncludeDetails(); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,48 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class AddedExportCustomUserSetting : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppExportCustomUserSettings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ExportUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ExportUserName = table.Column<string>(type: "nvarchar(max)", nullable: false), |
||||
|
ExportColumnName = table.Column<string>(type: "nvarchar(max)", nullable: false), |
||||
|
ExportTableName = table.Column<string>(type: "nvarchar(max)", nullable: false), |
||||
|
CustomUserSetting = table.Column<int>(type: "int", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppExportCustomUserSettings", x => x.Id); |
||||
|
}, |
||||
|
comment: " 用户个型导出配置"); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <inheritdoc />
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppExportCustomUserSettings"); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
@page |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
||||
|
@using Faster.Zheng.Winin.Localization |
||||
|
@inject IHtmlLocalizer<WininResource> L |
||||
|
@model Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting.CreateModalModel |
||||
|
@{ |
||||
|
Layout = null; |
||||
|
} |
||||
|
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="CreateModal"> |
||||
|
<abp-modal> |
||||
|
<abp-modal-header title="@L["CreateExportCustomUserSetting"].Value"></abp-modal-header> |
||||
|
<abp-modal-body> |
||||
|
<abp-form-content /> |
||||
|
</abp-modal-body> |
||||
|
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
||||
|
</abp-modal> |
||||
|
</abp-dynamic-form> |
@ -0,0 +1,27 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting.ViewModels; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting; |
||||
|
|
||||
|
public class CreateModalModel : WininPageModel |
||||
|
{ |
||||
|
[BindProperty] |
||||
|
public CreateEditExportCustomUserSettingViewModel ViewModel { get; set; } |
||||
|
|
||||
|
private readonly IExportCustomUserSettingAppService _service; |
||||
|
|
||||
|
public CreateModalModel(IExportCustomUserSettingAppService service) |
||||
|
{ |
||||
|
_service = service; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<IActionResult> OnPostAsync() |
||||
|
{ |
||||
|
var dto = ObjectMapper.Map<CreateEditExportCustomUserSettingViewModel, CreateUpdateExportCustomUserSettingDto>(ViewModel); |
||||
|
await _service.CreateAsync(dto); |
||||
|
return NoContent(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
@page |
||||
|
@using Faster.Zheng.Winin.Localization |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
||||
|
@inject IHtmlLocalizer<WininResource> L |
||||
|
@model Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting.EditModalModel |
||||
|
@{ |
||||
|
Layout = null; |
||||
|
} |
||||
|
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="EditModal"> |
||||
|
<abp-modal> |
||||
|
<abp-modal-header title="@L["EditExportCustomUserSetting"].Value"></abp-modal-header> |
||||
|
<abp-modal-body> |
||||
|
<abp-input asp-for="Id" /> |
||||
|
<abp-form-content /> |
||||
|
</abp-modal-body> |
||||
|
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
||||
|
</abp-modal> |
||||
|
</abp-dynamic-form> |
@ -0,0 +1,38 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting.ViewModels; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting; |
||||
|
|
||||
|
public class EditModalModel : WininPageModel |
||||
|
{ |
||||
|
[HiddenInput] |
||||
|
[BindProperty(SupportsGet = true)] |
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
[BindProperty] |
||||
|
public CreateEditExportCustomUserSettingViewModel ViewModel { get; set; } |
||||
|
|
||||
|
private readonly IExportCustomUserSettingAppService _service; |
||||
|
|
||||
|
public EditModalModel(IExportCustomUserSettingAppService service) |
||||
|
{ |
||||
|
_service = service; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task OnGetAsync() |
||||
|
{ |
||||
|
var dto = await _service.GetAsync(Id); |
||||
|
ViewModel = ObjectMapper.Map<ExportCustomUserSettingDto, CreateEditExportCustomUserSettingViewModel>(dto); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<IActionResult> OnPostAsync() |
||||
|
{ |
||||
|
var dto = ObjectMapper.Map<CreateEditExportCustomUserSettingViewModel, CreateUpdateExportCustomUserSettingDto>(ViewModel); |
||||
|
await _service.UpdateAsync(Id, dto); |
||||
|
return NoContent(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
@page |
||||
|
@using Faster.Zheng.Winin.Permissions |
||||
|
@using Microsoft.AspNetCore.Authorization |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Layout |
||||
|
@using Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting |
||||
|
@using Faster.Zheng.Winin.Localization |
||||
|
@using Faster.Zheng.Winin.Web.Menus |
||||
|
@model IndexModel |
||||
|
@inject IPageLayout PageLayout |
||||
|
@inject IHtmlLocalizer<WininResource> L |
||||
|
@inject IAuthorizationService Authorization |
||||
|
@{ |
||||
|
PageLayout.Content.Title = L["ExportCustomUserSetting"].Value; |
||||
|
PageLayout.Content.BreadCrumb.Add(L["Menu:ExportCustomUserSetting"].Value); |
||||
|
PageLayout.Content.MenuItemName = WininMenus.ExportCustomUserSetting; |
||||
|
} |
||||
|
|
||||
|
@section scripts |
||||
|
{ |
||||
|
<abp-script src="/Pages/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting/index.js" /> |
||||
|
} |
||||
|
@section styles |
||||
|
{ |
||||
|
<abp-style src="/Pages/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting/index.css"/> |
||||
|
} |
||||
|
|
||||
|
<abp-card> |
||||
|
<abp-card-header> |
||||
|
<abp-row> |
||||
|
<abp-column size-md="_6"> |
||||
|
<abp-card-title>@L["ExportCustomUserSetting"]</abp-card-title> |
||||
|
</abp-column> |
||||
|
<abp-column size-md="_6" class="text-end"> |
||||
|
@if (await Authorization.IsGrantedAsync(WininPermissions.ExportCustomUserSetting.Create)) |
||||
|
{ |
||||
|
<abp-button id="NewExportCustomUserSettingButton" |
||||
|
text="@L["CreateExportCustomUserSetting"].Value" |
||||
|
icon="plus" |
||||
|
button-type="Primary" /> |
||||
|
} |
||||
|
</abp-column> |
||||
|
</abp-row> |
||||
|
</abp-card-header> |
||||
|
<abp-card-body> |
||||
|
@*<abp-row class="mb-3"> |
||||
|
<a abp-collapse-id="ExportCustomUserSettingCollapse" class="text-secondary">@L["TableFilter"] </a> |
||||
|
</abp-row> |
||||
|
<abp-collapse-body id="ExportCustomUserSettingCollapse"> |
||||
|
<abp-dynamic-form abp-model="ExportCustomUserSettingFilter" id="ExportCustomUserSettingFilter" required-symbols="false"/> |
||||
|
<hr /> |
||||
|
</abp-collapse-body>*@ |
||||
|
<abp-table striped-rows="true" id="ExportCustomUserSettingTable" class="nowrap"/> |
||||
|
</abp-card-body> |
||||
|
</abp-card> |
@ -0,0 +1,40 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Faster.Zheng.Winin.Enums; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting; |
||||
|
|
||||
|
public class IndexModel : WininPageModel |
||||
|
{ |
||||
|
public ExportCustomUserSettingFilterInput ExportCustomUserSettingFilter { get; set; } |
||||
|
|
||||
|
public virtual async Task OnGetAsync() |
||||
|
{ |
||||
|
await Task.CompletedTask; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class ExportCustomUserSettingFilterInput |
||||
|
{ |
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "ExportCustomUserSettingExportUserId")] |
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "ExportCustomUserSettingExportUserName")] |
||||
|
public string ExportUserName { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "ExportCustomUserSettingExportColumnName")] |
||||
|
public string ExportColumnName { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "ExportCustomUserSettingExportTableName")] |
||||
|
public string ExportTableName { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "ExportCustomUserSettingCustomUserSetting")] |
||||
|
public Enum_ExportCustomUserSetting? CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Faster.Zheng.Winin.Enums; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Web.Pages.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting.ViewModels; |
||||
|
|
||||
|
public class CreateEditExportCustomUserSettingViewModel |
||||
|
{ |
||||
|
[Display(Name = "ExportCustomUserSettingExportUserId")] |
||||
|
public Guid ExportUserId { get; set; } |
||||
|
|
||||
|
[Display(Name = "ExportCustomUserSettingExportUserName")] |
||||
|
public string ExportUserName { get; set; } |
||||
|
|
||||
|
[Display(Name = "ExportCustomUserSettingExportColumnName")] |
||||
|
public string ExportColumnName { get; set; } |
||||
|
|
||||
|
[Display(Name = "ExportCustomUserSettingExportTableName")] |
||||
|
public string ExportTableName { get; set; } |
||||
|
|
||||
|
[Display(Name = "ExportCustomUserSettingCustomUserSetting")] |
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,100 @@ |
|||||
|
$(function () { |
||||
|
|
||||
|
$("#ExportCustomUserSettingFilter :input").on('input', function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
$('#ExportCustomUserSettingFilter div').addClass('col-sm-3').parent().addClass('row'); |
||||
|
|
||||
|
var getFilter = function () { |
||||
|
var input = {}; |
||||
|
$("#ExportCustomUserSettingFilter") |
||||
|
.serializeArray() |
||||
|
.forEach(function (data) { |
||||
|
if (data.value != '') { |
||||
|
input[abp.utils.toCamelCase(data.name.replace(/ExportCustomUserSettingFilter./g, ''))] = data.value; |
||||
|
} |
||||
|
}) |
||||
|
return input; |
||||
|
}; |
||||
|
|
||||
|
var l = abp.localization.getResource('Winin'); |
||||
|
|
||||
|
var service = faster.zheng.winin.appBaseBusiness.exportCustomUserSetting.exportCustomUserSetting; |
||||
|
var createModal = new abp.ModalManager(abp.appPath + 'AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting/CreateModal'); |
||||
|
var editModal = new abp.ModalManager(abp.appPath + 'AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting/EditModal'); |
||||
|
|
||||
|
var dataTable = $('#ExportCustomUserSettingTable').DataTable(abp.libs.datatables.normalizeConfiguration({ |
||||
|
processing: true, |
||||
|
serverSide: true, |
||||
|
paging: true, |
||||
|
searching: false,//disable default searchbox
|
||||
|
autoWidth: false, |
||||
|
scrollCollapse: true, |
||||
|
order: [[0, "asc"]], |
||||
|
ajax: abp.libs.datatables.createAjax(service.getList,getFilter), |
||||
|
columnDefs: [ |
||||
|
{ |
||||
|
rowAction: { |
||||
|
items: |
||||
|
[ |
||||
|
{ |
||||
|
text: l('Edit'), |
||||
|
visible: abp.auth.isGranted('Winin.ExportCustomUserSetting.Update'), |
||||
|
action: function (data) { |
||||
|
editModal.open({ id: data.record.id }); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
text: l('Delete'), |
||||
|
visible: abp.auth.isGranted('Winin.ExportCustomUserSetting.Delete'), |
||||
|
confirmMessage: function (data) { |
||||
|
return l('ExportCustomUserSettingDeletionConfirmationMessage', data.record.id); |
||||
|
}, |
||||
|
action: function (data) { |
||||
|
service.delete(data.record.id) |
||||
|
.then(function () { |
||||
|
abp.notify.info(l('SuccessfullyDeleted')); |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: l('ExportCustomUserSettingExportUserId'), |
||||
|
data: "exportUserId" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('ExportCustomUserSettingExportUserName'), |
||||
|
data: "exportUserName" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('ExportCustomUserSettingExportColumnName'), |
||||
|
data: "exportColumnName" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('ExportCustomUserSettingExportTableName'), |
||||
|
data: "exportTableName" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('ExportCustomUserSettingCustomUserSetting'), |
||||
|
data: "customUserSetting" |
||||
|
}, |
||||
|
] |
||||
|
})); |
||||
|
|
||||
|
createModal.onResult(function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
editModal.onResult(function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
$('#NewExportCustomUserSettingButton').click(function (e) { |
||||
|
e.preventDefault(); |
||||
|
createModal.open(); |
||||
|
}); |
||||
|
}); |
@ -0,0 +1,28 @@ |
|||||
|
using Shouldly; |
||||
|
using System.Threading.Tasks; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
public class ExportCustomUserSettingAppServiceTests : WininApplicationTestBase |
||||
|
{ |
||||
|
private readonly IExportCustomUserSettingAppService _exportCustomUserSettingAppService; |
||||
|
|
||||
|
public ExportCustomUserSettingAppServiceTests() |
||||
|
{ |
||||
|
_exportCustomUserSettingAppService = GetRequiredService<IExportCustomUserSettingAppService>(); |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
[Fact] |
||||
|
public async Task Test1() |
||||
|
{ |
||||
|
// Arrange
|
||||
|
|
||||
|
// Act
|
||||
|
|
||||
|
// Assert
|
||||
|
} |
||||
|
*/ |
||||
|
} |
||||
|
|
@ -0,0 +1,24 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Shouldly; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
public class ExportCustomUserSettingDomainTests : WininDomainTestBase |
||||
|
{ |
||||
|
public ExportCustomUserSettingDomainTests() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
[Fact] |
||||
|
public async Task Test1() |
||||
|
{ |
||||
|
// Arrange
|
||||
|
|
||||
|
// Assert
|
||||
|
|
||||
|
// Assert
|
||||
|
} |
||||
|
*/ |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.EntityFrameworkCore.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
public class ExportCustomUserSettingRepositoryTests : WininEntityFrameworkCoreTestBase |
||||
|
{ |
||||
|
private readonly IExportCustomUserSettingRepository _exportCustomUserSettingRepository; |
||||
|
|
||||
|
public ExportCustomUserSettingRepositoryTests() |
||||
|
{ |
||||
|
_exportCustomUserSettingRepository = GetRequiredService<IExportCustomUserSettingRepository>(); |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
[Fact] |
||||
|
public async Task Test1() |
||||
|
{ |
||||
|
await WithUnitOfWorkAsync(async () => |
||||
|
{ |
||||
|
// Arrange
|
||||
|
|
||||
|
// Act
|
||||
|
|
||||
|
//Assert
|
||||
|
}); |
||||
|
} |
||||
|
*/ |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
|
||||
|
using System.Threading.Tasks; |
||||
|
using Shouldly; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Faster.Zheng.Winin.Pages.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
public class Index_Tests : WininWebTestBase |
||||
|
{ |
||||
|
/* |
||||
|
[Fact] |
||||
|
public async Task Index_Page_Test() |
||||
|
{ |
||||
|
// Arrange
|
||||
|
|
||||
|
// Act
|
||||
|
var response = await GetResponseAsStringAsync("/ExportCustomUserSetting"); |
||||
|
|
||||
|
// Assert
|
||||
|
response.ShouldNotBeNull(); |
||||
|
} |
||||
|
*/ |
||||
|
} |
Loading…
Reference in new issue