Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化tab右键事件 #252

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b25c846
优化tab右键事件
p1j123456 May 22, 2022
921de47
新增工作流
p1j123456 Aug 22, 2022
98c82a9
更新
p1j123456 Aug 22, 2022
bb5f2f8
更新
p1j123456 Aug 22, 2022
ae40c1a
追加工作流接口
p1j123456 Aug 22, 2022
9d0a488
追加实体
p1j123456 Aug 22, 2022
01c1e8a
更新
p1j123456 Aug 22, 2022
ed70f3d
更新
p1j123456 Aug 22, 2022
e7a0e4c
新增邮箱工具类
p1j123456 Aug 22, 2022
f8e4672
更新
p1j123456 Aug 22, 2022
52b4a5e
更新
p1j123456 Aug 22, 2022
2e3660c
更新
p1j123456 Aug 22, 2022
c886ef8
更新
p1j123456 Aug 22, 2022
9394907
更新
p1j123456 Aug 22, 2022
2f7adec
更新
p1j123456 Aug 22, 2022
a1b82a4
更新
p1j123456 Aug 22, 2022
fb4e3fb
更新
p1j123456 Aug 22, 2022
797c2a1
追加例子
p1j123456 Aug 22, 2022
5c35de5
更新
p1j123456 Aug 22, 2022
8e2f56e
同步
p1j123456 Aug 22, 2022
11d5c2a
更新
p1j123456 Aug 22, 2022
f202301
同步官方
p1j123456 Aug 30, 2022
57daeff
同步官方
p1j123456 Sep 13, 2022
4cf6d90
同步官方
p1j123456 Sep 13, 2022
48fb58d
同步官方
p1j123456 Sep 13, 2022
531f281
删除
p1j123456 Sep 29, 2022
802ae16
同步官方
p1j123456 Sep 29, 2022
fcff1e5
更新
p1j123456 Dec 8, 2022
e9871d6
Merge branch 'master' of https://github.com/p1j123456/Vue.NetCore
p1j123456 Dec 8, 2022
05f7301
同步官方
p1j123456 Dec 8, 2022
ff59681
同步官方
p1j123456 Dec 8, 2022
490f17f
同步官方
p1j123456 Dec 8, 2022
6716605
同步官方
p1j123456 Apr 6, 2023
00e48cc
同步官方
p1j123456 Apr 9, 2023
9b641f8
同步官方
p1j123456 Apr 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions .Net6版本/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
44 changes: 44 additions & 0 deletions .Net6版本/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#
#FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
#RUN apt-get update; apt-get install libfontconfig1 -y
#
#WORKDIR /app
#EXPOSE 9991
#
#FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
#WORKDIR /src
#COPY ["VOL.WebApi/VOL.WebApi.csproj", "VOL.WebApi/"]
#COPY ["VOL.System/VOL.System.csproj", "VOL.System/"]
#COPY ["VOL.Core/VOL.Core.csproj", "VOL.Core/"]
#COPY ["VOL.Entity/VOL.Entity.csproj", "VOL.Entity/"]
#COPY ["VOL.Order/VOL.Order.csproj", "VOL.Order/"]
#COPY ["VOL.AppManager/VOL.AppManager.csproj", "VOL.AppManager/"]
#COPY ["VOL.Builder/VOL.Builder.csproj", "VOL.Builder/"]
#RUN dotnet restore "VOL.WebApi/VOL.WebApi.csproj"
#COPY . .
#WORKDIR "/src/VOL.WebApi"
#RUN dotnet build "VOL.WebApi.csproj" -c Release -o /app/build
#
#FROM build AS publish
#RUN dotnet publish "VOL.WebApi.csproj" -c Release -o /app/publish
#
#FROM base AS final
#WORKDIR /app
#COPY --from=publish /app/publish .
#ENTRYPOINT ["dotnet", "VOL.WebApi.dll"]

#docker run -p 3306:3306 --name volmysql \
#--restart=always \
#-v /home/mysql/data:/var/lib/mysql \
#-e MYSQL_ROOT_PASSWORD=123456 \
#-d mysql:5.7

#docker build -t volapi:1.0 .
#docker run -d --name volapi -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro --restart=always --log-opt max-size=300m --log-opt max-file=3 --network=host volapi:1.0

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
COPY . .
RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
ENTRYPOINT ["dotnet", "VOL.WebApi.dll"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VOL.Builder.Utility;
using VOL.Builder.Utility;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyModel;
using Newtonsoft.Json;
Expand Down Expand Up @@ -36,7 +36,7 @@ private string StratName
{
if (startName == "")
{
startName = WebProject.Substring(0, webProject.IndexOf('.'));
startName = WebProject.Substring(0, webProject.LastIndexOf('.'));
}
return startName;
}
Expand Down Expand Up @@ -482,7 +482,7 @@ public string CreateServices(string tableName, string nameSpace, string folderna
}
apiPath += $"\\Controllers\\{projectName}\\";
//生成Partial Api控制器
if (!File.Exists($"{apiPath}Partial\\{tableName}Controller.cs"))
if (!FileHelper.FileExists($"{apiPath}Partial\\{tableName}Controller.cs"))
{
string partialController = FileHelper.ReadFile(@"Template\\Controller\\ControllerApiPartial.html")
.Replace("{Namespace}", nameSpace).Replace("{TableName}", tableName).Replace("{StartName}", StratName);
Expand Down Expand Up @@ -511,7 +511,7 @@ public string CreateServices(string tableName, string nameSpace, string folderna
string fileName = "I" + tableName + "Service.cs";

//生成Partial IService类
if (!File.Exists(path + "Partial\\" + fileName))
if (!FileHelper.FileExists(path + "Partial\\" + fileName))
{
domainContent = FileHelper.ReadFile("Template\\IServices\\IServiceBasePartial.html").Replace("{Namespace}", nameSpace).Replace("{TableName}", tableName).Replace("{StartName}", StratName);
FileHelper.WriteFile(path + "Partial\\", fileName, domainContent);
Expand All @@ -526,7 +526,7 @@ public string CreateServices(string tableName, string nameSpace, string folderna
fileName = tableName + "Service.cs";
//生成Partial Service类
domainContent = FileHelper.ReadFile("Template\\Services\\ServiceBasePartial.html").Replace("{Namespace}", nameSpace).Replace("{TableName}", tableName).Replace("{StartName}", StratName);
if (!File.Exists(path + "Partial\\" + fileName))
if (!FileHelper.FileExists(path + "Partial\\" + fileName))
{
domainContent = FileHelper.ReadFile("Template\\Services\\ServiceBasePartial.html").Replace("{Namespace}", nameSpace).Replace("{TableName}", tableName).Replace("{StartName}", StratName);
FileHelper.WriteFile(path + "Partial\\", fileName, domainContent);
Expand All @@ -544,7 +544,7 @@ public string CreateServices(string tableName, string nameSpace, string folderna
path = $"{frameworkFolder}\\{nameSpace}\\Controllers\\{ foldername}\\";
fileName = tableName + "Controller.cs";
//生成Partial web控制器
if (!File.Exists(path + "Partial\\" + fileName))
if (!FileHelper.FileExists(path + "Partial\\" + fileName))
{
domainContent = FileHelper.ReadFile("Template\\Controller\\ControllerPartial.html").Replace("{Namespace}", nameSpace).Replace("{TableName}", tableName).Replace("{BaseOptions}", baseOptions).Replace("{StartName}", StratName);
FileHelper.WriteFile(path + "Partial\\", tableName + "Controller.cs", domainContent);
Expand Down Expand Up @@ -976,11 +976,13 @@ 0 ELSE 1
CASE
WHEN COLUMN_KEY <> '' THEN
1 ELSE 0
END AS IsReadDataset
END AS IsReadDataset,
ordinal_position
FROM
information_schema.COLUMNS
WHERE
table_name = ?tableName {GetMysqlTableSchema()}";
table_name = ?tableName {GetMysqlTableSchema()}
order by ordinal_position";
}

/// <summary>
Expand Down Expand Up @@ -1210,17 +1212,17 @@ private void SetMaxLength(List<Sys_TableColumn> columns)
{
columns.ForEach(x =>
{
if (x.ColumnName == "DateTime")
if (x.ColumnType.ToLower() == "datetime")
{
x.ColumnWidth = 150;
}
else if (x.ColumnName == "Modifier" || x.ColumnName == "Creator")
else if (x.ColumnName.ToLower() == "modifier" || x.ColumnName.ToLower() == "creator")
{
x.ColumnWidth = 130;
x.ColumnWidth = 100;
}
else if (x.ColumnName == "CreateID" || x.ColumnName == "ModifyID")
else if (x.ColumnName.ToLower() == "modifyid" || x.ColumnName.ToLower() == "createid")
{
x.ColumnWidth = 80;
x.ColumnWidth = 100;
}
else if (x.Maxlength > 200)
{
Expand Down Expand Up @@ -1280,10 +1282,15 @@ private int InitTable(int parentId, string tableName, string columnCNName, strin
{
columns[i].OrderNo = orderNo;
orderNo = orderNo - 50;
columns[i].EditRowNo = 0;
}

SetMaxLength(columns);
base.Add<Sys_TableColumn>(tableInfo, columns, false);
var result= base.Add<Sys_TableColumn>(tableInfo, columns, false);
if (!result.Status)
{
throw new Exception($"加载表结构写入异常:{result.Message}");
}
return tableInfo.Table_Id;
}

Expand Down Expand Up @@ -1763,7 +1770,7 @@ private string CreateEntityModel(List<Sys_TableColumn> sysColumn, Sys_TableInfo
// "\\" + modelNameSpace + "\\DomainModels\\{0}\\", folderName
// )
string modelPath = $"{mapPath}\\{modelNameSpace}\\DomainModels\\{folderName}\\";
FileHelper.WriteFile( modelPath , tableName + ".cs", domainContent);
FileHelper.WriteFile(modelPath, tableName + ".cs", domainContent);
//partialContent
modelPath += "partial\\";
if (!FileHelper.FileExists(modelPath + tableName + ".cs"))
Expand Down
4 changes: 2 additions & 2 deletions .Net6版本/VOL.Core/BaseProvider/IRepository.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore.Query;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
Expand Down
9 changes: 9 additions & 0 deletions .Net6版本/VOL.Core/BaseProvider/IService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using VOL.Core.CacheManager;
using VOL.Core.Utilities;
Expand All @@ -15,6 +16,14 @@ public interface IService<T> where T : BaseEntity

ICacheService CacheContext { get; }
Microsoft.AspNetCore.Http.HttpContext Context { get; }

/// <summary>
/// 前端查询条件转换为EF查询Queryable(2023.04.02)
/// </summary>
/// <param name="options">前端查询参数</param>
/// <param name="useTenancy">是否使用数据隔离</param>
/// <returns></returns>
IQueryable<T> GetPageDataQueryFilter(PageDataOptions options, bool useTenancy = true);
/// <summary>
/// 查询
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions .Net6版本/VOL.Core/BaseProvider/RepositoryBase.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
Expand Down Expand Up @@ -414,8 +413,9 @@ public virtual WebResponseContent UpdateRange<Detail>(TEntity entity,
string message = "";
if (updateDetail)
{
string detailTypeName = typeof(List<Detail>).FullName;
PropertyInfo[] properties = typeof(TEntity).GetProperties();
PropertyInfo detail = properties.Where(x => x.PropertyType.Name == "List`1").ToList().FirstOrDefault();
PropertyInfo detail = properties.Where(x => x.PropertyType.FullName == detailTypeName).ToList().FirstOrDefault();
if (detail != null)
{
PropertyInfo key = properties.GetKeyProperty();
Expand Down
Loading