Merge branch 'master' of https://gitea.xn--7p0a.site/2312072104/dm
This commit is contained in:
commit
1055dd1807
|
@ -147,4 +147,5 @@ function Operation2() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Operation2;
|
export default Operation2;
|
|
@ -78,6 +78,17 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
animation: slideInFromUp 0.5s ease-out forwards;
|
||||||
|
}
|
||||||
|
@keyframes slideInFromUp {
|
||||||
|
from {
|
||||||
|
transform: translateY(100%);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: translateY(0);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.warning-content {
|
.warning-content {
|
||||||
width: 1420px;
|
width: 1420px;
|
||||||
|
|
|
@ -4,17 +4,43 @@ import '../Training/TrainingPage.css'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
|
||||||
const WarningModal = ({ isOpen, onClose }) => {
|
// const WarningModal = ({ isOpen, onClose }) => {
|
||||||
if (!isOpen) return null; // 如果警告框不显示,则不渲染
|
|
||||||
|
|
||||||
return (
|
// if (!isOpen) return; // 如果警告框不显示,则不渲染
|
||||||
<div className="warning-box">
|
// return (
|
||||||
|
// <div className="warning-box">
|
||||||
|
// <div className="warning-content">
|
||||||
|
// <span className="close-button" onClick={onClose}>×</span>
|
||||||
|
// <p>提醒 : 请及时完成实训内容!!!</p>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
||||||
|
const WarningModal = ({ isOpen, onClose }) => {
|
||||||
|
// 添加一个状态来控制是否应用动画
|
||||||
|
const [isClosing, setIsClosing] = useState(false);
|
||||||
|
|
||||||
|
// 定义关闭警告框的函数
|
||||||
|
const handleClose = () => {
|
||||||
|
setIsClosing(true); // 设置状态以触发动画
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsClosing(false); // 确保动画结束后状态能够重置
|
||||||
|
onClose(); // 动画结束后调用传入的onClose函数来关闭Modal
|
||||||
|
}, 500); // 500ms 应与CSS动画持续时间一致
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!isOpen || !isClosing) {
|
||||||
|
return (
|
||||||
|
<div className={`warning-box ${isClosing ? 'slideUpFadeOut' : ''}`}>
|
||||||
<div className="warning-content">
|
<div className="warning-content">
|
||||||
<span className="close-button" onClick={onClose}>×</span>
|
{!isClosing && <span className="close-button" onClick={handleClose}>×</span>}
|
||||||
<p>提醒 : 请及时完成实训内容!!!</p>
|
<p>提醒 : 请及时完成实训内容!!!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const list4=[
|
const list4=[
|
||||||
|
@ -23,6 +49,7 @@ const list4=[
|
||||||
]
|
]
|
||||||
// 首页 学习分析
|
// 首页 学习分析
|
||||||
function SubjectPage(){
|
function SubjectPage(){
|
||||||
|
|
||||||
const student_ID=localStorage.getItem('islogin')
|
const student_ID=localStorage.getItem('islogin')
|
||||||
if(student_ID==null){
|
if(student_ID==null){
|
||||||
alert('登录过期,请重新登录')
|
alert('登录过期,请重新登录')
|
||||||
|
@ -48,13 +75,10 @@ function SubjectPage(){
|
||||||
|
|
||||||
// 控制警告框显示的状态
|
// 控制警告框显示的状态
|
||||||
const [isWarningOpen, setWarningOpen] = useState(false);
|
const [isWarningOpen, setWarningOpen] = useState(false);
|
||||||
|
|
||||||
// 打开警告框
|
// 打开警告框
|
||||||
const openWarning = () => setWarningOpen(true);
|
const openWarning = () => setWarningOpen(true);
|
||||||
|
|
||||||
// 关闭警告框
|
// 关闭警告框
|
||||||
const closeWarning = () => setWarningOpen(false);
|
const closeWarning = () => setWarningOpen(false);
|
||||||
|
|
||||||
// 可以在适当的时机调用openWarning函数来显示警告框
|
// 可以在适当的时机调用openWarning函数来显示警告框
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
openWarning();
|
openWarning();
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
||||||
import api from '../../api';
|
import api from '../../api';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import './SignUpForm.css'
|
import './SignUpForm.css'
|
||||||
import Sign from './注册页面右.png'
|
import Sign from './signup.png'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
|
@ -1,6 +1,6 @@
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import "./SignInPage.css"
|
import "./SignInPage.css"
|
||||||
import Login from "./登录页面左.png"
|
import Login from "./signin.png"
|
||||||
import React,{ useState } from 'react'
|
import React,{ useState } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
|
@ -23,8 +23,8 @@ import ClassID from '../TeacherPages/classlistpages/classId';
|
||||||
import ManageTest from '../TeacherPages/TestManage/ManageTest';
|
import ManageTest from '../TeacherPages/TestManage/ManageTest';
|
||||||
import SendTest from '../TeacherPages/TestManage/SendTest';
|
import SendTest from '../TeacherPages/TestManage/SendTest';
|
||||||
import Marking from '../TeacherPages/MarkingPages/Marking';
|
import Marking from '../TeacherPages/MarkingPages/Marking';
|
||||||
import SendTrain from '../TeacherPages/Trainmanage/SendTrain';
|
import SendTrain from '../TeacherPages/TrainManage/SendTrain';
|
||||||
import TrainManage from '../TeacherPages/Trainmanage/Trainmanage';
|
import TrainManage from '../TeacherPages/TrainManage/Trainmanage';
|
||||||
import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
|
import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
|
||||||
import List_pods from '../TeacherPages/list_pods/list_pods';
|
import List_pods from '../TeacherPages/list_pods/list_pods';
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ function App() {
|
||||||
<Route path="exam/:examId" element={<Exam />} />{/* 练习-考试页面 */}
|
<Route path="exam/:examId" element={<Exam />} />{/* 练习-考试页面 */}
|
||||||
<Route path='/teacher/sendtest' element={<SendTest />}/> {/* 考试管理-发布试卷 */}
|
<Route path='/teacher/sendtest' element={<SendTest />}/> {/* 考试管理-发布试卷 */}
|
||||||
<Route path='/teacher/SendTrain' element={<SendTrain/>}/> {/*实训管理-发布实训*/}
|
<Route path='/teacher/SendTrain' element={<SendTrain/>}/> {/*实训管理-发布实训*/}
|
||||||
<Route path='operation1/:operateID' element={<Operation1/>}/> {/* 实训页面1 */}
|
<Route path='operation1/:operateID' element={<Operation1/>}/> {/* 实训页面1:理论 */}
|
||||||
<Route path='operation2/:operateID' element={<Operation2/>}/> {/* 实训页面2 */}
|
<Route path='operation2/:operateID' element={<Operation2/>}/> {/* 实训页面2:数据库 */}
|
||||||
<Route path='teacher/list_pods' element={<List_pods/>}/>
|
<Route path='teacher/list_pods' element={<List_pods/>}/>
|
||||||
<Route path='/refresh' element={<Refresh/>}/>
|
<Route path='/refresh' element={<Refresh/>}/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue