添加修改主机配置页面.

This commit is contained in:
lijiahang
2023-09-22 11:50:56 +08:00
parent 9398f0f4fd
commit fdc3bc6147
27 changed files with 366 additions and 46 deletions

View File

@@ -109,7 +109,9 @@
// 渲染表单
const renderForm = (record: any) => {
Object.keys(formModel).forEach(k => {
formModel[k] = record[k];
if (record.hasOwnProperty(k)) {
formModel[k] = record[k];
}
});
};

View File

@@ -156,6 +156,7 @@
Message.success('删除成功');
// 重新加载数据
await fetchTableData();
} catch (e) {
} finally {
setLoading(false);
}
@@ -184,6 +185,7 @@
pagination.total = data.total;
pagination.current = request.page;
pagination.pageSize = request.limit;
} catch (e) {
} finally {
setLoading(false);
}
@@ -197,8 +199,11 @@
// 获取主机秘钥列表
const fetchHostKeyList = async () => {
const { data } = await getHostKeyList();
cacheStore.set('hostKeys', data);
try {
const { data } = await getHostKeyList();
cacheStore.set('hostKeys', data);
} catch (e) {
}
};
fetchHostKeyList();