This commit is contained in:
30404 2024-06-27 13:43:38 +08:00
commit 1055dd1807
8 changed files with 50 additions and 14 deletions

View File

@ -147,4 +147,5 @@ function Operation2() {
)
}
export default Operation2;

View File

@ -78,6 +78,17 @@
justify-content: center;
align-items: center;
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 {
width: 1420px;

View File

@ -4,17 +4,43 @@ import '../Training/TrainingPage.css'
import axios from 'axios';
// const WarningModal = ({ isOpen, onClose }) => {
// if (!isOpen) return; //
// return (
// <div className="warning-box">
// <div className="warning-content">
// <span className="close-button" onClick={onClose}>×</span>
// <p> : </p>
// </div>
// </div>
// );
// };
const WarningModal = ({ isOpen, onClose }) => {
if (!isOpen) return null; //
//
const [isClosing, setIsClosing] = useState(false);
return (
<div className="warning-box">
//
const handleClose = () => {
setIsClosing(true); //
setTimeout(() => {
setIsClosing(false); //
onClose(); // onCloseModal
}, 500); // 500ms CSS
};
if (!isOpen || !isClosing) {
return (
<div className={`warning-box ${isClosing ? 'slideUpFadeOut' : ''}`}>
<div className="warning-content">
<span className="close-button" onClick={onClose}>×</span>
{!isClosing && <span className="close-button" onClick={handleClose}>×</span>}
<p>提醒 : 请及时完成实训内容</p>
</div>
</div>
);
}
return null;
};
const list4=[
@ -23,6 +49,7 @@ const list4=[
]
//
function SubjectPage(){
const student_ID=localStorage.getItem('islogin')
if(student_ID==null){
alert('登录过期,请重新登录')
@ -48,13 +75,10 @@ function SubjectPage(){
//
const [isWarningOpen, setWarningOpen] = useState(false);
//
const openWarning = () => setWarningOpen(true);
//
const closeWarning = () => setWarningOpen(false);
// openWarning
useEffect(() => {
openWarning();

View File

@ -3,7 +3,7 @@ import React, { useState } from 'react';
import api from '../../api';
import classnames from 'classnames';
import './SignUpForm.css'
import Sign from './注册页面右.png'
import Sign from './signup.png'
import axios from 'axios';

View File

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 205 KiB

View File

@ -1,6 +1,6 @@
import { Link } from 'react-router-dom'
import "./SignInPage.css"
import Login from "./登录页面左.png"
import Login from "./signin.png"
import React,{ useState } from 'react'
import axios from 'axios'

View File

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -3,7 +3,7 @@ import { BrowserRouter, Outlet, Route ,Routes} from 'react-router-dom';
//
import SignUpPage from '../pages/SighUp/SignUpPage';
import SignInPage from '../pages/SignIn/SignInPage';
//
//
import HeaderNav from '../nav/nav';
import HeaderNavTeacher from '../nav/teacherIndex';
//
@ -23,8 +23,8 @@ import ClassID from '../TeacherPages/classlistpages/classId';
import ManageTest from '../TeacherPages/TestManage/ManageTest';
import SendTest from '../TeacherPages/TestManage/SendTest';
import Marking from '../TeacherPages/MarkingPages/Marking';
import SendTrain from '../TeacherPages/Trainmanage/SendTrain';
import TrainManage from '../TeacherPages/Trainmanage/Trainmanage';
import SendTrain from '../TeacherPages/TrainManage/SendTrain';
import TrainManage from '../TeacherPages/TrainManage/Trainmanage';
import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
import List_pods from '../TeacherPages/list_pods/list_pods';
@ -75,8 +75,8 @@ function App() {
<Route path="exam/:examId" element={<Exam />} />{/* 练习-考试页面 */}
<Route path='/teacher/sendtest' element={<SendTest />}/> {/* 考试管理-发布试卷 */}
<Route path='/teacher/SendTrain' element={<SendTrain/>}/> {/*实训管理-发布实训*/}
<Route path='operation1/:operateID' element={<Operation1/>}/> {/* 实训页面1 */}
<Route path='operation2/:operateID' element={<Operation2/>}/> {/* 实训页面2 */}
<Route path='operation1/:operateID' element={<Operation1/>}/> {/* 实训页面1:理论 */}
<Route path='operation2/:operateID' element={<Operation2/>}/> {/* 实训页面2:数据库 */}
<Route path='teacher/list_pods' element={<List_pods/>}/>
<Route path='/refresh' element={<Refresh/>}/>