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
709335f3
Commit
709335f3
authored
Apr 15, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
d1a354aa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
55 deletions
+46
-55
layout.component.html
src/app/layout/layout.component.html
+1
-1
layout.component.scss
src/app/layout/layout.component.scss
+4
-6
leftmenu.component.scss
src/app/layout/leftmenu/leftmenu.component.scss
+1
-1
gateway.component.html
src/app/main/gateway/gateway.component.html
+6
-6
gateway.component.ts
src/app/main/gateway/gateway.component.ts
+34
-41
No files found.
src/app/layout/layout.component.html
View file @
709335f3
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<app-leftmenu
#
leftmenu
[
isCollapsed
]="
isCollapsed
"
[
selectedItem
]="
selectedItem
"
></app-leftmenu>
<app-leftmenu
#
leftmenu
[
isCollapsed
]="
isCollapsed
"
[
selectedItem
]="
selectedItem
"
></app-leftmenu>
</nz-sider>
</nz-sider>
<nz-layout>
<nz-layout>
<nz-header
class=
"logoBackground bottomLine"
style=
"padding:0;position:fixed; width:100%;z-index: 99;border-bottom: 1px solid rgb(230, 230, 230);"
>
<nz-header
class=
"logoBackground bottomLine"
style=
"
background-color: #002661;
padding:0;position:fixed; width:100%;z-index: 99;border-bottom: 1px solid rgb(230, 230, 230);"
>
<i
class=
"io trigger textStyle1 whenHover"
[
class
.
i-shou
]="!
isCollapsed
"
<i
class=
"io trigger textStyle1 whenHover"
[
class
.
i-shou
]="!
isCollapsed
"
[
class
.
i-fang
]="
isCollapsed
"
(
click
)="
changeCollapsed
()"
></i>
[
class
.
i-fang
]="
isCollapsed
"
(
click
)="
changeCollapsed
()"
></i>
<label
class=
"linkToPersonSetting whenHover textStyle1"
routerLink=
"/app/system/person"
>
<label
class=
"linkToPersonSetting whenHover textStyle1"
routerLink=
"/app/system/person"
>
...
...
src/app/layout/layout.component.scss
View file @
709335f3
$headerSlideBackground
:
rgba
(
255
,
255
,
255
,
1
);
:host
::ng-deep
.trigger
{
:host
::ng-deep
.trigger
{
font-size
:
20px
;
font-size
:
20px
;
line-height
:
64px
;
line-height
:
64px
;
...
@@ -14,7 +12,7 @@ $headerSlideBackground: rgba(255, 255, 255, 1);
...
@@ -14,7 +12,7 @@ $headerSlideBackground: rgba(255, 255, 255, 1);
}
}
.logoBackground
{
.logoBackground
{
background-color
:
$headerSlideBackground
;
background-color
:
#002661
;
height
:
64px
;
height
:
64px
;
line-height
:
64px
;
line-height
:
64px
;
}
}
...
@@ -43,11 +41,11 @@ ul {
...
@@ -43,11 +41,11 @@ ul {
}
}
.width-200
{
.width-200
{
width
:
199
px
;
width
:
200
px
;
}
}
.width-
6
0
{
.width-
8
0
{
width
:
79
px
;
width
:
80
px
;
}
}
.halfPart
{
.halfPart
{
...
...
src/app/layout/leftmenu/leftmenu.component.scss
View file @
709335f3
.menuPart
{
.menuPart
{
margin-top
:
64px
;
border-top
:
64px
solid
#002661
;
}
}
.menuFirst
,
.menuSecond
{
.menuFirst
,
.menuSecond
{
padding
:
0
;
padding
:
0
;
...
...
src/app/main/gateway/gateway.component.html
View file @
709335f3
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</thead>
</thead>
<tbody
nz-tbody
>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable.data,let i = index"
>
<tr
*
ngFor=
"let one of nzTable.data,let i = index"
>
<td
nzShowCheckbox
[(
nzChecked
)]="
checkArray
[
i
]"
(
nzCheckedChange
)="
oneCheck
(
i
)"
></td>
<td
nzShowCheckbox
[(
nzChecked
)]="
one
.
checked
"
(
nzCheckedChange
)="
oneCheck
(
)"
></td>
<td
nz-td
class=
"canClick"
(
click
)="
toSee
(
one
)"
>
设备{{i}}
</td>
<td
nz-td
class=
"canClick"
(
click
)="
toSee
(
one
)"
>
设备{{i}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.realName}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
<td
nz-td
>
{{one.userName}}
</td>
...
@@ -65,15 +65,15 @@
...
@@ -65,15 +65,15 @@
</tbody>
</tbody>
</nz-table>
</nz-table>
<div
class=
"btnLine whenOneLine"
style=
"text-align: left; margin-top: 10px;"
>
<div
class=
"btnLine whenOneLine"
style=
"text-align: left; margin-top: 10px;"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
allDelete
()"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
[
disabled
]="!
isCheckedOne
"
(
click
)="
allDelete
()"
>
<span>
{{'delete' | translate}}
</span></button>
<span>
{{'delete' | translate}}
</span></button>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
(
click
)="
allBind
()"
><span>
{{'bind' | translate}}
</span>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
[
disabled
]="!
canbind
"
(
click
)="
allBind
()"
><span>
{{'bind' | translate}}
</span>
</button>
</button>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
allUnbind
()"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
[
disabled
]="!
canUnbind
"
(
click
)="
allUnbind
()"
>
<span>
{{'unbind' | translate}}
</span></button>
<span>
{{'unbind' | translate}}
</span></button>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
(
click
)="
allDivide
()"
><span>
{{'divide' | translate}}
</span>
<button
nz-button
class=
"btnAll"
[
nzLoading
]="
isLoading
"
[
disabled
]="!
isCheckedOne
"
(
click
)="
allDivide
()"
><span>
{{'divide' | translate}}
</span>
</button>
</button>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
(
click
)="
allUpdate
()"
>
<button
nz-button
[
nzType
]="'
primary
'"
[
nzLoading
]="
isLoading
"
[
disabled
]="!
isCheckedOne
"
(
click
)="
allUpdate
()"
>
<span>
{{'update' | translate}}
</span></button>
<span>
{{'update' | translate}}
</span></button>
</div>
</div>
<div
class=
"pagePart whenOneLine"
>
<div
class=
"pagePart whenOneLine"
>
...
...
src/app/main/gateway/gateway.component.ts
View file @
709335f3
...
@@ -28,7 +28,6 @@ export class GatewayComponent implements OnInit {
...
@@ -28,7 +28,6 @@ export class GatewayComponent implements OnInit {
isLoading
=
false
;
isLoading
=
false
;
isAllCheck
=
false
;
isAllCheck
=
false
;
isIndeterminate
=
false
;
isIndeterminate
=
false
;
checkArray
=
[];
page
=
1
;
page
=
1
;
rows
=
10
;
rows
=
10
;
total
=
125
;
total
=
125
;
...
@@ -41,9 +40,9 @@ export class GatewayComponent implements OnInit {
...
@@ -41,9 +40,9 @@ export class GatewayComponent implements OnInit {
addReq
=
{};
addReq
=
{};
bindReq
=
{};
bindReq
=
{};
divideReq
=
{};
divideReq
=
{};
nobind
=
''
;
canbind
=
false
;
canbind
=
false
;
canUnbind
=
false
;
canUnbind
=
false
;
isCheckedOne
=
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
)
{
...
@@ -61,8 +60,6 @@ export class GatewayComponent implements OnInit {
...
@@ -61,8 +60,6 @@ export class GatewayComponent implements OnInit {
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
?
1
:
0
;
return
one
;
});
this
.
total
=
data
.
total
;
this
.
total
=
data
.
total
;
this
.
initBindArray
(
data
.
rows
);
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
:
'操作成功'
);
}
else
if
(
data
.
code
===
0
)
{
}
else
if
(
data
.
code
===
0
)
{
...
@@ -78,21 +75,11 @@ export class GatewayComponent implements OnInit {
...
@@ -78,21 +75,11 @@ export class GatewayComponent implements OnInit {
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
this
.
api
.
loginlog
.
getAll
(
this
.
page
,
this
.
rows
,
[
''
,
this
.
next
]);
}
}
initBindArray
(
obj
)
{
initCheckArray
(
b
)
{
obj
.
map
((
one
,
index
)
=>
{
if
(
b
)
{
if
(
!
one
.
isOn
)
{
this
.
isCheckedOne
=
true
;
this
.
nobind
+=
'&'
+
index
;
}
});
}
initCheckArray
(
n
,
b
)
{
const
obj
=
[];
while
(
n
>
0
)
{
obj
.
push
(
b
);
n
--
;
}
}
this
.
checkArray
=
obj
;
this
.
data
.
map
((
one
)
=>
one
.
checked
=
b
)
;
}
}
onSearch
()
{
onSearch
()
{
...
@@ -103,37 +90,46 @@ export class GatewayComponent implements OnInit {
...
@@ -103,37 +90,46 @@ export class GatewayComponent implements OnInit {
checkAll
(
e
)
{
checkAll
(
e
)
{
this
.
isIndeterminate
=
false
;
this
.
isIndeterminate
=
false
;
this
.
initCheckArray
(
this
.
checkArray
.
length
,
e
);
this
.
initCheckArray
(
e
);
this
.
checkCanBind
();
}
}
oneCheck
(
i
)
{
oneCheck
()
{
const
x
=
this
.
checkArray
.
filter
(
k
=>
k
).
length
;
this
.
isCheckedOne
=
true
;
if
(
x
===
this
.
checkArray
.
length
)
{
this
.
isIndeterminate
=
false
;
this
.
isIndeterminate
=
false
;
this
.
isAllCheck
=
false
;
const
sum
=
this
.
data
.
filter
((
one
)
=>
one
.
checked
).
length
;
if
(
sum
===
this
.
data
.
length
)
{
this
.
isAllCheck
=
true
;
this
.
isAllCheck
=
true
;
}
else
if
(
x
===
0
)
{
}
else
if
(
sum
===
0
)
{
this
.
isCheckedOne
=
false
;
this
.
canbind
=
false
;
this
.
canbind
=
false
;
this
.
canUnbind
=
false
;
this
.
canUnbind
=
false
;
this
.
isIndeterminate
=
false
;
this
.
isAllCheck
=
false
;
}
else
{
}
else
{
this
.
isIndeterminate
=
true
;
this
.
isIndeterminate
=
true
;
this
.
isAllCheck
=
false
;
}
}
this
.
checkCanBind
();
}
}
filter
(
a
,
b
)
{
checkCanBind
()
{
console
.
log
(
a
,
b
);
const
obj
=
this
.
data
.
filter
(
one
=>
one
.
checked
);
if
(
obj
.
length
===
0
)
{
this
.
canbind
=
false
;
this
.
canUnbind
=
false
;
}
else
{
const
flag
=
obj
[
0
].
isOn
;
if
(
obj
.
filter
(
one
=>
one
.
isOn
===
flag
).
length
===
obj
.
length
)
{
this
.
canbind
=
flag
;
this
.
canUnbind
=
!
flag
;
}
else
{
this
.
canbind
=
false
;
this
.
canUnbind
=
false
;
}
}
}
}
getAllChecked
()
{
filter
(
a
,
b
)
{
const
obj
=
[];
console
.
log
(
a
,
b
);
this
.
data
.
map
((
one
,
index
)
=>
{
if
(
this
.
checkArray
[
index
])
{
obj
.
push
(
index
);
}
});
return
obj
;
}
}
deleteConfirm
(
one
)
{
deleteConfirm
(
one
)
{
...
@@ -154,10 +150,7 @@ export class GatewayComponent implements OnInit {
...
@@ -154,10 +150,7 @@ export class GatewayComponent implements OnInit {
delete
(
one
)
{}
delete
(
one
)
{}
deleteAll
()
{
deleteAll
()
{}
const
obj
=
this
.
getAllChecked
();
console
.
log
(
obj
);
}
allDivide
()
{
allDivide
()
{
this
.
isMulti
=
true
;
this
.
isMulti
=
true
;
...
...
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