Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
数
数据大屏终端
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
终端组
数据大屏终端
Commits
f233d67d
Commit
f233d67d
authored
May 15, 2020
by
姜春辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改宿舍信息数据结构,呈现方式
parent
13cc06cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
203 additions
and
56 deletions
+203
-56
DashBoard.ServiceModel.dll
...nal.DashBoard.Logic/DashBoards/DashBoard.ServiceModel.dll
+0
-0
SchoolSituation.dll
...S.Terminal.DashBoard.Logic/DashBoards/SchoolSituation.dll
+0
-0
GS.Terminal.DashBoard.exe
Publish/GS.Terminal.DashBoard.exe
+0
-0
School_SuSheState.cs
Src/DashBoard.ServiceModel/School_SuSheState.cs
+9
-1
DormInfo.xaml
Src/SchoolSituation/DormInfo/DormInfo.xaml
+141
-5
DormInfoViewModel.cs
Src/SchoolSituation/DormInfo/DormInfoViewModel.cs
+15
-50
SuSheStateModel.cs
Src/SchoolSituation/Models/SuSheStateModel.cs
+38
-0
No files found.
Publish/Addons/GS.Terminal.DashBoard.Logic/DashBoards/DashBoard.ServiceModel.dll
View file @
f233d67d
No preview for this file type
Publish/Addons/GS.Terminal.DashBoard.Logic/DashBoards/SchoolSituation.dll
View file @
f233d67d
No preview for this file type
Publish/GS.Terminal.DashBoard.exe
View file @
f233d67d
No preview for this file type
Src/DashBoard.ServiceModel/School_SuSheState.cs
View file @
f233d67d
...
...
@@ -5,7 +5,15 @@ using System.Text;
namespace
DashBoard.ServiceModel
{
//宿舍状态测试地址:http://192.168.1.2:8019/Visualization/SuSheState.ashx?Bui=a
public
class
School_SuSheBuild
{
public
int
BuiId
{
get
;
set
;
}
public
string
BuiName
{
get
;
set
;
}
public
List
<
School_SuSheState
>
Floors
{
get
;
set
;
}
}
//传参说明:?Bui=a a男生宿舍楼b女生宿舍楼y游泳馆
public
class
School_SuSheState
{
...
...
Src/SchoolSituation/DormInfo/DormInfo.xaml
View file @
f233d67d
This diff is collapsed.
Click to expand it.
Src/SchoolSituation/DormInfo/DormInfoViewModel.cs
View file @
f233d67d
...
...
@@ -7,30 +7,21 @@ using System.Collections.ObjectModel;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Controls
;
namespace
SchoolSituation
{
public
partial
class
DormInfoViewModel
:
PageViewModel
{
private
ObservableCollection
<
ViewSuSheState
>
_Dorma
;
public
ObservableCollection
<
ViewSuSheState
>
Dorma
{
get
{
return
_Dorma
;
}
set
{
_Dorma
=
value
;
RaisePropertyChanged
(
"Dorma"
);
}
}
private
ObservableCollection
<
ViewSuSheState
>
_Dormb
;
public
ObservableCollection
<
ViewSuSheState
>
Dormb
{
get
{
return
_Dormb
;
}
set
{
_Dormb
=
value
;
RaisePropertyChanged
(
"Dormb"
);
}
}
private
ObservableCollection
<
ViewSuSheState
>
_Dormy
;
public
ObservableCollection
<
ViewSuSheState
>
Dormy
private
ObservableCollection
<
ViewSuSheBuild
>
_DormList
;
public
ObservableCollection
<
ViewSuSheBuild
>
DormList
{
get
{
return
_Dorm
y
;
}
set
{
_Dorm
y
=
value
;
RaisePropertyChanged
(
"Dormy
"
);
}
get
{
return
_Dorm
List
??
(
_DormList
=
new
ObservableCollection
<
ViewSuSheBuild
>())
;
}
set
{
_Dorm
List
=
value
;
RaisePropertyChanged
(
"DormList
"
);
}
}
public
override
void
Enter
()
{
throw
new
NotImplementedException
();
...
...
@@ -48,49 +39,23 @@ namespace SchoolSituation
if
(
isfirst
)
{
isfirst
=
false
;
var
localresulta
=
Tools
.
ReadCache
(
$"SuShetStatea.json"
);
var
locala
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
localresulta
);
var
localresultb
=
Tools
.
ReadCache
(
$"SuShetStateb.json"
);
var
localb
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
localresultb
);
var
localresulty
=
Tools
.
ReadCache
(
$"SuShetStatey.json"
);
var
localy
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
localresulty
);
if
(
locala
!=
null
||
locala
!=
null
||
locala
!=
null
)
var
localresult
=
Tools
.
ReadCache
(
$"SuSheBuild.json"
);
var
local
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheBuild
>>(
localresult
);
if
(
local
!=
null
)
{
Dorma
=
new
ObservableCollection
<
ViewSuSheState
>(
locala
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
Dormb
=
new
ObservableCollection
<
ViewSuSheState
>(
localb
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
Dormy
=
new
ObservableCollection
<
ViewSuSheState
>(
localy
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
DormList
=
new
ObservableCollection
<
ViewSuSheBuild
>(
local
.
Select
(
r
=>
(
ViewSuSheBuild
)
r
).
ToList
());
}
}
//读取本地数据加载界面
if
(
string
.
IsNullOrEmpty
(
Source
))
return
false
;
var
updateResult
=
false
;
var
getUrla
=
new
Uri
(
Source
+
"?Bui=a"
);
var
getUrlb
=
new
Uri
(
Source
+
"?Bui=b"
);
var
getUrly
=
new
Uri
(
Source
+
"?Bui=y"
);
var
resulta
=
Tools
.
Get
(
getUrla
,
out
string
backDataa
);
var
resulta
=
Tools
.
Get
(
new
Uri
(
Source
),
out
string
backDataa
);
if
(
resulta
)
{
var
writeCacheResulta
=
Tools
.
WriteCache
(
$"SuShetStatea.json"
,
backDataa
);
var
entiya
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
backDataa
);
Dorma
=
new
ObservableCollection
<
ViewSuSheState
>(
entiya
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
updateResult
=
true
;
}
var
resultb
=
Tools
.
Get
(
getUrlb
,
out
string
backDatab
);
if
(
resultb
)
{
var
writeCacheResultb
=
Tools
.
WriteCache
(
$"SuShetStateb.json"
,
backDatab
);
var
entiyb
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
backDatab
);
Dormb
=
new
ObservableCollection
<
ViewSuSheState
>(
entiyb
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
updateResult
=
true
;
}
var
resulty
=
Tools
.
Get
(
getUrly
,
out
string
backDatay
);
if
(
resulty
)
{
var
writeCacheResulty
=
Tools
.
WriteCache
(
$"SuShetStatey.json"
,
backDatay
);
var
entiyy
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheState
>>(
backDatay
);
Dormy
=
new
ObservableCollection
<
ViewSuSheState
>(
entiyy
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
var
writeCacheResulta
=
Tools
.
WriteCache
(
$"SuSheBuild.json"
,
backDataa
);
var
entiya
=
JsonConvert
.
DeserializeObject
<
List
<
DashBoard
.
ServiceModel
.
School_SuSheBuild
>>(
backDataa
);
DormList
=
new
ObservableCollection
<
ViewSuSheBuild
>(
entiya
.
Select
(
r
=>
(
ViewSuSheBuild
)
r
).
ToList
());
updateResult
=
true
;
}
return
updateResult
;
...
...
Src/SchoolSituation/Models/SuSheStateModel.cs
View file @
f233d67d
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
...
...
@@ -7,6 +8,43 @@ using GalaSoft.MvvmLight;
namespace
SchoolSituation
{
public
class
ViewSuSheBuild
:
ObservableObject
{
private
int
_Id
;
public
int
Id
{
get
{
return
_Id
;
}
set
{
_Id
=
value
;
RaisePropertyChanged
(
"Id"
);
}
}
private
string
_Name
;
public
string
Name
{
get
{
return
_Name
;
}
set
{
_Name
=
value
;
RaisePropertyChanged
(
"Name"
);
}
}
private
ObservableCollection
<
ViewSuSheState
>
_Floors
;
public
ObservableCollection
<
ViewSuSheState
>
Floors
{
get
{
return
_Floors
;
}
set
{
_Floors
=
value
;
RaisePropertyChanged
(
"Floors"
);
}
}
public
static
explicit
operator
ViewSuSheBuild
(
DashBoard
.
ServiceModel
.
School_SuSheBuild
data
)
{
var
entity
=
new
ViewSuSheBuild
();
entity
.
Id
=
data
.
BuiId
;
entity
.
Name
=
data
.
BuiName
;
entity
.
Floors
=
new
ObservableCollection
<
ViewSuSheState
>(
data
.
Floors
.
Select
(
r
=>
(
ViewSuSheState
)
r
).
ToList
());
return
entity
;
}
}
public
class
ViewSuSheState
:
ObservableObject
{
...
...
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