|
|
|
@ -310,12 +310,11 @@ const SideBar: React.FC<SideBarProps> = ({
|
|
|
|
}, [menu, searchValue, activeKey]);
|
|
|
|
}, [menu, searchValue, activeKey]);
|
|
|
|
|
|
|
|
|
|
|
|
const getProjectEnvData = async (data) => {
|
|
|
|
const getProjectEnvData = async (data) => {
|
|
|
|
if (!data.path || !data.key) return;
|
|
|
|
if (!data.path || !data.key || data.hasOwnProperty('compData')) return;
|
|
|
|
const parentKey = menu[activeKey]?.key;
|
|
|
|
const parentKey = menu[activeKey]?.key;
|
|
|
|
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);
|
|
|
|
console.log('res.data:', res.data.subs);
|
|
|
|
|
|
|
|
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 => {
|
|
|
|
@ -340,7 +339,11 @@ const SideBar: React.FC<SideBarProps> = ({
|
|
|
|
title: info.flowName,
|
|
|
|
title: info.flowName,
|
|
|
|
children: null,
|
|
|
|
children: null,
|
|
|
|
icon: '/ideContainer/icon/tool.png',
|
|
|
|
icon: '/ideContainer/icon/tool.png',
|
|
|
|
compData: info
|
|
|
|
compData: info,
|
|
|
|
|
|
|
|
path: 'complexFlow',
|
|
|
|
|
|
|
|
key: info.flowId,
|
|
|
|
|
|
|
|
pathTitle: `${data.title} / ${info.flowName}`,
|
|
|
|
|
|
|
|
parentKey: 'appList'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -614,7 +617,6 @@ const SideBar: React.FC<SideBarProps> = ({
|
|
|
|
onSelect={async (_selectedKeys, info) => {
|
|
|
|
onSelect={async (_selectedKeys, info) => {
|
|
|
|
const selectedNode = info.node;
|
|
|
|
const selectedNode = info.node;
|
|
|
|
const originalData = selectedNode.props.dataRef;
|
|
|
|
const originalData = selectedNode.props.dataRef;
|
|
|
|
console.log(originalData);
|
|
|
|
|
|
|
|
if (selected?.parentKey === 'appList') {
|
|
|
|
if (selected?.parentKey === 'appList') {
|
|
|
|
await getProjectEnvData(originalData);
|
|
|
|
await getProjectEnvData(originalData);
|
|
|
|
|
|
|
|
|
|
|
|
|