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
xwx
3 years ago
Commit
59be853107c31be4953a38672f24ce9ae94935b4
1 parent
43f6d824
采集协议管理-【1758】-采集协议管理编辑后无法保存
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/protocolIndex.js
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/protocol/add.html
hg-monitor-web-base/src/main/resources/static/src/controller/protocolIndex.js
View file @
59be853
...
...
@@ -237,7 +237,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
if
(
flag
)
{
$
(
".protocol-base-area"
).
css
(
"display"
,
"none"
);
}
form
.
on
(
'submit(protocol-add-form)'
,
function
(
data
)
{
},
yes
:
function
(
index
,
layero
)
{
//确定按钮回调方法
var
flag
=
true
;
//看协议参数名称和参数code、参数排序有没有输入
$
.
each
(
$
(
"#editProtocolParam_add_table"
).
find
(
"input[name='paramName'],input[name='paramCode'],input[name='sort']"
),
function
(
i
,
e
)
{
if
(
!
$
(
e
).
val
())
{
flag
=
false
;
return
;
}
})
if
(
flag
)
{
var
paramList
=
[];
$
.
each
(
$
(
"#editProtocolParam_add_table"
).
find
(
"tbody tr"
),
function
(
i
,
e
)
{
paramList
.
push
({
...
...
@@ -263,8 +274,9 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
contentType
:
"application/json;charset=utf-8"
,
async
:
false
,
success
:
function
(
res
)
{
// layer.closeAll();
layer
.
close
(
index
m
);
//joke modify 20210303
layer
.
close
(
index
);
//joke modify 20210303
layer
.
closeAll
(
'loading'
);
reloadTable
();
},
...
...
@@ -272,20 +284,6 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
layer
.
closeAll
(
'loading'
);
}
})
});
},
yes
:
function
(
index
,
layero
)
{
//确定按钮回调方法
var
flag
=
true
;
//看协议参数名称和参数code、参数排序有没有输入
$
.
each
(
$
(
"#editProtocolParam_add_table"
).
find
(
"input[name='paramName'],input[name='paramCode'],input[name='sort']"
),
function
(
i
,
e
)
{
if
(
!
$
(
e
).
val
())
{
flag
=
false
;
return
;
}
})
if
(
flag
)
{
$
(
'#protocolAddForm'
).
find
(
"button.protocol-add-submit"
).
trigger
(
"click"
)
}
else
{
layer
.
msg
(
"请将参数协议填写完整"
,
{
offset
:
'15px'
,
icon
:
7
,
time
:
1500
});
return
false
;
...
...
@@ -313,4 +311,4 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
}
});
});
\ No newline at end of file
});
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/protocol/add.html
View file @
59be853
...
...
@@ -23,7 +23,7 @@
<textarea
name=
"protocolDesc"
class=
"layui-textarea"
></textarea>
</div>
</div>
<button
type=
"submit"
lay-submit
class
=
"protocol-add-submit"
style=
"display: none"
>
提交
</button>
<button
type=
"submit"
lay-submit
id
=
"protocol-add-submit"
style=
"display: none"
>
提交
</button>
</form>
</div>
<div
class=
"layui-card-body layui-form-pane editProtocolParam-list"
style=
"padding-top: 0px;"
>
...
...
@@ -112,4 +112,4 @@
layui
.
use
(
'protocolAdd'
,
function
(
fn
)
{
fn
({{
d
}});
});
</script>
\ No newline at end of file
</script>
...
...
Please
register
or
login
to post a comment