59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
//服务器状态监测-ajax
|
|
function getServerData() {
|
|
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
|
$.ajax({
|
|
headers: {
|
|
"encrypt": sm3(JSON.stringify({}))
|
|
},
|
|
url: dataUrl + "proteam/pot/resourceMonitor/getServerMonitorList?token=" + token,
|
|
data: {},
|
|
type: 'POST',
|
|
async: true,
|
|
success: function (result) {
|
|
layer.close(loadingMsg);
|
|
if (result.code === 200) {
|
|
if (result.data) {
|
|
setServerData(result.data);
|
|
}
|
|
} else if (result.code === 500) {
|
|
layer.alert(result.msg, {icon: 2})
|
|
} else if (result.code === 401) {
|
|
logout(1);
|
|
}
|
|
}, error: function () {
|
|
layer.close(loadingMsg);
|
|
}
|
|
});
|
|
}
|
|
|
|
// 视频诊断通知-删除
|
|
function delVideoData(id) {
|
|
let param = {
|
|
'id': id
|
|
}
|
|
layer.confirm("确定删除吗?", function () {
|
|
let loadingMsg = layer.msg('数据删除中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
|
$.ajax({
|
|
headers: {
|
|
"encrypt": sm3(JSON.stringify(param))
|
|
},
|
|
url: dataUrl + "proteam/pot/video/delVideoData?token=" + token,
|
|
data: param,
|
|
type: 'POST',
|
|
async: true,
|
|
success: function (result) {
|
|
layer.close(loadingMsg);
|
|
if (result.code === 200) {
|
|
reloadData();
|
|
parent.layer.msg(result.msg, {icon: 1})
|
|
} else if (result.code === 500) {
|
|
layer.alert(result.msg, {icon: 2})
|
|
} else if (result.code === 401) {
|
|
logout(1);
|
|
}
|
|
}, error: function () {
|
|
layer.close(loadingMsg);
|
|
}
|
|
});
|
|
})
|
|
} |