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
zhichao
2 years ago
Commit
ddc8ddcb42b84e0f46bcbb9f9224a59219aa9faf
1 parent
0c19f6ce
fix:迁移采集协议管理页面
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/protocolAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/protocolIndex.js
hg-monitor-web-base/src/main/resources/static/src/controller/protocolAdd.js
View file @
ddc8ddc
...
...
@@ -19,18 +19,17 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
var
msg
=
''
;
var
url
=
common
.
domainName
+
'/api-web/manage/protocol/checkUniqueCode'
;
//var protocolId = $("#protocolAddForm").find("input[name='protocolId']");
var
data
=
{
protocolCode
:
value
,
access
_t
oken
:
accessToken
};
var
data
=
{
protocolCode
:
value
,
access
T
oken
:
accessToken
};
if
(
id
)
{
data
[
'notProtocolId'
]
=
id
;
}
$
.
ajax
({
admin
.
req
({
url
:
url
,
data
:
data
,
async
:
false
,
success
:
function
(
res
)
{
if
(
res
.
object
!=
null
)
{
msg
=
'当前名称已存在'
}
async
:
false
}).
done
(
function
(
res
)
{
if
(
res
.
object
!=
null
)
{
msg
=
'当前名称已存在'
}
})
return
msg
...
...
@@ -39,7 +38,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay
form
.
verify
(
verify
);
if
(
code
)
{
var
url
=
common
.
domainName
+
'/api-web/manage/protocol/getById'
;
$
.
get
(
url
,
{
'protocolCode'
:
code
,
'access_token'
:
accessToken
},
function
(
res
)
{
admin
.
req
({
url
:
url
,
data
:
{
protocolCode
:
code
}}).
done
(
function
(
res
)
{
if
(
res
.
object
)
{
var
bean
=
res
.
object
var
param
=
res
.
data
;
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/protocolIndex.js
View file @
ddc8ddc
...
...
@@ -256,22 +256,20 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
var
submitData
=
layui
.
form
.
val
(
'protocol-add-form'
);
submitData
.
protocolParamList
=
paramList
;
var
loading
=
layer
.
load
(
2
)
$
.
ajax
({
url
:
common
.
domainName
+
'/api-web/manage/protocol/save?access_token='
+
accessToken
,
admin
.
req
({
url
:
common
.
domainName
+
'/api-web/manage/protocol/save'
,
type
:
'post'
,
data
:
JSON
.
stringify
(
submitData
),
contentType
:
"application/json;charset=utf-8"
,
async
:
false
,
success
:
function
(
res
)
{
// layer.closeAll();
layer
.
close
(
indexm
);
//joke modify 20210303
layer
.
closeAll
(
'loading'
);
reloadTable
();
},
error
:
function
()
{
layer
.
closeAll
(
'loading'
);
}
})
async
:
false
}).
done
(
function
(
res
)
{
// layer.closeAll();
layer
.
close
(
indexm
);
//joke modify 20210303
layer
.
closeAll
(
'loading'
);
reloadTable
();
}.
catch
(
function
()
{
layer
.
closeAll
(
'loading'
);
}))
});
},
...
...
Please
register
or
login
to post a comment