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
63603e2a
Commit
63603e2a
authored
Sep 10, 2021
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
传感器详情-运行状态页面: 在主题的下拉选项中,过滤掉topicType=4(REPORT) 的主题
parent
5fd3ca2a
Pipeline
#1092
passed with stage
in 0 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
5 deletions
+22
-5
sensor-detail.component.html
src/app/main/sensor-detail/sensor-detail.component.html
+1
-1
sensor-detail.component.ts
src/app/main/sensor-detail/sensor-detail.component.ts
+15
-1
en.json
src/assets/i18n/en.json
+2
-1
jpn.json
src/assets/i18n/jpn.json
+2
-1
zh.json
src/assets/i18n/zh.json
+2
-1
No files found.
src/app/main/sensor-detail/sensor-detail.component.html
View file @
63603e2a
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
</nz-col>
</nz-col>
<nz-col
[
nzSpan
]="
5
"
>
<nz-col
[
nzSpan
]="
5
"
>
<nz-select
[(
ngModel
)]="
selectedTopicValue
"
nzAllowClear
nzPlaceHolder=
"Choose"
style=
"min-width: 300px"
>
<nz-select
[(
ngModel
)]="
selectedTopicValue
"
nzAllowClear
nzPlaceHolder=
"Choose"
style=
"min-width: 300px"
>
<nz-option
*
ngFor=
"let one of
deviceData
"
[
nzValue
]="
one
.
topicName
"
[
nzLabel
]="
one
.
topicName
"
></nz-option>
<nz-option
*
ngFor=
"let one of
topicOption
"
[
nzValue
]="
one
.
topicName
"
[
nzLabel
]="
one
.
topicName
"
></nz-option>
</nz-select>
</nz-select>
</nz-col>
</nz-col>
...
...
src/app/main/sensor-detail/sensor-detail.component.ts
View file @
63603e2a
...
@@ -17,6 +17,7 @@ export class SensorDetailComponent implements OnInit {
...
@@ -17,6 +17,7 @@ export class SensorDetailComponent implements OnInit {
isLoading
=
false
;
isLoading
=
false
;
deviceData
=
[];
deviceData
=
[];
topicOption
=
[];
deviceNo
=
''
;
deviceNo
=
''
;
name
=
''
;
name
=
''
;
req
:
any
=
{};
req
:
any
=
{};
...
@@ -79,7 +80,7 @@ export class SensorDetailComponent implements OnInit {
...
@@ -79,7 +80,7 @@ export class SensorDetailComponent implements OnInit {
this
.
getCurrent
();
this
.
getCurrent
();
}
}
});
});
this
.
topicOption
=
[];
this
.
getAllPolicies
();
this
.
getAllPolicies
();
}
}
...
@@ -117,6 +118,8 @@ export class SensorDetailComponent implements OnInit {
...
@@ -117,6 +118,8 @@ export class SensorDetailComponent implements OnInit {
this
.
api
.
topic
.
getByDeviceNo
([{
deviceNo
:
this
.
deviceNo
},
(
data
)
=>
{
this
.
api
.
topic
.
getByDeviceNo
([{
deviceNo
:
this
.
deviceNo
},
(
data
)
=>
{
if
(
data
&&
data
.
constructor
===
Array
)
{
if
(
data
&&
data
.
constructor
===
Array
)
{
this
.
deviceData
=
data
;
this
.
deviceData
=
data
;
// 在主题的下拉选项中,过滤掉topicType=4(REPORT) 的主题
this
.
updateTopicSelection
();
}
else
{
}
else
{
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
}
}
...
@@ -506,4 +509,15 @@ export class SensorDetailComponent implements OnInit {
...
@@ -506,4 +509,15 @@ export class SensorDetailComponent implements OnInit {
refresh
()
{
refresh
()
{
this
.
getCurrent
();
this
.
getCurrent
();
}
}
updateTopicSelection
()
{
this
.
topicOption
=
[];
if
(
this
.
deviceData
)
{
this
.
deviceData
.
forEach
(
one
=>
{
if
(
one
.
topicType
!==
4
)
{
this
.
topicOption
.
push
(
one
);
}
});
}
}
}
}
src/assets/i18n/en.json
View file @
63603e2a
...
@@ -200,5 +200,6 @@
...
@@ -200,5 +200,6 @@
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
,
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
"belongCompany"
:
"所属公司"
,
"isToSeeModel"
:
"查看数据"
}
}
src/assets/i18n/jpn.json
View file @
63603e2a
...
@@ -200,5 +200,6 @@
...
@@ -200,5 +200,6 @@
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
,
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
"belongCompany"
:
"所属公司"
,
"isToSeeModel"
:
"查看数据"
}
}
src/assets/i18n/zh.json
View file @
63603e2a
...
@@ -200,5 +200,6 @@
...
@@ -200,5 +200,6 @@
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
,
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
"belongCompany"
:
"所属公司"
,
"isToSeeModel"
:
"查看数据"
}
}
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