diff --git a/public/video/new_1to2.mp4 b/public/video/new_1to2.mp4 new file mode 100644 index 0000000..92f12e2 Binary files /dev/null and b/public/video/new_1to2.mp4 differ diff --git a/public/video/new_boom.mp4 b/public/video/new_boom.mp4 new file mode 100644 index 0000000..560aaf0 Binary files /dev/null and b/public/video/new_boom.mp4 differ diff --git a/public/video/new_flr1.mp4 b/public/video/new_flr1.mp4 new file mode 100644 index 0000000..ed46558 Binary files /dev/null and b/public/video/new_flr1.mp4 differ diff --git a/public/video/new_flr2.mp4 b/public/video/new_flr2.mp4 new file mode 100644 index 0000000..b7016cd Binary files /dev/null and b/public/video/new_flr2.mp4 differ diff --git a/src/components/模块组件/窑炉内部/Center/index.jsx b/src/components/模块组件/窑炉内部/Center/index.jsx new file mode 100644 index 0000000..b063a3b --- /dev/null +++ b/src/components/模块组件/窑炉内部/Center/index.jsx @@ -0,0 +1,87 @@ +import { useRef, useState } from 'react'; +import cls from './index.module.css'; + +function KilnCenter() { + const videoRef = useRef(null); + const [currentVideo, setCurrentVideo] = useState( + 'http://localhost:8000/video/new_boom.mp4', + ); + const [activeFlr, setActiveFlr] = useState(0); + + console.log('video', videoRef); + + function handleClickFlr(flr) { + if (flr == 1) { + setActiveFlr(1); + setCurrentVideo('http://localhost:8000/video/new_flr1.mp4'); + } else { + setActiveFlr(2); + setCurrentVideo('http://localhost:8000/video/new_flr2.mp4'); + } + } + + return ( +
+
+
handleClickFlr(1)} + > + 一层 +
+
handleClickFlr(2)} + > + 二层 +
+
+ +
+ +
+
+ ); +} + +export default KilnCenter; diff --git a/src/components/模块组件/窑炉内部/Center/index.module.css b/src/components/模块组件/窑炉内部/Center/index.module.css new file mode 100644 index 0000000..701d22a --- /dev/null +++ b/src/components/模块组件/窑炉内部/Center/index.module.css @@ -0,0 +1,25 @@ +.menuItem { + transition: all 0.3s ease-out; + cursor: pointer; + user-select: none; + padding: 10px 50px; + font-size: 32px; + line-height: 48px; + letter-spacing: 6px; + background: url(../../../../assets/bg_center_menu.png) no-repeat; + background-size: 100% 50%; + background-position: bottom; + color: #00fff788; + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', + 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Microsoft YaHei UI', + 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif; +} + +.menuItem.active, +.menuItem:hover { + color: #00fff7; +} + +.menuItem:not(:first-child) { + margin-left: 50px; +} diff --git a/src/pages/总览/index.jsx b/src/pages/总览/index.jsx index b282c34..48339d1 100644 --- a/src/pages/总览/index.jsx +++ b/src/pages/总览/index.jsx @@ -3,7 +3,7 @@ import BottomBar from '../../components/模块组件/总览/Bottom'; import RightBar from '../../components/模块组件/总览/RightSide'; import CenterTopData from '../../components/模块组件/总览/CenterTop'; import { AnimatePresence, motion } from 'framer-motion'; - +import KilnCenter from '../../components/模块组件/窑炉内部/Center'; import KilnInnerLeft from '../../components/模块组件/窑炉内部/LeftSide'; import KilnInnerRight from '../../components/模块组件/窑炉内部/RightSide'; import FireCheckLeft from '../../components/模块组件/退火监测/LeftSide'; @@ -74,6 +74,8 @@ export default function Home({ active }) { )} + {active == '窑炉内部' && } + {active == '退火监测' &&
} {active == '质检统计' &&
} diff --git a/src/pages/总览/index.module.css b/src/pages/总览/index.module.css new file mode 100644 index 0000000..a07ff4c --- /dev/null +++ b/src/pages/总览/index.module.css @@ -0,0 +1,25 @@ +.menuItem { + transition: all 0.3s ease-out; + cursor: pointer; + user-select: none; + padding: 10px 50px; + font-size: 32px; + line-height: 48px; + letter-spacing: 6px; + background: url(../../assets/bg_center_menu.png) no-repeat; + background-size: 100% 50%; + background-position: bottom; + color: #00fff788; + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', + 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Microsoft YaHei UI', + 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif; +} + +.menuItem.active, +.menuItem:hover { + color: #00fff7; +} + +.menuItem:not(:first-child) { + margin-left: 50px; +}