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
c2bb96cf
Commit
c2bb96cf
authored
Feb 28, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志记录
parent
d7beaaee
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
308 additions
and
21 deletions
+308
-21
VIZ.Package.Domain/RecordLogConstants.cs
+155
-10
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
+20
-0
VIZ.Package.Module/Log/ViewModel/VizCommandWindowModel.cs
+1
-1
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
+1
-1
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
+24
-0
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+78
-1
VIZ.Package.Module/Page/Templage/ViewModel/PageTemplateViewModel.cs
+27
-0
VIZ.Package.Storage/CSV/RecordLog/RecordLogOperate.cs
+1
-7
VIZ.Package.Storage/CSV/RecordLog/RecordLogTrigger.cs
+1
-1
No files found.
VIZ.Package.Domain/RecordLogConstants.cs
View file @
c2bb96cf
...
@@ -50,6 +50,137 @@ namespace VIZ.Package.Domain
...
@@ -50,6 +50,137 @@ namespace VIZ.Package.Domain
public
const
string
OPERATE_SHUTDOWN
=
"关闭系统"
;
public
const
string
OPERATE_SHUTDOWN
=
"关闭系统"
;
// =============================================================================
// =============================================================================
// 设置
// =============================================================================
/// <summary>
/// 打开设置页面
/// </summary>
public
const
string
OPERATE_SETTING_OPEN
=
"打开设置页面"
;
/// <summary>
/// 重置布局
/// </summary>
public
const
string
OPERATE_SETTING_RESET_LAYOUT
=
"重置布局"
;
// =============================================================================
// 项目
// =============================================================================
/// <summary>
/// 创建项目
/// </summary>
public
const
string
OPERATE_PROJECT_CREATE
=
"创建项目"
;
/// <summary>
/// 打开项目
/// </summary>
public
const
string
OPERATE_PROJECT_OPEN
=
"打开项目"
;
/// <summary>
/// 保存项目
/// </summary>
public
const
string
OPERATE_PROJECT_SAVE
=
"保存项目"
;
/// <summary>
/// 关闭项目
/// </summary>
public
const
string
OPERATE_PROJECT_CLOSE
=
"关闭项目"
;
// =============================================================================
// 模板
// =============================================================================
/// <summary>
/// 添加模板
/// </summary>
public
const
string
OPERATE_TEMPLATE_ADD
=
"添加模板"
;
/// <summary>
/// 打开模板
/// </summary>
public
const
string
OPERATE_TEMPLATE_OPEN
=
"打开模板"
;
/// <summary>
/// 更新模板
/// </summary>
public
const
string
OPERATE_TEMPLATE_UPDATE
=
"更新模板"
;
/// <summary>
/// 删除模板
/// </summary>
public
const
string
OPERATE_TEMPLATE_DELETE
=
"删除模板"
;
// =============================================================================
// 播出单
// =============================================================================
/// <summary>
/// 播出单添加分组
/// </summary>
public
const
string
OPERATE_PAGE_GROUP_ADD
=
"播出单添加分组"
;
/// <summary>
/// 播出单重名了
/// </summary>
public
const
string
OPERATE_PAGE_GROUP_RENAME
=
"播出单重命名"
;
/// <summary>
/// 播出单删除分组
/// </summary>
public
const
string
OPERATE_PAGE_GROUP_DELETE
=
"播出单删除分组"
;
/// <summary>
/// 播出单删除页
/// </summary>
public
const
string
OPERATE_PAGE_DELETE
=
"播出单删除页"
;
/// <summary>
/// 打开播出单页
/// </summary>
public
const
string
OPERATE_PAGE_OPEN
=
"打开播出单页"
;
/// <summary>
/// 更新播出单页
/// </summary>
public
const
string
OPERATE_PAGE_UPDATE
=
"更新播出单页"
;
/// <summary>
/// 清理页
/// </summary>
public
const
string
OPERATE_PAGE_CLEAR
=
"清理页"
;
/// <summary>
/// 初始化页
/// </summary>
public
const
string
OPERATE_PAGE_INIT
=
"初始化页"
;
/// <summary>
/// 拷贝播出单分组
/// </summary>
public
const
string
OPERATE_PAGE_GROUP_COPY
=
"拷贝播出单分组"
;
/// <summary>
/// 复制页
/// </summary>
public
const
string
OPERATE_PAGE_BEGIN_COPY
=
"复制页"
;
/// <summary>
/// 粘贴页
/// </summary>
public
const
string
OPERATE_PAGE_PASTE
=
"粘贴页"
;
/// <summary>
/// 添加页
/// </summary>
public
const
string
OPERATE_PAGE_ADD
=
"添加页"
;
/// <summary>
/// 修改页号
/// </summary>
public
const
string
OPERATE_PAGE_CHANGE_PAGE_NUM
=
"修改页号"
;
// =============================================================================
// Viz预览
// Viz预览
// =============================================================================
// =============================================================================
...
@@ -61,52 +192,52 @@ namespace VIZ.Package.Domain
...
@@ -61,52 +192,52 @@ namespace VIZ.Package.Domain
/// <summary>
/// <summary>
/// 点击预览播放
/// 点击预览播放
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_PLAY
=
"
点击预览
播放"
;
public
const
string
OPERATE_PREVIEW_PLAY
=
"
预览:点击
播放"
;
/// <summary>
/// <summary>
/// 点击预览继续
/// 点击预览继续
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_CONTINUE
=
"
点击预览
继续"
;
public
const
string
OPERATE_PREVIEW_CONTINUE
=
"
预览:点击
继续"
;
/// <summary>
/// <summary>
/// 点击预览停止
/// 点击预览停止
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_STOP
=
"
点击预览
停止"
;
public
const
string
OPERATE_PREVIEW_STOP
=
"
预览:点击
停止"
;
/// <summary>
/// <summary>
/// 点击预览更新
/// 点击预览更新
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_UPDATE
=
"
点击预览
更新"
;
public
const
string
OPERATE_PREVIEW_UPDATE
=
"
预览:点击
更新"
;
/// <summary>
/// <summary>
/// 点击预览RGB
/// 点击预览RGB
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_RGB
=
"
点击预览
RGB"
;
public
const
string
OPERATE_PREVIEW_RGB
=
"
预览:点击
RGB"
;
/// <summary>
/// <summary>
/// 点击预览Key
/// 点击预览Key
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_KEY
=
"
点击预览
Key"
;
public
const
string
OPERATE_PREVIEW_KEY
=
"
预览:点击
Key"
;
/// <summary>
/// <summary>
/// 点击预览KeyPreview
/// 点击预览KeyPreview
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_KEY_PREVIEW
=
"
点击预览
KeyPreview"
;
public
const
string
OPERATE_PREVIEW_KEY_PREVIEW
=
"
预览:点击
KeyPreview"
;
/// <summary>
/// <summary>
/// 点击预览TS
/// 点击预览TS
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_TS
=
"
点击预览
TS"
;
public
const
string
OPERATE_PREVIEW_TS
=
"
预览:点击
TS"
;
/// <summary>
/// <summary>
/// 点击预览SA
/// 点击预览SA
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_SA
=
"
点击预览
SA"
;
public
const
string
OPERATE_PREVIEW_SA
=
"
预览:点击
SA"
;
/// <summary>
/// <summary>
/// 点击预览BB
/// 点击预览BB
/// </summary>
/// </summary>
public
const
string
OPERATE_PREVIEW_BB
=
"
点击预览
BB"
;
public
const
string
OPERATE_PREVIEW_BB
=
"
预览:点击
BB"
;
// =============================================================================
// =============================================================================
// Take
// Take
...
@@ -131,5 +262,19 @@ namespace VIZ.Package.Domain
...
@@ -131,5 +262,19 @@ namespace VIZ.Package.Domain
/// 点击更新
/// 点击更新
/// </summary>
/// </summary>
public
const
string
OPERATE_TAKE_UPDATE
=
"播控:点击Update"
;
public
const
string
OPERATE_TAKE_UPDATE
=
"播控:点击Update"
;
// =============================================================================
// 控制对象字段编辑
// =============================================================================
/// <summary>
/// 保存控制字段
/// </summary>
public
const
string
OPERATE_CONTROL_FIELD_SAVE
=
"保存控制字段"
;
/// <summary>
/// 另存为页
/// </summary>
public
const
string
OPERATE_CONTROL_FIELD_SAVE_AS
=
"另存为页"
;
}
}
}
}
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
View file @
c2bb96cf
...
@@ -65,6 +65,11 @@ namespace VIZ.Package.Module
...
@@ -65,6 +65,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
ControlObjectService
controlObjectService
=
new
ControlObjectService
();
private
ControlObjectService
controlObjectService
=
new
ControlObjectService
();
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
// =============================================================
// =============================================================
// Property
// Property
// =============================================================
// =============================================================
...
@@ -163,6 +168,10 @@ namespace VIZ.Package.Module
...
@@ -163,6 +168,10 @@ namespace VIZ.Package.Module
return
;
return
;
}
}
// 记录操作日志
string
remark
=
$"
{
ApplicationDomainEx
.
CurrentPage
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_CONTROL_FIELD_SAVE
,
remark
);
// 更新列表值
// 更新列表值
service
.
TryUpdateControlFieldListValue
();
service
.
TryUpdateControlFieldListValue
();
// 保存
// 保存
...
@@ -221,6 +230,10 @@ namespace VIZ.Package.Module
...
@@ -221,6 +230,10 @@ namespace VIZ.Package.Module
PageModel
page
=
pageGroupService
.
AddPage
(
srcTemplate
);
PageModel
page
=
pageGroupService
.
AddPage
(
srcTemplate
);
this
.
controlObjectService
.
SaveControlFields
(
page
.
PageID
,
controlObject
.
AllFiledNodes
);
this
.
controlObjectService
.
SaveControlFields
(
page
.
PageID
,
controlObject
.
AllFiledNodes
);
pageGroupService
.
OpenPage
(
page
);
pageGroupService
.
OpenPage
(
page
);
// 记录操作日志
string
remark
=
$"模板:
{
srcTemplate
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_CONTROL_FIELD_SAVE_AS
,
remark
);
}
}
// 另存页
// 另存页
else
if
(
ApplicationDomainEx
.
CurrentPage
is
PageModel
srcPage
)
else
if
(
ApplicationDomainEx
.
CurrentPage
is
PageModel
srcPage
)
...
@@ -228,6 +241,10 @@ namespace VIZ.Package.Module
...
@@ -228,6 +241,10 @@ namespace VIZ.Package.Module
PageModel
page
=
pageGroupService
.
CopyPage
();
PageModel
page
=
pageGroupService
.
CopyPage
();
this
.
controlObjectService
.
SaveControlFields
(
page
.
PageID
,
controlObject
.
AllFiledNodes
);
this
.
controlObjectService
.
SaveControlFields
(
page
.
PageID
,
controlObject
.
AllFiledNodes
);
pageGroupService
.
OpenPage
(
page
);
pageGroupService
.
OpenPage
(
page
);
// 记录操作日志
string
remark
=
$"页:
{
page
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_CONTROL_FIELD_SAVE_AS
,
remark
);
}
}
}
}
...
@@ -304,6 +321,9 @@ namespace VIZ.Package.Module
...
@@ -304,6 +321,9 @@ namespace VIZ.Package.Module
// 保存
// 保存
if
(
string
.
Equals
(
msg
.
Key
,
ApplicationDomainEx
.
HotKeyConfig
.
SaveOpendPageOrTemplateAndProject
))
if
(
string
.
Equals
(
msg
.
Key
,
ApplicationDomainEx
.
HotKeyConfig
.
SaveOpendPageOrTemplateAndProject
))
{
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
SYSTEM_HOT_KEY
,
msg
.
Key
);
this
.
Save
();
this
.
Save
();
return
;
return
;
}
}
...
...
VIZ.Package.Module/Log/ViewModel/VizCommandWindowModel.cs
View file @
c2bb96cf
...
@@ -90,7 +90,7 @@ namespace VIZ.Package.Module
...
@@ -90,7 +90,7 @@ namespace VIZ.Package.Module
private
void
OnVizCommandLogMessage
(
VizCommandLogMessage
msg
)
private
void
OnVizCommandLogMessage
(
VizCommandLogMessage
msg
)
{
{
// 记录操作日志
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
System
,
RecordLogTrigger
.
System
,
RecordLogConstants
.
SYSTEM_SEND_VIZ_COMMAND
,
msg
.
Log
);
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
VizCommand
,
RecordLogTrigger
.
System
,
RecordLogConstants
.
SYSTEM_SEND_VIZ_COMMAND
,
msg
.
Log
);
// 更新界面
// 更新界面
WPFHelper
.
BeginInvoke
(()
=>
WPFHelper
.
BeginInvoke
(()
=>
...
...
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
View file @
c2bb96cf
...
@@ -396,7 +396,7 @@ namespace VIZ.Package.Module
...
@@ -396,7 +396,7 @@ namespace VIZ.Package.Module
// 记录操作日志
// 记录操作日志
StringBuilder
remark
=
new
StringBuilder
();
StringBuilder
remark
=
new
StringBuilder
();
remark
.
Append
(
$"GH库:
{
vizConfig
.
GH_IP
}
:
{
vizConfig
.
GH_Port
}
服务名:
{
vizConfig
.
GH_ServerName
}
"
);
remark
.
Append
(
$"GH库:
{
vizConfig
.
GH_IP
}
:
{
vizConfig
.
GH_Port
}
服务名:
{
vizConfig
.
GH_ServerName
}
"
);
remark
.
Append
(
$"账号:
{
vizConfig
.
GH_UserName
}
密码:
{
vizConfig
.
VIZ_Password
}
"
);
remark
.
Append
(
$"账号:
{
vizConfig
.
GH_UserName
}
"
);
remark
.
Append
(
$"节目:
{
vizConfig
.
PluginGroup
??
string
.
Empty
}
"
);
remark
.
Append
(
$"节目:
{
vizConfig
.
PluginGroup
??
string
.
Empty
}
"
);
remark
.
Append
(
$"引擎类型:
{
vizConfig
.
EngineFullType
.
GetDescription
()}
"
);
remark
.
Append
(
$"引擎类型:
{
vizConfig
.
EngineFullType
.
GetDescription
()}
"
);
remark
.
Append
(
$"预览模式:
{
vizConfig
.
EnginePreviewMode
.
GetDescription
()}
"
);
remark
.
Append
(
$"预览模式:
{
vizConfig
.
EnginePreviewMode
.
GetDescription
()}
"
);
...
...
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
View file @
c2bb96cf
...
@@ -13,6 +13,7 @@ using System.Windows.Forms;
...
@@ -13,6 +13,7 @@ using System.Windows.Forms;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain.Model
;
using
VIZ.Package.Domain.Model
;
using
VIZ.Package.Service
;
using
VIZ.Package.Storage
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
...
@@ -74,6 +75,11 @@ namespace VIZ.Package.Module
...
@@ -74,6 +75,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
bool
isNeedOpenLastProject
=
true
;
private
bool
isNeedOpenLastProject
=
true
;
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
// =====================================================================
// =====================================================================
// Property
// Property
// =====================================================================
// =====================================================================
...
@@ -222,6 +228,9 @@ namespace VIZ.Package.Module
...
@@ -222,6 +228,9 @@ namespace VIZ.Package.Module
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
this
.
UpdateCommandStatus
();
this
.
UpdateCommandStatus
();
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PROJECT_CREATE
,
path
);
}
}
#
endregion
#
endregion
...
@@ -269,6 +278,9 @@ namespace VIZ.Package.Module
...
@@ -269,6 +278,9 @@ namespace VIZ.Package.Module
/// <param name="path">项目路径</param>
/// <param name="path">项目路径</param>
private
void
OpenProject
(
string
path
)
private
void
OpenProject
(
string
path
)
{
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PROJECT_OPEN
,
path
);
this
.
ProjectName
=
System
.
IO
.
Path
.
GetFileNameWithoutExtension
(
path
);
this
.
ProjectName
=
System
.
IO
.
Path
.
GetFileNameWithoutExtension
(
path
);
ApplicationDomainEx
.
ProjectDbContext
=
new
ProjectDbContext
(
path
);
ApplicationDomainEx
.
ProjectDbContext
=
new
ProjectDbContext
(
path
);
...
@@ -305,6 +317,9 @@ namespace VIZ.Package.Module
...
@@ -305,6 +317,9 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
SaveProject
()
private
void
SaveProject
()
{
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PROJECT_SAVE
,
this
.
ProjectName
);
ProjectSaveMessage
msg
=
new
ProjectSaveMessage
();
ProjectSaveMessage
msg
=
new
ProjectSaveMessage
();
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
}
...
@@ -344,6 +359,9 @@ namespace VIZ.Package.Module
...
@@ -344,6 +359,9 @@ namespace VIZ.Package.Module
ApplicationDomainEx
.
ProjectDbContext
.
Dispose
();
ApplicationDomainEx
.
ProjectDbContext
.
Dispose
();
}
}
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PROJECT_CLOSE
,
this
.
ProjectName
);
this
.
ProjectName
=
null
;
this
.
ProjectName
=
null
;
ApplicationDomainEx
.
ProjectDbContext
=
null
;
ApplicationDomainEx
.
ProjectDbContext
=
null
;
...
@@ -371,6 +389,9 @@ namespace VIZ.Package.Module
...
@@ -371,6 +389,9 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Setting
()
private
void
Setting
()
{
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_SETTING_OPEN
);
SettingWindow
window
=
new
SettingWindow
();
SettingWindow
window
=
new
SettingWindow
();
window
.
Owner
=
ApplicationDomainEx
.
MainWindow
;
window
.
Owner
=
ApplicationDomainEx
.
MainWindow
;
window
.
ShowDialog
();
window
.
ShowDialog
();
...
@@ -394,6 +415,9 @@ namespace VIZ.Package.Module
...
@@ -394,6 +415,9 @@ namespace VIZ.Package.Module
if
(
service
==
null
)
if
(
service
==
null
)
return
;
return
;
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_SETTING_RESET_LAYOUT
);
service
.
LoadLayout
();
service
.
LoadLayout
();
}
}
...
...
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
c2bb96cf
This diff is collapsed.
Click to expand it.
VIZ.Package.Module/Page/Templage/ViewModel/PageTemplateViewModel.cs
View file @
c2bb96cf
using
DevExpress.Xpf.Core
;
using
DevExpress.Xpf.Core
;
using
DevExpress.Xpf.Core.HandleDecorator.Helpers
;
using
log4net
;
using
log4net
;
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections
;
...
@@ -17,6 +18,7 @@ using VIZ.Framework.Core;
...
@@ -17,6 +18,7 @@ using VIZ.Framework.Core;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Service
;
using
VIZ.Package.Service
;
using
VIZ.Package.Storage
;
using
VIZ.Package.Storage
;
using
static
System
.
Windows
.
Forms
.
VisualStyles
.
VisualStyleElement
;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
{
{
...
@@ -103,6 +105,11 @@ namespace VIZ.Package.Module
...
@@ -103,6 +105,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
VizControlObjectDownloadService
vizControlObjectDownloadService
=
new
VizControlObjectDownloadService
();
private
VizControlObjectDownloadService
vizControlObjectDownloadService
=
new
VizControlObjectDownloadService
();
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
// ======================================================================================
// ======================================================================================
// Property
// Property
// ======================================================================================
// ======================================================================================
...
@@ -222,6 +229,7 @@ namespace VIZ.Package.Module
...
@@ -222,6 +229,7 @@ namespace VIZ.Package.Module
if
(
this
.
SelectedSceneTemplateModel
==
null
)
if
(
this
.
SelectedSceneTemplateModel
==
null
)
return
;
return
;
// 打开模板页
this
.
OpenScenePage
(
this
.
SelectedSceneTemplateModel
);
this
.
OpenScenePage
(
this
.
SelectedSceneTemplateModel
);
}
}
...
@@ -231,6 +239,10 @@ namespace VIZ.Package.Module
...
@@ -231,6 +239,10 @@ namespace VIZ.Package.Module
/// <param name="page">页</param>
/// <param name="page">页</param>
private
void
OpenScenePage
(
PageModelBase
page
)
private
void
OpenScenePage
(
PageModelBase
page
)
{
{
// 记录操作日志
string
remark
=
$"
{
page
.
ScenePath
}
"
;
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TEMPLATE_OPEN
,
remark
);
if
(
ApplicationDomainEx
.
CurrentPage
!=
null
)
if
(
ApplicationDomainEx
.
CurrentPage
!=
null
)
{
{
ApplicationDomainEx
.
CurrentPage
.
IsOpen
=
false
;
ApplicationDomainEx
.
CurrentPage
.
IsOpen
=
false
;
...
@@ -263,6 +275,10 @@ namespace VIZ.Package.Module
...
@@ -263,6 +275,10 @@ namespace VIZ.Package.Module
List
<
PageModelBase
>
templates
=
this
.
SelectedSceneTemplateModels
.
ToList
<
PageModelBase
>();
List
<
PageModelBase
>
templates
=
this
.
SelectedSceneTemplateModels
.
ToList
<
PageModelBase
>();
// 记录操作日志
string
remark
=
string
.
Join
(
","
,
templates
.
Select
(
p
=>
p
.
Scene
));
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TEMPLATE_UPDATE
,
remark
);
// 开始下载图片
// 开始下载图片
this
.
pageModelController
.
BeginDownLoadIamge
(
templates
);
this
.
pageModelController
.
BeginDownLoadIamge
(
templates
);
...
@@ -299,6 +315,10 @@ namespace VIZ.Package.Module
...
@@ -299,6 +315,10 @@ namespace VIZ.Package.Module
if
(
DXMessageBox
.
Show
(
$"是否删除模板 [
{
scenes
}
] ?"
,
"提示"
,
MessageBoxButton
.
YesNo
)
!=
MessageBoxResult
.
Yes
)
if
(
DXMessageBox
.
Show
(
$"是否删除模板 [
{
scenes
}
] ?"
,
"提示"
,
MessageBoxButton
.
YesNo
)
!=
MessageBoxResult
.
Yes
)
return
;
return
;
// 记录操作日志
string
remark
=
string
.
Join
(
","
,
this
.
SelectedSceneTemplateModels
.
Select
(
p
=>
p
.
Scene
));
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TEMPLATE_DELETE
,
remark
);
List
<
PageTemplateModel
>
templates
=
this
.
SelectedSceneTemplateModels
.
ToList
();
List
<
PageTemplateModel
>
templates
=
this
.
SelectedSceneTemplateModels
.
ToList
();
foreach
(
PageTemplateModel
template
in
templates
)
foreach
(
PageTemplateModel
template
in
templates
)
{
{
...
@@ -332,6 +352,9 @@ namespace VIZ.Package.Module
...
@@ -332,6 +352,9 @@ namespace VIZ.Package.Module
// 删除模板
// 删除模板
if
(
string
.
Equals
(
key
,
HotKeyConfigEntity
.
DELETE
))
if
(
string
.
Equals
(
key
,
HotKeyConfigEntity
.
DELETE
))
{
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
System
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
SYSTEM_HOT_KEY
,
key
);
this
.
Delete
();
this
.
Delete
();
return
;
return
;
}
}
...
@@ -406,6 +429,10 @@ namespace VIZ.Package.Module
...
@@ -406,6 +429,10 @@ namespace VIZ.Package.Module
/// <param name="fileModels">文件模型集合</param>
/// <param name="fileModels">文件模型集合</param>
public
void
AddSceneTemplate
(
List
<
GHResourceFileModel
>
fileModels
)
public
void
AddSceneTemplate
(
List
<
GHResourceFileModel
>
fileModels
)
{
{
// 记录操作日志
string
remark
=
string
.
Join
(
","
,
fileModels
.
Select
(
p
=>
p
.
Name
));
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TEMPLATE_ADD
,
remark
);
List
<
PageModelBase
>
list
=
new
List
<
PageModelBase
>();
List
<
PageModelBase
>
list
=
new
List
<
PageModelBase
>();
foreach
(
GHResourceFileModel
fileModel
in
fileModels
)
foreach
(
GHResourceFileModel
fileModel
in
fileModels
)
...
...
VIZ.Package.Storage/CSV/RecordLog/RecordLogOperate.cs
View file @
c2bb96cf
...
@@ -34,12 +34,6 @@ namespace VIZ.Package.Storage
...
@@ -34,12 +34,6 @@ namespace VIZ.Package.Storage
/// Http请求
/// Http请求
/// </summary>
/// </summary>
[
Description
(
"Http请求"
)]
[
Description
(
"Http请求"
)]
Http
,
Http
/// <summary>
/// 数据仓储
/// </summary>
[
Description
(
"数据仓储"
)]
Storage
}
}
}
}
VIZ.Package.Storage/CSV/RecordLog/RecordLogTrigger.cs
View file @
c2bb96cf
...
@@ -15,7 +15,7 @@ namespace VIZ.Package.Storage
...
@@ -15,7 +15,7 @@ namespace VIZ.Package.Storage
/// <summary>
/// <summary>
/// 手动操作触发
/// 手动操作触发
/// </summary>
/// </summary>
[
Description
(
"手动"
)]
[
Description
(
"手动
操作
"
)]
Human
,
Human
,
/// <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