😎1、去掉删除表按钮禁用 2、修复删除表只有一列时错误 3、升级nuget依赖 4、数据审批代码整理

This commit is contained in:
zuohuaijun 2024-06-19 03:18:45 +08:00
parent 6631768d7f
commit 65c9e0ad83
12 changed files with 40 additions and 50 deletions

View File

@ -33,7 +33,6 @@
<ItemGroup>
<ProjectReference Include="..\Admin.NET.Core\Admin.NET.Core.csproj" />
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.GoView\Admin.NET.Plugin.GoView.csproj" />
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.ReZero\Admin.NET.Plugin.ReZero.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -37,7 +37,7 @@
<PackageReference Include="SqlSugarCore" Version="5.1.4.158" />
<PackageReference Include="SSH.NET" Version="2024.0.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.0" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1027" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1028" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>
@ -53,8 +53,8 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="8.0.0" />
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="8.0.0" />
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="8.1.0" />
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="8.1.0" />
<PackageReference Include="Lazy.Captcha.Core" Version="2.0.7" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.6" />

View File

@ -163,6 +163,10 @@ public class SysDatabaseService : IDynamicApiController, ITransient
public void DeleteColumn(DeleteDbColumnInput input)
{
var db = _db.AsTenant().GetConnectionScope(input.ConfigId);
// 当只有1列时直接删除表
if (db.DbMaintenance.GetColumnInfosByTableName(input.TableName, false).Count == 1)
db.DbMaintenance.DropTable(input.TableName);
else
db.DbMaintenance.DropColumn(input.TableName, input.DbColumnName);
}

View File

@ -4,8 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
namespace Admin.NET.Plugin.ApprovalFlow;
/// <summary>
@ -49,5 +47,4 @@ public class ApprovalFlowRecord : EntityBaseData
/// </summary>
[SugarColumn(ColumnName = "FlowResult", ColumnDescription = "流程结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string? FlowResult { get; set; }
}

View File

@ -4,8 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
namespace Admin.NET.Plugin.ApprovalFlow;
/// <summary>
@ -61,5 +59,4 @@ public class ApprovalForm : EntityBaseData
/// </summary>
[SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 255)]
public string? Remark { get; set; }
}

View File

@ -4,8 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
namespace Admin.NET.Plugin.ApprovalFlow;
/// <summary>
@ -55,5 +53,4 @@ public class ApprovalFormRecord : EntityBaseData
/// </summary>
[SugarColumn(ColumnName = "FormResult", ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string? FormResult { get; set; }
}

View File

@ -5,9 +5,6 @@
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using System.Text.Json;
using Admin.NET.Plugin.ApprovalFlow.Const;
using Admin.NET.Plugin.ApprovalFlow.Entity;
using Microsoft.AspNetCore.Http;
namespace Admin.NET.Plugin.ApprovalFlow.Service;
@ -133,7 +130,8 @@ public class ApprovalFlowService : IDynamicApiController, ITransient
var result = await _approvalFlowRep.AsQueryable().Where(u => u.Code == code).Select<ApprovalFlowOutput>().FirstAsync();
var FlowJson = result.FlowJson != null ? JsonSerializer.Deserialize<ApprovalFlowItem>(result.FlowJson) : new ApprovalFlowItem();
var FormJson = result.FormJson != null ? JsonSerializer.Deserialize<ApprovalFormItem>(result.FormJson) : new ApprovalFormItem();
return new {
return new
{
FlowJson,
FormJson
};

View File

@ -72,7 +72,6 @@ public class ApprovalFlowEdgeItem
public class FlowProperties
{
}
public class FlowTextItem

View File

@ -1,4 +1,3 @@
using Microsoft.AspNetCore.Http;
namespace Admin.NET.Plugin.ApprovalFlow.Service;

View File

@ -77,7 +77,7 @@ public class GoViewSysService : IDynamicApiController
[AllowAnonymous]
[ApiDescriptionSettings(Name = "GetOssInfo")]
[DisplayName("获取 OSS 上传接口")]
public static Task<GoViewOssUrlOutput> GetOssInfo()
public Task<GoViewOssUrlOutput> GetOssInfo()
{
return Task.FromResult(new GoViewOssUrlOutput { BucketURL = "" });
}

View File

@ -24,7 +24,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Rezero.Api" Version="1.7.0" />
<PackageReference Include="Rezero.Api" Version="1.7.1" />
</ItemGroup>
<ItemGroup>

View File

@ -16,7 +16,7 @@
<el-button-group>
<el-button icon="ele-Plus" type="primary" @click="openAddTable"> 增加表 </el-button>
<el-button icon="ele-Edit" @click="openEditTable"> 编辑表 </el-button>
<el-button icon="ele-Delete" type="danger" @click="delTable" disabled> 删除表 </el-button>
<el-button icon="ele-Delete" type="danger" @click="delTable"> 删除表 </el-button>
<el-button icon="ele-View" @click="visualTable"> 可视化 </el-button>
</el-button-group>
<el-button-group style="padding-left: 10px">