This commit is contained in:
nopy 2024-06-25 22:45:23 +08:00
parent edba86ccea
commit 564ab7e4fd
19 changed files with 1318 additions and 1350 deletions

View File

@ -21,7 +21,7 @@ function Marking(){
{class:'课程2:web前端开发与数据库的结合',time:"关闭时间:2024-4-16 11.46",ImgSrc:Test}, {class:'课程2:web前端开发与数据库的结合',time:"关闭时间:2024-4-16 11.46",ImgSrc:Test},
{class:'课程2:web前端开发与数据库的结合',time:"关闭时间:2024-4-16 11.46",ImgSrc:Test}, {class:'课程2:web前端开发与数据库的结合',time:"关闭时间:2024-4-16 11.46",ImgSrc:Test},
].map((item) => ].map((item) =>
<Link style={{color:'#000',textDecoration:'none'}}> <Link style={{color:'#000',textDecoration:'none'}} to={'studentlink'}>
<li key={item.class}> <li key={item.class}>
<img src={item.ImgSrc} alt="" width='35px' height='35px'/> <img src={item.ImgSrc} alt="" width='35px' height='35px'/>
<p> <p>

View File

@ -0,0 +1,10 @@
.body-right-studentlink{
width: 1420px;
height: 830px;
position: absolute;
top: 72px;
left: 220px;
border-radius: 10px;
float: right;
background-color: #f7f8fa;
}

View File

@ -0,0 +1,28 @@
import './StudentLink.css'
function StudentLink(){
return(
<div className='body-right-studentlink'>
<table>
<thead>
<tr>
<th>学生</th>
<th>链接</th>
<th>分数</th>
</tr>
</thead>
<tbody>
<tr>
<td>数据1</td>
<td>数据2</td>
<td>数据3</td>
</tr>
</tbody>
</table>
</div>
)
}
export default StudentLink

View File

@ -1,74 +0,0 @@
.body-trainmanage{
width: 1420px;
height: 830px;
position: absolute;
top: 72px;
left: 220px;
border-radius: 10px;
float: right;
background-color: #f7f8fa;
}
.body-trainmanage p{
font-size: 20px;
position: absolute;
left: 50px;
}
.line{
width: 250px;
height: 2px;
position: absolute;
top: 60px;
background-image: linear-gradient(120deg,#ffffff,rgb(223, 223, 223),#fff);
}
.ul1-trainmanage{
width: 650px;
height: 200px;
position: absolute;
top: 50px;
left: 10px;
}
.ul2-trainmanage{
width: 650px;
height: 200px;
position: absolute;
top: 50px;
left: 700px;
}
.train-list-trainmanage li{
width: 650px;
height: 70px;
list-style-type: none;
margin-top: 10px;
border-radius: 10px;
background-color: #ffffff;
box-shadow: 2px 2px 2px #d8d9d9;
cursor: pointer;
}
.train-list-trainmanage span {
font-size: 20px;
}
.train-list-trainmanage p{
font-size: 15px;
margin-left: 460px;
margin-top: -40px;
}
.train-list-trainmanage li::before {
content: "▶";
color: rgb(132, 213, 209);
padding-right: 20px;
line-height: 65px;
padding-left: 15px;
font-size: 20px;
display: inline-block;
}
.sendtestpage{
padding: 20px 30px;
font-size: 20px;
text-decoration: none;
color: #000;
position: absolute;
bottom: 50px;
right: 100px;
background-color: rgb(186, 237, 237);
}

View File

@ -1,39 +0,0 @@
import './trainmanage.css'
import { Link } from 'react-router-dom';
// import React, { useEffect, useState } from 'react';
// import axios from 'axios';
function TrainManage(){
return(
<div className='body-trainmanage'>
<p>已批改试卷</p>
<div className='line'></div>
<div className='train-list-trainmanage'>
<ul className='ul1-trainmanage'>
<li>
<span>111</span>
<p>关闭时间2024-11-5</p>
</li>
<li>
<span>333</span>
<p>关闭时间2024-11-5</p>
</li>
</ul>
<ul className='ul2-trainmanage'>
<li>
<span>222</span>
<p>关闭时间2024-11-5</p>
</li>
<li>
<span>444</span>
<p>关闭时间2024-11-5</p>
</li>
</ul>
<Link to='/teacher/sendtest' className='sendtestpage'>前往发布试卷</Link>
</div>
</div>
)
}
export default TrainManage

View File

@ -1,32 +1,74 @@
.body-TrainManage{ .body-trainmanage{
width: 1420px; width: 1420px;
height: 830px; height: 830px;
position: absolute; position: absolute;
top: 72px; top: 72px;
left: 220px; left: 220px;
border-radius: 10px; border-radius: 10px;
float: right;
background-color: #f7f8fa; background-color: #f7f8fa;
} }
.body-right-Train h3{ .body-trainmanage p{
margin-left: 60px;
font-size: 20px; font-size: 20px;
margin-bottom: -5px; position: absolute;
left: 50px;
}
.line{
width: 250px;
height: 2px;
position: absolute;
top: 60px;
background-image: linear-gradient(120deg,#ffffff,rgb(223, 223, 223),#fff);
}
.ul1-trainmanage{
width: 650px;
height: 200px;
position: absolute;
top: 50px;
left: 10px;
}
.ul2-trainmanage{
width: 650px;
height: 200px;
position: absolute;
top: 50px;
left: 700px;
}
.train-list-trainmanage li{
width: 650px;
height: 70px;
list-style-type: none;
margin-top: 10px;
border-radius: 10px;
background-color: #ffffff;
box-shadow: 2px 2px 2px #d8d9d9;
cursor: pointer;
}
.train-list-trainmanage span {
font-size: 20px;
}
.train-list-trainmanage p{
font-size: 15px;
margin-left: 460px;
margin-top: -40px;
}
.train-list-trainmanage li::before {
content: "▶";
color: rgb(132, 213, 209);
padding-right: 20px;
line-height: 65px;
padding-left: 15px;
font-size: 20px;
display: inline-block;
} }
.test-Train{ .sendtestpage{
display:flex; padding: 20px 30px;
flex-wrap: wrap; font-size: 20px;
flex-direction: row; text-decoration: none;
margin-left: 40px; color: #000;
margin-bottom: 60px; position: absolute;
} bottom: 50px;
right: 100px;
.Train-box{ background-color: rgb(186, 237, 237);
flex-basis: calc(30.00% - 10PX);
box-sizing: border-box;
margin: 20px;
height: 210px;
background-image: linear-gradient(190deg,rgba(157, 246, 252, 0.7),rgba(198, 212, 255, 0.7));
border-radius: 15px;
line-height: 35px;
} }

View File

@ -1,37 +1,39 @@
import './Trainmanage.css' import './trainmanage.css'
import axios from 'axios'; import { Link } from 'react-router-dom';
import React,{ useState,useEffect } from 'react'; // import React, { useEffect, useState } from 'react';
// import axios from 'axios';
function TeacherTrainManage(){
const click=()=>{
console.log('a');
}
function TrainManage(){
return( return(
<div className="body-TrainManage"> <div className='body-trainmanage'>
<div className="body-right-Train"> <p>已批改试卷</p>
<h3>正在进行的考试与练习</h3> <div className='line'></div>
<div className='test-Train'> <div className='train-list-trainmanage'>
<div className='Train-box'> <ul className='ul1-trainmanage'>
<p>试卷ID:</p> <li>
<span>发布者:</span> <span>111</span>
<div>发布时间:</div> <p>关闭时间2024-11-5</p>
<div>截至时间:</div> </li>
</div> <li>
</div> <span>333</span>
<button onClick={click}>测试按钮</button> <p>关闭时间2024-11-5</p>
</li>
<h3>已结束或完成的试卷与练习</h3> </ul>
<div className='test-subject'> <ul className='ul2-trainmanage'>
<div className='test-box'> <li>
<p>试卷ID:</p> <span>222</span>
<span>发布者:</span> <p>关闭时间2024-11-5</p>
<div>发布时间:</div> </li>
<div>截至时间:</div> <li>
</div> <span>444</span>
</div> <p>关闭时间2024-11-5</p>
</li>
</ul>
<Link to='/teacher/SendTrain' className='sendtestpage'>前往发布实训</Link>
</div> </div>
</div> </div>
) )
} }
export default TeacherTrainManage
export default TrainManage

View File

@ -110,6 +110,8 @@
height: 30px; height: 30px;
background-color: #b4c7c0; background-color: #b4c7c0;
border: none; border: none;
position: absolute;
left: 840px;
} }
.btn-test:hover{ .btn-test:hover{

View File

@ -44,9 +44,6 @@ function SubjectPage(){
</div> </div>
))} ))}
</div>} </div>}
<button onClick={()=>{
console.log(title[0][0][11]);
}}></button>
<p className='bottomP'>提醒:请及时完成实训内容</p> <p className='bottomP'>提醒:请及时完成实训内容</p>
</div> </div>
)}; )};

