diff --git a/Directory.Build.props b/Directory.Build.props
index 8e0a6337..d59ff165 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,5 +1,13 @@
$(MSBuildThisFileDirectory)
+ latest
+ $(NoWarn);CS1591;
+
+
+ none
+ false
+
+
\ No newline at end of file
diff --git a/Tnb.Server.sln b/Tnb.Server.sln
index 42180ae7..1b62b7aa 100644
--- a/Tnb.Server.sln
+++ b/Tnb.Server.sln
@@ -22,7 +22,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{7876D0A1-7141-4904-8A3B-88DF61BEE7EE}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
- clear_bin_obj.cmd = clear_bin_obj.cmd
common.props = common.props
Directory.Build.props = Directory.Build.props
dotnet.ruleset = dotnet.ruleset
@@ -295,14 +294,14 @@ Global
{DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.Release|Any CPU.Build.0 = Release|Any CPU
- {DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.tianyi|Any CPU.ActiveCfg = tianyi|Any CPU
- {DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.tianyi|Any CPU.Build.0 = tianyi|Any CPU
+ {DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.tianyi|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB646C4B-D6FB-44CB-A8F6-C0F6AA83AB8A}.tianyi|Any CPU.Build.0 = Debug|Any CPU
{0282541C-4295-4A2A-A826-54E9C69718D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0282541C-4295-4A2A-A826-54E9C69718D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0282541C-4295-4A2A-A826-54E9C69718D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0282541C-4295-4A2A-A826-54E9C69718D9}.Release|Any CPU.Build.0 = Release|Any CPU
- {0282541C-4295-4A2A-A826-54E9C69718D9}.tianyi|Any CPU.ActiveCfg = tianyi|Any CPU
- {0282541C-4295-4A2A-A826-54E9C69718D9}.tianyi|Any CPU.Build.0 = tianyi|Any CPU
+ {0282541C-4295-4A2A-A826-54E9C69718D9}.tianyi|Any CPU.ActiveCfg = Debug|Any CPU
+ {0282541C-4295-4A2A-A826-54E9C69718D9}.tianyi|Any CPU.Build.0 = Debug|Any CPU
{08A36D02-DC53-4895-9E1C-E02BC1BBA890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08A36D02-DC53-4895-9E1C-E02BC1BBA890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08A36D02-DC53-4895-9E1C-E02BC1BBA890}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/clear_bin_obj.cmd b/clear_bin_obj.cmd
deleted file mode 100644
index 242e75da..00000000
--- a/clear_bin_obj.cmd
+++ /dev/null
@@ -1,76 +0,0 @@
-@echo off&chcp 936>nul&setlocal enabledelayedexpansion
-title ɾbinobjļС
-echo;
-if [%1] equ [] (set fp=%~dp0) else (set fp=%1)
-set fp="%fp%" & set fp=%fp:"=%
-if "%fp%" neq "" if "%fp:~-1%" neq "\" set fp=%fp%\
-set nowPath="%fp%"
-
-set /a findFileCount=0
-set /a findFolderCount=0
-set /a findAllCount=0
-set /a delFileCount=0
-set /a delFolderCount=0
-set /a fileSize=0
-set delFileOrFolder=*.vshost.*,bin,obj,.vs
-
-
-echo; &echo Ŀ¼%nowPath%
-echo; &echo ɾָĿ¼µģ
-set delType=%delFileOrFolder%
-:loop
-for /f "tokens=1* delims=," %%a in ("%delType%") do echo %%a &set delType=%%b
-if defined delType goto :loop
-:: echo; &echo ˳رմڡ &pause>nul
-:: echo; &echo --------------------------------------------------
-echo ɾб
-
-rem search delete specify file or folder(such as:*.pdb,*.vshost.*)
-::for /r %nowPath% %%i in (*.pdb,*.vshost.*) do (echo del "%%i")
-for /r %nowPath% %%i in (%delFileOrFolder%) do (IF EXIST "%%i" (echo "%%i"&IF EXIST "%%i\.\" (set /a findFolderCount+=1) else set /a findFileCount+=1
- set fs=0&(for /f "tokens=3* delims= " %%a in ('dir "%%i" /a-d /s /-c ^| find /i "ļ"') do set fs=%%a)&call :bigNumAdd !fileSize! !fs! fileSize
-))
-set /a findAllCount=%findFolderCount%+%findFileCount%
-echo;&if %findAllCount% equ 0 echo [file or folder not found] &goto end
-call :numToThousand %fileSize% fileSize
-echo ҵ%findAllCount%ɾļ%findFileCount%ļУ%findFolderCount%ܹС%fileSize% bytes
-echo --------------------------------------------------
-set /p var=ǷȷɾļļУ[Y/N]:
-if /i "%var%"=="Y" (goto DelFileAndFolder) else goto cancelDel
-
-:DelFileAndFolder
-rem delete specify file or folder(such as:obj,bin,*.pdb,*.vshost.*)
-::for /r %nowPath% %%i in (%delFileOrFolder%) do (IF EXIST "%%i" IF EXIST "%%i\.\" (echo "%%i\.\") ELSE echo "%%i")
-for /r %nowPath% %%i in (%delFileOrFolder%) do (IF EXIST "%%i" (echo Deleting file "%%i"&IF EXIST "%%i\.\" (RD /s /q "%%i" &set /a delFolderCount+=1) else del "%%i" &set /a delFileCount+=1))
-echo; &echo [Delete completed] delete %delFileCount% files, delete %delFolderCount% folders, total size %fileSize% bytes &echo;
-goto end
-
-:cancelDel
-echo; &echo [Cancel deletion] &echo;
-
-:end
-Pause
-goto :eof
-
-
-::ӷ call _ADD <> <> [ر]
-::ֱ֧ʮƵ64λֺ64λС,һμ0.01
-:bigNumAdd <> <> [ر] // by jack on 2021-09-03
-(setlocal enabledelayedexpansion
-set L=&for /l %%a in (1,1,8) do set L=!L!00000000
-for /f "tokens=1-3 delims=." %%a in ("!L!%1.!L!") do set at=%%a&set aw=%%b%%c
-for /f "tokens=1-3 delims=." %%a in ("!L!%2.!L!") do set bt=%%a&set bw=%%b%%c
-set a=!at:~-64!!aw:~,64!&set b=!bt:~-64!!bw:~,64!&set e=&set v=200000000
-for /l %%a in (8,8,128)do set/a v=1!b:~-%%a,8!+1!a:~-%%a,8!+!v:~-9,-8!-2&set e=!v:~-8!!e!
-set e=!e:0= !&for /f "tokens=*" %%a in ("!e:~,-64!_.!e:~64!") do set e=%%~nxa
-set e=!e:_=!&for %%a in ("!e: =0!") do endlocal&(if %3.==. (echo %%~a) else set %3=%%~a)
-exit/b)
-
-::ַתǧַʾ
-:numToThousand <ֲ> [ر]
-(setlocal enabledelayedexpansion&set n=%~1
-set len=0&for /l %%i in (0,1,1000) do if "!n:~%%i,1!."=="." set len=%%i&goto :breakFor
-:breakFor
-set nv=&for /l %%a in (1,1,%len%)do (set nv=!n:~-%%a,1!!nv!&set/a m=%%a%%3&if !m!==0 if not %%a==%len% set nv=,!nv!)
-endlocal&(if %2.==. (echo %nv%) else set %2=%nv%)
-exit/b)
\ No newline at end of file
diff --git a/common/Tnb.Common/Tnb.Common.csproj b/common/Tnb.Common/Tnb.Common.csproj
index b8426126..21b2e243 100644
--- a/common/Tnb.Common/Tnb.Common.csproj
+++ b/common/Tnb.Common/Tnb.Common.csproj
@@ -1,5 +1,5 @@
-
+
net6.0
diff --git a/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs b/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs
index d4599d1c..29b9a2cf 100644
--- a/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs
+++ b/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs
@@ -16,6 +16,12 @@ public interface IDictionaryTypeService
///
Task> GetList();
+ ///
+ /// 获取部分列表.
+ ///
+ ///
+ Task> GetListMany(string[] ids);
+
///
/// 信息.
///
diff --git a/system/Tnb.Systems/System/DictionaryDataService.cs b/system/Tnb.Systems/System/DictionaryDataService.cs
index 3a42488d..e4171e29 100644
--- a/system/Tnb.Systems/System/DictionaryDataService.cs
+++ b/system/Tnb.Systems/System/DictionaryDataService.cs
@@ -95,6 +95,26 @@ public class DictionaryDataService : IDictionaryDataService, IDynamicApiControll
}
}
+ ///
+ /// 获取部分数据字典列表(多个分类).
+ ///
+ [HttpGet("Many")]
+ public async Task GetListMany(string[] dictionaryTypeIds)
+ {
+ var dictionaryData = await _repository.AsQueryable().Where(d => d.DeleteMark == null && d.EnabledMark == 1 && dictionaryTypeIds.Contains(d.DictionaryTypeId))
+ .OrderBy(o => o.SortCode).OrderBy(o => o.CreatorTime, OrderByType.Desc).OrderBy(o => o.LastModifyTime, OrderByType.Desc).ToListAsync();
+ var dictionaryType = await _dictionaryTypeService.GetListMany(dictionaryTypeIds);
+ var data = dictionaryType.Adapt>();
+ data.ForEach(dataall =>
+ {
+ if (dataall.isTree == 1)
+ dataall.dictionaryList = dictionaryData.FindAll(d => d.DictionaryTypeId == dataall.id).Adapt>().ToTree();
+ else
+ dataall.dictionaryList = dictionaryData.FindAll(d => d.DictionaryTypeId == dataall.id).Adapt>();
+ });
+ return new { list = data };
+ }
+
///
/// 获取所有数据字典列表(分类+内容).
///
diff --git a/system/Tnb.Systems/System/DictionaryTypeService.cs b/system/Tnb.Systems/System/DictionaryTypeService.cs
index d02b1089..2498f0cb 100644
--- a/system/Tnb.Systems/System/DictionaryTypeService.cs
+++ b/system/Tnb.Systems/System/DictionaryTypeService.cs
@@ -165,13 +165,22 @@ public class DictionaryTypeService : IDictionaryTypeService, IDynamicApiControll
///
/// 列表.
///
- ///
[NonAction]
public async Task> GetList()
{
return await _repository.AsQueryable().Where(x => x.DeleteMark == null).OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToListAsync();
}
+ ///
+ /// 列表.
+ ///
+ [NonAction]
+ public async Task> GetListMany(string[] ids)
+ {
+ return await _repository.AsQueryable().Where(x => x.DeleteMark == null && ids.Contains(x.Id)).OrderBy(x => x.SortCode).OrderBy(x => x.CreatorTime, OrderByType.Desc).ToListAsync();
+ }
+
+
///
/// 递归获取所有分类.
///
diff --git a/visualdev/Tnb.Vengine/Domain/OutputParser.cs b/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs
similarity index 86%
rename from visualdev/Tnb.Vengine/Domain/OutputParser.cs
rename to visualdev/Tnb.Vengine/Domain/VmQueryParser.cs
index 2a90c0b9..68763d1f 100644
--- a/visualdev/Tnb.Vengine/Domain/OutputParser.cs
+++ b/visualdev/Tnb.Vengine/Domain/VmQueryParser.cs
@@ -8,14 +8,14 @@ using Tnb.Vengine.DataAccess;
namespace Tnb.Vengine.Domain
{
- public class OutputParser
+ public class VmQueryParser
{
private readonly IDataAccess _dataAccess;
private readonly Vmodel _root;
private List _outputs;
private Dictionary _selectProps = new Dictionary();
private Dictionary _navModels = new Dictionary();
- public OutputParser(IDataAccess dataAccess, Vmodel rootModel, string output)
+ public VmQueryParser(IDataAccess dataAccess, Vmodel rootModel, string output)
{
_dataAccess = dataAccess;
_root = rootModel;
@@ -54,6 +54,10 @@ namespace Tnb.Vengine.Domain
private async Task LoadNavModel()
{
+ foreach (var selVm in _selectProps.Values)
+ {
+ //if(selVm.navModel != null)
+ }
var navProps = _root.navProps.Where(a => _selectProps.Values.Any(b => b.vmPath.StartsWith(a.code + "."))).ToList();
await LoadVmodelNavigateAsync(navProps);
}
@@ -74,8 +78,8 @@ namespace Tnb.Vengine.Domain
internal class OutputSelect
{
- public string vmId { get; set; } = string.Empty;
- public string vmCode { get; set; } = string.Empty;
+ public Vmodel? navModel { get; set; }
+ public string navPath { get; set; } = string.Empty;
public string vmPath { get; set; } = string.Empty;
public eNavigateType navType { get; set; } = eNavigateType.None;
public List navPaths { get; set; } = new List();
@@ -89,9 +93,13 @@ namespace Tnb.Vengine.Domain
}
public OutputSelect(Vmodel model)
{
- vmId = model.id;
- vmCode = model.vmCode;
vmPath = Vmodel.MAIN_ALIES;
}
}
+
+ internal class NavigateVmodel
+ {
+ public Vmodel? navModel { get; set; }
+ public string navPath { get; set; }
+ }
}
diff --git a/visualdev/Tnb.Vengine/Domain/Vmodel.cs b/visualdev/Tnb.Vengine/Domain/Vmodel.cs
index 89b0d03f..070ce510 100644
--- a/visualdev/Tnb.Vengine/Domain/Vmodel.cs
+++ b/visualdev/Tnb.Vengine/Domain/Vmodel.cs
@@ -139,6 +139,9 @@ public partial class Vmodel : Entity
public string fullCode
{ get { return areaCode + "/" + vmCode; } }
+ [SugarColumn(IsIgnore = true)]
+ public Vmodel? parent { get; set; }
+
///
/// 主键
///