mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
parent
a454f2ab2d
commit
8479f69bdc
@ -5,8 +5,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FreeSql.DbContext.NS" Version="3.2.833-ns4"/>
|
<PackageReference Include="FreeSql.DbContext.NS" Version="3.2.833-ns4"/>
|
||||||
<PackageReference Include="FreeSql.Provider.Sqlite.NS" Version="3.2.833-ns4"/>
|
<PackageReference Include="FreeSql.Provider.Sqlite.NS" Version="3.2.833-ns4"/>
|
||||||
<PackageReference Include="Gurion" Version="1.1.0"/>
|
<PackageReference Include="Gurion" Version="1.2.0"/>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0"/>
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.12.0-3.final"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0-rc.2.24474.3"/>
|
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0-rc.2.24474.3"/>
|
||||||
<PackageReference Include="Minio" Version="6.0.3"/>
|
<PackageReference Include="Minio" Version="6.0.3"/>
|
||||||
<PackageReference Include="NSExt" Version="2.2.0"/>
|
<PackageReference Include="NSExt" Version="2.2.0"/>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"AppSettings": {
|
"AppSettings": {
|
||||||
"InjectSpecificationDocument": true,
|
"InjectSpecificationDocument": true
|
||||||
"InjectMiniProfiler": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"AppSettings": {
|
"AppSettings": {
|
||||||
"InjectSpecificationDocument": true,
|
"InjectSpecificationDocument": true
|
||||||
"InjectMiniProfiler": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"AppSettings": {
|
"AppSettings": {
|
||||||
"InjectSpecificationDocument": true,
|
"InjectSpecificationDocument": true
|
||||||
"InjectMiniProfiler": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
// App基本配置
|
// App基本配置
|
||||||
"AppSettings": {
|
"AppSettings": {
|
||||||
"InjectSpecificationDocument": false,
|
"InjectSpecificationDocument": false
|
||||||
"InjectMiniProfiler": false
|
|
||||||
},
|
},
|
||||||
// Swagger文档配置 ------------------------------------------------------------------------------
|
// Swagger文档配置 ------------------------------------------------------------------------------
|
||||||
"SpecificationDocumentSettings": {
|
"SpecificationDocumentSettings": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace NetAdmin.Infrastructure.Utils;
|
namespace NetAdmin.Infrastructure.Utils;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 忽略 JsonIgnore 特性
|
/// 忽略 JsonIgnore 特性
|
||||||
|
@ -246,7 +246,13 @@ public sealed class UserService(
|
|||||||
public async Task<IEnumerable<QueryUserRsp>> QueryAsync(QueryReq<QueryUserReq> req)
|
public async Task<IEnumerable<QueryUserRsp>> QueryAsync(QueryReq<QueryUserReq> req)
|
||||||
{
|
{
|
||||||
req.ThrowIfInvalid();
|
req.ThrowIfInvalid();
|
||||||
var list = await (await QueryInternalAsync(req).ConfigureAwait(false)).Take(req.Count).ToListAsync(_listUserExp).ConfigureAwait(false);
|
var list = await (await QueryInternalAsync(req, false).ConfigureAwait(false))
|
||||||
|
#if DBTYPE_SQLSERVER
|
||||||
|
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
|
||||||
|
#endif
|
||||||
|
.Take(req.Count)
|
||||||
|
.ToListAsync(a => new Sys_User { Id = a.Id, UserName = a.UserName })
|
||||||
|
.ConfigureAwait(false);
|
||||||
return list.Adapt<IEnumerable<QueryUserRsp>>();
|
return list.Adapt<IEnumerable<QueryUserRsp>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public record CreateMenuReq : Sys_Menu
|
|||||||
|
|
||||||
/// <inheritdoc cref="Sys_Menu.ParentId" />
|
/// <inheritdoc cref="Sys_Menu.ParentId" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
public override long ParentId { get; init; } = 0;
|
public override long ParentId { get; init; }
|
||||||
|
|
||||||
/// <inheritdoc cref="Sys_Menu.Path" />
|
/// <inheritdoc cref="Sys_Menu.Path" />
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.2.24474.3"/>
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.2.24474.3"/>
|
||||||
<PackageReference Include="xunit" Version="2.9.2"/>
|
<PackageReference Include="xunit" Version="2.9.2"/>
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0-pre.42">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -71,6 +71,15 @@
|
|||||||
:style="item.style"
|
:style="item.style"
|
||||||
clearable
|
clearable
|
||||||
filterable />
|
filterable />
|
||||||
|
<na-user-select
|
||||||
|
v-else-if="item.type === 'user-select' && (!item.condition || item.condition())"
|
||||||
|
v-model="form[item.field[0]][item.field[1]]"
|
||||||
|
v-role="item.role || '*/*/*'"
|
||||||
|
:class="item.class"
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
:style="item.style"
|
||||||
|
clearable
|
||||||
|
filterable />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-badge :hidden="vue.query.dynamicFilter.filters.length === 0" :value="vue.query.dynamicFilter.filters.length">
|
<el-badge :hidden="vue.query.dynamicFilter.filters.length === 0" :value="vue.query.dynamicFilter.filters.length">
|
||||||
|
@ -46,7 +46,7 @@ export default {
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(n) {
|
handler(n) {
|
||||||
this.user = n ?? {}
|
this.user = n
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -72,6 +72,7 @@ export default {
|
|||||||
//最大化
|
//最大化
|
||||||
setFullscreen() {
|
setFullscreen() {
|
||||||
this.isFullscreen = !this.isFullscreen
|
this.isFullscreen = !this.isFullscreen
|
||||||
|
this.$emit('onSetFullscreen', this.isFullscreen)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,9 @@ export default {
|
|||||||
this.myChart = myChart
|
this.myChart = myChart
|
||||||
window.addEventListener('resize', () => myChart.resize())
|
window.addEventListener('resize', () => myChart.resize())
|
||||||
},
|
},
|
||||||
|
resize(width) {
|
||||||
|
this.myChart.resize({ width: width || 'auto' })
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -505,7 +505,7 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
await this.exportApi.post(this.getQueryParams())
|
await this.exportApi.post(this.getQueryParams())
|
||||||
this.$message.success(`数据已导出(上限2万条)`)
|
this.$message.success(`数据已导出(上限5万条)`)
|
||||||
} catch {}
|
} catch {}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
@ -158,7 +158,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const setrow = this.tableData.filter((item) => item[this.defaultProps.value] === this.defaultValue[this.defaultProps.value])
|
const setrow = this.tableData.filter(
|
||||||
|
(item) => item[this.defaultProps.value] === (this.defaultValue ?? {})[this.defaultProps.value],
|
||||||
|
)
|
||||||
this.$refs.table.setCurrentRow(setrow[0])
|
this.$refs.table.setCurrentRow(setrow[0])
|
||||||
}
|
}
|
||||||
this.$refs.table.setScrollTop(0)
|
this.$refs.table.setScrollTop(0)
|
||||||
@ -182,7 +184,7 @@ export default {
|
|||||||
item.currentLabel = item.value[this.defaultProps.label]
|
item.currentLabel = item.value[this.defaultProps.label]
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$refs.select.states.selectedLabel = this.defaultValue[this.defaultProps.label]
|
this.$refs.select.states.selectedLabel = (this.defaultValue ?? {})[this.defaultProps.label]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -118,7 +118,7 @@ export default {
|
|||||||
/// 模块说明
|
/// 模块说明
|
||||||
moduleRemark: '',
|
moduleRemark: '',
|
||||||
/// 模块类型
|
/// 模块类型
|
||||||
type: 'SysComponent',
|
type: 'NetAdmin.SysComponent',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -30,6 +30,15 @@
|
|||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<na-search
|
<na-search
|
||||||
:controls="[
|
:controls="[
|
||||||
|
{
|
||||||
|
type: 'remote-select',
|
||||||
|
field: ['dy', 'ownerId'],
|
||||||
|
api: $API.sys_user.query,
|
||||||
|
config: { props: { label: 'userName', value: 'id' } },
|
||||||
|
placeholder: '用户',
|
||||||
|
style: 'width:15rem',
|
||||||
|
condition: () => $GLOBAL.hasPermission('sys/log/operation/user'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
multiple: true,
|
multiple: true,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user