From 3ca99f3953fa414874b1491dc57fb5b5248b9473 Mon Sep 17 00:00:00 2001 From: 188633308 <188633308@qq.com> Date: Sun, 25 Apr 2021 17:04:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Core/Service/App/SysAppService.cs | 4 ++-- Api/Ewide.Core/Service/Menu/Dto/MenuInput.cs | 2 +- Web/src/pages/system/app/form.vue | 2 +- Web/src/pages/system/app/index.vue | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Api/Ewide.Core/Service/App/SysAppService.cs b/Api/Ewide.Core/Service/App/SysAppService.cs index ac31034..8cb3ebf 100644 --- a/Api/Ewide.Core/Service/App/SysAppService.cs +++ b/Api/Ewide.Core/Service/App/SysAppService.cs @@ -131,7 +131,7 @@ namespace Ewide.Core.Service if (input.Active) { - isExist = await _sysAppRep.DetachedEntities.AnyAsync(u => u.Active == input.Active); + isExist = await _sysAppRep.DetachedEntities.AnyAsync(u => u.Active == input.Active && !u.Id.Equals(input.Id)); if (isExist) throw Oops.Oh(ErrorCode.D5001); } @@ -159,7 +159,7 @@ namespace Ewide.Core.Service [HttpGet("/sysApp/list")] public async Task GetAppList([FromQuery] AppInput input) { - return await _sysAppRep.DetachedEntities.Where(u => u.Status == (int)CommonStatus.ENABLE).ToListAsync(); + return await _sysAppRep.DetachedEntities.Where(u => u.Status == (int)CommonStatus.ENABLE).OrderBy(u => u.Sort).ToListAsync(); } /// diff --git a/Api/Ewide.Core/Service/Menu/Dto/MenuInput.cs b/Api/Ewide.Core/Service/Menu/Dto/MenuInput.cs index 755ed86..f6ba082 100644 --- a/Api/Ewide.Core/Service/Menu/Dto/MenuInput.cs +++ b/Api/Ewide.Core/Service/Menu/Dto/MenuInput.cs @@ -60,7 +60,7 @@ namespace Ewide.Core.Service /// /// 是否可见(Y-是,N-否) /// - public string Visible { get; set; } + public bool Visible { get; set; } /// /// 内链地址 diff --git a/Web/src/pages/system/app/form.vue b/Web/src/pages/system/app/form.vue index d2368f4..95bdcbc 100644 --- a/Web/src/pages/system/app/form.vue +++ b/Web/src/pages/system/app/form.vue @@ -24,7 +24,7 @@ export default { data() { return { form: { - active: 'N', + active: false, }, rules: { name: [{ required: true, message: '请输入应用名称' }], diff --git a/Web/src/pages/system/app/index.vue b/Web/src/pages/system/app/index.vue index b5f5991..6b41d4b 100644 --- a/Web/src/pages/system/app/index.vue +++ b/Web/src/pages/system/app/index.vue @@ -26,8 +26,8 @@ 新增应用 - {{ bindCodeValue(text, 'yes_or_no') }} - + {{ text ? '是' : '否' }} +