diff --git a/009_DI-Electrical.sln b/009_DI-Electrical.sln
index f6d4f9fc..c646d901 100644
--- a/009_DI-Electrical.sln
+++ b/009_DI-Electrical.sln
@@ -94,6 +94,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04 Plugin", "04 Plugin", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Department2", "Department2\Department2.csproj", "{74A88CCC-F53B-471C-B350-A2BB5804619C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.Share", "newFront\c#前端\SWS.Share\SWS.Share.csproj", "{87E71797-E60A-4637-BA32-C8B57154ABC3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Android = Debug|Android
@@ -806,6 +808,30 @@ Global
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x64.Build.0 = Release|Any CPU
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x86.ActiveCfg = Release|Any CPU
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x86.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Android.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Android.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|iOS.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|iOS.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-ARM.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-ARM.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x86.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x86.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Android.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Android.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|iOS.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|iOS.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-ARM.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-ARM.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x86.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -848,10 +874,11 @@ Global
{56F9A112-FD96-4809-98F4-0D7C5DE0711B} = {D5BF3E92-22DA-4C1B-A736-B9E847A3DE27}
{A448AD52-CB49-4206-BBDC-E433574BB88F} = {27B3C269-FF3F-4E1C-9B92-A40F6B4857E0}
{74A88CCC-F53B-471C-B350-A2BB5804619C} = {E011739D-4EC0-4E88-B6D1-A86242FBE6B0}
+ {87E71797-E60A-4637-BA32-C8B57154ABC3} = {D5BF3E92-22DA-4C1B-A736-B9E847A3DE27}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451}
+ EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
diff --git a/Department2/obj/Debug/build.force b/Department2/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Application.Web/AppApi/PlotBOMApiController.cs b/Learun.Application.Web/AppApi/PlotBOMApiController.cs
index ffff394e..56a34701 100644
--- a/Learun.Application.Web/AppApi/PlotBOMApiController.cs
+++ b/Learun.Application.Web/AppApi/PlotBOMApiController.cs
@@ -6,6 +6,7 @@ using NPOI.SS.Formula.PTG;
using NPOI.Util.Collections;
using OfficeOpenXml.Drawing.Vml;
using Pipelines.Sockets.Unofficial.Arenas;
+using SWS.Share;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -31,7 +32,7 @@ namespace Learun.Application.Web.AppApi
///
///
[HttpGet]
- public IHttpActionResult GetBOMGroupInfo(string ProjectId = "c151f5d4-cbe1-4522-945c-501b1ad990d5", string drawingId = "277d883d-e271-45e4-990b-926585321fa8")
+ public IHttpActionResult GetBOMGroupInfo(string ProjectId = "403ee1e6-ca2e-4acc-9667-273afd4ea93c", string drawingId = "db834963-f62b-4c44-8180-1b9073819546")
{
var res = new List();//声明结果
@@ -77,7 +78,7 @@ namespace Learun.Application.Web.AppApi
#region 预处理每个位号,然后进行分组
foreach (ec_enginedataEntity tag in allTag)
{
- var matchedTypes = new List();
+ var matchedTypes = new List();
var idx = 0;
var GroupName = TrimTagNubmer(tag.TagNumber, out idx);// 如 A-B1,A-B2,取出来的group就是A-B,idx为0
var seq = tag.TagNumber.Substring(idx).Replace(GroupName, "");// 1,2
@@ -127,19 +128,25 @@ namespace Learun.Application.Web.AppApi
{
List allTagsInThisGroup = group.ToList();
var GroupName = group.Key.Group; //A-ABC, 正常情况下A是system,放下面;B是tag,放上面
+ string part1 = string.Empty;
+ string part0 = string.Empty;
if (!GroupName.Contains("-"))
- {
-
- continue;
+ {
+ part1 = GroupName;
}
- var upper_text_Part1 = GroupName.Split('-')[1];//ABC
+ else
+ {
+ part0 = GroupName.Split('-')[0];
+ part1 = GroupName.Split('-')[1];//ABC
+ }
+ var upper_text_Part1 = part1;//ABC
var upper_text_Part2 = "";//seq
#region seq的不同情况
//得到每个位号下的seq
var allSeqText = allTagsInThisGroup.OrderBy(x => x.Seq).Select(x => x.Seq).ToList();
var allSeq = ExtractNumbers(allSeqText);//把1A 1B 这种情况也处理了,变成1,1
- if (allSeq.Distinct().Count() == 1)
+ if (allSeq.Distinct().Count() <= 1)
{
//TAG如果一样的就取这个TAG就行???
upper_text_Part2 = allSeqText.First();
@@ -165,7 +172,7 @@ namespace Learun.Application.Web.AppApi
var BOMGroupInfo = new BOMGroupInfo
{
upper_text = upper_text_Part1 + upper_text_Part2,
- lower_text = GroupName.Split('-')[0],//A
+ lower_text = part0,//A
Count = group.Count(),
Remark = group.Key.vendor,
Model = group.Key.Model,
@@ -290,32 +297,5 @@ namespace Learun.Application.Web.AppApi
///
public string Name { set; get; }
}
- public class BOMGroupInfo
- {
- public string upper_text { set; get; }
- public string lower_text { set; get; }
- ///
- /// 每一行用的symbol是什么
- ///
- public string FileId { set; get; }
- ///
- /// 个数
- ///
- public int Count { set; get; }
- ///
- /// 备注(由 厂商)
- ///
- public string Remark { set; get; }
- ///
- /// 规格(由 电制 额定功率 ip等级 防爆等级等属性拼接而成)
- ///
- public string Spec { set; get; }
-
- ///
- /// 型号
- ///
- public string Model { set; get; }
-
- }
}
\ No newline at end of file
diff --git a/Learun.Application.Web/AppApi/ProjectApiController.cs b/Learun.Application.Web/AppApi/ProjectApiController.cs
index 5e5c73e4..b9f80969 100644
--- a/Learun.Application.Web/AppApi/ProjectApiController.cs
+++ b/Learun.Application.Web/AppApi/ProjectApiController.cs
@@ -1,4 +1,6 @@
-using Learun.Application.TwoDevelopment.ZZDT_EC;
+using DocumentFormat.OpenXml.Drawing.Spreadsheet;
+using Learun.Application.Base.SystemModule;
+using Learun.Application.TwoDevelopment.ZZDT_EC;
using Learun.Util;
using Learun.Util.SqlSugar;
using SqlSugar;
@@ -109,5 +111,25 @@ namespace Learun.Application.Web.AppApi
return Success(resAll);
}
+ ///
+ /// 获取项目信息
+ ///
+ /// 项目ID
+ ///
+ [HttpGet]
+ [ResponseType(typeof(TwoDevelopment.ZZDT_EC.ec_projectEntity))]
+ public IHttpActionResult GetEntity(string projectId)
+ {
+ try
+ {
+ ec_projectIBLL ec_projectIBLL = new ec_projectBLL();
+ var entity = ec_projectIBLL.GetEntity(projectId);
+ return Success(entity);
+ }
+ catch (Exception ex)
+ {
+ return Fail(ex.Message);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Application.Web/Learun.Application.Web.csproj
index 75876b25..3bda2aa7 100644
--- a/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Application.Web/Learun.Application.Web.csproj
@@ -3814,6 +3814,9 @@
+
+ PreserveNewest
+
@@ -3909,6 +3912,10 @@
{1d192591-b85a-41db-ae3a-4bf9765786c1}
Learun.Workflow.Engine
+
+ {87e71797-e60a-4637-ba32-c8b57154abc3}
+ SWS.Share
+
10.0
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache
index 0b7d950e..c3986afc 100644
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache and b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache
index 0a03554a..8e1769fc 100644
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache and b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache
index 293a4e6b..d4b9e141 100644
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache and b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref
index 633d7ec8..2fe5958e 100644
--- a/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref
+++ b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref
@@ -1,5 +1,5 @@
-FC:\repo\CODE\009_DI-Elec\SWSDBSchemeUpgradeTool\MainWindow.xaml;;
-FC:\repo\CODE\009_DI-Elec\SWSDBSchemeUpgradeTool\SQLPreview.xaml;;
+FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\MainWindow.xaml;;
+FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\SQLPreview.xaml;;
diff --git a/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs b/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
index 85691f4d..21e0f884 100644
--- a/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
+++ b/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
@@ -50,6 +50,7 @@ namespace DI_Electrical.ViewModels
}
public void onShowDialogTest(object o)
{
+
IDialogParameters par = new Prism.Services.Dialogs.DialogParameters();
par.Add(GlobalObject.dialogPar.para1.ToString(), "abc你我他");
_dialogService.ShowDialog(nameof(DialogTest), par, (result) =>
diff --git a/newFront/c#前端/SWS.CAD.Base/General.cs b/newFront/c#前端/SWS.CAD.Base/General.cs
index c8ee2e9f..36bdcaf5 100644
--- a/newFront/c#前端/SWS.CAD.Base/General.cs
+++ b/newFront/c#前端/SWS.CAD.Base/General.cs
@@ -109,8 +109,10 @@ namespace SWS.CAD.Base
///
/// 读取图块图纸插入当前文档
///
- ///
- public static ObjectId InsertBlock(string fileName, string blockName)
+ /// 块图纸路径
+ /// 块名
+ /// 坐标位
+ public static ObjectId InsertBlock(string fileName, string blockName, Point3d position)
{
ObjectId entity = ObjectId.Null;
@@ -135,9 +137,10 @@ namespace SWS.CAD.Base
using (Transaction trans = db.TransactionManager.StartTransaction())
{
BlockTable bt = trans.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
- ObjectId idBtr = doc.Database.Insert(blockName, blockName, blockDb, true);
+ ObjectId idBtr = doc.Database.Insert(blockName, blockName, blockDb, true);
BlockTableRecord curBtr = trans.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord;
var block = new BlockReference(Point3d.Origin, idBtr);
+ block.Position = position;
curBtr.AppendEntity(block);
trans.AddNewlyCreatedDBObject(block, true);
entity = block.Id;
@@ -721,6 +724,7 @@ namespace SWS.CAD.Base
}
#endregion
+
#region 读取元件块,插入图纸
///
/// 读取元件块,插入图纸
@@ -730,15 +734,15 @@ namespace SWS.CAD.Base
/// 位号值
/// 元件类型ID
/// 比例大小
- /// 坐标位置
+ /// 坐标位置
///
- public static ObjectId AddTagDWG(string filePath, string tagName, string tag, string objTypeId, double scale, Point3d tagPoint)
+ public static ObjectId AddTagDWG(string filePath, string tagName, string tag, string objTypeId, double scale, Point3d position)
{
if (scale == 0)
{ scale = 1; }
Document doc = Application.DocumentManager.MdiActiveDocument;
var ed = doc.Editor;
- ObjectId oid = ObjectId.Null;
+ ObjectId oid = ObjectId.Null;
if (!File.Exists(filePath))
{
ed.WriteMessage("\n 错误:图元文件不存在!\n");
@@ -754,7 +758,7 @@ namespace SWS.CAD.Base
using (Database sourceDb = new Database(false, true))
{
sourceDb.ReadDwgFile(filePath, FileOpenMode.OpenForReadAndAllShare, false, null);
-
+
// 生成唯一块名(避免重名)
string blockName = GetUniqueBlockName(destDb, tagName);
// 将外部DWG转换为块定义
@@ -764,7 +768,7 @@ namespace SWS.CAD.Base
Point3d.Origin, // 插入点(可修改)
blockId// bt[blockName]
);
- br.Position = tagPoint;
+ br.Position = position;
// 设置比例和旋转
br.ScaleFactors = new Scale3d(scale); //比例因子
br.Rotation = 0.0; // 旋转角度(弧度)
@@ -948,18 +952,13 @@ namespace SWS.CAD.Base
///
/// 保存图纸
///
- public static void SaveDwg(string filename)
+ public static void SaveAndCloseDwg(string filename)
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
if (db.Filename.Equals(filename))
{
- using (Transaction tr = doc.TransactionManager.StartTransaction())
- {
- // 操作数据库...
- tr.Commit(); // 必须提交
- }
- doc.Database.Save();
+ doc.CloseAndSave(filename);
}
}
#endregion
@@ -1013,6 +1012,7 @@ namespace SWS.CAD.Base
}
else { doc.CloseAndDiscard(); }
// 重新打开
+ Thread.Sleep(200);
Application.DocumentManager.Open(filePath, isReadOnly);
doc = Application.DocumentManager.MdiActiveDocument;
ed = doc.Editor;
@@ -1996,6 +1996,144 @@ namespace SWS.CAD.Base
}
#endregion
+
+ #region 插入文本内容
+ public static string InsertTextInfo(List listTextInfo)
+ {
+ string res = string.Empty;
+ try
+ {
+ Document doc = Application.DocumentManager.MdiActiveDocument;
+ Database db = doc.Database;
+ Editor ed = doc.Editor;
+ // 开始事务处理
+ using (Transaction tr = db.TransactionManager.StartTransaction())
+ {
+ // 打开当前空间(模型空间或图纸空间)用于写入
+ BlockTableRecord currentSpace = (BlockTableRecord)tr.GetObject(
+ db.CurrentSpaceId, OpenMode.ForWrite);
+ foreach (var textInfo in listTextInfo)
+ {
+ if (textInfo.IsMText)
+ {
+ // 创建多行文字对象
+ MText mText = new MText();
+ mText.Contents = textInfo.Text;
+ mText.Location = textInfo.Position;
+ mText.TextHeight = textInfo.Height;
+ mText.Width = textInfo.Width; // 设置文本宽度,控制自动换行
+ if (textInfo.Align == 0)
+ {
+ mText.Attachment = AttachmentPoint.MiddleLeft; // 设置对齐居左
+ }
+ else if (textInfo.Align == 1)
+ {
+ mText.Attachment = AttachmentPoint.BaseCenter; // 设置对齐居中
+ }
+ // 将文字添加到当前空间
+ currentSpace.AppendEntity(mText);
+ tr.AddNewlyCreatedDBObject(mText, true);
+ }
+ else
+ {
+ // 创建单行文字对象
+ DBText dbText = new DBText();
+ dbText.TextString = textInfo.Text;
+ dbText.Position = textInfo.Position;
+ dbText.AlignmentPoint= textInfo.Position;
+ dbText.Height = textInfo.Height;
+ if (textInfo.Align == 0)
+ {
+ dbText.HorizontalMode = TextHorizontalMode.TextLeft; // 设置对齐居左
+ }
+ else if (textInfo.Align == 1)
+ {
+ dbText.HorizontalMode = TextHorizontalMode.TextCenter; // 设置对齐居中
+ }
+
+ // 将文字添加到当前空间
+ currentSpace.AppendEntity(dbText);
+ tr.AddNewlyCreatedDBObject(dbText, true);
+ }
+ }
+
+ // 提交事务
+ tr.Commit();
+ }
+ return res;
+ }
+ catch (Exception ex)
+ {
+ return ex.Message;
+ }
+ }
+ #endregion
+
+ #region 读取源图纸,插入当前图纸
+ ///
+ /// 读取源图纸,插入当前图纸
+ ///
+ /// 源图纸路径
+ /// 块名
+ /// 坐标位置
+ ///
+ public static ObjectId AddBlockDWG(string filePath, string blockName, Point3d position)
+ {
+ Document doc = Application.DocumentManager.MdiActiveDocument;
+ var ed = doc.Editor;
+ ObjectId oid = ObjectId.Null;
+ if (!File.Exists(filePath))
+ {
+ ed.WriteMessage("\n 错误: 源图纸不存在!\n");
+ return oid;
+ }
+ // 获取当前数据库
+ Database destDb = HostApplicationServices.WorkingDatabase;
+ using (Transaction tr = destDb.TransactionManager.StartTransaction())
+ {
+ try
+ {
+ // 创建临时数据库读取外部DWG
+ using (Database sourceDb = new Database(false, true))
+ {
+ sourceDb.ReadDwgFile(filePath, FileOpenMode.OpenForReadAndAllShare, false, null);
+
+ // 生成唯一块名(避免重名)
+ //string blockName = GetUniqueBlockName(destDb, blockName);
+ // 将外部DWG转换为块定义
+ ObjectId blockId = destDb.Insert(blockName, sourceDb, true);
+ // 创建块参照
+ BlockReference br = new BlockReference(
+ Point3d.Origin, // 插入点(可修改)
+ blockId// bt[blockName]
+ );
+ br.Position = position;
+ // 设置比例和旋转
+ br.ScaleFactors = new Scale3d(1.0); //比例因子
+ br.Rotation = 0.0; // 旋转角度(弧度)
+ BlockTableRecord btr = (BlockTableRecord)tr.GetObject(
+ SymbolUtilityServices.GetBlockModelSpaceId(destDb),
+ OpenMode.ForWrite
+ );
+
+ // 处理插入结果
+ btr.AppendEntity(br);
+ tr.AddNewlyCreatedDBObject(br, true);
+ tr.Commit();
+ oid = br.Id;
+ }
+ }
+ catch (Exception ex)
+ {
+ tr.Abort();
+ ed.WriteMessage($"\n错误: {ex.Message}\n");
+ }
+ }
+ return oid;
+
+
+ }
+ #endregion
}
}
diff --git a/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs b/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs
new file mode 100644
index 00000000..2ceebadb
--- /dev/null
+++ b/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Teigha.Geometry;
+
+namespace SWS.CAD.Base
+{
+ public class DtoCadTextInfo
+ {
+ ///
+ /// 坐标
+ ///
+ public Point3d Position { get; set; }
+ ///
+ /// 是否为多行文本
+ ///
+ public bool IsMText { get; set; }
+ ///
+ /// 文本内容,多行文本用\n 进行换行
+ ///
+ public string Text { get; set; }
+ ///
+ /// 文本高度
+ ///
+ public double Height { get; set; }
+ ///
+ /// 文本宽度
+ ///
+ public double Width { get; set; }
+ ///
+ /// 文本对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public double Align { get; set; }
+ }
+}
diff --git a/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj b/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
index ee676d80..9412e79b 100644
--- a/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
+++ b/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
@@ -52,6 +52,7 @@
+
diff --git a/newFront/c#前端/SWS.CAD.sln b/newFront/c#前端/SWS.CAD.sln
index 87f32b55..e6768535 100644
--- a/newFront/c#前端/SWS.CAD.sln
+++ b/newFront/c#前端/SWS.CAD.sln
@@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.WPF", "SWS.WPF\SWS.WPF.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.CAD", "SWS.CAD\SWS.CAD.csproj", "{6BD9B3FC-7D55-4762-AF68-A50183342537}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.Share", "SWS.Share\SWS.Share.csproj", "{87E71797-E60A-4637-BA32-C8B57154ABC3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -215,6 +217,22 @@ Global
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.Build.0 = Release|Any CPU
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.ActiveCfg = Release|Any CPU
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x86.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|ARM64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x86.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/newFront/c#前端/SWS.CAD/GlobalObje.cs b/newFront/c#前端/SWS.CAD/GlobalObje.cs
index d235b2e6..f45a552e 100644
--- a/newFront/c#前端/SWS.CAD/GlobalObje.cs
+++ b/newFront/c#前端/SWS.CAD/GlobalObje.cs
@@ -1,5 +1,6 @@
using IniParser;
using Prism.Ioc;
+using SWS.Commons;
using SWS.Model;
using SWS.Service;
using System;
@@ -59,7 +60,7 @@ namespace SWS.CAD
if (_dwgType == null)
{
- var serv = GlobalObje.container.Resolve();
+ var serv = GlobalObject.container.Resolve();
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingType.ToString()));
var res2 = res.Result;
return res2;
@@ -83,7 +84,7 @@ namespace SWS.CAD
if (_dwgMaterialRange == null)
{
- var serv = GlobalObje.container.Resolve();
+ var serv = GlobalObject.container.Resolve();
var res = Task.Run(() => serv.GetDetails(DBConst.Be_MaterialRange.ToString()));
var res2 = res.Result;
return res2;
@@ -107,7 +108,7 @@ namespace SWS.CAD
if (_dwgMaterialCensus == null)
{
- var serv = GlobalObje.container.Resolve();
+ var serv = GlobalObject.container.Resolve();
var res = Task.Run(() => serv.GetDetails(DBConst.Be_MaterialCensus.ToString()));
var res2 = res.Result;
return res2;
@@ -131,7 +132,7 @@ namespace SWS.CAD
if (_dwgStage == null)
{
- var serv = GlobalObje.container.Resolve();
+ var serv = GlobalObject.container.Resolve();
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingStage.ToString()));
var res2 = res.Result;
return res2;
diff --git a/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs b/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
index 1682d52b..b0b6bf2b 100644
--- a/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
+++ b/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
@@ -58,27 +58,27 @@ namespace SWS.CAD.Helper
}
#endregion
- #region 获取树节点所有图纸名
+ #region 获取树节点所有图纸名
- ///
- /// 获取树节点所有图纸名
- ///
+ ///
+ /// 获取树节点所有图纸名
+ ///
public static void GetTreeText(Model.TreeModel node)
{
// 如果根节点为空,则返回null
- if (node == null) return ;
+ if (node == null) return;
//没有子节点就返回null
- if (node.ChildNodes == null) return ;
+ if (node.ChildNodes == null) return;
// 否则,递归地在子节点中查找
foreach (var child in node.ChildNodes)
{
GetTreeText(child);
-
+
}
if (node.Text.ToLower().EndsWith(".dwg") && !GlobalObject.AllDwgName.Contains(node.Text))
{ GlobalObject.AllDwgName.Add(node.Text); }
// 如果在当前树中没有找到,返回null
- return ;
+ return;
}
#endregion
}
diff --git a/newFront/c#前端/SWS.CAD/Views/CheckInApprove.xaml b/newFront/c#前端/SWS.CAD/Views/CheckInApprove.xaml
index c11334a2..70666235 100644
--- a/newFront/c#前端/SWS.CAD/Views/CheckInApprove.xaml
+++ b/newFront/c#前端/SWS.CAD/Views/CheckInApprove.xaml
@@ -11,8 +11,8 @@
AllowsTransparency="True"
Background="White"
Loaded="Window_Loaded"
- ResizeMode="NoResize"
- WindowStartupLocation="CenterScreen"
+ ResizeMode="NoResize"
+ WindowStartupLocation="CenterScreen"
WindowStyle="None">
@@ -24,67 +24,115 @@
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -95,22 +143,23 @@
+ Background="{StaticResource ColorPrimary}">
-
+
+ Margin="5"
+ Command="{Binding OKCommand}"
+ CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
+ Content="批量审核"
+ Style="{StaticResource sysBtn}"
+ Visibility="{Binding IsShowApprove}" />
-
+
diff --git a/newFront/c#前端/SWS.CAD/Views/LeftPanel.xaml b/newFront/c#前端/SWS.CAD/Views/LeftPanel.xaml
index dad986c5..bec49049 100644
--- a/newFront/c#前端/SWS.CAD/Views/LeftPanel.xaml
+++ b/newFront/c#前端/SWS.CAD/Views/LeftPanel.xaml
@@ -2,16 +2,17 @@
x:Class="SWS.CAD.Views.LeftPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:converter="clr-namespace:SWS.CAD.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:SWS.CAD.Views"
xmlns:local2="clr-namespace:SWS.Model;assembly=SWS.Model"
- xmlns:converter="clr-namespace:SWS.CAD.Converter"
- xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors" Width="250"
+ xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
+ Width="250"
Loaded="UserControl_Loaded">
-
-
+
+
@@ -48,32 +49,35 @@
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -122,7 +126,7 @@
-
+
@@ -136,49 +140,79 @@
-
-
-
-
-
-
-
+ Grid.Column="1"
+ Width="auto"
+ Margin="1,0,0,0"
+ HorizontalAlignment="Stretch"
+ Style="{StaticResource sysTextBox}"
+ Tag="工程文件"
+ TextChanged="TextBox_TextChanged" />
+
+
+
+
+
+
+
-
+
+ x:Name="radTreeView"
+ Grid.Row="2"
+ Grid.ColumnSpan="2"
+ Margin="-5,0,0,0"
+ telerik:StyleManager.Theme="Green"
+ FontSize="11"
+ ItemsSource="{Binding Drawings}"
+ PreviewMouseRightButtonDown="RadTreeView_PreviewMouseRightButtonDown"
+ SelectedItem="{Binding selectedNode, Mode=TwoWay}">
+ Height="16"
+ Orientation="Horizontal"
+ ToolTip="{Binding ToolTipText}">
-
+
+ VerticalAlignment="Center"
+ Foreground="{Binding FontColor}"
+ Text="{Binding Text}" />
-
+
@@ -190,28 +224,32 @@
+ x:Name="treeDwgHistory"
+ Margin="-5,0,0,0"
+ telerik:StyleManager.Theme="Green"
+ Background="Transparent"
+ FontSize="11"
+ ItemsSource="{Binding historyDrawings}"
+ PreviewMouseRightButtonDown="treeDwgHistory_PreviewMouseRightButtonDown"
+ SelectedItem="{Binding selectedHistoryDwg, Mode=TwoWay}">
+ Height="16"
+ Orientation="Horizontal"
+ ToolTip="{Binding ToolTipText}">
-
+
-
+
@@ -231,7 +269,7 @@
-
+
@@ -242,10 +280,17 @@
-
diff --git a/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs b/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs
new file mode 100644
index 00000000..41477d9e
--- /dev/null
+++ b/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs
@@ -0,0 +1,182 @@
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+using System.Windows.Threading;
+
+namespace SWS.CustomControl
+{
+ public class MultiSelectComboBox : ListBox
+ {
+ private const string PART_Popup = "PART_Popup";
+ private const string PART_CheckBoxAll = "PART_CheckBoxAll";
+
+ public static readonly DependencyProperty IsDropDownOpenProperty =
+ DependencyProperty.Register("IsDropDownOpen", typeof(bool), typeof(MultiSelectComboBox),
+ new PropertyMetadata(false));
+
+ public static readonly DependencyProperty MaxDropDownHeightProperty
+ = DependencyProperty.Register("MaxDropDownHeight", typeof(double), typeof(MultiSelectComboBox),
+ new PropertyMetadata(SystemParameters.PrimaryScreenHeight / 3));
+
+ public static readonly DependencyProperty SelectAllContentProperty =
+ DependencyProperty.Register("SelectAllContent", typeof(object), typeof(MultiSelectComboBox),
+ new PropertyMetadata("全选"));
+
+ public static readonly DependencyProperty IsSelectAllActiveProperty =
+ DependencyProperty.Register("IsSelectAllActive", typeof(bool), typeof(MultiSelectComboBox),
+ new PropertyMetadata(false));
+
+ public static readonly DependencyProperty DelimiterProperty =
+ DependencyProperty.Register("Delimiter", typeof(string), typeof(MultiSelectComboBox),
+ new PropertyMetadata(";"));
+
+ public static readonly DependencyProperty TextProperty =
+ DependencyProperty.Register("Text", typeof(string), typeof(MultiSelectComboBox),
+ new PropertyMetadata(string.Empty, OnTextChanged));
+
+ private bool _ignoreTextValueChanged;
+ private MultiSelectComboBoxItem _multiSelectComboBoxItem;
+ private Popup _popup;
+
+ public bool IsDropDownOpen
+ {
+ get => (bool)GetValue(IsDropDownOpenProperty);
+ set => SetValue(IsDropDownOpenProperty, value);
+ }
+
+
+ [Bindable(true)]
+ [Category("Layout")]
+ [TypeConverter(typeof(LengthConverter))]
+ public double MaxDropDownHeight
+ {
+ get => (double)GetValue(MaxDropDownHeightProperty);
+ set => SetValue(MaxDropDownHeightProperty, value);
+ }
+
+
+ public object SelectAllContent
+ {
+ get => GetValue(SelectAllContentProperty);
+ set => SetValue(SelectAllContentProperty, value);
+ }
+
+
+ public bool IsSelectAllActive
+ {
+ get => (bool)GetValue(IsSelectAllActiveProperty);
+ set => SetValue(IsSelectAllActiveProperty, value);
+ }
+
+
+ public string Delimiter
+ {
+ get => (string)GetValue(DelimiterProperty);
+ set => SetValue(DelimiterProperty, value);
+ }
+
+
+ public string Text
+ {
+ get => (string)GetValue(TextProperty);
+ set => SetValue(TextProperty, value);
+ }
+
+ private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var MultiSelectComboBox = (MultiSelectComboBox)d;
+
+ if (!(bool)e.NewValue)
+ MultiSelectComboBox.Dispatcher.BeginInvoke(new Action(() => { Mouse.Capture(null); }),
+ DispatcherPriority.Send);
+ }
+
+ private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ }
+
+
+ protected override bool IsItemItsOwnContainerOverride(object item)
+ {
+ return item is MultiSelectComboBoxItem;
+ }
+
+ protected override DependencyObject GetContainerForItemOverride()
+ {
+ return new MultiSelectComboBoxItem();
+ }
+
+ protected override void OnSelectionChanged(SelectionChangedEventArgs e)
+ {
+ UpdateText();
+ base.OnSelectionChanged(e);
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _popup = GetTemplateChild(PART_Popup) as Popup;
+ _multiSelectComboBoxItem = GetTemplateChild(PART_CheckBoxAll) as MultiSelectComboBoxItem;
+ _multiSelectComboBoxItem.Selected += _MultiSelectComboBoxItem_Selected;
+ _multiSelectComboBoxItem.Unselected += _MultiSelectComboBoxItem_Unselected;
+ }
+
+ private void _MultiSelectComboBoxItem_Unselected(object sender, RoutedEventArgs e)
+ {
+ if (_ignoreTextValueChanged) return;
+ _ignoreTextValueChanged = true;
+ UnselectAll();
+ _ignoreTextValueChanged = false;
+ UpdateText();
+ }
+
+ private void _MultiSelectComboBoxItem_Selected(object sender, RoutedEventArgs e)
+ {
+ if (_ignoreTextValueChanged) return;
+ _ignoreTextValueChanged = true;
+ SelectAll();
+ _ignoreTextValueChanged = false;
+ UpdateText();
+ }
+
+ protected virtual void UpdateText()
+ {
+ if (_ignoreTextValueChanged) return;
+ var newValue = string.Join(Delimiter, SelectedItems.Cast
public string TagNumber_Lower { get; set; } = "";
-
+
///
/// 图元文件Id
///
@@ -48,23 +48,33 @@ namespace SWS.Model
///
/// 肋位号 和 偏移量
///
- public double X { get; set; }
- public string XOff { get; set; }
+ public double X { get; set; }
+ private string _XOff;
+ public string XOff
+ {
+ get { return string.IsNullOrEmpty(_XOff) ? "0" : _XOff; }
+ set { _XOff = value; }
+ }
///
/// 纵骨号 偏移量
///
- public string YOff { get; set; }
+ private string _YOff;
+ public string YOff
+ {
+ get { return string.IsNullOrEmpty(_YOff) ? "0" : _YOff; }
+ set { _YOff = value; }
+ }
- public string deck { get; set; }
+ public string deck { get; set; }
public string area { get; set; }
-
+
///
/// 基点从属的、或者说附近的设备位号
///
public List Tags { get; set; } = new List();
#endregion
-
+
}
}
diff --git a/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs b/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs
new file mode 100644
index 00000000..8f7062c5
--- /dev/null
+++ b/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SWS.Model
+{
+ ///
+ /// 材料表配置
+ /// 用于生成图纸的材料表
+ ///
+ public class BomConfig
+ {
+ ///
+ /// 材料表宽度
+ ///
+ public int Width { get; set; }
+ ///
+ /// 材料表高度
+ ///
+ public int Height { get; set; }
+
+ ///
+ /// 材料表一行有几页A4表格
+ ///
+ public int RowPageCount { get; set; }
+ ///
+ /// 行数量
+ ///
+ public int RowCount { get; set; }
+ ///
+ /// 行高度
+ ///
+ public int RowHeight { get; set; }
+ ///
+ /// 第1行第1列的X坐标
+ ///
+ public int Column1X { get; set; }
+ ///
+ /// 第1行第1列的Y坐标
+ ///
+ public int Column1Y { get; set; }
+ ///
+ /// 第1行第1列的宽度
+ ///
+ public int Column1Width { get; set; }
+ ///
+ /// 第1行第1列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column1Align { get; set; }
+ ///
+ /// 第1行第2列的X坐标
+ ///
+ public int Column2X { get; set; }
+ ///
+ /// 第1行第2列的Y坐标
+ ///
+ public int Column2Y { get; set; }
+ ///
+ /// 第1行第2列的宽度
+ ///
+ public int Column2Width { get; set; }
+ ///
+ /// 第1行第2列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column2Align { get; set; }
+ ///
+ /// 第1行第3列的X坐标
+ ///
+ public int Column3X { get; set; }
+ ///
+ /// 第1行第3列的Y坐标
+ ///
+ public int Column3Y { get; set; }
+ ///
+ /// 第1行第3列的宽度
+ ///
+ public int Column3Width { get; set; }
+ ///
+ /// 第1行第3列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column3Align { get; set; }
+ ///
+ /// 第1行第4列的X坐标
+ ///
+ public int Column4X { get; set; }
+ ///
+ /// 第1行第4列的Y坐标
+ ///
+ public int Column4Y { get; set; }
+ ///
+ /// 第1行第4列的宽度
+ ///
+ public int Column4Width { get; set; }
+ ///
+ /// 第1行第4列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column4Align { get; set; }
+ ///
+ /// 第1行第5列的X坐标
+ ///
+ public int Column5X { get; set; }
+ ///
+ /// 第1行第5列的Y坐标
+ ///
+ public int Column5Y { get; set; }
+ ///
+ /// 第1行第5列的宽度
+ ///
+ public int Column5Width { get; set; }
+ ///
+ /// 第1行第5列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column5Align { get; set; }
+ ///
+ /// 第1行第6列的X坐标
+ ///
+ public int Column6X { get; set; }
+ ///
+ /// 第1行第6列的Y坐标
+ ///
+ public int Column6Y { get; set; }
+ ///
+ /// 第1行第6列的宽度
+ ///
+ public int Column6Width { get; set; }
+ ///
+ /// 第1行第6列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column6Align { get; set; }
+ }
+}
diff --git a/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs b/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
index e457f8dd..a4d38a56 100644
--- a/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
+++ b/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
@@ -1,10 +1,11 @@
-using System.Collections.ObjectModel;
+using System;
+using System.Collections.ObjectModel;
using System.Windows.Media;
using Telerik.Windows.Controls;
namespace SWS.Model
{
- public class TreeModel : ViewModelBase, System.ICloneable
+ public class TreeModel : ViewModelBase, System.ICloneable
{
public string ID { get; set; }
private string _Text;
@@ -37,6 +38,17 @@ namespace SWS.Model
get { return _isexpand; }
set { _isexpand = value; OnPropertyChanged(nameof(isexpand)); }
}
+ private bool isChecked=false;
+ ///
+ /// 是否选中状态
+ ///
+ public bool IsChecked
+ {
+ get { return isChecked; }
+ set { isChecked = value; OnPropertyChanged(nameof(IsChecked));
+
+ }
+ }
///
/// 节点类型
///
diff --git a/newFront/c#前端/SWS.Model/SWS.Model.csproj b/newFront/c#前端/SWS.Model/SWS.Model.csproj
index 4ae32f4a..f5417adc 100644
--- a/newFront/c#前端/SWS.Model/SWS.Model.csproj
+++ b/newFront/c#前端/SWS.Model/SWS.Model.csproj
@@ -116,6 +116,7 @@
+
diff --git a/newFront/c#前端/SWS.Service/DrawingServce.cs b/newFront/c#前端/SWS.Service/DrawingServce.cs
index cce48a49..788eef87 100644
--- a/newFront/c#前端/SWS.Service/DrawingServce.cs
+++ b/newFront/c#前端/SWS.Service/DrawingServce.cs
@@ -32,7 +32,7 @@ namespace SWS.Service
///
/// 查询图纸目录树
///
- /// 是否只查询文件夹。1代表只查询文件夹
+ /// 是否只查询文件夹。0:包含图纸文件的查询, 1代表只查询文件夹
///
public async Task> GetDrawingCatalogue(string onlyFolderFlag = "0")
{
diff --git a/newFront/c#前端/SWS.Service/PlotBOMService.cs b/newFront/c#前端/SWS.Service/PlotBOMService.cs
new file mode 100644
index 00000000..45418ea5
--- /dev/null
+++ b/newFront/c#前端/SWS.Service/PlotBOMService.cs
@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
+using SWS.Commons;
+using SWS.Model;
+using SWS.Share;
+
+namespace SWS.Service
+{
+ public class PlotBOMService : HttpService
+ {
+ public PlotBOMService() : base()
+ {
+
+ }
+
+ public async Task> GetBOMGroupInfo(string drawingId)
+ {
+
+ var res = await this.GetAsync>($"PlotBOMApi/GetBOMGroupInfo?drawingId={drawingId}&ProjectId={GlobalObject.curProject.ProjectId}");
+ if (res.code == 200)
+ {
+ return res.data;
+ }
+ else
+ {
+ }
+ return null;
+ }
+
+ }
+}
diff --git a/newFront/c#前端/SWS.Service/ProjectService.cs b/newFront/c#前端/SWS.Service/ProjectService.cs
index 79a82f83..fdbcc0f5 100644
--- a/newFront/c#前端/SWS.Service/ProjectService.cs
+++ b/newFront/c#前端/SWS.Service/ProjectService.cs
@@ -10,7 +10,19 @@ namespace SWS.Service
{
}
+ public async Task GetEntity(string projectId)
+ {
+ var res = await this.GetAsync($"ProjectApi/GetEntity?projectId={projectId}");
+ if (res.code == 200)
+ {
+ return res.data;
+ }
+ else
+ {
+ }
+ return null;
+ }
public async Task> GetProjects(int pageNo, int pageSize)
{
diff --git a/newFront/c#前端/SWS.Service/SWS.Service.csproj b/newFront/c#前端/SWS.Service/SWS.Service.csproj
index 4bb7114b..4c71d606 100644
--- a/newFront/c#前端/SWS.Service/SWS.Service.csproj
+++ b/newFront/c#前端/SWS.Service/SWS.Service.csproj
@@ -64,6 +64,7 @@
+
@@ -82,6 +83,10 @@
{1995385b-d1b0-4c55-835e-d3e769972a6a}
SWS.Model
+
+ {87e71797-e60a-4637-ba32-c8b57154abc3}
+ SWS.Share
+
diff --git a/newFront/c#前端/SWS.Service/SWS.Service.csproj.user b/newFront/c#前端/SWS.Service/SWS.Service.csproj.user
index a607660d..0b246432 100644
--- a/newFront/c#前端/SWS.Service/SWS.Service.csproj.user
+++ b/newFront/c#前端/SWS.Service/SWS.Service.csproj.user
@@ -1,6 +1,6 @@
- ShowAllFiles
+ ProjectFiles
\ No newline at end of file
diff --git a/newFront/c#前端/SWS.Share/BOMGroupInfo.cs b/newFront/c#前端/SWS.Share/BOMGroupInfo.cs
new file mode 100644
index 00000000..057e5d9b
--- /dev/null
+++ b/newFront/c#前端/SWS.Share/BOMGroupInfo.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SWS.Share
+{
+ ///
+ /// 材料表分组信息
+ ///
+ public class BOMGroupInfo
+ {
+ ///
+ /// 图标上面部分显示内容
+ ///
+ public string upper_text { set; get; }
+ ///
+ /// 图标下面部分显示内容
+ ///
+ public string lower_text { set; get; }
+ ///
+ /// 每一行用的symbol是什么
+ ///
+ public string FileId { set; get; }
+ ///
+ /// 个数
+ ///
+ public int Count { set; get; }
+ ///
+ /// 备注(由 厂商)
+ ///
+ public string Remark { set; get; }
+ ///
+ /// 规格(由 电制 额定功率 ip等级 防爆等级等属性拼接而成)
+ ///
+ public string Spec { set; get; }
+
+ ///
+ /// 型号
+ ///
+ public string Model { set; get; }
+ }
+}
diff --git a/newFront/c#前端/SWS.Share/Properties/AssemblyInfo.cs b/newFront/c#前端/SWS.Share/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..1d82d37b
--- /dev/null
+++ b/newFront/c#前端/SWS.Share/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("SWS.Share")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SWS.Share")]
+[assembly: AssemblyCopyright("Copyright © 2025")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("87e71797-e60a-4637-ba32-c8b57154abc3")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/newFront/c#前端/SWS.Share/SWS.Share.csproj b/newFront/c#前端/SWS.Share/SWS.Share.csproj
new file mode 100644
index 00000000..91be2f35
--- /dev/null
+++ b/newFront/c#前端/SWS.Share/SWS.Share.csproj
@@ -0,0 +1,49 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}
+ Library
+ Properties
+ SWS.Share
+ SWS.Share
+ v4.6.1
+ 512
+ true
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/newFront/c#前端/SWS.Share/SWS.Share.csproj.user b/newFront/c#前端/SWS.Share/SWS.Share.csproj.user
new file mode 100644
index 00000000..0b246432
--- /dev/null
+++ b/newFront/c#前端/SWS.Share/SWS.Share.csproj.user
@@ -0,0 +1,6 @@
+
+
+
+ ProjectFiles
+
+
\ No newline at end of file
diff --git a/newFront/c#前端/SWS.WPF/ViewModels/DialogTestViewModel.cs b/newFront/c#前端/SWS.WPF/ViewModels/DialogTestViewModel.cs
index 550f1bcd..88615576 100644
--- a/newFront/c#前端/SWS.WPF/ViewModels/DialogTestViewModel.cs
+++ b/newFront/c#前端/SWS.WPF/ViewModels/DialogTestViewModel.cs
@@ -1,4 +1,6 @@
using System;
+using System.Threading;
+using System.Threading.Tasks;
using System.Windows.Input;
using Prism.Services.Dialogs;
using SWS.Commons;
@@ -58,17 +60,17 @@ namespace SWS.WPF.ViewModels
}
public void onClose1(object o)
- {
- IDialogParameters par = new DialogParameters();
- par.Add(GlobalObject.dialogPar.para1.ToString(), "xxx");
- DialogResult result = new DialogResult(ButtonResult.Yes,par);
- RequestClose.Invoke(result);
+ {
+ IDialogParameters par = new DialogParameters();
+ par.Add(GlobalObject.dialogPar.para1.ToString(), "xxx");
+ DialogResult result = new DialogResult(ButtonResult.Yes, par);
+ RequestClose.Invoke(result);
}
public void onClose2(object o)
{
IDialogParameters par = new DialogParameters();
par.Add(GlobalObject.dialogPar.para1.ToString(), "zzz");
- DialogResult result = new DialogResult(ButtonResult.No,par);
+ DialogResult result = new DialogResult(ButtonResult.No, par);
RequestClose.Invoke(result);
}
}
diff --git a/newFront/c#前端/SWS.WPF/Views/DialogSignalManagements/DialogAllOutputSignal.xaml b/newFront/c#前端/SWS.WPF/Views/DialogSignalManagements/DialogAllOutputSignal.xaml
index ac30f7dc..5d4a4298 100644
--- a/newFront/c#前端/SWS.WPF/Views/DialogSignalManagements/DialogAllOutputSignal.xaml
+++ b/newFront/c#前端/SWS.WPF/Views/DialogSignalManagements/DialogAllOutputSignal.xaml
@@ -1,18 +1,20 @@
-
+
-
+