Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
witiumCloud2
Project
Project
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
WitCloud
witiumCloud2
Commits
026761a8
Commit
026761a8
authored
Apr 18, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
1f638138
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
3 deletions
+66
-3
gateway.component.html
src/app/main/gateway/gateway.component.html
+2
-2
sensor-detail.component.html
src/app/main/sensor-detail/sensor-detail.component.html
+43
-1
sensor-detail.component.ts
src/app/main/sensor-detail/sensor-detail.component.ts
+14
-0
api.ts
src/app/service/api.ts
+7
-0
No files found.
src/app/main/gateway/gateway.component.html
View file @
026761a8
...
...
@@ -146,7 +146,7 @@
</nz-autocomplete>
</div>
</div>
<app-search-item
*
ngIf=
"!isUpdate"
isMust=
"true"
inModal=
"true"
[
label
]="'
belongAddress
'
|
translate
"
[(
value
)]="
req3
.
address
"
></app-search-item>
<app-search-item
isMust=
"true"
inModal=
"true"
[
label
]="'
belongAddress
'
|
translate
"
[(
value
)]="
req3
.
address
"
></app-search-item>
</ng-template>
<ng-template
#
foot3
>
<button
nz-button
nzType=
"default"
[
nzLoading
]="
isLoading
"
(
click
)="
cancel
('
isBindConV
')"
>
...
...
@@ -162,7 +162,7 @@
<app-search-select
isMust=
"true"
[(
value
)]="
req4
.
companyNo
"
[
label
]="'
selectCompany
'
|
translate
"
optL=
"companyName"
(
valueChange
)="
companySelected
($
event
)"
[
data
]="
companys
"
inModal=
"true"
optV=
"companyNo"
></app-search-select>
</ng-template>
</ng-template>
<ng-template
#
foot4
>
<button
nz-button
nzType=
"default"
[
nzLoading
]="
isLoading
"
(
click
)="
cancel
('
isDivideConV
')"
>
<span>
{{'cancel' | translate}}
</span></button>
...
...
src/app/main/sensor-detail/sensor-detail.component.html
View file @
026761a8
...
...
@@ -96,7 +96,49 @@
<nz-tab
nzTitle=
"运行状态"
>
<nz-tabset
style=
"margin-top: -20px;"
>
<nz-tab
nzTitle=
"表格"
>
<nz-table
#
nzTable5
[
nzData
]="
actualData
"
[
nzSize
]="'
middle
'"
nzShowSizeChanger
[
nzShowPagination
]="
true
"
[
nzLoading
]="
isLoading
"
>
<thead
nz-thead
>
<tr>
<th
nz-th
><span>
{{'wayName' | translate}}
</span></th>
<th
nz-th
><span>
{{'wayAlias' | translate}}
</span></th>
<th
nz-th
><span>
{{'per' | translate}}
</span></th>
<th
nz-th
><span>
{{'wayType' | translate}}
</span></th>
<th
nz-th
><span>
{{'max' | translate}}
</span></th>
<th
nz-th
><span>
{{'min' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMax' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMaxMax' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMin' | translate}}
</span></th>
<th
nz-th
><span>
{{'alarmMinMin' | translate}}
</span></th>
<th
nz-th
><span>
{{'isAlarm' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
</tr>
</thead>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable5.data, let i = index"
>
<td
nz-td
>
{{one.name}}
</td>
<td
nz-td
>
{{one.alias}}
</td>
<td
nz-td
>
{{one.unit}}
</td>
<td
nz-td
>
{{one.type}}
</td>
<td
nz-td
>
{{one.rangeMax}}
</td>
<td
nz-td
>
{{one.rangeMin}}
</td>
<td
nz-td
>
{{one.alarmUp}}
</td>
<td
nz-td
>
{{one.upperAlarmLimit}}
</td>
<td
nz-td
>
{{one.alarmDown}}
</td>
<td
nz-td
>
{{one.lowerAlarmLimit}}
</td>
<td
nz-td
>
{{one.isAlarm === 1 ? '是': '否'}}
</td>
<td
nz-td
>
<span
class=
"editSpan"
(
click
)="
update2
(
one
)"
>
{{'update' | translate}}
</span>
<nz-divider
nzType=
"vertical"
></nz-divider>
<span
class=
"deleteFontColor"
(
click
)="
deleteConfirm2
(
one
)"
>
{{'delete' | translate}}
</span>
</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"图表"
>
<div
class=
"cards"
>
...
...
src/app/main/sensor-detail/sensor-detail.component.ts
View file @
026761a8
...
...
@@ -28,6 +28,7 @@ export class SensorDetailComponent implements OnInit {
isUpdate2
=
false
;
probsModels
=
[];
topicModels
=
[];
actualData
=
[];
wayData
=
[];
selectTime3
=
24
;
items
=
[{
...
...
@@ -68,6 +69,7 @@ export class SensorDetailComponent implements OnInit {
this
.
getProbsModels
();
this
.
getTopicModels
();
this
.
getProbs
();
this
.
getCurrent
();
}
});
}
...
...
@@ -133,6 +135,18 @@ export class SensorDetailComponent implements OnInit {
}]);
}
getCurrent
()
{
this
.
isLoading
=
true
;
this
.
api
.
data
.
getRealData
([{
deviceNo
:
this
.
deviceNo
},
(
data
)
=>
{
if
(
data
&&
data
.
constructor
===
Array
)
{
this
.
actualData
=
data
;
}
else
{
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
}
this
.
isLoading
=
false
;
}]);
}
toDetail
(
one
)
{
this
.
router
.
navigate
([
'/app/deviceCenter/sensorMgr/sensorDetail/sensorTopicWay'
],
{
queryParams
:
{
deviceNo
:
one
.
deviceNo
,
topicName
:
one
.
topicName
}});
...
...
src/app/service/api.ts
View file @
026761a8
...
...
@@ -149,6 +149,13 @@ export class ApiService {
updateProbes
:
(
data
)
=>
this
.
trans
(
'post'
,
'/device/probes/updateProbes'
,
data
),
};
public
data
=
{
getHisData
:
(
data
)
=>
this
.
trans
(
'post'
,
'/data/getHisData'
,
data
),
getRealData
:
(
data
)
=>
this
.
trans
(
'post'
,
'/data/getRealData'
,
data
),
getStatus
:
(
data
)
=>
this
.
trans
(
'post'
,
'/data/getStatus'
,
data
),
updateRemoteControl
:
(
data
)
=>
this
.
trans
(
'post'
,
'/data/updateRemoteControl'
,
data
),
};
private
trans
(
type
,
addr
,
data
)
{
this
.
sendHttpReq
(
type
,
addr
,
data
[
0
],
data
[
1
],
data
[
2
],
data
[
3
]);
}
...
...
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