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
66b75a82
Commit
66b75a82
authored
Apr 15, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
7fab40f1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
245 additions
and
25 deletions
+245
-25
module-detail.component.html
src/app/main/module-detail/module-detail.component.html
+44
-3
module-detail.component.ts
src/app/main/module-detail/module-detail.component.ts
+64
-2
module-mgr.component.html
src/app/main/module-mgr/module-mgr.component.html
+8
-4
module-mgr.component.ts
src/app/main/module-mgr/module-mgr.component.ts
+10
-4
topic-module-detail.component.html
...in/topic-module-detail/topic-module-detail.component.html
+44
-3
topic-module-detail.component.ts
...main/topic-module-detail/topic-module-detail.component.ts
+61
-3
topic-module-mgr.component.html
...app/main/topic-module-mgr/topic-module-mgr.component.html
+1
-1
topic-module-mgr.component.ts
src/app/main/topic-module-mgr/topic-module-mgr.component.ts
+10
-4
zh.json
src/assets/i18n/zh.json
+3
-1
No files found.
src/app/main/module-detail/module-detail.component.html
View file @
66b75a82
<p>
module-detail works!
</p>
<div
class=
"searchBar"
@
fade
>
<app-search-date
[
label
]="'
topicModuleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
<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
class=
"canClick"
(
click
)="
toDetail
()"
>
{{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/module-detail/module-detail.component.ts
View file @
66b75a82
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'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-module-detail'
,
templateUrl
:
'./module-detail.component.html'
,
styles
:
[]
styles
:
[],
animations
:
[
fadeIn
]
})
export
class
ModuleDetailComponent
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
,
private
router
:
Router
)
{
}
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
();
}
}
toDetail
()
{
this
.
router
.
navigate
([
'/app/deviceCenter/moduleMgr/moduleDetail'
]);
}
}
src/app/main/module-mgr/module-mgr.component.html
View file @
66b75a82
<div
class=
"searchBar"
@
fade
>
<app-search-date
[
label
]="'
m
oduleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
<app-search-date
[
label
]="'
topicM
oduleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
<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>
...
...
@@ -21,8 +21,10 @@
<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>
{{'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>
...
...
@@ -30,9 +32,11 @@
<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
class=
"canClick"
(
click
)="
toDetail
()"
>
{{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>
...
...
src/app/main/module-mgr/module-mgr.component.ts
View file @
66b75a82
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'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-module-mgr'
,
...
...
@@ -19,7 +20,8 @@ export class ModuleMgrComponent implements OnInit {
rows
:
any
=
10
;
total
:
any
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
)
{
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
...
...
@@ -52,14 +54,14 @@ export class ModuleMgrComponent implements OnInit {
}
next
=
(
data
)
=>
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
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
)
{
...
...
@@ -68,4 +70,8 @@ export class ModuleMgrComponent implements OnInit {
this
.
getData
();
}
}
toDetail
()
{
this
.
router
.
navigate
([
'/app/deviceCenter/moduleMgr/moduleDetail'
]);
}
}
src/app/main/topic-module-detail/topic-module-detail.component.html
View file @
66b75a82
<p>
topic-module-detail works!
</p>
<div
class=
"searchBar"
@
fade
>
<app-search-date
[
label
]="'
topicModuleName
'
|
translate
"
[(
value
)]="
req
.
startTime
"
showTime=
"true"
></app-search-date>
<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-detail/topic-module-detail.component.ts
View file @
66b75a82
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'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-topic-module-detail'
,
templateUrl
:
'./topic-module-detail.component.html'
,
styles
:
[]
styles
:
[],
animations
:
[
fadeIn
]
})
export
class
TopicModuleDetailComponent
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
,
private
router
:
Router
)
{
}
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/topic-module-mgr/topic-module-mgr.component.html
View file @
66b75a82
...
...
@@ -32,7 +32,7 @@
<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
class=
"canClick"
(
click
)="
toDetail
()"
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.loginTime}}
</td>
<td
nz-td
>
{{'webPlatform' | translate}}
</td>
...
...
src/app/main/topic-module-mgr/topic-module-mgr.component.ts
View file @
66b75a82
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'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-topic-module-mgr'
,
...
...
@@ -19,7 +20,8 @@ export class TopicModuleMgrComponent implements OnInit {
rows
:
any
=
10
;
total
:
any
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
)
{
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
translate
:
TranslateService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
...
...
@@ -52,14 +54,14 @@ export class TopicModuleMgrComponent implements OnInit {
}
next
=
(
data
)
=>
{
if
(
data
&&
data
.
rows
&&
data
.
rows
.
constructor
===
Array
)
{
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
)
{
...
...
@@ -68,4 +70,8 @@ export class TopicModuleMgrComponent implements OnInit {
this
.
getData
();
}
}
toDetail
()
{
this
.
router
.
navigate
([
'/app/deviceCenter/topicModuleMgr/topicModuleDetail'
]);
}
}
src/assets/i18n/zh.json
View file @
66b75a82
...
...
@@ -113,5 +113,7 @@
"addSensor"
:
"新增传感器"
,
"selectTime"
:
"选择时间"
,
"moduleName"
:
"通道模板名称"
,
"topicModuleName"
:
"主题配置模板名称"
"topicModuleName"
:
"主题配置模板名称"
,
"moduleDetail"
:
"通道模板详情"
,
"topicModuleDetail"
:
"主题配置模板详情"
}
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