This commit is contained in:
30404 2024-06-26 11:24:36 +08:00
commit 50d36e240a
18 changed files with 1317 additions and 1366 deletions

View File

@ -26,7 +26,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},
].map((item) =>
<Link style={{color:'#000',textDecoration:'none'}}>
<Link style={{color:'#000',textDecoration:'none'}} to={'studentlink'}>
<li key={item.class}>
<img src={item.ImgSrc} alt="" width='35px' height='35px'/>
<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,44 +0,0 @@
import './trainmanage.css'
import { Link } from 'react-router-dom';
// import React, { useEffect, useState } from 'react';
// import axios from 'axios';
function TrainManage(){
const teacher_ID=localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
}
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

@ -6,11 +6,7 @@ import './ManageTest.css'
function TeacherPage() {
const teacher_ID=localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
}
const teacher_ID = localStorage.getItem('islogin')
const [classData, setClassData] = useState({});
const [classtest,setClassTest]=useState()
const [defaultclass,setDefaultClass]=useState()

View File

@ -7,10 +7,6 @@ import axios from 'axios';
function SendTest(){
// const { key } = useParams();
const teacher_ID=localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
}
//
const [ChoiceQuestion,SetChoiceQuestion]=useState()
const [Completion,SetCompletion]=useState()

View File

@ -5,10 +5,6 @@ import axios from 'axios';
function SendTrain(){
const teacher_ID=localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
}
//
const [Trainquestion,SetTrainquestion]=useState()
//

View File

@ -1,32 +1,74 @@
.body-TrainManage{
.body-trainmanage{
width: 1420px;
height: 830px;
position: absolute;
top: 72px;
left: 220px;
border-radius: 10px;
float: right;
background-color: #f7f8fa;
}
.body-right-Train h3{
margin-left: 60px;
.body-trainmanage p{
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{
display:flex;
flex-wrap: wrap;
flex-direction: row;
margin-left: 40px;
margin-bottom: 60px;
}
.Train-box{
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;
.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,37 +1,39 @@
import './Trainmanage.css'
import axios from 'axios';
import React,{ useState,useEffect } from 'react';
import './trainmanage.css'
import { Link } from 'react-router-dom';
// import React, { useEffect, useState } from 'react';
// import axios from 'axios';
function TeacherTrainManage(){
const click=()=>{
console.log('a');
}
function TrainManage(){
return(
<div className="body-TrainManage">
<div className="body-right-Train">
<h3>正在进行的考试与练习</h3>
<div className='test-Train'>
<div className='Train-box'>
<p>试卷ID:</p>
<span>发布者:</span>
<div>发布时间:</div>
<div>截至时间:</div>
</div>
</div>
<button onClick={click}>测试按钮</button>
<h3>已结束或完成的试卷与练习</h3>
<div className='test-subject'>
<div className='test-box'>
<p>试卷ID:</p>
<span>发布者:</span>
<div>发布时间:</div>
<div>截至时间:</div>
</div>
</div>
<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/SendTrain' className='sendtestpage'>前往发布实训</Link>
</div>
</div>
)
}
export default TeacherTrainManage
export default TrainManage

View File

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

View File

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

View File

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

View File

View File