Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
3bb39234
Commit
3bb39234
authored
Nov 24, 2021
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:组件功能
parent
a0c2bea4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
340 additions
and
35 deletions
+340
-35
Bailun.DC.Models.csproj
Bailun.DC.Models/Bailun.DC.Models.csproj
+4
-0
ControlDTO.cs
Bailun.DC.Models/Component/DTO/ControlDTO.cs
+10
-0
FormDTO.cs
Bailun.DC.Models/Component/DTO/FormDTO.cs
+87
-0
TableDTO.cs
Bailun.DC.Models/Component/DTO/TableDTO.cs
+35
-15
dc_component_form.cs
Bailun.DC.Models/Component/Entity/dc_component_form.cs
+115
-0
dc_component_table.cs
Bailun.DC.Models/Component/Entity/dc_component_table.cs
+31
-19
QueryEnum.cs
Bailun.DC.Models/Component/Enum/QueryEnum.cs
+1
-1
FormService.cs
Bailun.DC.Services/Component/FormService.cs
+57
-0
TableService.cs
Bailun.DC.Services/Component/TableService.cs
+0
-0
No files found.
Bailun.DC.Models/Bailun.DC.Models.csproj
View file @
3bb39234
...
...
@@ -17,4 +17,8 @@
<Folder Include="OrderExport\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bailun.DC.DB\Bailun.DC.DB.csproj" />
</ItemGroup>
</Project>
Bailun.DC.Models/Component/DTO/ControlDTO.cs
View file @
3bb39234
...
...
@@ -79,6 +79,16 @@ namespace Bailun.DC.Models.Component.DTO
public
dynamic
DefaultValue
{
get
;
set
;
}
/// <summary>
/// element按钮类型
/// </summary>
public
string
ButtonType
{
get
;
set
;
}
/// <summary>
/// element图标
/// </summary>
public
string
Icon
{
get
;
set
;
}
/// <summary>
/// 选项
/// </summary>
public
IEnumerable
<
OptionDTO
>
ListOption
{
get
;
set
;
}
...
...
Bailun.DC.Models/Component/DTO/FormDTO.cs
0 → 100644
View file @
3bb39234
using
System.Collections.Generic
;
namespace
Bailun.DC.Models.Component.DTO
{
public
class
FormDTO
{
/// <summary>
/// 编码
/// </summary>
public
string
Code
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 宽度
/// </summary>
public
int
?
Width
{
get
;
set
;
}
/// <summary>
/// 标签宽度
/// </summary>
public
int
?
LabelWidth
{
get
;
set
;
}
/// <summary>
/// 是否显示边框
/// </summary>
public
bool
?
IsShowBorder
{
get
;
set
;
}
/// <summary>
/// 是否显示保存按钮 (默认:是)
/// </summary>
public
bool
?
IsShowSaveButton
{
get
;
set
;
}
/// <summary>
/// 保存按钮文本 (默认:保存)
/// </summary>
public
string
SaveButtonText
{
get
;
set
;
}
/// <summary>
/// 是否显示取消按钮 (默认:是)
/// </summary>
public
bool
?
IsShowCancelButton
{
get
;
set
;
}
/// <summary>
/// 取消按钮文本 (默认:保存)
/// </summary>
public
string
CancelButtonText
{
get
;
set
;
}
/// <summary>
/// flex布局下的水平排列方式:(默认center)
/// </summary>
public
string
Justify
{
get
;
set
;
}
/// <summary>
/// 提交时验证表单:(默认验证)
/// </summary>
public
bool
?
IsValidate
{
get
;
set
;
}
/// <summary>
/// 保存脚本
/// </summary>
public
string
SaveScript
{
get
;
set
;
}
/// <summary>
/// 自定义脚本
/// </summary>
public
string
javascript
{
get
;
set
;
}
/// <summary>
/// 操作列值
/// </summary>
public
IEnumerable
<
dynamic
>
ListFormItem
{
get
;
set
;
}
/// <summary>
/// 操作列值
/// </summary>
public
IEnumerable
<
dynamic
>
ListControl
{
get
;
set
;
}
/// <summary>
/// Scripts引用
/// </summary>
public
IEnumerable
<
string
>
ListJavascriptSrc
{
get
;
set
;
}
}
}
Bailun.DC.Models/Component/DTO/
Query
DTO.cs
→
Bailun.DC.Models/Component/DTO/
Table
DTO.cs
View file @
3bb39234
...
...
@@ -4,14 +4,24 @@ using System.Collections.Generic;
namespace
Bailun.DC.Models.Component.DTO
{
public
class
Query
DTO
public
class
Table
DTO
{
/// <summary>
/// 通用查询代码
/// ID
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 编码
/// </summary>
public
string
Code
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 菜单代码
/// </summary>
public
string
MenuCode
{
get
;
set
;
}
...
...
@@ -22,29 +32,34 @@ namespace Bailun.DC.Models.Component.DTO
public
string
Javascript
{
get
;
set
;
}
/// <summary>
/// 是否显示查询按钮:
1:显示; 0:不显示
/// 是否显示查询按钮:
(默认是)
/// </summary>
public
bool
IsShowSearchButton
{
get
;
set
;
}
public
bool
?
IsShowSearchButton
{
get
;
set
;
}
/// <summary>
/// 是否显示重置按钮:
1:显示; 0:不显示
/// 是否显示重置按钮:
(默认是)
/// </summary>
public
bool
IsShowResetButton
{
get
;
set
;
}
public
bool
?
IsShowResetButton
{
get
;
set
;
}
/// <summary>
/// 是否显示导出按钮:
1:显示; 0:不显示
/// 是否显示导出按钮:
(默认否)
/// </summary>
public
bool
IsShowExportButton
{
get
;
set
;
}
public
bool
?
IsShowExportButton
{
get
;
set
;
}
/// <summary>
/// 是否显示导入按钮:
1:显示; 0:不显示
/// 是否显示导入按钮:
(默认否)
/// </summary>
public
bool
IsShowImportButton
{
get
;
set
;
}
public
bool
?
IsShowImportButton
{
get
;
set
;
}
/// <summary>
/// 是否显示顺序列:
1:显示; 0:不显示
/// 是否显示顺序列:
(默认否)
/// </summary>
public
bool
IsShowSequenceColumn
{
get
;
set
;
}
public
bool
?
IsShowSequenceColumn
{
get
;
set
;
}
/// <summary>
/// 操作控件位置:NULL/1:换行,2:同行
/// </summary>
public
int
?
OperateControlsPosition
{
get
;
set
;
}
/// <summary>
/// 选择行方式:1: 单选, 2: 多选
...
...
@@ -63,6 +78,11 @@ namespace Bailun.DC.Models.Component.DTO
public
string
ColumnValue
{
get
;
set
;
}
/// <summary>
/// 是否显示列查询:(默认否)
/// </summary>
public
bool
?
IsShowColumnSearch
{
get
;
set
;
}
/// <summary>
/// 操作列名
/// </summary>
public
string
OperateColumnName
{
get
;
set
;
}
...
...
@@ -93,12 +113,12 @@ namespace Bailun.DC.Models.Component.DTO
/// 数据默认排序SQL
/// </summary>
[
JsonIgnore
]
public
string
DataSortSql
{
get
;
set
;
}
public
string
DataSortSql
{
get
;
set
;
}
/// <summary>
/// 是否自动查询:
1:是; 0:否
/// 是否自动查询:
(默认是)
/// </summary>
public
bool
IsAutoSearch
{
get
;
set
;
}
public
bool
?
IsAutoSearch
{
get
;
set
;
}
/// <summary>
/// 面包屑
...
...
Bailun.DC.Models/Component/Entity/dc_component_form.cs
0 → 100644
View file @
3bb39234
using
System
;
namespace
Bailun.DC.Models.Component.Entity
{
/// <summary>
/// 表单组件
/// </summary>
public
class
dc_component_form
{
/// <summary>
/// ID
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 编码
/// </summary>
public
string
code
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 宽度
/// </summary>
public
int
?
width
{
get
;
set
;
}
/// <summary>
/// 标签宽度
/// </summary>
public
int
?
label_width
{
get
;
set
;
}
/// <summary>
/// 是否显示边框
/// </summary>
public
bool
?
is_show_border
{
get
;
set
;
}
/// <summary>
/// 是否显示保存按钮 (默认:是)
/// </summary>
public
bool
?
is_show_save_button
{
get
;
set
;
}
/// <summary>
/// 保存按钮文本 (默认:保存)
/// </summary>
public
string
save_button_text
{
get
;
set
;
}
/// <summary>
/// 是否显示取消按钮 (默认:是)
/// </summary>
public
bool
?
is_show_cancel_button
{
get
;
set
;
}
/// <summary>
/// 取消按钮文本 (默认:保存)
/// </summary>
public
string
cancel_button_text
{
get
;
set
;
}
/// <summary>
/// flex布局下的水平排列方式:(默认center)
/// </summary>
public
string
justify
{
get
;
set
;
}
/// <summary>
/// 表单项
/// </summary>
public
string
form_item
{
get
;
set
;
}
/// <summary>
/// 提交时验证表单:(默认验证)
/// </summary>
public
bool
?
is_validate
{
get
;
set
;
}
/// <summary>
/// 保存脚本
/// </summary>
public
string
save_script
{
get
;
set
;
}
/// <summary>
/// 自定义脚本
/// </summary>
public
string
javascript
{
get
;
set
;
}
/// <summary>
/// 引用脚本
/// </summary>
public
string
javascript_src
{
get
;
set
;
}
/// <summary>
/// 自定义控件
/// </summary>
public
string
controls
{
get
;
set
;
}
/// <summary>
/// 是否可以拉伸:(默认不可以)
/// </summary>
public
bool
?
is_drag
{
get
;
set
;
}
/// <summary>
/// 是否删除: 1:是; 0:否
/// </summary>
public
bool
is_delete
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
gmt_create
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
gmt_modified
{
get
;
set
;
}
}
}
Bailun.DC.Models/Component/Entity/dc_component_
query
.cs
→
Bailun.DC.Models/Component/Entity/dc_component_
table
.cs
View file @
3bb39234
using
Bailun.DC.Models.Component.Enum
;
using
Dapper
;
using
System
;
namespace
Bailun.DC.Models.Component.Entity
{
/// <summary>
///
查询
组件
///
报表
组件
/// </summary>
public
class
dc_component_
query
public
class
dc_component_
table
{
/// <summary>
/// ID
...
...
@@ -14,14 +15,14 @@ namespace Bailun.DC.Models.Component.Entity
public
int
id
{
get
;
set
;
}
/// <summary>
///
名称
///
编码
/// </summary>
public
string
nam
e
{
get
;
set
;
}
public
string
cod
e
{
get
;
set
;
}
/// <summary>
///
通用查询代码
///
名称
/// </summary>
public
string
cod
e
{
get
;
set
;
}
public
string
nam
e
{
get
;
set
;
}
/// <summary>
/// 菜单代码
...
...
@@ -49,24 +50,24 @@ namespace Bailun.DC.Models.Component.Entity
public
string
filter_controls
{
get
;
set
;
}
/// <summary>
/// 是否显示查询按钮:
1:显示; 0:不显示
/// 是否显示查询按钮:
(默认是)
/// </summary>
public
bool
is_show_search_button
{
get
;
set
;
}
public
bool
?
is_show_search_button
{
get
;
set
;
}
/// <summary>
/// 是否显示重置按钮:
1:显示; 0:不显示
/// 是否显示重置按钮:
(默认是)
/// </summary>
public
bool
is_show_reset_button
{
get
;
set
;
}
public
bool
?
is_show_reset_button
{
get
;
set
;
}
/// <summary>
/// 是否显示导出按钮:
1:显示; 0:不显示
/// 是否显示导出按钮:
(默认否)
/// </summary>
public
bool
is_show_export_button
{
get
;
set
;
}
public
bool
?
is_show_export_button
{
get
;
set
;
}
/// <summary>
/// 是否显示导入按钮:
1:显示; 0:不显示
/// 是否显示导入按钮:
(默认否)
/// </summary>
public
bool
is_show_import_button
{
get
;
set
;
}
public
bool
?
is_show_import_button
{
get
;
set
;
}
/// <summary>
/// 操作控件
...
...
@@ -74,9 +75,14 @@ namespace Bailun.DC.Models.Component.Entity
public
string
operate_controls
{
get
;
set
;
}
/// <summary>
///
是否显示顺序列: 1:显示; 0:不显示
///
操作控件位置:NULL/1:换行,2:同行
/// </summary>
public
bool
is_show_sequence_column
{
get
;
set
;
}
public
int
?
operate_controls_position
{
get
;
set
;
}
/// <summary>
/// 是否显示顺序列:(默认否)
/// </summary>
public
bool
?
is_show_sequence_column
{
get
;
set
;
}
/// <summary>
/// 选择行方式:1: 单选, 2: 多选
...
...
@@ -94,6 +100,11 @@ namespace Bailun.DC.Models.Component.Entity
public
string
column_value
{
get
;
set
;
}
/// <summary>
/// 是否显示列查询:(默认否)
/// </summary>
public
bool
?
is_show_column_search
{
get
;
set
;
}
/// <summary>
/// 操作列名
/// </summary>
public
string
operate_column_name
{
get
;
set
;
}
...
...
@@ -129,18 +140,19 @@ namespace Bailun.DC.Models.Component.Entity
public
DBEnum
?
data_db
{
get
;
set
;
}
/// <summary>
/// 是否自动查询:
1:是; 0:否
/// 是否自动查询:
(默认是)
/// </summary>
public
bool
is_auto_search
{
get
;
set
;
}
public
bool
?
is_auto_search
{
get
;
set
;
}
/// <summary>
/// 是否删除
: 1:是; 0:否
/// 是否删除
/// </summary>
public
bool
is_delete
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
[
IgnoreUpdate
]
public
DateTime
gmt_create
{
get
;
set
;
}
/// <summary>
...
...
Bailun.DC.Models/Component/Enum/QueryEnum.cs
View file @
3bb39234
...
...
@@ -3,7 +3,7 @@
namespace
Bailun.DC.Models.Component.Enum
{
/// <summary>
/// 列名类型:1:
API,2:SQL,3:本地配置
/// 列名类型:1:
SQL(首次),2:SQL,3:配置,3:API
/// </summary>
public
enum
ColumnTypeEnum
{
...
...
Bailun.DC.Services/Component/FormService.cs
0 → 100644
View file @
3bb39234
using
Bailun.DC.Models.Component.DTO
;
using
Bailun.DC.Models.Component.Entity
;
using
Dapper
;
namespace
Bailun.DC.Services.Component
{
/// <summary>
/// 表单组件
/// </summary>
public
class
FormService
:
BaseService
{
/// <summary>
/// 获取表单组件
/// </summary>
/// <param name="code">编码</param>
/// <returns></returns>
public
FormDTO
Get
(
string
code
)
{
FormDTO
dto
=
default
(
FormDTO
);
if
(!
string
.
IsNullOrWhiteSpace
(
code
))
{
dc_component_form
entity
=
default
(
dc_component_form
);
using
(
var
db
=
DB
)
{
DynamicParameters
sqlparam
=
new
DynamicParameters
();
sqlparam
.
Add
(
"code"
,
code
);
entity
=
db
.
QueryFirstOrDefault
<
dc_component_form
>(
"select * from dc_component_form where is_delete = 0 and code = @code"
,
sqlparam
);
}
if
(
entity
!=
null
)
{
dto
=
new
FormDTO
{
Code
=
entity
.
code
,
Name
=
entity
.
name
,
Width
=
entity
.
width
,
LabelWidth
=
entity
.
label_width
,
IsShowBorder
=
entity
.
is_show_border
,
IsShowSaveButton
=
entity
.
is_show_save_button
,
SaveButtonText
=
entity
.
save_button_text
,
IsShowCancelButton
=
entity
.
is_show_cancel_button
,
CancelButtonText
=
entity
.
cancel_button_text
,
Justify
=
entity
.
justify
,
IsValidate
=
entity
.
is_validate
,
SaveScript
=
entity
.
save_script
,
javascript
=
entity
.
javascript
,
ListFormItem
=
!
string
.
IsNullOrWhiteSpace
(
entity
.
form_item
)
?
DeserializeCollection
<
dynamic
>(
entity
.
form_item
)
:
null
,
ListControl
=
!
string
.
IsNullOrWhiteSpace
(
entity
.
controls
)
?
DeserializeCollection
<
dynamic
>(
entity
.
controls
)
:
null
,
ListJavascriptSrc
=
!
string
.
IsNullOrWhiteSpace
(
entity
.
javascript_src
)
?
DeserializeCollection
<
string
>(
entity
.
javascript_src
)
:
null
,
};
}
}
return
dto
;
}
}
}
Bailun.DC.Services/Component/
Query
Service.cs
→
Bailun.DC.Services/Component/
Table
Service.cs
View file @
3bb39234
This diff is collapsed.
Click to expand it.
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