Merge branch 'main' of http://27.154.35.18:7053/yuxingheng/009_DI-Elec
This commit is contained in:
commit
842777110e
@ -97,9 +97,9 @@ namespace SWS.Electrical
|
||||
var listProjects = (await projectService.GetProjects(1, 1000)).Rows;
|
||||
var p = listProjects.FirstOrDefault(a => a.ProjectId == curProjId);
|
||||
GlobalObject.curProject = p;
|
||||
var obj = await projectService.InitProjInfo(curProjId, "");
|
||||
var treeData = obj.First(x => (string)x["Name"] == "图纸树(按目录)")["data"];
|
||||
treeDrawings = JsonConvert.DeserializeObject<List<TreeModel>>(treeData.ToString());
|
||||
//var obj = await projectService.InitProjInfo(curProjId, "");
|
||||
//var treeData = obj.First(x => (string)x["Name"] == "图纸树(按目录)")["data"];
|
||||
//treeDrawings = JsonConvert.DeserializeObject<List<TreeModel>>(treeData.ToString());
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace SWS.Electrical.ViewModels
|
||||
}
|
||||
private ObservableCollection<DtoAutoPlotLayout> _listBasePoint;
|
||||
/// <summary>
|
||||
/// 基点元件列表
|
||||
/// 正常基点元件列表
|
||||
/// </summary>
|
||||
public ObservableCollection<DtoAutoPlotLayout> listBasePoint
|
||||
{
|
||||
@ -63,6 +63,22 @@ namespace SWS.Electrical.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
private ObservableCollection<DtoAutoPlotLayout> _listErrBasePoint;
|
||||
/// <summary>
|
||||
/// 异常基点元件列表
|
||||
/// </summary>
|
||||
public ObservableCollection<DtoAutoPlotLayout> listErrBasePoint
|
||||
{
|
||||
get { return this._listErrBasePoint; }
|
||||
set
|
||||
{
|
||||
if (value != this._listErrBasePoint)
|
||||
{
|
||||
this._listErrBasePoint = value;
|
||||
RaisePropertyChanged(nameof(listErrBasePoint));
|
||||
}
|
||||
}
|
||||
}
|
||||
private DtoAutoPlotLayout _SelectedTag;
|
||||
/// <summary>
|
||||
/// 基点元件
|
||||
@ -193,6 +209,24 @@ namespace SWS.Electrical.ViewModels
|
||||
get { return _inputValue; }
|
||||
set { _inputValue = value; OnPropertyChanged(nameof(inputValue)); }
|
||||
}
|
||||
private string _NormalTagCount = "正常元件";
|
||||
/// <summary>
|
||||
/// 正常位号
|
||||
/// </summary>
|
||||
public string NormalTagCount
|
||||
{
|
||||
get { return _NormalTagCount; }
|
||||
set { _NormalTagCount = value; OnPropertyChanged(nameof(NormalTagCount)); }
|
||||
}
|
||||
private string _ErrTagCount = "异常元件";
|
||||
/// <summary>
|
||||
/// 异常位号
|
||||
/// </summary>
|
||||
public string ErrTagCount
|
||||
{
|
||||
get { return _ErrTagCount; }
|
||||
set { _ErrTagCount = value; OnPropertyChanged(nameof(ErrTagCount)); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 命令事件
|
||||
@ -238,6 +272,7 @@ namespace SWS.Electrical.ViewModels
|
||||
_ServiceDataItem = GlobalObject.container.Resolve<DataItemService>();
|
||||
listDrawings = new ObservableCollection<DtoDrawing>();
|
||||
listBasePoint = new ObservableCollection<DtoAutoPlotLayout>();
|
||||
listErrBasePoint = new ObservableCollection<DtoAutoPlotLayout>();
|
||||
listMsg = new ObservableCollection<TextBlock>();
|
||||
var list = new ObservableCollection<KeyValueModel>();
|
||||
list.Add(new KeyValueModel { Key = "甲板号", Value = "甲板号" });
|
||||
@ -442,21 +477,60 @@ namespace SWS.Electrical.ViewModels
|
||||
BusyContent = "数据加载中...";
|
||||
AddMsg("开始查询布置图基点元件信息...");
|
||||
List<DtoAutoPlotLayout> listDto = new List<DtoAutoPlotLayout>();
|
||||
List<DtoAutoPlotLayout> listErrDto = new List<DtoAutoPlotLayout>();
|
||||
bool isBasePointErr = false;
|
||||
bool isTagErr = false;
|
||||
int index = 1;
|
||||
int count = listSelDwg.Count;
|
||||
foreach (var dwg in listSelDwg)
|
||||
{
|
||||
BusyContent = $"数据加载中......{index}/{count}";
|
||||
var list = await _ServicePlotLayout.GetBasePointByDwg(selectRange.Value, selectOperator.Value, inputValue, dwg.DrawingFileID);
|
||||
index++;
|
||||
if (list == null)
|
||||
{ continue; }
|
||||
foreach (var basePoint in list)
|
||||
{
|
||||
if (basePoint.area != null && basePoint.area.ToLower() == "err")
|
||||
{ continue; }
|
||||
{ isBasePointErr = true; }
|
||||
else { isBasePointErr = false; }
|
||||
if (basePoint.Tags.Any())
|
||||
{
|
||||
foreach (var tag in basePoint.Tags)
|
||||
{
|
||||
if (tag.area != null && tag.area.ToLower() == "err")
|
||||
{ continue; }
|
||||
{ isTagErr = true; }
|
||||
else { isTagErr = false; }
|
||||
if (isBasePointErr || isTagErr)
|
||||
{
|
||||
string strErr = isBasePointErr ? "基点异常;" : "";
|
||||
strErr += isTagErr ? "元件异常" : "";
|
||||
strErr = strErr.Replace(";","");
|
||||
listErrDto.Add(new DtoAutoPlotLayout()
|
||||
{
|
||||
IsSelected = true,
|
||||
DrawingFileID = dwg.DrawingFileID,
|
||||
DrawingFileName = dwg.DrawingFileName,
|
||||
EngineDataID = basePoint.EngineDataID,
|
||||
BasePointTagNumber = basePoint.TagNumber,
|
||||
Scale = basePoint.Scale,
|
||||
FileId = basePoint.FileId,
|
||||
PixelOnDwg = basePoint.PixelOnDwg,
|
||||
IsNotDefaultSymbol = basePoint.IsNotDefaultSymbol,
|
||||
X = basePoint.X,
|
||||
XOff = basePoint.XOff,
|
||||
YOff = basePoint.YOff,
|
||||
deck = basePoint.deck,
|
||||
area = basePoint.area,
|
||||
AutoDrawing = strErr,
|
||||
TagNumber = tag.TagNumber,
|
||||
TagNumber_Upper = basePoint.TagNumber_Upper,
|
||||
TagNumber_Lower = basePoint.TagNumber_Lower,
|
||||
Tag = tag
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
listDto.Add(new DtoAutoPlotLayout()
|
||||
{
|
||||
IsSelected = true,
|
||||
@ -483,7 +557,11 @@ namespace SWS.Electrical.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
listBasePoint = new ObservableCollection<DtoAutoPlotLayout>(listDto);
|
||||
listErrBasePoint = new ObservableCollection<DtoAutoPlotLayout>(listErrDto);
|
||||
NormalTagCount = $"正常元件({listBasePoint.Count}个)";
|
||||
ErrTagCount = $"异常元件({listErrBasePoint.Count}个)";
|
||||
IsSelectAll = listBasePoint.Any() ? true : false;
|
||||
AddMsg("布置图基点元件信息查询完成!");
|
||||
IsBusy = false;
|
||||
|
@ -228,11 +228,13 @@
|
||||
Content="开始自动绘图"
|
||||
FontSize="16" />
|
||||
</StackPanel>
|
||||
<DataGrid
|
||||
x:Name="dgTag"
|
||||
<TabControl
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Height="auto"
|
||||
Height="auto">
|
||||
<TabItem Header="{Binding NormalTagCount}">
|
||||
<DataGrid
|
||||
x:Name="dgTag"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
CanUserResizeColumns="True"
|
||||
@ -332,6 +334,55 @@
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ErrTagCount}">
|
||||
<DataGrid
|
||||
x:Name="dgErrTag"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
CanUserResizeColumns="True"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding listErrBasePoint, Mode=TwoWay}"
|
||||
LoadingRow="dgTag_LoadingRow"
|
||||
RowHeight="22"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectionMode="Single">
|
||||
<DataGrid.Columns>
|
||||
|
||||
<DataGridTemplateColumn Width="50" Header="序号">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGridRow}, Path=Header}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="0.65*"
|
||||
Binding="{Binding DrawingFileName}"
|
||||
Header="布置图"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="0.35*"
|
||||
Binding="{Binding BasePointTagNumber}"
|
||||
Header="基点"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="110"
|
||||
Binding="{Binding TagNumber}"
|
||||
Header="元件位号"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn
|
||||
Width="110"
|
||||
Binding="{Binding AutoDrawing}"
|
||||
Header="绘制"
|
||||
IsReadOnly="True" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</Grid>
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\Views\DialogAutoArrangeLayout.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D0C5F0216DF6BCDDDA98AFD5EEED25E2B5C8BB0236746F3B9CC6B583DD7624FD"
|
||||
#pragma checksum "..\..\..\Views\DialogAutoArrangeLayout.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D381518E6A709FE4FD61B7B59C0FE6A02830580BBED56CC9959DA9E027AC6A01"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@ -85,13 +85,21 @@ namespace SWS.Electrical.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 232 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
#line 237 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.DataGrid dgTag;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 340 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.DataGrid dgErrTag;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@ -128,9 +136,18 @@ namespace SWS.Electrical.Views {
|
||||
case 2:
|
||||
this.dgTag = ((System.Windows.Controls.DataGrid)(target));
|
||||
|
||||
#line 241 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
#line 243 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
this.dgTag.LoadingRow += new System.EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.dgTag_LoadingRow);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 3:
|
||||
this.dgErrTag = ((System.Windows.Controls.DataGrid)(target));
|
||||
|
||||
#line 346 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
this.dgErrTag.LoadingRow += new System.EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.dgTag_LoadingRow);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\Views\DialogAutoArrangeLayout.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D0C5F0216DF6BCDDDA98AFD5EEED25E2B5C8BB0236746F3B9CC6B583DD7624FD"
|
||||
#pragma checksum "..\..\..\Views\DialogAutoArrangeLayout.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D381518E6A709FE4FD61B7B59C0FE6A02830580BBED56CC9959DA9E027AC6A01"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@ -85,13 +85,21 @@ namespace SWS.Electrical.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 232 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
#line 237 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.DataGrid dgTag;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 340 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.DataGrid dgErrTag;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@ -128,9 +136,18 @@ namespace SWS.Electrical.Views {
|
||||
case 2:
|
||||
this.dgTag = ((System.Windows.Controls.DataGrid)(target));
|
||||
|
||||
#line 241 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
#line 243 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
this.dgTag.LoadingRow += new System.EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.dgTag_LoadingRow);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 3:
|
||||
this.dgErrTag = ((System.Windows.Controls.DataGrid)(target));
|
||||
|
||||
#line 346 "..\..\..\Views\DialogAutoArrangeLayout.xaml"
|
||||
this.dgErrTag.LoadingRow += new System.EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.dgTag_LoadingRow);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
|
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D4B655A725F9DA5CEF801330CC2E000E8A952FC6E92D22159739897F8A32A6A6"
|
||||
#pragma checksum "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9BC88517AA32E047BA6D8CB1D1F60D2837D4E22C18FF9DE0448C2276C8824A00"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@ -86,7 +86,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 233 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 231 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtReviewCountdown;
|
||||
|
||||
@ -94,7 +94,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 252 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 250 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtConstructionCountdown;
|
||||
|
||||
@ -102,7 +102,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 308 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 306 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal SWS.CustomControl.IconButton PopupButton;
|
||||
|
||||
@ -110,7 +110,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 318 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 317 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Primitives.Popup CustomPopup;
|
||||
|
||||
@ -118,7 +118,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 367 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 368 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal SWS.CustomControl.IconButton myButton;
|
||||
|
||||
@ -126,7 +126,7 @@ namespace SWS.WPF.Views {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 400 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
#line 401 "..\..\..\..\Views\DialogSignalManagements\DialogSignalManagement.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal Telerik.Windows.Controls.RadTreeListView RadGridView1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user