控制台页面及时刷新列表

This commit is contained in:
bwcx_jzy 2020-03-21 23:17:36 +08:00
parent 0af07a81ff
commit 435e1ef466
5 changed files with 30 additions and 15 deletions

View File

@ -160,7 +160,7 @@
maxmin: true,
};
$.extend(newData, options);
layer.open(newData);
return layer.open(newData);
}
function getSocketHost() {

View File

@ -354,11 +354,16 @@
function refreshProjectData() {
if (copyId && copyId.length > 0) {
// 通过副本集打开不刷新
try {
var reloadCopyTable = top.frames["manageList"].reloadCopyTable;
reloadCopyTable && reloadCopyTable();
} catch (e) {
}
return;
}
try {
top.frames["manageList"].location.reload();
var reloadTable = top.frames["manageList"].reloadTable;
reloadTable && reloadTable();
} catch (e) {
}
}

View File

@ -229,7 +229,12 @@
success: function (data) {
layer.msg(data.msg);
if (200 === data.code) {
autoClose(group);
try {
var changeGroup = parent.window['changeGroup'];
changeGroup && changeGroup(group);
} catch (e) {
}
autoClose();
}
}
});

View File

@ -140,12 +140,11 @@
// 管理
function manageApplication(data) {
var url = './manage/console?id=' + projectId + "&copyId=" + data.id;
tabChange({
id: projectId + "_" + data.id,
url: url,
title: projectId + ' -副本管理-' + data.id,
title: projectId + ' -副本管理-' + data.id
});
}
}

View File

@ -68,6 +68,8 @@
const apiWhere = {};
var cachePortInfo;
var copyIframeWin;
function getCacheItemInfo(data, key) {
if (!data.status) {
return "";
@ -183,7 +185,10 @@
title: data.id + '- 项目副本集',
shade: 0.8,
area: ['80%', '60%'],
content: './projectCopyLList.html?id=' + data.id
content: './projectCopyLList.html?id=' + data.id,
success: function (layero, index) {
copyIframeWin = window[layero.find('iframe')[0]['name']];
}
});
} else if ('file' === event) {
fileManage(data);
@ -240,14 +245,15 @@
});
}
function reloadTable(group) {
if (group) {
changeGroup(group);
window.location.reload();
} else {
table.reload('table_project', {
where: apiWhere
});
function reloadTable() {
table.reload('table_project', {
where: apiWhere
});
}
function reloadCopyTable() {
if (copyIframeWin) {
copyIframeWin.reloadTable && copyIframeWin.reloadTable();
}
}
</script>