|
|
|
@@ -1,15 +1,15 @@ |
|
|
|
import { useDraggable } from '@/hooks/useDraggable'; |
|
|
|
// import { useDraggable } from '@/hooks/useDraggable'; |
|
|
|
import { getWorkspaceOverviewReq } from '@/services/workspace'; |
|
|
|
import { ExperimentInstance } from '@/types'; |
|
|
|
import { to } from '@/utils/promise'; |
|
|
|
import { Divider, Flex } from 'antd'; |
|
|
|
import { useEffect, useState } from 'react'; |
|
|
|
import Draggable from 'react-draggable'; |
|
|
|
// import Draggable from 'react-draggable'; |
|
|
|
import AssetsManagement from './components/AssetsManagement'; |
|
|
|
import ExperimentChart, { type ExperimentStatistics } from './components/ExperimentChart'; |
|
|
|
import ExperitableTable from './components/ExperimentTable'; |
|
|
|
import QuickStart from './components/QuickStart'; |
|
|
|
import RobotFrame from './components/RobotFrame'; |
|
|
|
// import RobotFrame from './components/RobotFrame'; |
|
|
|
import TotalStatistics from './components/TotalStatistics'; |
|
|
|
import UserPoints from './components/UserPoints'; |
|
|
|
import UserSpace from './components/UserSpace'; |
|
|
|
@@ -25,10 +25,10 @@ type OverviewData = { |
|
|
|
|
|
|
|
function Workspace() { |
|
|
|
const [overviewData, setOverviewData] = useState<OverviewData>(); |
|
|
|
const [robotFrameVisible, setRobotFrameVisible] = useState(false); |
|
|
|
const { handleStart, handleStop, handleDrag, handleClick } = useDraggable(() => |
|
|
|
setRobotFrameVisible((prev) => !prev), |
|
|
|
); |
|
|
|
// const [robotFrameVisible, setRobotFrameVisible] = useState(false); |
|
|
|
// const { handleStart, handleStop, handleDrag, handleClick } = useDraggable(() => |
|
|
|
// setRobotFrameVisible((prev) => !prev), |
|
|
|
// ); |
|
|
|
const users: number[] = new Array(8).fill(0); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
@@ -85,7 +85,7 @@ function Workspace() { |
|
|
|
<AssetsManagement></AssetsManagement> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag} bounds="body"> |
|
|
|
{/* <Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag} bounds="body"> |
|
|
|
<img |
|
|
|
className={styles['workspace__robot-img']} |
|
|
|
src={require('@/assets/img/robot.png')} |
|
|
|
@@ -98,7 +98,7 @@ function Workspace() { |
|
|
|
<RobotFrame |
|
|
|
visible={robotFrameVisible} |
|
|
|
onClose={() => setRobotFrameVisible(false)} |
|
|
|
></RobotFrame> |
|
|
|
></RobotFrame> */} |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
|