feat(ideContainer): 获取应用详情的同时获取应用下的所有事件

master
钟良源 3 months ago
parent d080efff5b
commit 4c93714a1c

@ -21,6 +21,7 @@ import { updateMenuData, updateFlowData, updateCurrentAppData } from '@/store/id
import { addApp, getProjectEnv, editApp, deleteApp } from '@/api/apps'; import { addApp, getProjectEnv, editApp, deleteApp } from '@/api/apps';
import _ from 'lodash'; import _ from 'lodash';
import { getAppInfoNew } from '@/api/appRes'; import { getAppInfoNew } from '@/api/appRes';
import { getAppEventData } from '@/api/appEvent';
const TreeNode = Tree.Node; const TreeNode = Tree.Node;
const FormItem = Form.Item; const FormItem = Form.Item;
@ -315,6 +316,7 @@ const SideBar: React.FC<SideBarProps> = ({
const currentMenu = _.cloneDeep(menuData[identity]); const currentMenu = _.cloneDeep(menuData[identity]);
const index = currentMenu.findIndex(v => v.key === parentKey); const index = currentMenu.findIndex(v => v.key === parentKey);
const res: any = await getAppInfoNew(data.id); const res: any = await getAppInfoNew(data.id);
getAppEventData(data.id);
if (res.code === 200) { if (res.code === 200) {
const children = currentMenu[index].children.find(v => v.id === data.id); const children = currentMenu[index].children.find(v => v.id === data.id);
children.children[0].children = res.data.events.map(item => { children.children[0].children = res.data.events.map(item => {

Loading…
Cancel
Save