mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-12-27 06:35:39 +08:00
同步openauth.Core:
采用代码生成器的表结构控制前端显示,删除以前按照dbset获取数据库结构 优化注释 升级EF及所有三方的版本
This commit is contained in:
@@ -20,6 +20,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Infrastructure;
|
||||
using Infrastructure.Helpers;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Response;
|
||||
@@ -139,7 +140,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = _authStrategyContext.GetProperties(moduleCode);
|
||||
var list = _authStrategyContext.GetTableColumns(moduleCode);
|
||||
return JsonHelper.Instance.Serialize(new TableData
|
||||
{
|
||||
data = list,
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
<UseRazorBuildServer>false</UseRazorBuildServer>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>1701;1702;1591;1573;1572;1570</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Views\Base\**" />
|
||||
<Content Remove="Views\Base\**" />
|
||||
@@ -16,7 +20,7 @@
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Description', width:150}">字段描述</th>
|
||||
<th lay-data="{field:'Key', width:150}">字段代码</th>
|
||||
<th lay-data="{field:'Comment', width:150}">字段描述</th>
|
||||
<th lay-data="{field:'ColumnName', width:150}">字段代码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -41,4 +41,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/assignModule.js?v=2.1"></script>
|
||||
<script type="text/javascript" src="/userJs/assignModule.js?v=3.3"></script>
|
||||
@@ -100,7 +100,7 @@ layui.config({
|
||||
//循环所有数据,找出对应关系,设置checkbox选中状态
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
for (var j = 0; j < props.Result.length; j++) {
|
||||
if (res.data[i].Key != props.Result[j]) continue;
|
||||
if (res.data[i].ColumnName != props.Result[j]) continue;
|
||||
|
||||
//这里才是真正的有效勾选
|
||||
res.data[i]["LAY_CHECKED"] = true;
|
||||
|
||||
@@ -13,11 +13,11 @@ layui.config({
|
||||
$.getJSON('/Categories/All',
|
||||
{ page: 1, limit: 1 },
|
||||
function(data) {
|
||||
var columns = data.columnHeaders.filter(u =>u.Browsable ===true).map(function(e) {
|
||||
return {
|
||||
field: e.Key,
|
||||
title: e.Description
|
||||
};
|
||||
var columns = data.columnFields.filter(u => u.IsList ===true).map(function (e) {
|
||||
return {
|
||||
field: e.ColumnName,
|
||||
title: e.Comment
|
||||
};
|
||||
});
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
$.getJSON('/DataPrivilegeRules/Load',
|
||||
{ page: 1, limit: 1 },
|
||||
function (data) {
|
||||
var columns = data.columnHeaders.filter(u =>u.Browsable ===true).map(function (e) {
|
||||
return {
|
||||
field: e.Key,
|
||||
title: e.Description
|
||||
};
|
||||
});
|
||||
var columns = data.columnFields.filter(u => u.IsList ===true).map(function (e) {
|
||||
return {
|
||||
field: e.ColumnName,
|
||||
title: e.Comment
|
||||
};
|
||||
});
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
fixed: 'left'
|
||||
|
||||
Reference in New Issue
Block a user