fix: 拓扑图组名称保存去除两头空格
This commit is contained in:
@@ -142,21 +142,22 @@ function fnModalOk() {
|
|||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
const hide = message.loading({ content: t('common.loading') });
|
const hide = message.loading({ content: t('common.loading') });
|
||||||
// 根据类型选择函数
|
// 根据类型选择函数
|
||||||
saveGraphData(from.group, graphG6.value.save())
|
const groupName = from.group.trim()
|
||||||
|
saveGraphData(groupName, graphG6.value.save())
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: t('views.monitor.topologyBuild.saveOk', {
|
content: t('views.monitor.topologyBuild.saveOk', {
|
||||||
group: from.group,
|
group: groupName,
|
||||||
}),
|
}),
|
||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
fnGraphDataGroups(true);
|
fnGraphDataGroups(true);
|
||||||
graphState.group = from.group;
|
graphState.group = groupName;
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: t('views.monitor.topologyBuild.saveFail', {
|
content: t('views.monitor.topologyBuild.saveFail', {
|
||||||
group: from.group,
|
group: groupName,
|
||||||
}),
|
}),
|
||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user