Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
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
wangqinghua
smart
Commits
eefb6bfc
Commit
eefb6bfc
authored
Nov 08, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
告警模块
parent
768e4153
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+2
-11
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+2
-4
No files found.
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
eefb6bfc
...
@@ -63,7 +63,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -63,7 +63,6 @@ export class BasicEditComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
tabNum
=
0
;
this
.
tabNum
=
0
;
// this.isBasicEdit = true;
this
.
getTemplate
();
this
.
getTemplate
();
this
.
validateForm
=
{
this
.
validateForm
=
{
...
@@ -106,11 +105,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -106,11 +105,9 @@ export class BasicEditComponent implements OnInit {
//新增
//新增
showModal
(
hostId
,
name
,
gId
):
void
{
showModal
(
hostId
,
name
,
gId
):
void
{
this
.
isBasicEdit
=
true
;
this
.
modalTitle
=
'添加资源'
;
this
.
modalTitle
=
'添加资源'
;
this
.
hostId
=
hostId
;
this
.
hostId
=
hostId
;
this
.
tabNum
=
0
;
this
.
isBasicEdit
=
true
;
this
.
validateForm
=
{
this
.
validateForm
=
{
groups
:
[],
groups
:
[],
hostExtend
:
{
hostExtend
:
{
...
@@ -141,12 +138,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -141,12 +138,9 @@ export class BasicEditComponent implements OnInit {
//编辑
//编辑
editModal
(
hostId
,
name
,
gId
):
void
{
editModal
(
hostId
,
name
,
gId
):
void
{
console
.
log
(
this
.
validateForm
);
this
.
isBasicEdit
=
true
;
this
.
hostId
=
hostId
;
this
.
hostId
=
hostId
;
this
.
modalTitle
=
'编辑资源'
;
this
.
modalTitle
=
'编辑资源'
;
this
.
tabNum
=
0
;
this
.
isBasicEdit
=
true
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
validateForm
=
res
.
data
[
0
];
this
.
validateForm
=
res
.
data
[
0
];
...
@@ -162,13 +156,10 @@ export class BasicEditComponent implements OnInit {
...
@@ -162,13 +156,10 @@ export class BasicEditComponent implements OnInit {
for
(
let
i
=
0
;
i
<
this
.
validateForm
.
groups
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
validateForm
.
groups
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
groupList
.
length
;
j
++
){
for
(
let
j
=
0
;
j
<
this
.
groupList
.
length
;
j
++
){
if
(
this
.
validateForm
.
groups
[
i
].
groupid
==
this
.
groupList
[
j
].
value
){
if
(
this
.
validateForm
.
groups
[
i
].
groupid
==
this
.
groupList
[
j
].
value
){
console
.
log
(
this
.
groupList
[
j
].
value
);
this
.
groupList
[
j
].
checked
=
true
;
this
.
groupList
[
j
].
checked
=
true
;
}
}
}
}
}
}
console
.
log
(
this
.
validateForm
);
// this.message.info(res.errMsg);
}
}
);
);
}
}
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
eefb6bfc
...
@@ -81,14 +81,14 @@ export class BasicComponent implements OnInit {
...
@@ -81,14 +81,14 @@ export class BasicComponent implements OnInit {
const
stack
=
[];
const
stack
=
[];
const
array
=
[];
const
array
=
[];
const
hashMap
=
{};
const
hashMap
=
{};
stack
.
push
({...
root
,
level
:
0
,
expand
:
fals
e
});
stack
.
push
({...
root
,
level
:
0
,
expand
:
tru
e
});
while
(
stack
.
length
!==
0
)
{
while
(
stack
.
length
!==
0
)
{
const
node
=
stack
.
pop
();
const
node
=
stack
.
pop
();
this
.
visitNode
(
node
,
hashMap
,
array
);
this
.
visitNode
(
node
,
hashMap
,
array
);
if
(
node
.
list
)
{
if
(
node
.
list
)
{
for
(
let
i
=
node
.
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
node
.
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
stack
.
push
({...
node
.
list
[
i
],
level
:
node
.
level
+
1
,
expand
:
fals
e
,
parent
:
node
,
gId
:
groupId
,
checked
:
false
});
stack
.
push
({...
node
.
list
[
i
],
level
:
node
.
level
+
1
,
expand
:
tru
e
,
parent
:
node
,
gId
:
groupId
,
checked
:
false
});
}
}
}
}
}
}
...
@@ -119,13 +119,11 @@ export class BasicComponent implements OnInit {
...
@@ -119,13 +119,11 @@ export class BasicComponent implements OnInit {
//添加资源 ,name-分组名称,id-分组id
//添加资源 ,name-分组名称,id-分组id
showBasicEditModal
(
item
)
{
showBasicEditModal
(
item
)
{
console
.
log
(
item
);
this
.
basicEdit
.
showModal
(
item
.
hostId
,
item
.
name
,
item
.
id
);
this
.
basicEdit
.
showModal
(
item
.
hostId
,
item
.
name
,
item
.
id
);
}
}
//编辑资源 name--分组名称,gId-当前分组的id
//编辑资源 name--分组名称,gId-当前分组的id
editBasicModal
(
item
)
{
editBasicModal
(
item
)
{
console
.
log
(
item
);
this
.
basicEdit
.
editModal
(
item
.
hostid
,
item
.
name
,
item
.
gId
);
this
.
basicEdit
.
editModal
(
item
.
hostid
,
item
.
name
,
item
.
gId
);
}
}
...
...
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