View File

@ -9,8 +9,8 @@ import HeaderNavTeacher from '../nav/teacherIndex';
// //
import Home from '../pages/Home/Home'; import Home from '../pages/Home/Home';
import SubjectPage from '../pages/ListPages/Subject/SubjectPage'; import SubjectPage from '../pages/ListPages/Subject/SubjectPage';
import AnalysePage from '../pages/ListPages/Analyse/AnalysePages';
import Training from '../pages/ListPages/Training/TrainingPage'; import Training from '../pages/ListPages/Training/TrainingPage';
import AnalysePage from '../pages/ListPages/Analyse/AnalysePages';
import Exam from '../pages/ListPages/Subject/Exam'; import Exam from '../pages/ListPages/Subject/Exam';
import Operation1 from '../pages/ListPages/Training/Operation1'; import Operation1 from '../pages/ListPages/Training/Operation1';
import Operation2 from '../pages/ListPages/Training/Operation2'; import Operation2 from '../pages/ListPages/Training/Operation2';
@ -18,11 +18,12 @@ import Operation2 from '../pages/ListPages/Training/Operation2';
// //
import TeacherPage from '../TeacherPages/TeacherPage'; import TeacherPage from '../TeacherPages/TeacherPage';
import ClassID from '../TeacherPages/classlistpages/classId'; import ClassID from '../TeacherPages/classlistpages/classId';
import ManageTest from '../TeacherPages/teachermanagetest/ManageTest'; import ManageTest from '../TeacherPages/TestManage/ManageTest';
import SendTest from '../TeacherPages/SendTest/SendTest'; import SendTest from '../TeacherPages/TestManage/SendTest';
import Marking from '../TeacherPages/MarkingPages/Marking'; import Marking from '../TeacherPages/MarkingPages/Marking';
import SendTrain from '../TeacherPages/SendTrain/SendTrain'; import SendTrain from '../TeacherPages/TrainManage/SendTrain';
import TrainManage from '../TeacherPages/SendTest/trainmanage'; import TrainManage from '../TeacherPages/TrainManage/trainmanage';
import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
// (exam)使 // (exam)使
const MainLayout = ({ headerNav:HeaderNav }) => { const MainLayout = ({ headerNav:HeaderNav }) => {
@ -44,22 +45,21 @@ function App() {
<Routes> <Routes>
{/* 使用 HeaderNav 的用户页面 */} {/* 使用 HeaderNav 的用户页面 */}
<Route path="/" element={<MainLayout headerNav={HeaderNav} />}> <Route path="/" element={<MainLayout headerNav={HeaderNav} />}>
<Route index element={<Home />} /> <Route index element={<Home />} /> {/* 主页 */}
<Route path="analyse" element={<AnalysePage />} /> <Route path='subject' element={<SubjectPage/>} /> {/* 练习 */}
<Route path='subject' element={<SubjectPage/>} /> <Route path='train' element={<Training/>}/> {/* 实训 */}
<Route path='train' element={<Training/>}/> <Route path="analyse" element={<AnalysePage />} /> {/* 学习分析 */}
{/* 其他需要HeaderNav的页面 */} {/* 其他需要HeaderNav的页面 */}
</Route> </Route>
{/* 使用 HeaderNavTeacher 的教师页面 */} {/* 使用 HeaderNavTeacher 的教师页面 */}
<Route path="/teacher" element={<MainLayout headerNav={HeaderNavTeacher} />}> <Route path="/teacher" element={<MainLayout headerNav={HeaderNavTeacher} />}>
<Route index element={<TeacherPage/>} /> <Route index element={<TeacherPage/>} /> {/* 班级管理 */}
<Route path='managetest' element={<ManageTest />}/> <Route path='trainmanage' element={<TrainManage/>}/> {/* 实训管理 */}
{/* <Route path='managetest/:ClassID' element={<ManageTest />}/> */} <Route path='mark' element={<Marking/>}/> {/* 批改 */}
<Route path="classID/:key" element={<ClassID />} /> <Route path='managetest' element={<ManageTest />}/> {/* 考试管理 */}
<Route path='mark' element={<Marking/>}/> <Route path="classID/:key" element={<ClassID />} /> {/* 班级管理1 */}
<Route path='trainmanage' element={<TrainManage/>}/> <Route path='mark/studentlink' element={<StudentLink/>}/> {/* 批改1 */}
{/* 其他需要HeaderNavTeacher的页面 */} {/* 其他需要HeaderNavTeacher的页面 */}
</Route> </Route>
@ -68,11 +68,11 @@ function App() {
</Route> </Route>
{/* 页面使用单独的布局不包含HeaderNav和HeaderNavTeacher */} {/* 页面使用单独的布局不包含HeaderNav和HeaderNavTeacher */}
<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='operation1/:operateID' element={<Operation1/>}/> <Route path='/teacher/SendTrain' element={<SendTrain/>}/> {/* 实训管理-发布实训 */}
<Route path='operation2/:operateID' element={<Operation2/>}/> <Route path='operation1/:operateID' element={<Operation1/>}/> {/* 实训页面1 */}
<Route path='teacher/SendTrain' element={<SendTrain/>}/> <Route path='operation2/:operateID' element={<Operation2/>}/> {/* 实训页面2 */}
{/* 独立的顶级路由如登录页面也不包含HeaderNav */} {/* 独立的顶级路由如登录页面也不包含HeaderNav */}
{/* 登录页面 */} {/* 登录页面 */}
<Route path="signin" element={<SignInPage />} /> <Route path="signin" element={<SignInPage />} />

View File

@ -4,7 +4,7 @@ module.exports = function(app) {
app.use( app.use(
'/api', // 如果请求路径匹配'/api',则进行代理 '/api', // 如果请求路径匹配'/api',则进行代理
createProxyMiddleware({ createProxyMiddleware({
target: 'http://localhost:5000', // 目标后端服务地址 target: 'http://127.0.0.1:5000', // 目标后端服务地址
changeOrigin: true, changeOrigin: true,
}) })
); );

View File

View File