Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP
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.TVP
Commits
a18315dd
Commit
a18315dd
authored
Dec 27, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加动态列表列头描述
parent
82209b91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
VIZ.TVP.Module/Control/ControlList/Controller/ControlObject/ControlObjectController.cs
+1
-1
VIZ.TVP.Service/VIZ/Implementation/VizCommandControlObjectService.cs
+12
-2
VIZ.TVP.Service/VIZ/Interface/IVizCommandControlObjectService.cs
+3
-2
VIZ.TVP.UnitTest/ControlObjectTest.cs
+1
-1
No files found.
VIZ.TVP.Module/Control/ControlList/Controller/ControlObject/ControlObjectController.cs
View file @
a18315dd
...
@@ -124,7 +124,7 @@ namespace VIZ.TVP.Module
...
@@ -124,7 +124,7 @@ namespace VIZ.TVP.Module
this
.
CancelListValuePropertyChanged
();
this
.
CancelListValuePropertyChanged
();
List
<
GridColumnDefinition
>
columns
;
List
<
GridColumnDefinition
>
columns
;
List
<
ExpandoObject
>
items
;
List
<
ExpandoObject
>
items
;
vizCommandControlObjectService
.
GetControlObjectXmlData
(
field
.
Value
,
out
columns
,
out
items
);
vizCommandControlObjectService
.
GetControlObjectXmlData
(
field
.
Value
,
field
.
FieldSchema
.
Schema
,
out
columns
,
out
items
);
field
.
ListValueColumns
=
columns
;
field
.
ListValueColumns
=
columns
;
field
.
ListValue
=
items
;
field
.
ListValue
=
items
;
}
}
...
...
VIZ.TVP.Service/VIZ/Implementation/VizCommandControlObjectService.cs
View file @
a18315dd
...
@@ -20,10 +20,11 @@ namespace VIZ.TVP.Service
...
@@ -20,10 +20,11 @@ namespace VIZ.TVP.Service
/// 获取控制对象XML数据
/// 获取控制对象XML数据
/// </summary>
/// </summary>
/// <param name="xml">xml内容</param>
/// <param name="xml">xml内容</param>
/// <param name="schema">定义信息</param>
/// <param name="columns">列信息</param>
/// <param name="columns">列信息</param>
/// <param name="items">数据源</param>
/// <param name="items">数据源</param>
/// <returns></returns>
/// <returns></returns>
public
void
GetControlObjectXmlData
(
string
xml
,
out
List
<
GridColumnDefinition
>
columns
,
out
List
<
ExpandoObject
>
items
)
public
void
GetControlObjectXmlData
(
string
xml
,
ControlObject_Schema_Node
schema
,
out
List
<
GridColumnDefinition
>
columns
,
out
List
<
ExpandoObject
>
items
)
{
{
columns
=
new
List
<
GridColumnDefinition
>();
columns
=
new
List
<
GridColumnDefinition
>();
items
=
new
List
<
ExpandoObject
>();
items
=
new
List
<
ExpandoObject
>();
...
@@ -50,9 +51,18 @@ namespace VIZ.TVP.Service
...
@@ -50,9 +51,18 @@ namespace VIZ.TVP.Service
if
(!
isCreatedColumns
)
if
(!
isCreatedColumns
)
{
{
ControlObject_Field_node
node
=
schema
.
Fields
.
FirstOrDefault
(
p
=>
p
.
Name
==
cell
.
Name
);
GridColumnDefinition
column
=
new
GridColumnDefinition
();
GridColumnDefinition
column
=
new
GridColumnDefinition
();
column
.
FieldName
=
cell
.
Name
;
column
.
FieldName
=
cell
.
Name
;
column
.
Header
=
cell
.
Name
;
if
(
cell
.
Name
==
node
?.
Description
)
{
column
.
Header
=
cell
.
Name
;
}
else
{
column
.
Header
=
$"(
{
node
?.
Description
}
)
{
cell
.
Name
}
"
;
}
columns
.
Add
(
column
);
columns
.
Add
(
column
);
}
}
...
...
VIZ.TVP.Service/VIZ/Interface/IVizCommandControlObjectService.cs
View file @
a18315dd
...
@@ -17,11 +17,12 @@ namespace VIZ.TVP.Service
...
@@ -17,11 +17,12 @@ namespace VIZ.TVP.Service
/// <summary>
/// <summary>
/// 获取控制对象XML数据
/// 获取控制对象XML数据
/// </summary>
/// </summary>
/// <param name="xml">xml内容</param>
/// <param name="xml">xml内容</param>
/// <param name="schema">定义信息</param>
/// <param name="columns">列信息</param>
/// <param name="columns">列信息</param>
/// <param name="items">数据源</param>
/// <param name="items">数据源</param>
/// <returns></returns>
/// <returns></returns>
void
GetControlObjectXmlData
(
string
xml
,
out
List
<
GridColumnDefinition
>
columns
,
out
List
<
ExpandoObject
>
items
);
void
GetControlObjectXmlData
(
string
xml
,
ControlObject_Schema_Node
schema
,
out
List
<
GridColumnDefinition
>
columns
,
out
List
<
ExpandoObject
>
items
);
/// <summary>
/// <summary>
/// 获取控制对象XML数据
/// 获取控制对象XML数据
...
...
VIZ.TVP.UnitTest/ControlObjectTest.cs
View file @
a18315dd
...
@@ -22,7 +22,7 @@ namespace VIZ.TVP.UnitTest
...
@@ -22,7 +22,7 @@ namespace VIZ.TVP.UnitTest
{
{
string
xml
=
sr
.
ReadToEnd
();
string
xml
=
sr
.
ReadToEnd
();
service
.
GetControlObjectXmlData
(
xml
,
out
var
columns
,
out
var
items
);
service
.
GetControlObjectXmlData
(
xml
,
null
,
out
var
columns
,
out
var
items
);
string
output
=
service
.
GetControlObjectXml
(
items
);
string
output
=
service
.
GetControlObjectXml
(
items
);
}
}
...
...
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