Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
袁晋鹏
3 years ago
Commit
4c956fde514c814b1bc5cd9aa6da9e1230cc0bfb
1 parent
6ca1c68e
新增一行到最下面的bug解决
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
View file @
4c956fd
...
...
@@ -934,7 +934,24 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
clone
.
find
(
"select.policyparam"
).
html
(
options
);
clone
.
find
(
"select.condition"
).
html
(
conditionoptions
);
clone
.
find
(
"input[type=tel]"
).
val
(
''
);
$
(
`#
$
{
id
}
`
).
after
(
clone
).
after
(
cond
);
//获取最后一个添加的id
var
doms
=
$
(
`
div
[
id
^=
$
{
id
}][
id$
=
'condition'
][
id
!=
$
{
id
}]
`
);
var
lastid
=
''
;
console
.
log
(
doms
);
if
(
$
(
doms
)
&&
$
(
doms
).
length
>
0
)
{
$
(
doms
).
each
(
function
(
i
,
v
)
{
var
$domId
=
$
(
v
).
attr
(
"id"
);
var
trimdomid
=
$domId
.
substring
(
0
,
$domId
.
length
-
10
)
if
(
trimdomid
>
lastid
)
{
lastid
=
trimdomid
;
}
});
}
else
{
lastid
=
id
;
}
$
(
`#
$
{
lastid
}
`
).
after
(
clone
).
after
(
cond
);
form
.
render
();
//渲染新增事件
$
(
"i.policy-input-add"
).
off
(
"click"
).
on
(
"click"
,
function
(){
...
...
Please
register
or
login
to post a comment