fix: 静态资源文件路径解析
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
} from '@/api/monitor/topology';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { Form, Modal, message } from 'ant-design-vue/es';
|
||||
import { parseBasePath } from '@/plugins/file-static-url';
|
||||
const { t } = useI18n();
|
||||
const { graphMode, graphModeOptions, handleRanderGraph, handleChangeMode } =
|
||||
useGraph();
|
||||
@@ -80,6 +81,14 @@ function fnGraphDataLoad(reload: boolean = false) {
|
||||
getGraphData(graphState.group)
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
res.data.nodes.map((item: any) => {
|
||||
// 图片路径处理
|
||||
if (item.img) item.img = parseBasePath(item.img);
|
||||
if (item.icon.show && item.icon?.img) {
|
||||
item.icon.img = parseBasePath(item.icon.img);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
graphState.data = res.data;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user