|
|
|
@ -5,13 +5,15 @@ import SideBar from './sideBar';
|
|
|
|
import LogBar from './logBar';
|
|
|
|
import LogBar from './logBar';
|
|
|
|
import RightSideBar from './rightSideBar';
|
|
|
|
import RightSideBar from './rightSideBar';
|
|
|
|
import NavBar, { NavBarRef } from './navBar';
|
|
|
|
import NavBar, { NavBarRef } from './navBar';
|
|
|
|
import ProjectContainer from '@/pages/orchestration/project';
|
|
|
|
|
|
|
|
import ApplicationContainer from '@/pages/orchestration/application';
|
|
|
|
|
|
|
|
import { Selected } from '@/pages/ideContainer/types';
|
|
|
|
import { Selected } from '@/pages/ideContainer/types';
|
|
|
|
import { updateInfo } from '@/store/ideContainer';
|
|
|
|
import { updateInfo } from '@/store/ideContainer';
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
import { getAppListBySceneId } from '@/api/apps';
|
|
|
|
import { getAppListBySceneId } from '@/api/apps';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import ProjectContainer from '@/pages/orchestration/project';
|
|
|
|
|
|
|
|
import ApplicationContainer from '@/pages/orchestration/application';
|
|
|
|
|
|
|
|
import EventContainer from '@/pages/orchestration/event';
|
|
|
|
|
|
|
|
|
|
|
|
type UrlParamsOptions = {
|
|
|
|
type UrlParamsOptions = {
|
|
|
|
identity?: string;
|
|
|
|
identity?: string;
|
|
|
|
[key: string]: string
|
|
|
|
[key: string]: string
|
|
|
|
@ -19,7 +21,6 @@ type UrlParamsOptions = {
|
|
|
|
|
|
|
|
|
|
|
|
const CompListComponent = () => <div style={{ height: '100%', width: '100%' }}>组件列表</div>;
|
|
|
|
const CompListComponent = () => <div style={{ height: '100%', width: '100%' }}>组件列表</div>;
|
|
|
|
const AppInstanceComponent = () => <div style={{ height: '100%', width: '100%' }}>应用实例</div>;
|
|
|
|
const AppInstanceComponent = () => <div style={{ height: '100%', width: '100%' }}>应用实例</div>;
|
|
|
|
const EventComponent = () => <div style={{ height: '100%', width: '100%' }}>事件</div>;
|
|
|
|
|
|
|
|
const GlobalVarComponent = () => <div style={{ height: '100%', width: '100%' }}>全局变量</div>;
|
|
|
|
const GlobalVarComponent = () => <div style={{ height: '100%', width: '100%' }}>全局变量</div>;
|
|
|
|
const AppCompComponent = () => <div style={{ height: '100%', width: '100%' }}>组件</div>;
|
|
|
|
const AppCompComponent = () => <div style={{ height: '100%', width: '100%' }}>组件</div>;
|
|
|
|
const MyComponents = () => <div style={{ height: '100%', width: '100%' }}>我的组件</div>;
|
|
|
|
const MyComponents = () => <div style={{ height: '100%', width: '100%' }}>我的组件</div>;
|
|
|
|
@ -68,6 +69,7 @@ function IDEContainer() {
|
|
|
|
|
|
|
|
|
|
|
|
// 当selected.path变化时,添加到已打开的tab集合中
|
|
|
|
// 当selected.path变化时,添加到已打开的tab集合中
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
console.log('selected:', selected);
|
|
|
|
if (selected.key) {
|
|
|
|
if (selected.key) {
|
|
|
|
setOpenedTabs(prev => new Set(prev).add(selected.key!));
|
|
|
|
setOpenedTabs(prev => new Set(prev).add(selected.key!));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -135,7 +137,7 @@ function IDEContainer() {
|
|
|
|
case 'appInstance':
|
|
|
|
case 'appInstance':
|
|
|
|
return <AppInstanceComponent />;
|
|
|
|
return <AppInstanceComponent />;
|
|
|
|
case 'event':
|
|
|
|
case 'event':
|
|
|
|
return <EventComponent />;
|
|
|
|
return <EventContainer />;
|
|
|
|
case 'globalVar':
|
|
|
|
case 'globalVar':
|
|
|
|
return <GlobalVarComponent />;
|
|
|
|
return <GlobalVarComponent />;
|
|
|
|
case 'appCompList':
|
|
|
|
case 'appCompList':
|
|
|
|
@ -215,6 +217,7 @@ function IDEContainer() {
|
|
|
|
selected={selected}
|
|
|
|
selected={selected}
|
|
|
|
identity={urlParams.identity}
|
|
|
|
identity={urlParams.identity}
|
|
|
|
subMenuData={subMenuData}
|
|
|
|
subMenuData={subMenuData}
|
|
|
|
|
|
|
|
showSubMenu={!['event', 'globalVar', 'appCompList'].includes(selected.key)}
|
|
|
|
onMenuSelect={(select) => setSelected(select)}
|
|
|
|
onMenuSelect={(select) => setSelected(select)}
|
|
|
|
onRefresh={() => getAppList()}
|
|
|
|
onRefresh={() => getAppList()}
|
|
|
|
onDeleteApp={(appId) => {
|
|
|
|
onDeleteApp={(appId) => {
|
|
|
|
@ -247,11 +250,12 @@ function IDEContainer() {
|
|
|
|
{/*页面渲染*/}
|
|
|
|
{/*页面渲染*/}
|
|
|
|
{renderContent()}
|
|
|
|
{renderContent()}
|
|
|
|
{/*底部日志栏*/}
|
|
|
|
{/*底部日志栏*/}
|
|
|
|
{urlParams.identity !== 'componentDevelopment' && <LogBar></LogBar>}
|
|
|
|
{urlParams.identity !== 'componentDevelopment' && !['event', 'globalVar', 'appCompList'].includes(selected.key) &&
|
|
|
|
|
|
|
|
<LogBar></LogBar>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<RightSideBar></RightSideBar>
|
|
|
|
{!['event', 'globalVar', 'appCompList'].includes(selected.key) && <RightSideBar></RightSideBar>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|