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
7fab40f1
Commit
7fab40f1
authored
Apr 15, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
709335f3
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
503 additions
and
24 deletions
+503
-24
layout.module.ts
src/app/layout/layout.module.ts
+5
-1
leftmenu.component.ts
src/app/layout/leftmenu/leftmenu.component.ts
+1
-1
gateway.component.ts
src/app/main/gateway/gateway.component.ts
+1
-1
module-detail.component.html
src/app/main/module-detail/module-detail.component.html
+3
-0
module-detail.component.ts
src/app/main/module-detail/module-detail.component.ts
+15
-0
module-mgr.component.html
src/app/main/module-mgr/module-mgr.component.html
+40
-3
module-mgr.component.ts
src/app/main/module-mgr/module-mgr.component.ts
+58
-2
sensor-detail.component.html
src/app/main/sensor-detail/sensor-detail.component.html
+93
-0
sensor-detail.component.scss
src/app/main/sensor-detail/sensor-detail.component.scss
+39
-0
sensor-detail.component.ts
src/app/main/sensor-detail/sensor-detail.component.ts
+33
-1
topic-module-detail.component.html
...in/topic-module-detail/topic-module-detail.component.html
+3
-0
topic-module-detail.component.ts
...main/topic-module-detail/topic-module-detail.component.ts
+15
-0
topic-module-mgr.component.html
...app/main/topic-module-mgr/topic-module-mgr.component.html
+44
-3
topic-module-mgr.component.ts
src/app/main/topic-module-mgr/topic-module-mgr.component.ts
+58
-2
router.module.ts
src/app/router.module.ts
+8
-4
en.json
src/assets/i18n/en.json
+40
-2
jpn.json
src/assets/i18n/jpn.json
+40
-2
zh.json
src/assets/i18n/zh.json
+7
-2
No files found.
src/app/layout/layout.module.ts
View file @
7fab40f1
...
@@ -27,6 +27,8 @@ import {SetModuleMgrComponent} from '../main/set-module-mgr/set-module-mgr.compo
...
@@ -27,6 +27,8 @@ import {SetModuleMgrComponent} from '../main/set-module-mgr/set-module-mgr.compo
import
{
TopicModuleMgrComponent
}
from
'../main/topic-module-mgr/topic-module-mgr.component'
;
import
{
TopicModuleMgrComponent
}
from
'../main/topic-module-mgr/topic-module-mgr.component'
;
import
{
SensorMgrComponent
}
from
'../main/sensor-mgr/sensor-mgr.component'
;
import
{
SensorMgrComponent
}
from
'../main/sensor-mgr/sensor-mgr.component'
;
import
{
SensorDetailComponent
}
from
'../main/sensor-detail/sensor-detail.component'
;
import
{
SensorDetailComponent
}
from
'../main/sensor-detail/sensor-detail.component'
;
import
{
ModuleDetailComponent
}
from
'../main/module-detail/module-detail.component'
;
import
{
TopicModuleDetailComponent
}
from
'../main/topic-module-detail/topic-module-detail.component'
;
// 通用组件
// 通用组件
import
{
SearchDateComponent
}
from
'../component/search-date/search-date.component'
;
import
{
SearchDateComponent
}
from
'../component/search-date/search-date.component'
;
import
{
SearchItemComponent
}
from
'../component/search-item/search-item.component'
;
import
{
SearchItemComponent
}
from
'../component/search-item/search-item.component'
;
...
@@ -80,7 +82,9 @@ import {BackComponent} from '../component/back/back.component';
...
@@ -80,7 +82,9 @@ import {BackComponent} from '../component/back/back.component';
SetModuleMgrComponent
,
SetModuleMgrComponent
,
TopicModuleMgrComponent
,
TopicModuleMgrComponent
,
SensorMgrComponent
,
SensorMgrComponent
,
SensorDetailComponent
SensorDetailComponent
,
ModuleDetailComponent
,
TopicModuleDetailComponent
]
]
})
})
export
class
LayoutModule
{
export
class
LayoutModule
{
...
...
src/app/layout/leftmenu/leftmenu.component.ts
View file @
7fab40f1
...
@@ -33,7 +33,7 @@ export class LeftmenuComponent implements OnInit, OnDestroy {
...
@@ -33,7 +33,7 @@ export class LeftmenuComponent implements OnInit, OnDestroy {
icon
:
'io i-shebei'
,
icon
:
'io i-shebei'
,
type
:
0
,
type
:
0
,
child
:
[{
name
:
'gatewayMgr'
},
{
name
:
'sensorMgr'
},
{
name
:
'moduleMgr'
},
child
:
[{
name
:
'gatewayMgr'
},
{
name
:
'sensorMgr'
},
{
name
:
'moduleMgr'
},
{
name
:
'topicModuleMgr'
}
,
{
name
:
'setModuleMgr'
},
{
name
:
'mqttSetMgr'
}
]
{
name
:
'topicModuleMgr'
}]
},
{
},
{
name
:
'systemMgr'
,
name
:
'systemMgr'
,
icon
:
'io i-shezhi'
,
icon
:
'io i-shezhi'
,
...
...
src/app/main/gateway/gateway.component.ts
View file @
7fab40f1
...
@@ -58,7 +58,7 @@ export class GatewayComponent implements OnInit {
...
@@ -58,7 +58,7 @@ export class GatewayComponent implements OnInit {
next
=
(
data
)
=>
{
next
=
(
data
)
=>
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
this
.
data
=
data
.
rows
.
filter
(
one
=>
{
one
.
isOn
=
Math
.
random
()
>
0.5
?
1
:
0
;
return
one
;
});
this
.
data
=
data
.
rows
.
filter
(
one
=>
{
one
.
isOn
=
Math
.
random
()
>
0.5
;
return
one
;
});
this
.
total
=
data
.
total
;
this
.
total
=
data
.
total
;
}
else
if
(
data
.
code
===
1
)
{
}
else
if
(
data
.
code
===
1
)
{
this
.
message
.
success
(
data
&&
data
.
message
?
data
.
message
:
'操作成功'
);
this
.
message
.
success
(
data
&&
data
.
message
?
data
.
message
:
'操作成功'
);
...
...
src/app/main/module-detail/module-detail.component.html
0 → 100644
View file @
7fab40f1
<p>
module-detail works!
</p>
src/app/main/module-detail/module-detail.component.ts
0 → 100644
View file @
7fab40f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-module-detail'
,
templateUrl
:
'./module-detail.component.html'
,
styles
:
[]
})
export
class
ModuleDetailComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/app/main/module-mgr/module-mgr.component.html
View file @
7fab40f1
<p>
<div
class=
"searchBar"
@
fade
>
module-mgr works!
<app-search-date
[
label
]="'
moduleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
</p>
<div
class=
"btnLine"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
onSearch
()"
><span>
{{'search' | translate}}
</span></button>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
(
click
)="
onGetAll
()"
><span>
{{'allData' | translate}}
</span></button>
</div>
</div>
<div
class=
"tableBar"
@
fade
>
<nz-table
#
nzTable
[
nzData
]="
data
"
[
nzSize
]="'
middle
'"
nzShowSizeChanger
[
nzShowPagination
]="
true
"
[
nzLoading
]="
isLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
total
"
[(
nzPageIndex
)]="
page
"
[(
nzPageSize
)]="
rows
"
(
nzPageIndexChange
)="
searchData
()"
(
nzPageSizeChange
)="
searchData
()"
>
<thead
nz-thead
>
<tr>
<th
nz-th
><span>
{{'num' | translate}}
</span></th>
<th
nz-th
><span>
{{'moduleName' | translate}}
</span></th>
<th
nz-th
><span>
{{'wayNum' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
</tr>
</thead>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable.data, let i = index"
>
<td
nz-td
>
{{i + 1}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
{{one.ipAddress}}
</td>
</tr>
</tbody>
</nz-table>
</div>
src/app/main/module-mgr/module-mgr.component.ts
View file @
7fab40f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ApiService
}
from
'../../service/api'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
fadeIn
}
from
'../../animation/fade-in'
;
@
Component
({
@
Component
({
selector
:
'app-module-mgr'
,
selector
:
'app-module-mgr'
,
templateUrl
:
'./module-mgr.component.html'
,
templateUrl
:
'./module-mgr.component.html'
,
styles
:
[]
styles
:
[],
animations
:
[
fadeIn
]
})
})
export
class
ModuleMgrComponent
implements
OnInit
{
export
class
ModuleMgrComponent
implements
OnInit
{
constructor
()
{
}
req
:
any
=
{};
data
=
[];
isLoading
=
false
;
page
:
any
=
1
;
rows
:
any
=
10
;
total
:
any
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getData
();
}
getData
()
{
this
.
isLoading
=
true
;
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
}
}
onSearch
()
{
this
.
page
=
1
;
this
.
query
();
}
query
()
{
this
.
isLoading
=
true
;
const
req
=
{
startTime
:
this
.
req
.
startTime
?
new
Date
(
this
.
req
.
startTime
).
getTime
()
:
''
,
endTime
:
this
.
req
.
endTime
?
new
Date
(
this
.
req
.
endTime
).
getTime
()
:
''
};
this
.
api
.
loginlog
.
getByTime
(
this
.
page
,
this
.
rows
,
[
req
,
this
.
next
]);
}
onGetAll
()
{
this
.
page
=
1
;
this
.
req
=
{};
this
.
getData
();
}
next
=
(
data
)
=>
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
this
.
data
=
data
.
rows
;
this
.
total
=
data
.
total
;
}
else
{
this
.
message
.
error
(
data
.
message
||
this
.
translate
.
instant
(
'wrongToGetData'
));
}
this
.
isLoading
=
false
;
}
searchData
()
{
if
(
this
.
req
.
startTime
||
this
.
req
.
endTime
)
{
this
.
query
();
}
else
{
this
.
getData
();
}
}
}
}
src/app/main/sensor-detail/sensor-detail.component.html
View file @
7fab40f1
...
@@ -81,5 +81,98 @@
...
@@ -81,5 +81,98 @@
</tbody>
</tbody>
</nz-table>
</nz-table>
</nz-tab>
</nz-tab>
<nz-tab
nzTitle=
"运行状态"
>
<div
class=
"cards"
>
<div
class=
"card"
*
ngFor=
"let one of items"
>
<div
class=
"title"
>
{{one.name}}
<div
class=
"rightSpan canClick"
>
查看数据
</div>
</div>
<div
class=
"middle"
>
<div
class=
"left"
>
{{one.data}}{{one.per}}
</div>
<div
class=
"right"
>
{{one.min}}{{one.per}} - {{one.max}}{{one.per}}
</div>
</div>
<div
class=
"bottom"
>
{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}
</div>
</div>
</div>
<div
class=
"charts"
>
<div
style=
"width: calc(100% - 80px);display: inline-block;vertical-align: top;padding-left: 15px;"
>
<app-search-select
inModal=
"true"
[
label
]="'
selectTime
'
|
translate
"
[(
value
)]="
selectTime
"
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=
"selectTime === 0"
inModal=
"true"
[
label
]="'
startTime
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
<app-search-date
*
ngIf=
"selectTime === 0"
inModal=
"true"
[
label
]="'
endTime
'
|
translate
"
[(
value
)]="
req
.
endTime
"
showTime=
"true"
></app-search-date>
</div>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
onSearch
()"
>
<span>
{{'search' | translate}}
</span></button>
<nz-tabset
style=
"border-top: 1px solid #cccccc"
>
<nz-tab
nzTitle=
"表格"
>
111
</nz-tab>
<nz-tab
nzTitle=
"图表"
>
222
</nz-tab>
</nz-tabset>
<div
class=
"btnLine"
>
<button
nz-button
[
nzType
]="'
default
'"
[
nzLoading
]="
isLoading
"
(
click
)="
close
()"
>
<span>
{{'close' | translate}}
</span></button>
</div>
</div>
</nz-tab>
<nz-tab
nzTitle=
"日志服务"
>
<div
style=
"width: calc(100% - 80px);display: inline-block;vertical-align: top;"
>
<app-search-select
[
label
]="'
selectTime
'
|
translate
"
[(
value
)]="
selectTime2
"
showTime=
"true"
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=
"selectTime === 0"
[
label
]="'
startTime
'
|
translate
"
[(
value
)]="
req2
.
startTime
"
showTime=
"true"
></app-search-date>
<app-search-date
*
ngIf=
"selectTime === 0"
[
label
]="'
endTime
'
|
translate
"
[(
value
)]="
req2
.
endTime
"
showTime=
"true"
></app-search-date>
</div>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
onSearch2
()"
>
<span>
{{'search' | translate}}
</span></button>
<nz-table
#
nzTable3
[
nzData
]="
data
"
[
nzSize
]="'
middle
'"
nzShowSizeChanger
[
nzShowPagination
]="
true
"
[
nzLoading
]="
isLoading
"
>
<thead
nz-thead
>
<tr>
<th
nz-th
><span>
{{'wayIndex' | translate}}
</span></th>
<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>
{{'isbind' | translate}}
</span></th>
</tr>
</thead>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable3.data, let i = index"
>
<td
nz-td
>
{{i + 1}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
{{'web'}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
{{'web'}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
<span
class=
"deleteFontColor"
>
{{'delete' | translate}}
</span>
</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</nz-tabset>
</div>
</div>
src/app/main/sensor-detail/sensor-detail.component.scss
0 → 100644
View file @
7fab40f1
.cards
,
.charts
{
width
:
50%
;
display
:
inline-block
;
vertical-align
:
top
;
}
.card
{
width
:
calc
(
50%
-
10px
);
display
:
inline-block
;
border
:
1px
solid
#cccccc
;
border-radius
:
10px
;
padding
:
10px
;
margin
:
0
10px
15px
0
;
}
.rightSpan.canClick
{
float
:
right
;
}
.right
{
text-align
:
right
;
}
.left
,
.right
{
width
:
50%
;
display
:
inline-block
;
line-height
:
40px
;
}
.bottom
{
line-height
:
20px
;
letter-spacing
:
0
.4px
;
}
.charts
{
border
:
1px
solid
#cccccc
;
padding
:
10px
;
border-radius
:
10px
;
margin-bottom
:
15px
;
}
src/app/main/sensor-detail/sensor-detail.component.ts
View file @
7fab40f1
...
@@ -7,13 +7,39 @@ import {fadeIn} from '../../animation/fade-in';
...
@@ -7,13 +7,39 @@ import {fadeIn} from '../../animation/fade-in';
@
Component
({
@
Component
({
selector
:
'app-sensor-detail'
,
selector
:
'app-sensor-detail'
,
templateUrl
:
'./sensor-detail.component.html'
,
templateUrl
:
'./sensor-detail.component.html'
,
style
s
:
[
],
style
Urls
:
[
'./sensor-detail.component.scss'
],
animations
:
[
fadeIn
]
animations
:
[
fadeIn
]
})
})
export
class
SensorDetailComponent
implements
OnInit
{
export
class
SensorDetailComponent
implements
OnInit
{
isLoading
=
false
;
isLoading
=
false
;
data
=
[];
data
=
[];
selectTime
=
24
;
req
=
{};
selectTime2
=
24
;
req2
=
{};
items
=
[{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
},
{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
},
{
name
:
'液位'
,
data
:
'1'
,
per
:
'℃'
,
max
:
'2'
,
min
:
'0'
,
time
:
new
Date
().
getTime
()
}];
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
router
:
Router
)
{
}
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -43,4 +69,10 @@ export class SensorDetailComponent implements OnInit {
...
@@ -43,4 +69,10 @@ export class SensorDetailComponent implements OnInit {
toDetail
()
{
toDetail
()
{
this
.
router
.
navigate
([
'/app/deviceCenter/sensorMgr/sensorDetail'
]);
this
.
router
.
navigate
([
'/app/deviceCenter/sensorMgr/sensorDetail'
]);
}
}
onSearch
()
{}
onSearch2
()
{}
close
()
{}
}
}
src/app/main/topic-module-detail/topic-module-detail.component.html
0 → 100644
View file @
7fab40f1
<p>
topic-module-detail works!
</p>
src/app/main/topic-module-detail/topic-module-detail.component.ts
0 → 100644
View file @
7fab40f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-topic-module-detail'
,
templateUrl
:
'./topic-module-detail.component.html'
,
styles
:
[]
})
export
class
TopicModuleDetailComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/app/main/topic-module-mgr/topic-module-mgr.component.html
View file @
7fab40f1
<p>
<div
class=
"searchBar"
@
fade
>
topic-module-mgr works!
<app-search-date
[
label
]="'
topicModuleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
</p>
<div
class=
"btnLine"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
onSearch
()"
><span>
{{'search' | translate}}
</span></button>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
(
click
)="
onGetAll
()"
><span>
{{'allData' | translate}}
</span></button>
</div>
</div>
<div
class=
"tableBar"
@
fade
>
<nz-table
#
nzTable
[
nzData
]="
data
"
[
nzSize
]="'
middle
'"
nzShowSizeChanger
[
nzShowPagination
]="
true
"
[
nzLoading
]="
isLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
total
"
[(
nzPageIndex
)]="
page
"
[(
nzPageSize
)]="
rows
"
(
nzPageIndexChange
)="
searchData
()"
(
nzPageSizeChange
)="
searchData
()"
>
<thead
nz-thead
>
<tr>
<th
nz-th
><span>
{{'num' | translate}}
</span></th>
<th
nz-th
><span>
{{'topicModuleName' | translate}}
</span></th>
<th
nz-th
><span>
{{'front' | translate}}
</span></th>
<th
nz-th
><span>
{{'belongCompany' | translate}}
</span></th>
<th
nz-th
><span>
{{'createTime' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
</tr>
</thead>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable.data, let i = index"
>
<td
nz-td
>
{{i + 1}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
{{'webPlatform' | translate}}
</td>
<td
nz-td
>
{{one.ipAddress}}
</td>
<td
nz-td
>
{{one.ipAddress}}
</td>
</tr>
</tbody>
</nz-table>
</div>
src/app/main/topic-module-mgr/topic-module-mgr.component.ts
View file @
7fab40f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ApiService
}
from
'../../service/api'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
fadeIn
}
from
'../../animation/fade-in'
;
@
Component
({
@
Component
({
selector
:
'app-topic-module-mgr'
,
selector
:
'app-topic-module-mgr'
,
templateUrl
:
'./topic-module-mgr.component.html'
,
templateUrl
:
'./topic-module-mgr.component.html'
,
styles
:
[]
styles
:
[],
animations
:
[
fadeIn
]
})
})
export
class
TopicModuleMgrComponent
implements
OnInit
{
export
class
TopicModuleMgrComponent
implements
OnInit
{
constructor
()
{
}
req
:
any
=
{};
data
=
[];
isLoading
=
false
;
page
:
any
=
1
;
rows
:
any
=
10
;
total
:
any
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getData
();
}
getData
()
{
this
.
isLoading
=
true
;
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
}
}
onSearch
()
{
this
.
page
=
1
;
this
.
query
();
}
query
()
{
this
.
isLoading
=
true
;
const
req
=
{
startTime
:
this
.
req
.
startTime
?
new
Date
(
this
.
req
.
startTime
).
getTime
()
:
''
,
endTime
:
this
.
req
.
endTime
?
new
Date
(
this
.
req
.
endTime
).
getTime
()
:
''
};
this
.
api
.
loginlog
.
getByTime
(
this
.
page
,
this
.
rows
,
[
req
,
this
.
next
]);
}
onGetAll
()
{
this
.
page
=
1
;
this
.
req
=
{};
this
.
getData
();
}
next
=
(
data
)
=>
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
this
.
data
=
data
.
rows
;
this
.
total
=
data
.
total
;
}
else
{
this
.
message
.
error
(
data
.
message
||
this
.
translate
.
instant
(
'wrongToGetData'
));
}
this
.
isLoading
=
false
;
}
searchData
()
{
if
(
this
.
req
.
startTime
||
this
.
req
.
endTime
)
{
this
.
query
();
}
else
{
this
.
getData
();
}
}
}
}
src/app/router.module.ts
View file @
7fab40f1
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
LayoutComponent
}
from
'./layout/layout.component'
;
import
{
LayoutComponent
}
from
'./layout/layout.component'
;
import
{
AuthService
}
from
'./service/auth'
;
import
{
AuthService
}
from
'./service/auth'
;
import
{
HomeComponent
}
from
'./main/home/home.component'
;
import
{
HomeComponent
}
from
'./main/home/home.component'
;
import
{
LogComponent
}
from
'./main/log/log.component'
;
import
{
LogComponent
}
from
'./main/log/log.component'
;
import
{
RoleComponent
}
from
'./main/role/role.component'
;
import
{
RoleComponent
}
from
'./main/role/role.component'
;
import
{
UserComponent
}
from
'./main/user/user.component'
;
import
{
UserComponent
}
from
'./main/user/user.component'
;
...
@@ -18,6 +18,8 @@ import {SetModuleMgrComponent} from './main/set-module-mgr/set-module-mgr.compon
...
@@ -18,6 +18,8 @@ import {SetModuleMgrComponent} from './main/set-module-mgr/set-module-mgr.compon
import
{
TopicModuleMgrComponent
}
from
'./main/topic-module-mgr/topic-module-mgr.component'
;
import
{
TopicModuleMgrComponent
}
from
'./main/topic-module-mgr/topic-module-mgr.component'
;
import
{
SensorMgrComponent
}
from
'./main/sensor-mgr/sensor-mgr.component'
;
import
{
SensorMgrComponent
}
from
'./main/sensor-mgr/sensor-mgr.component'
;
import
{
SensorDetailComponent
}
from
'./main/sensor-detail/sensor-detail.component'
;
import
{
SensorDetailComponent
}
from
'./main/sensor-detail/sensor-detail.component'
;
import
{
ModuleDetailComponent
}
from
'./main/module-detail/module-detail.component'
;
import
{
TopicModuleDetailComponent
}
from
'./main/topic-module-detail/topic-module-detail.component'
;
const
AppRoutes
:
Routes
=
[
const
AppRoutes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'/extra/login'
,
pathMatch
:
'full'
},
{
path
:
''
,
redirectTo
:
'/extra/login'
,
pathMatch
:
'full'
},
...
@@ -40,7 +42,9 @@ const routes: Routes = [
...
@@ -40,7 +42,9 @@ const routes: Routes = [
{
path
:
'deviceCenter/sensorMgr'
,
component
:
SensorMgrComponent
},
{
path
:
'deviceCenter/sensorMgr'
,
component
:
SensorMgrComponent
},
{
path
:
'deviceCenter/sensorMgr/sensorDetail'
,
component
:
SensorDetailComponent
},
{
path
:
'deviceCenter/sensorMgr/sensorDetail'
,
component
:
SensorDetailComponent
},
{
path
:
'deviceCenter/moduleMgr'
,
component
:
ModuleMgrComponent
},
{
path
:
'deviceCenter/moduleMgr'
,
component
:
ModuleMgrComponent
},
{
path
:
'deviceCenter/moduleMgr/moduleDetail'
,
component
:
ModuleDetailComponent
},
{
path
:
'deviceCenter/topicModuleMgr'
,
component
:
TopicModuleMgrComponent
},
{
path
:
'deviceCenter/topicModuleMgr'
,
component
:
TopicModuleMgrComponent
},
{
path
:
'deviceCenter/topicModuleMgr/topicModuleDetail'
,
component
:
TopicModuleDetailComponent
},
{
path
:
'deviceCenter/setModuleMgr'
,
component
:
SetModuleMgrComponent
},
{
path
:
'deviceCenter/setModuleMgr'
,
component
:
SetModuleMgrComponent
},
{
path
:
'deviceCenter/mqttSetMgr'
,
component
:
MqttSetMgrComponent
},
{
path
:
'deviceCenter/mqttSetMgr'
,
component
:
MqttSetMgrComponent
},
{
path
:
'systemMgr/userCenter'
,
component
:
UserComponent
},
{
path
:
'systemMgr/userCenter'
,
component
:
UserComponent
},
...
...
src/assets/i18n/en.json
View file @
7fab40f1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"deviceCenter"
:
"设备中心"
,
"deviceCenter"
:
"设备中心"
,
"gatewayMgr"
:
"网关管理"
,
"gatewayMgr"
:
"网关管理"
,
"sensorMgr"
:
"传感器管理"
,
"sensorMgr"
:
"传感器管理"
,
"moduleMgr"
:
"
模块管理
"
,
"moduleMgr"
:
"
通道模板
"
,
"topicModuleMgr"
:
"主题模板管理"
,
"topicModuleMgr"
:
"主题模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
"divide"
:
"分配"
,
"divide"
:
"分配"
,
"unbind"
:
"解绑"
,
"unbind"
:
"解绑"
,
"update"
:
"修改"
,
"update"
:
"修改"
,
"back"
:
"返回"
,
"close"
:
"关闭"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"loginName"
:
"登录名"
,
"loginName"
:
"登录名"
,
"userRealName"
:
"用户姓名"
,
"userRealName"
:
"用户姓名"
,
...
@@ -65,6 +67,7 @@
...
@@ -65,6 +67,7 @@
"editRole"
:
"编辑角色"
,
"editRole"
:
"编辑角色"
,
"addRole"
:
"新增角色"
,
"addRole"
:
"新增角色"
,
"confirmDeleteThisRecord"
:
"确认删除这条记录吗"
,
"confirmDeleteThisRecord"
:
"确认删除这条记录吗"
,
"confirmDeleteSelectedRecord"
:
"确认批量删除选中的这些记录吗"
,
"loginOutValidityTips"
:
"登录凭证失效,请重新登录"
,
"loginOutValidityTips"
:
"登录凭证失效,请重新登录"
,
"noLoginTips"
:
"您尚未登录,请登录"
,
"noLoginTips"
:
"您尚未登录,请登录"
,
"wrongServerWithCode"
:
"服务器异常,错误代码: "
,
"wrongServerWithCode"
:
"服务器异常,错误代码: "
,
...
@@ -75,5 +78,40 @@
...
@@ -75,5 +78,40 @@
"simCardNum"
:
"SIM卡号"
,
"simCardNum"
:
"SIM卡号"
,
"off/on"
:
"卸载/挂载"
,
"off/on"
:
"卸载/挂载"
,
"belongCompany"
:
"所属公司"
,
"belongCompany"
:
"所属公司"
,
"isbind"
:
"是否绑定"
"isbind"
:
"是否绑定"
,
"gatewaySee"
:
"查看网关"
,
"gatewayDetail"
:
"网关详情"
,
"sensorName"
:
"传感器名称"
,
"wayNum"
:
"通道数"
,
"createTime"
:
"创建时间"
,
"wayIndex"
:
"通道编号"
,
"sensorSN"
:
"传感器序列号"
,
"wayName"
:
"通道名称"
,
"wayAlias"
:
"通道别名"
,
"per"
:
"单位"
,
"wayType"
:
"通道类型"
,
"max"
:
"最大值"
,
"min"
:
"最小值"
,
"alarmMax"
:
"报警上限"
,
"alarmMaxMax"
:
"报警上上限"
,
"alarmMin"
:
"报警下限"
,
"alarmMinMin"
:
"报警下下限"
,
"sensorDetail"
:
"传感器详情"
,
"topicName"
:
"主题名"
,
"topicType"
:
"主题类型"
,
"dataType"
:
"数据类型"
,
"inTime"
:
"间隔时间/ms"
,
"dataSaveInTime"
:
"数据存储间隔时间/ms"
,
"sensor"
:
"传感器"
,
"wayDetail"
:
"通道详情"
,
"detail"
:
"详情"
,
"gateway"
:
"网关"
,
"multiAdd"
:
"批量新增"
,
"addGateway"
:
"新增网关"
,
"front"
:
"前缀"
,
"frontName"
:
"前缀名"
,
"addSensor"
:
"新增传感器"
,
"selectTime"
:
"选择时间"
,
"moduleName"
:
"通道模板名称"
,
"topicModuleName"
:
"主题配置模板名称"
}
}
src/assets/i18n/jpn.json
View file @
7fab40f1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"deviceCenter"
:
"设备中心"
,
"deviceCenter"
:
"设备中心"
,
"gatewayMgr"
:
"网关管理"
,
"gatewayMgr"
:
"网关管理"
,
"sensorMgr"
:
"传感器管理"
,
"sensorMgr"
:
"传感器管理"
,
"moduleMgr"
:
"
模块管理
"
,
"moduleMgr"
:
"
通道模板
"
,
"topicModuleMgr"
:
"主题模板管理"
,
"topicModuleMgr"
:
"主题模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
"divide"
:
"分配"
,
"divide"
:
"分配"
,
"unbind"
:
"解绑"
,
"unbind"
:
"解绑"
,
"update"
:
"修改"
,
"update"
:
"修改"
,
"back"
:
"返回"
,
"close"
:
"关闭"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"loginName"
:
"登录名"
,
"loginName"
:
"登录名"
,
"userRealName"
:
"用户姓名"
,
"userRealName"
:
"用户姓名"
,
...
@@ -65,6 +67,7 @@
...
@@ -65,6 +67,7 @@
"editRole"
:
"编辑角色"
,
"editRole"
:
"编辑角色"
,
"addRole"
:
"新增角色"
,
"addRole"
:
"新增角色"
,
"confirmDeleteThisRecord"
:
"确认删除这条记录吗"
,
"confirmDeleteThisRecord"
:
"确认删除这条记录吗"
,
"confirmDeleteSelectedRecord"
:
"确认批量删除选中的这些记录吗"
,
"loginOutValidityTips"
:
"登录凭证失效,请重新登录"
,
"loginOutValidityTips"
:
"登录凭证失效,请重新登录"
,
"noLoginTips"
:
"您尚未登录,请登录"
,
"noLoginTips"
:
"您尚未登录,请登录"
,
"wrongServerWithCode"
:
"服务器异常,错误代码: "
,
"wrongServerWithCode"
:
"服务器异常,错误代码: "
,
...
@@ -75,5 +78,40 @@
...
@@ -75,5 +78,40 @@
"simCardNum"
:
"SIM卡号"
,
"simCardNum"
:
"SIM卡号"
,
"off/on"
:
"卸载/挂载"
,
"off/on"
:
"卸载/挂载"
,
"belongCompany"
:
"所属公司"
,
"belongCompany"
:
"所属公司"
,
"isbind"
:
"是否绑定"
"isbind"
:
"是否绑定"
,
"gatewaySee"
:
"查看网关"
,
"gatewayDetail"
:
"网关详情"
,
"sensorName"
:
"传感器名称"
,
"wayNum"
:
"通道数"
,
"createTime"
:
"创建时间"
,
"wayIndex"
:
"通道编号"
,
"sensorSN"
:
"传感器序列号"
,
"wayName"
:
"通道名称"
,
"wayAlias"
:
"通道别名"
,
"per"
:
"单位"
,
"wayType"
:
"通道类型"
,
"max"
:
"最大值"
,
"min"
:
"最小值"
,
"alarmMax"
:
"报警上限"
,
"alarmMaxMax"
:
"报警上上限"
,
"alarmMin"
:
"报警下限"
,
"alarmMinMin"
:
"报警下下限"
,
"sensorDetail"
:
"传感器详情"
,
"topicName"
:
"主题名"
,
"topicType"
:
"主题类型"
,
"dataType"
:
"数据类型"
,
"inTime"
:
"间隔时间/ms"
,
"dataSaveInTime"
:
"数据存储间隔时间/ms"
,
"sensor"
:
"传感器"
,
"wayDetail"
:
"通道详情"
,
"detail"
:
"详情"
,
"gateway"
:
"网关"
,
"multiAdd"
:
"批量新增"
,
"addGateway"
:
"新增网关"
,
"front"
:
"前缀"
,
"frontName"
:
"前缀名"
,
"addSensor"
:
"新增传感器"
,
"selectTime"
:
"选择时间"
,
"moduleName"
:
"通道模板名称"
,
"topicModuleName"
:
"主题配置模板名称"
}
}
src/assets/i18n/zh.json
View file @
7fab40f1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"deviceCenter"
:
"设备中心"
,
"deviceCenter"
:
"设备中心"
,
"gatewayMgr"
:
"网关管理"
,
"gatewayMgr"
:
"网关管理"
,
"sensorMgr"
:
"传感器管理"
,
"sensorMgr"
:
"传感器管理"
,
"moduleMgr"
:
"
模块管理
"
,
"moduleMgr"
:
"
通道模板
"
,
"topicModuleMgr"
:
"主题模板管理"
,
"topicModuleMgr"
:
"主题模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"setModuleMgr"
:
"配置模板管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
"mqttSetMgr"
:
"MQTT账户管理"
,
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
"unbind"
:
"解绑"
,
"unbind"
:
"解绑"
,
"update"
:
"修改"
,
"update"
:
"修改"
,
"back"
:
"返回"
,
"back"
:
"返回"
,
"close"
:
"关闭"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"-----------业务-----------"
:
"-----------业务-----------"
,
"loginName"
:
"登录名"
,
"loginName"
:
"登录名"
,
"userRealName"
:
"用户姓名"
,
"userRealName"
:
"用户姓名"
,
...
@@ -107,6 +108,10 @@
...
@@ -107,6 +108,10 @@
"gateway"
:
"网关"
,
"gateway"
:
"网关"
,
"multiAdd"
:
"批量新增"
,
"multiAdd"
:
"批量新增"
,
"addGateway"
:
"新增网关"
,
"addGateway"
:
"新增网关"
,
"front"
:
"前缀"
,
"frontName"
:
"前缀名"
,
"frontName"
:
"前缀名"
,
"addSensor"
:
"新增传感器"
"addSensor"
:
"新增传感器"
,
"selectTime"
:
"选择时间"
,
"moduleName"
:
"通道模板名称"
,
"topicModuleName"
:
"主题配置模板名称"
}
}
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