From 03269269c614c0d4d0471f9c0a4200ce06f55e66 Mon Sep 17 00:00:00 2001 From: nopy <646880214@qq.com> Date: Sat, 6 Jul 2024 01:00:41 +0800 Subject: [PATCH] 1 --- .../src/TeacherPages/MarkingPages/Marking.css | 16 ++-- .../src/TeacherPages/MarkingPages/Marking.jsx | 20 ++--- .../TeacherPages/MarkingPages/StudentLink.css | 41 +++++++++- .../TeacherPages/MarkingPages/StudentLink.jsx | 5 +- .../TeacherPages/Trainmanage/SendTrain.css | 74 ++++++++++--------- .../TeacherPages/Trainmanage/SendTrain.jsx | 50 ++++++++----- .../TeacherPages/Trainmanage/Trainmanage.css | 2 +- app-dm/src/nav/style.css | 20 ++--- 8 files changed, 143 insertions(+), 85 deletions(-) diff --git a/app-dm/src/TeacherPages/MarkingPages/Marking.css b/app-dm/src/TeacherPages/MarkingPages/Marking.css index 2eae47d..b6c66ec 100644 --- a/app-dm/src/TeacherPages/MarkingPages/Marking.css +++ b/app-dm/src/TeacherPages/MarkingPages/Marking.css @@ -45,24 +45,24 @@ } .test-mark p{ - margin-top: 8px; + margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: start; } - -.p-mark { +.p-mark span{ font-size: 18px; + line-height: 48px; } - -.test-mark span { - font-size: 13px; - margin-top: -12px; +.p-mark p{ + font-size: 14px; color: #525252; + margin-top: -10px; } #TF{ position: absolute; - margin-left: 1200px; + margin-left: 1230px; + margin-top: -45px; } \ No newline at end of file diff --git a/app-dm/src/TeacherPages/MarkingPages/Marking.jsx b/app-dm/src/TeacherPages/MarkingPages/Marking.jsx index 4c3f85a..44285d6 100644 --- a/app-dm/src/TeacherPages/MarkingPages/Marking.jsx +++ b/app-dm/src/TeacherPages/MarkingPages/Marking.jsx @@ -73,15 +73,17 @@ function Marking(){
-
实训ID:{MarkData[key][0][10]}{eval(MarkData[key][0][11])}
-{MarkData[key][0][6]}
+学生 | 链接1 | 链接2 | @@ -74,7 +73,7 @@ function StudentLink(){
---|---|---|
{key} | {TestLink[key][6]} | {TestLink[key][7]} | diff --git a/app-dm/src/TeacherPages/Trainmanage/SendTrain.css b/app-dm/src/TeacherPages/Trainmanage/SendTrain.css index 853b2af..8657cf2 100644 --- a/app-dm/src/TeacherPages/Trainmanage/SendTrain.css +++ b/app-dm/src/TeacherPages/Trainmanage/SendTrain.css @@ -30,7 +30,7 @@ margin-top: -28px; } .SendTrain_body_left_ul button{ - background-color: rgb(247, 232, 189); + background-color: #f7e8bd; border: none; width: 100%; height: 40px; @@ -233,10 +233,16 @@ /* 按钮 */ #SendTrainBtn{ - font-size: 32px; + height: 40px; + width: 130px; + font-size: 25px; margin-top: 40px; margin-bottom: 40px; - margin-left: 830px; + margin-left: 900px; + background-color: #9acec2; + border: none; + border-radius: 20px; + color: #fff; } @@ -246,31 +252,29 @@ } .OptionBox{ width: 90%; - height: 500px; - margin-top: 30px; + height: 480px; margin-left: 15px; border-radius: 20px; - background-color: rgb(173, 255, 251); - + background-color: #bef6e9; + padding: 10px; } .TrainSelectClass{ width: 95%; height: 200px; - background-color: bisque; + background-color: #fffde8; border-radius: 20px; margin-left: 7px; - padding-top: 20; } .TrainSelectClassP{ font-size: 20px; - margin-left: 80px; - padding-top: 10px; + margin-left: 85px; + padding-top: 15px; } #Train_class_ul{ - margin-left: 30px; + margin-left: 40px; } #Train_class_ul li{ list-style-type: none; @@ -280,50 +284,54 @@ /* 普通状态下的样式 */ width: 120px; height: 30px; - border: 1px solid #5086eb; + border: 1px solid #72967b; cursor: pointer; margin-top: 10px; margin-left: 15px; text-align: center; + line-height: 30px; } .Trainselected { /* 选中状态下的样式 */ - background-color: rgb(148, 246, 186); - border-color: rgb(250, 200, 140); + background-color: rgb(181, 252, 208); + border:1px solid rgb(206, 153, 88); } +/* 时间选择盒子 */ .TrainSelectTime{ width: 95%; height: 220px; - background-color: beige; + background-color: #fff4d5; text-align: center; margin-left: 7px; border-radius: 20px; } .TrainSelectTime p{ - padding-top: 10px; + padding-top: 25px; } .TrainSelectTime p::before{ content: "▶"; } -.calendar-box span{ +/* 日历 */ +.calendar-picker span{ position: absolute; - top: 400px; - right: 185px; + top: 323px; + right: 181px; } -.calendar1{ - width: 100px; - height: 20px; - position: absolute; - left: -110px; +.calendar1 { + width: 110px; + max-width: 300px; + line-height: 18px; + position: absolute !important; /* 相对于固定定位的 .react-datepicker-popper */ + bottom: -15px; + left: -120px; } -.calendar2{ - width: 100px; - height: 20px; - position: absolute; - right: -130px; -} -.data-num{ - margin-top: 30px; +.calendar2 { + width: 110px; + max-width: 300px; + line-height: 18px; + position: absolute !important; /* 相对于固定定位的 .react-datepicker-popper */ + bottom: -15px; /* 根据需要调整 */ + left: 0px; /* 根据需要调整 */ } \ No newline at end of file diff --git a/app-dm/src/TeacherPages/Trainmanage/SendTrain.jsx b/app-dm/src/TeacherPages/Trainmanage/SendTrain.jsx index 03f4ea3..e02dd47 100644 --- a/app-dm/src/TeacherPages/Trainmanage/SendTrain.jsx +++ b/app-dm/src/TeacherPages/Trainmanage/SendTrain.jsx @@ -138,16 +138,32 @@ function SendTrain(){ // 日历 const [startDate, setStartDate] = useState(new Date()); const [endDate, setEndDate] = useState(new Date()); + const [duration, setDuration] = useState(null); + const [scrollPosition, setScrollPosition] = useState(0); // 处理开始时间选择 const handleStartDateChange = (date) => { setStartDate(date); + // 计算时长并更新状态 + if (startDate && date) { + const diffInMilliseconds = date - startDate; + const diffInDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24)); + const diffInHours = Math.floor((diffInMilliseconds % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + const diffInMinutes = Math.floor((diffInMilliseconds % (1000 * 60 * 60)) / (1000 * 60)); + let durationText = ''; + if (diffInDays > 0) durationText += `${diffInDays}天`; + if (diffInHours > 0 || diffInDays > 0) durationText += `${diffInHours}小时`; + durationText += `${diffInMinutes}分钟`; + setDuration(durationText); + } else { + setDuration('请选择考试结束日期'); + } }; - // 处理结束时间选择 const handleEndDateChange = (date) => { setEndDate(date); }; + return(