This commit is contained in:
30404 2024-07-04 14:50:25 +08:00
parent 0573e4f702
commit abe873d7bb
11 changed files with 16 additions and 42 deletions

View File

@ -9,7 +9,7 @@ In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
Open [http://36.138.114.105:30294/signin](http://36.138.114.105:30294/signin) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.

View File

@ -12,7 +12,7 @@ function Marking(){
const currentTime = new Date().toLocaleString()
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
const [istrue,setistrue]=useState(false)

View File

@ -24,7 +24,7 @@ function StudentLink(){
const submit=()=>{
sumbitScore()
alert('批改成功')
window.location.href='http://localhost:3000/teacher/mark'
window.location.href='http://36.138.114.105:30294/teacher/mark'
}
const [TestLink,setTestLink]=useState()

View File

@ -9,7 +9,7 @@ function TeacherPage() {
const teacher_ID = localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
const [classData, setClassData] = useState({});
const log=(key)=>{

View File

@ -25,7 +25,7 @@
const teacher_ID=localStorage.getItem('islogin')
if(teacher_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
//

View File

@ -38,20 +38,6 @@ function HeaderNav() {
{/* <div>
头像
</div> */}
<ul className="narbar-nav mr-auto">
<li className='nav-item'>
<Link className='nav-link' to='/'>学生</Link>
</li>
<li className='nav-item'>
<Link className='nav-link' to='/teacher'>教师</Link>
</li>
<li className='nav-item'>
<Link className='nav-link' to='/signup'>注册</Link>
</li>
<li className='nav-item'>
<Link className='nav-link' to='/signin'>登录</Link>
</li>
</ul>
</div>
<div className='left-nav-li'>
<ul>

View File

@ -14,7 +14,7 @@ function Home(){
const [isChecked,setisChecked]=useState(false)
const student_ID=localStorage.getItem('islogin')
if(student_ID==null){
window.location.href='http://localhost:3000/signin'
window.location.href='http://36.138.114.105:30294/signin'
alert('未登录,请前往登录')
}

View File

@ -11,7 +11,7 @@ function SubjectPage(){
const student_ID=localStorage.getItem('islogin')
if(student_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
//li
const [SubjectModal,setSubjectModal] = useState(false);
@ -53,10 +53,6 @@ function SubjectPage(){
setSubjectModal(false);
};
const click=()=>{
console.log(score);
}
//
const [HistoryTrain,setHisToryTrain]=useState()
@ -86,22 +82,14 @@ function SubjectPage(){
<img src={Computer} alt="" width='35px' height='35px'/>
<p>
<p className='p'>{eval(HistoryTrain[key][1][11])}</p>
<span>{HistoryTrain[key][1][5]}</span>
</p>
</li>
))}
</ul>
</div>}
<button onClick={click}>万能的测试按钮</button>
<div className='right-vertical-nav'>
<p>课程</p>
<ul>
<li>达梦数据库</li>
<li className='li-deep'>数据结构</li>
<li>python</li>
</ul>
</div>
{SubjectModal && (
<div className='outbox-test-analyse'>
@ -110,13 +98,14 @@ function SubjectPage(){
{/* 饼图组件 */}
<div className="pie-chart-container">
<Pie data={PieData} options={PieOptions} />
</div>
</div>
{HistoryTrain&&<div className='analyse-box'>
{/* 图表或者文字分析 */}
<ul>
<li>总得分{parseInt(PieData['datasets'][0]['data'][0])+parseInt(PieData['datasets'][0]['data'][1])}/{score}</li>
<li>分析{parseInt(PieData['datasets'][0]['data'][0])>parseInt(PieData['datasets'][0]['data'][1]) ? '基础题得分略低':'实训题得分略低'}</li>
<li>建议{parseInt(PieData['datasets'][0]['data'][0])>parseInt(PieData['datasets'][0]['data'][1]) ? '巩固基础,稳步提升':'加强实训,手动操作'}</li>
<li>分析{parseInt(PieData['datasets'][0]['data'][0])>parseInt(PieData['datasets'][0]['data'][1]) ? '基础题得分略低':'提高实训得分需优化学习方法与题目理解。'}</li>
<br />
<li>老师建议{parseInt(PieData['datasets'][0]['data'][0])>parseInt(PieData['datasets'][0]['data'][1]) ? '巩固基础,稳步提升':'加强HTML语法'}</li>
</ul>
</div>}
</div>

View File

@ -8,10 +8,9 @@ import moment from 'moment';
//
function SubjectPage(){
const student_ID=localStorage.getItem('islogin')
if(student_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
const [testdata,settestdata]=useState('')
const [FalseData,setFalseData]=useState('')

View File

@ -49,7 +49,7 @@ function SubjectPage(){
const student_ID=localStorage.getItem('islogin')
if(student_ID==null){
alert('登录过期,请重新登录')
window.location.href='http://36.138.114.105:30294/'
window.location.href='http://36.138.114.105:30294/signin'
}
const [title,setTitle]=useState()
//

View File

@ -26,7 +26,7 @@ import Marking from '../TeacherPages/MarkingPages/Marking';
import SendTrain from '../TeacherPages/Trainmanage/SendTrain'
import TrainManage from '../TeacherPages/Trainmanage/Trainmanage'
import StudentLink from '../TeacherPages/MarkingPages/StudentLink';
import Test from '../TeacherPages/TestManage/Test.tsx'
import Test from '../TeacherPages/TestManage/Test'
// (exam)使