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; export default Operation2;

View File

@ -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;

View File

@ -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(); // onCloseModal
}, 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();

View File

@ -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';

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 { 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'

View File

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -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/>}/>