fix 修复默认应用的问题
This commit is contained in:
@@ -131,7 +131,7 @@ namespace Ewide.Core.Service
|
|||||||
|
|
||||||
if (input.Active)
|
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)
|
if (isExist)
|
||||||
throw Oops.Oh(ErrorCode.D5001);
|
throw Oops.Oh(ErrorCode.D5001);
|
||||||
}
|
}
|
||||||
@@ -159,7 +159,7 @@ namespace Ewide.Core.Service
|
|||||||
[HttpGet("/sysApp/list")]
|
[HttpGet("/sysApp/list")]
|
||||||
public async Task<dynamic> GetAppList([FromQuery] AppInput input)
|
public async Task<dynamic> 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否可见(Y-是,N-否)
|
/// 是否可见(Y-是,N-否)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Visible { get; set; }
|
public bool Visible { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 内链地址
|
/// 内链地址
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
active: 'N',
|
active: false,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: '请输入应用名称' }],
|
name: [{ required: true, message: '请输入应用名称' }],
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
<a-button @click="onOpen('add-form')" icon="plus">新增应用</a-button>
|
<a-button @click="onOpen('add-form')" icon="plus">新增应用</a-button>
|
||||||
</Auth>
|
</Auth>
|
||||||
<span slot="active" slot-scope="text, record">
|
<span slot="active" slot-scope="text, record">
|
||||||
{{ bindCodeValue(text, 'yes_or_no') }}
|
{{ text ? '是' : '否' }}
|
||||||
<Auth auth="sysApp:setAsDefault" v-if="record.active == 'N'">
|
<Auth auth="sysApp:setAsDefault" v-if="!record.active">
|
||||||
<yo-table-actions>
|
<yo-table-actions>
|
||||||
<span></span>
|
<span></span>
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
|
|||||||
Reference in New Issue
Block a user