feat(flow): 实现应用流程数据转换与边渲染逻辑
parent
c6ffb01e57
commit
3d7037ba62
@ -1,9 +1,23 @@
|
|||||||
import React from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import FlowEditor from '@/pages/flowEditor/index';
|
import FlowEditor from '@/pages/flowEditor/index';
|
||||||
|
import { useSelector } from 'react-redux';
|
||||||
|
import { getAppEventData, getAppEventList } from '@/api/appEvent';
|
||||||
|
|
||||||
const ApplicationContainer = () => {
|
const ApplicationContainer = () => {
|
||||||
|
const { info } = useSelector((state: any) => state.ideContainer);
|
||||||
|
const [appFlowList, setAppFlowList] = useState([]);
|
||||||
|
|
||||||
|
const getAppFlowList = async () => {
|
||||||
|
const res: any = await getAppEventList(info.id);
|
||||||
|
if (res.code === 200) setAppFlowList(res.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getAppFlowList();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FlowEditor useDefault={false} />
|
<FlowEditor initialData={appFlowList} useDefault={false} />
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue