Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
0b0adb28
Commit
0b0adb28
authored
Mar 16, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页上添加 Take, TakeContinue,TakeOut
parent
564eeaba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
195 additions
and
7 deletions
+195
-7
VIZ.Package.Module/Control/Service/IControlService.cs
+12
-0
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
+62
-4
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanel.xaml
+1
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanelModel.cs
+23
-2
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+7
-0
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+90
-0
No files found.
VIZ.Package.Module/Control/Service/IControlService.cs
View file @
0b0adb28
...
@@ -31,6 +31,18 @@ namespace VIZ.Package.Module
...
@@ -31,6 +31,18 @@ namespace VIZ.Package.Module
void
TakeWhenPageOpend
(
PageModelBase
pageBase
);
void
TakeWhenPageOpend
(
PageModelBase
pageBase
);
/// <summary>
/// <summary>
/// 当页打开后Continue指定页
/// </summary>
/// <param name="pageBase">指定页</param>
void
TakeContinueWhenPageOpend
(
PageModelBase
pageBase
);
/// <summary>
/// 当页打开后TakeOut指定页
/// </summary>
/// <param name="pageBase">指定页</param>
void
TakeOutWhenPageOpend
(
PageModelBase
pageBase
);
/// <summary>
/// 继续
/// 继续
/// </summary>
/// </summary>
void
Continue
();
void
Continue
();
...
...
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
View file @
0b0adb28
...
@@ -64,6 +64,16 @@ namespace VIZ.Package.Module
...
@@ -64,6 +64,16 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
PageModelBase
waitTakePageBase
;
private
PageModelBase
waitTakePageBase
;
/// <summary>
/// 等待Continue的页
/// </summary>
private
PageModelBase
waitTakeContinuePageBase
;
/// <summary>
/// 等待TakeOut的页
/// </summary>
private
PageModelBase
waitTakeOutPageBase
;
// ==============================================================
// ==============================================================
// Service & Controller
// Service & Controller
// ==============================================================
// ==============================================================
...
@@ -293,15 +303,39 @@ namespace VIZ.Package.Module
...
@@ -293,15 +303,39 @@ namespace VIZ.Package.Module
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnPageOpenOverMessage
(
PageOpenOverMessage
msg
)
private
void
OnPageOpenOverMessage
(
PageOpenOverMessage
msg
)
{
{
if
(
this
.
waitTakePageBase
==
null
)
// Wait Take
if
(
this
.
waitTakePageBase
!=
null
&&
this
.
waitTakePageBase
==
msg
.
Page
)
{
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
null
;
this
.
Take
();
return
;
return
;
}
if
(
this
.
waitTakePageBase
!=
msg
.
Page
)
// Wait Continue
if
(
this
.
waitTakeContinuePageBase
!=
null
&&
this
.
waitTakeContinuePageBase
==
msg
.
Page
)
{
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
null
;
this
.
Continue
();
return
;
return
;
}
this
.
waitTakePageBase
=
null
;
// Wait TakeOut
if
(
this
.
waitTakeOutPageBase
!=
null
&&
this
.
waitTakeOutPageBase
==
msg
.
Page
)
{
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
null
;
this
.
TakeOut
();
return
;
}
this
.
Take
();
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
null
;
}
}
// ==============================================================
// ==============================================================
...
@@ -367,6 +401,30 @@ namespace VIZ.Package.Module
...
@@ -367,6 +401,30 @@ namespace VIZ.Package.Module
public
void
TakeWhenPageOpend
(
PageModelBase
pageBase
)
public
void
TakeWhenPageOpend
(
PageModelBase
pageBase
)
{
{
this
.
waitTakePageBase
=
pageBase
;
this
.
waitTakePageBase
=
pageBase
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
null
;
}
/// <summary>
/// 当页打开后Continue指定页
/// </summary>
/// <param name="pageBase">指定页</param>
public
void
TakeContinueWhenPageOpend
(
PageModelBase
pageBase
)
{
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
pageBase
;
this
.
waitTakeOutPageBase
=
null
;
}
/// <summary>
/// 当页打开后TakeOut指定页
/// </summary>
/// <param name="pageBase">指定页</param>
public
void
TakeOutWhenPageOpend
(
PageModelBase
pageBase
)
{
this
.
waitTakePageBase
=
null
;
this
.
waitTakeContinuePageBase
=
null
;
this
.
waitTakeOutPageBase
=
pageBase
;
}
}
// ==============================================================
// ==============================================================
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanel.xaml
View file @
0b0adb28
...
@@ -43,6 +43,6 @@
...
@@ -43,6 +43,6 @@
</Grid>
</Grid>
<!-- 数据 -->
<!-- 数据 -->
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanelModel.cs
View file @
0b0adb28
...
@@ -11,6 +11,7 @@ using System.Windows;
...
@@ -11,6 +11,7 @@ using System.Windows;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Service
;
using
VIZ.Package.Service
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
{
{
...
@@ -38,6 +39,21 @@ namespace VIZ.Package.Module
...
@@ -38,6 +39,21 @@ namespace VIZ.Package.Module
this
.
ApplyTemplateCommand
=
new
VCommand
(
this
.
ApplyTemplate
);
this
.
ApplyTemplateCommand
=
new
VCommand
(
this
.
ApplyTemplate
);
}
}
// ============================================================
// Service & Controller
// ============================================================
/// <summary>
/// 控制对象服务
/// </summary>
private
ControlObjectService
controlObjectService
=
new
ControlObjectService
();
/// <summary>
/// 控制对象命令服务
/// </summary>
private
VizCommandControlObjectService
vizCommandControlObjectService
=
new
VizCommandControlObjectService
();
// ============================================================
// ============================================================
// Property
// Property
// ============================================================
// ============================================================
...
@@ -108,10 +124,15 @@ namespace VIZ.Package.Module
...
@@ -108,10 +124,15 @@ namespace VIZ.Package.Module
if
(
this
.
SelectedSceneTemplateModel
==
null
)
if
(
this
.
SelectedSceneTemplateModel
==
null
)
return
;
return
;
PageModelBase
pageBase
=
ApplicationDomainEx
.
CurrentPage
;
if
(
this
.
ControlObject
==
null
)
if
(
pageBase
==
null
)
return
;
return
;
ControlObjectEntity
entity
=
this
.
controlObjectService
.
GetControlObject
(
this
.
SelectedSceneTemplateModel
)?.
FirstOrDefault
();
ControlObjectModel
controlObject
=
new
ControlObjectModel
();
this
.
vizCommandControlObjectService
.
UpdateControlObjectModel
(
controlObject
,
entity
);
// 只处理文本与图片类型
List
<
ControlFieldNodeModel
>
fields
=
controlObject
.
AllFiledNodes
.
Where
(
p
=>
p
.
Type
==
VizControlFieldType
.
text
||
p
.
Type
==
VizControlFieldType
.
image
).
ToList
();
}
}
...
...
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
0b0adb28
...
@@ -428,6 +428,13 @@
...
@@ -428,6 +428,13 @@
<dxb:BarButtonItem Name="OpenAndTakePage" Content="Take"
<dxb:BarButtonItem Name="OpenAndTakePage" Content="Take"
Command="{Binding ElementName=uc,Path=DataContext.OpenAndTakePageCommand}"
Command="{Binding ElementName=uc,Path=DataContext.OpenAndTakePageCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarButtonItem Name="OpenAndTakeContinuePage" Content="Continue"
Command="{Binding ElementName=uc,Path=DataContext.OpenAndTakeContinueCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarButtonItem Name="OpenAndTakeOutPage" Content="TakeOut"
Command="{Binding ElementName=uc,Path=DataContext.OpenAndTakeOutCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarItemLinkSeparator />
<dxb:BarButtonItem Name="OpenPage" Content="打开"
<dxb:BarButtonItem Name="OpenPage" Content="打开"
Command="{Binding ElementName=uc,Path=DataContext.OpenPageCommand}"
Command="{Binding ElementName=uc,Path=DataContext.OpenPageCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
...
...
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
0b0adb28
...
@@ -97,6 +97,8 @@ namespace VIZ.Package.Module
...
@@ -97,6 +97,8 @@ namespace VIZ.Package.Module
this
.
DeleteItemCommand
=
new
VCommand
(
this
.
DeleteItem
);
this
.
DeleteItemCommand
=
new
VCommand
(
this
.
DeleteItem
);
this
.
OpenPageCommand
=
new
VCommand
(
this
.
OpenPage
,
this
.
CanOpenPage
);
this
.
OpenPageCommand
=
new
VCommand
(
this
.
OpenPage
,
this
.
CanOpenPage
);
this
.
OpenAndTakePageCommand
=
new
VCommand
(
this
.
OpenAndTakePage
,
this
.
CanOpenAndTakePage
);
this
.
OpenAndTakePageCommand
=
new
VCommand
(
this
.
OpenAndTakePage
,
this
.
CanOpenAndTakePage
);
this
.
OpenAndTakeContinueCommand
=
new
VCommand
(
this
.
OpenAndTakeContinue
,
this
.
CanOpenAndTakeContinue
);
this
.
OpenAndTakeOutCommand
=
new
VCommand
(
this
.
OpenAndTakeOut
,
this
.
CanOpenAndTakeOut
);
this
.
UpdateCommand
=
new
VCommand
(
this
.
Update
,
this
.
CanUpdate
);
this
.
UpdateCommand
=
new
VCommand
(
this
.
Update
,
this
.
CanUpdate
);
this
.
TakeClearCommand
=
new
VCommand
(
this
.
TakeClear
);
this
.
TakeClearCommand
=
new
VCommand
(
this
.
TakeClear
);
this
.
TakeInitCommand
=
new
VCommand
(
this
.
TakeInit
,
this
.
CanTakeInit
);
this
.
TakeInitCommand
=
new
VCommand
(
this
.
TakeInit
,
this
.
CanTakeInit
);
...
@@ -513,6 +515,94 @@ namespace VIZ.Package.Module
...
@@ -513,6 +515,94 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
OpenAndTakeContinueCommand
--
打开并
Continue
页命令
/// <summary>
/// 打开并Continue页命令
/// </summary>
public
VCommand
OpenAndTakeContinueCommand
{
get
;
set
;
}
/// <summary>
/// 是否可以打开并Continue页
/// </summary>
/// <returns>是否可以打开并Continue页</returns>
private
bool
CanOpenAndTakeContinue
()
{
return
this
.
SelectedPageGroupModel
!=
null
&&
this
.
SelectedPageGroupModel
.
SelectedPage
!=
null
&&
this
.
SelectedPageGroupModel
.
SelectedPage
.
IsTake
;
}
/// <summary>
/// 打开并Continue页
/// </summary>
private
void
OpenAndTakeContinue
()
{
if
(
this
.
SelectedPageGroupModel
==
null
)
return
;
if
(
this
.
SelectedPageGroupModel
.
SelectedPage
==
null
)
return
;
// 记录操作日志
string
remark
=
$"
{
this
.
SelectedPageGroupModel
.
SelectedPage
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PAGE_OPEN
,
remark
);
// 设置需要等待Continue的页
IControlService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IControlService
>(
ViewServiceKeys
.
CONTROL_SERVICE
);
if
(
service
==
null
)
return
;
service
.
TakeContinueWhenPageOpend
(
this
.
SelectedPageGroupModel
.
SelectedPage
);
// 打开页
this
.
OpenPage
(
this
.
SelectedPageGroupModel
.
SelectedPage
);
}
#
endregion
#
region
OpenAndTakeOutCommand
--
打开并下板命令
/// <summary>
/// 打开并下板命令
/// </summary>
public
VCommand
OpenAndTakeOutCommand
{
get
;
set
;
}
/// <summary>
/// 是否可以执行打开并下板命令
/// </summary>
/// <returns>是否可以执行下板</returns>
private
bool
CanOpenAndTakeOut
()
{
return
this
.
SelectedPageGroupModel
!=
null
&&
this
.
SelectedPageGroupModel
.
SelectedPage
!=
null
&&
this
.
SelectedPageGroupModel
.
SelectedPage
.
IsTake
;
}
/// <summary>
/// 打开并下板
/// </summary>
private
void
OpenAndTakeOut
()
{
if
(
this
.
SelectedPageGroupModel
==
null
)
return
;
if
(
this
.
SelectedPageGroupModel
.
SelectedPage
==
null
)
return
;
// 记录操作日志
string
remark
=
$"
{
this
.
SelectedPageGroupModel
.
SelectedPage
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PAGE_OPEN
,
remark
);
// 设置需要等待Continue的页
IControlService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IControlService
>(
ViewServiceKeys
.
CONTROL_SERVICE
);
if
(
service
==
null
)
return
;
service
.
TakeOutWhenPageOpend
(
this
.
SelectedPageGroupModel
.
SelectedPage
);
// 打开页
this
.
OpenPage
(
this
.
SelectedPageGroupModel
.
SelectedPage
);
}
#
endregion
#
region
UpdateCommand
--
更新命令
#
region
UpdateCommand
--
更新命令
/// <summary>
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment