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
5d338897
Commit
5d338897
authored
May 14, 2019
by
aymen.du
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
eb463d5e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
2 deletions
+97
-2
sensor-detail.component.html
src/app/main/sensor-detail/sensor-detail.component.html
+46
-0
sensor-detail.component.ts
src/app/main/sensor-detail/sensor-detail.component.ts
+49
-2
zh.json
src/assets/i18n/zh.json
+2
-0
No files found.
src/app/main/sensor-detail/sensor-detail.component.html
View file @
5d338897
...
@@ -329,3 +329,49 @@
...
@@ -329,3 +329,49 @@
<button
nz-button
nzType=
"primary"
class=
"searchBtn"
[
nzLoading
]="
isLoading
"
(
click
)="
save
('
req4
')"
><span>
{{'confirm' | translate}}
</span></button>
<button
nz-button
nzType=
"primary"
class=
"searchBtn"
[
nzLoading
]="
isLoading
"
(
click
)="
save
('
req4
')"
><span>
{{'confirm' | translate}}
</span></button>
</ng-template>
</ng-template>
</nz-modal>
</nz-modal>
<nz-modal
[(
nzVisible
)]="
isToSee
"
[
nzContent
]="
con4
"
nzWidth=
"500"
[
nzTitle
]="'
isToSeeModel
'
|
translate
"
[
nzFooter
]="
foot4
"
(
nzOnCancel
)="
cancel
()"
nzMaskClosable=
"false"
>
<ng-template
#
con4
>
<!--<app-search-item inModal="true" isMust="true" [label]="'moduleName' | translate" [(value)]="req4.newTopicModelName"></app-search-item>-->
<!--<app-search-select isMust="true" inModal="true" [(value)]="req2.companyNo" [label]="'selectCompany' | translate" optL="companyName"-->
<!--[data]="companys" optV="companyNo"></app-search-select>-->
<div
style=
"width: calc(100% - 80px);display: inline-block;vertical-align: top;padding-left: 15px;"
>
<app-search-select
inModal=
"true"
[
label
]="'
selectTime
'
|
translate
"
[(
value
)]="
selectTime3
"
optL=
"a"
optV=
"b"
[
data
]="[{
a:
'
1
小时',
b:
1
},
{
a:
'
24
小时',
b:
24
},
{
a:
'
7
天',
b:
144
},
{
a:
'自定义',
b:
0
}]"
></app-search-select>
<app-search-date
*
ngIf=
"selectTime3 === 0"
inModal=
"true"
[
label
]="'
startTime
'
|
translate
"
[(
value
)]="
req3
.
startTime
"
showTime=
"true"
></app-search-date>
<app-search-date
*
ngIf=
"selectTime3 === 0"
inModal=
"true"
[
label
]="'
endTime
'
|
translate
"
[(
value
)]="
req3
.
endTime
"
showTime=
"true"
></app-search-date>
</div>
<button
nz-button
class=
"searchBtn"
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
onSearchToSee
()"
>
<span>
{{'search' | translate}}
</span></button>
<nz-tabset
style=
"border-top: 1px solid #cccccc"
>
<nz-tab
nzTitle=
"表格"
>
<nz-table
#
nzTable6
[
nzData
]="
toSeeData
"
[
nzSize
]="'
middle
'"
nzShowSizeChanger
[
nzShowPagination
]="
true
"
[
nzLoading
]="
isLoading
"
>
<thead
nz-thead
>
<tr>
<th
nz-th
><span>
{{'Time' | translate}}
</span></th>
<th
nz-th
><span>
{{'Numerical' | translate}}
</span></th>
</tr>
</thead>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable6.data, let i = index"
>
<td
nz-td
>
{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</td>
<td
nz-td
>
{{(one.type === 'DI' || one.type === 'DO') ? (one.value ? 1 : 0) : one.value}}
</td>
</tr>
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"图表"
><div
class=
"chartCon"
echarts
[
options
]="
option1
"
></div></nz-tab>
</nz-tabset>
</ng-template>
<ng-template
#
foot4
>
<button
nz-button
class=
"searchBtn"
nzType=
"default"
[
nzLoading
]="
isLoading
"
(
click
)="
cancel
()"
><span>
{{'cancel' | translate}}
</span></button>
</ng-template>
</nz-modal>
src/app/main/sensor-detail/sensor-detail.component.ts
View file @
5d338897
...
@@ -20,18 +20,22 @@ export class SensorDetailComponent implements OnInit {
...
@@ -20,18 +20,22 @@ export class SensorDetailComponent implements OnInit {
name
=
''
;
name
=
''
;
req
:
any
=
{};
req
:
any
=
{};
req2
:
any
=
{};
req2
:
any
=
{};
req3
=
{};
req3
:
any
=
{};
req4
=
{};
req4
=
{};
req5
:
any
=
{};
req5
:
any
=
{};
isUC
=
false
;
isUC
=
false
;
isUC2
=
false
;
isUC2
=
false
;
isMC
=
false
;
isMC
=
false
;
isToSee
=
false
;
ToSeeList
:
any
;
isUpdate
=
false
;
isUpdate
=
false
;
probsModels
=
[];
probsModels
=
[];
topicModels
=
[];
topicModels
=
[];
actualData
=
[];
actualData
=
[];
toSeeData
=
[];
wayData
=
[];
wayData
=
[];
selectTime3
=
24
;
selectTime3
=
24
;
option1
:
any
=
{};
isClose
=
false
;
isClose
=
false
;
isSaveOther
=
false
;
isSaveOther
=
false
;
companyNo
=
''
;
companyNo
=
''
;
...
@@ -192,6 +196,7 @@ export class SensorDetailComponent implements OnInit {
...
@@ -192,6 +196,7 @@ export class SensorDetailComponent implements OnInit {
this
.
isUC
=
false
;
this
.
isUC
=
false
;
this
.
isMC
=
false
;
this
.
isMC
=
false
;
this
.
isUC2
=
false
;
this
.
isUC2
=
false
;
this
.
isToSee
=
false
;
this
.
isSaveOther
=
false
;
this
.
isSaveOther
=
false
;
}
}
...
@@ -262,7 +267,49 @@ export class SensorDetailComponent implements OnInit {
...
@@ -262,7 +267,49 @@ export class SensorDetailComponent implements OnInit {
this
.
api
.
probes
.
delAProbes
([{
deviceNo
:
one
.
deviceNo
,
topicName
:
one
.
topicName
,
name
:
one
.
name
},
this
.
next
]);
this
.
api
.
probes
.
delAProbes
([{
deviceNo
:
one
.
deviceNo
,
topicName
:
one
.
topicName
,
name
:
one
.
name
},
this
.
next
]);
}
}
toSee
()
{
toSee
(
value
)
{
this
.
isToSee
=
true
;
this
.
ToSeeList
=
value
;
}
onSearchToSee
()
{
const
req
=
{
alias
:
this
.
ToSeeList
.
alias
,
deviceList
:
[
{
sn
:
this
.
ToSeeList
.
SN
,
type
:
this
.
ToSeeList
.
type
}
],
endTime
:
this
.
selectTime3
?
new
Date
().
getTime
()
:
this
.
req3
.
startTime
,
offset
:
0
-
new
Date
().
getTimezoneOffset
()
/
60
,
startTime
:
this
.
selectTime3
?
new
Date
().
getTime
()
-
this
.
selectTime3
*
60
*
60
*
1000
:
this
.
req3
.
startTime
,
// topicName: 'string'
};
this
.
option1
=
{
grid
:
{
top
:
'5%'
},
xAxis
:
{
type
:
'category'
,
data
:
[
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
,
'Sat'
,
'Sun'
]
},
yAxis
:
{
type
:
'value'
},
series
:
[{
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
],
type
:
'line'
,
smooth
:
true
}]
};
this
.
api
.
data
.
getHisData
([
req
,
(
data
)
=>
{
if
(
data
&&
data
.
constructor
===
Array
)
{
this
.
toSeeData
=
data
;
}
else
{
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
}
}]);
}
}
saveOther
()
{
saveOther
()
{
...
...
src/assets/i18n/zh.json
View file @
5d338897
...
@@ -152,6 +152,8 @@
...
@@ -152,6 +152,8 @@
"topic"
:
"主题"
,
"topic"
:
"主题"
,
"updateWay"
:
"编辑通道"
,
"updateWay"
:
"编辑通道"
,
"updateTime"
:
"更新时间"
,
"updateTime"
:
"更新时间"
,
"Time"
:
"时间"
,
"Numerical"
:
"数值"
,
"updateData"
:
"最新数据"
,
"updateData"
:
"最新数据"
,
"see"
:
"查看"
,
"see"
:
"查看"
,
"pleaseFillAll"
:
"请填完所有必填项"
,
"pleaseFillAll"
:
"请填完所有必填项"
,
...
...
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