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
d1a354aa
Commit
d1a354aa
authored
Apr 12, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
af705aaa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
gateway.component.ts
src/app/main/gateway/gateway.component.ts
+16
-2
No files found.
src/app/main/gateway/gateway.component.ts
View file @
d1a354aa
...
@@ -41,6 +41,9 @@ export class GatewayComponent implements OnInit {
...
@@ -41,6 +41,9 @@ export class GatewayComponent implements OnInit {
addReq
=
{};
addReq
=
{};
bindReq
=
{};
bindReq
=
{};
divideReq
=
{};
divideReq
=
{};
nobind
=
''
;
canbind
=
false
;
canUnbind
=
false
;
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
router
:
Router
,
constructor
(
private
api
:
ApiService
,
private
message
:
NzMessageService
,
private
router
:
Router
,
private
modalService
:
NzModalService
,
private
translate
:
TranslateService
)
{
private
modalService
:
NzModalService
,
private
translate
:
TranslateService
)
{
...
@@ -56,8 +59,9 @@ export class GatewayComponent implements OnInit {
...
@@ -56,8 +59,9 @@ 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
;
this
.
data
=
data
.
rows
.
filter
(
one
=>
{
one
.
isOn
=
Math
.
random
()
>
0.5
?
1
:
0
;
return
one
;
})
;
this
.
total
=
data
.
total
;
this
.
total
=
data
.
total
;
this
.
initBindArray
(
data
.
rows
);
this
.
initCheckArray
(
data
.
rows
.
length
,
false
);
this
.
initCheckArray
(
data
.
rows
.
length
,
false
);
}
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
:
'操作成功'
);
...
@@ -67,13 +71,21 @@ export class GatewayComponent implements OnInit {
...
@@ -67,13 +71,21 @@ export class GatewayComponent implements OnInit {
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
this
.
message
.
error
(
data
&&
data
.
message
?
data
.
message
:
'获取数据失败'
);
}
}
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
}
;
}
getData
()
{
getData
()
{
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
}
}
initBindArray
(
obj
)
{
obj
.
map
((
one
,
index
)
=>
{
if
(
!
one
.
isOn
)
{
this
.
nobind
+=
'&'
+
index
;
}
});
}
initCheckArray
(
n
,
b
)
{
initCheckArray
(
n
,
b
)
{
const
obj
=
[];
const
obj
=
[];
while
(
n
>
0
)
{
while
(
n
>
0
)
{
...
@@ -100,6 +112,8 @@ export class GatewayComponent implements OnInit {
...
@@ -100,6 +112,8 @@ export class GatewayComponent implements OnInit {
this
.
isIndeterminate
=
false
;
this
.
isIndeterminate
=
false
;
this
.
isAllCheck
=
true
;
this
.
isAllCheck
=
true
;
}
else
if
(
x
===
0
)
{
}
else
if
(
x
===
0
)
{
this
.
canbind
=
false
;
this
.
canUnbind
=
false
;
this
.
isIndeterminate
=
false
;
this
.
isIndeterminate
=
false
;
this
.
isAllCheck
=
false
;
this
.
isAllCheck
=
false
;
}
else
{
}
else
{
...
...
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