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(){ } diff --git a/app-dm/src/TeacherPages/MarkingPages/StudentLink.css b/app-dm/src/TeacherPages/MarkingPages/StudentLink.css index 3708e7a..fe16c5f 100644 --- a/app-dm/src/TeacherPages/MarkingPages/StudentLink.css +++ b/app-dm/src/TeacherPages/MarkingPages/StudentLink.css @@ -8,7 +8,44 @@ float: right; background-color: #f7f8fa; } +.title-link{ + position: absolute; + top: 30px; + left: -110px; + font-size: 18px; +} +.title-link th{ + padding-left: 190px; +} + +.link-table{ + margin-top: 50px; + position: absolute; + top: 40px; + left: 25px; +} +.link-table td{ + padding-left: 45px; + font-size: 17px; + border-bottom: 1px solid #8a9991; + padding-bottom: 15px; +} +.link-table input{ + height: 20px; +} + +.link-table tr { + vertical-align: middle; /* 垂直居中对齐 */ +} + .submit{ - margin-left: 1000px; - margin-top: 20px; + width: 140px; + height: 45px; + font-size: 20px; + /* background-color: rgb(187, 235, 219); */ + background-image: linear-gradient(#bbf5e2,#a4d1d3); + border-radius: 20px; + border: none; + margin-left: 1180px; + margin-top: 700px; } \ No newline at end of file diff --git a/app-dm/src/TeacherPages/MarkingPages/StudentLink.jsx b/app-dm/src/TeacherPages/MarkingPages/StudentLink.jsx index 6f0d1fc..9078186 100644 --- a/app-dm/src/TeacherPages/MarkingPages/StudentLink.jsx +++ b/app-dm/src/TeacherPages/MarkingPages/StudentLink.jsx @@ -8,7 +8,6 @@ import axios from 'axios'; function StudentLink(){ const testID=useParams()['key'] - const sumbitScore=async()=>{ try{ const sumbitScoreSrc=await axios.post('/api/teacher/UpdateTest',{ @@ -63,7 +62,7 @@ function StudentLink(){
{TestLink&& - + @@ -74,7 +73,7 @@ function StudentLink(){ {Object.keys(TestLink).map((key)=>( - + 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(
@@ -320,21 +336,6 @@ function SendTrain(){ }
-

请填写考试总时长

- 小时 - - 分钟 {/* 日历 */}

请填写考试开始、截止日期

@@ -342,15 +343,23 @@ function SendTrain(){
{/* 日历组件 */}
+ {/* 开始时间 */} +   {/* 空格符号 */} + - +   {/* 空格符号 */} + {/* 结束时间 */}
-
+

考试总时长

+ {duration || '请选择考试结束日期'}
diff --git a/app-dm/src/TeacherPages/Trainmanage/Trainmanage.css b/app-dm/src/TeacherPages/Trainmanage/Trainmanage.css index 7f4f8f4..ee97ec8 100644 --- a/app-dm/src/TeacherPages/Trainmanage/Trainmanage.css +++ b/app-dm/src/TeacherPages/Trainmanage/Trainmanage.css @@ -18,7 +18,7 @@ height: 2px; position: absolute; top: 60px; - background-image: linear-gradient(120deg,#ffffff,rgb(223, 223, 223),#fff); + background-image: linear-gradient(120deg,#ffffff,rgb(181, 181, 181),#fff); } .ul1-trainmanage{ width: 650px; diff --git a/app-dm/src/nav/style.css b/app-dm/src/nav/style.css index fcae1eb..4dbbce9 100644 --- a/app-dm/src/nav/style.css +++ b/app-dm/src/nav/style.css @@ -92,7 +92,7 @@ top: 0px; position: fixed; right: 0px; - background-color: #fef2f2ef;; + background-color: #e7f8fbf3; padding: 0; list-style: none; z-index: 1; @@ -137,8 +137,8 @@ font-size: 20px; text-align: center; line-height: 80px; - border-bottom: 1px solid #77a6d5; - background-color: #fef2f2ef; + border-bottom: 1px solid #4f946a; + background-color: #e7f8fbf3; overflow: hidden; } .close-btn-nav { @@ -151,18 +151,18 @@ background: none; border: none; font-size: 18px; - color: #8b4a11; - background-color: #fce5d9; + color: #257e84; + background-color: #bffbdb; /* border: 1px solid #666; */ } .close-btn-nav:hover{ - background-color: #fff3e3; + background-color: #c6f1e3; } .set-list-nav li:hover{ cursor: pointer; - color: rgb(65, 13, 121); + color: rgb(13, 121, 105); } .exit-btn-nav{ height: 40px; @@ -170,12 +170,12 @@ border: none; border-radius: 10px; font-size: 18px; - margin-top: 310px; + margin-top: 290px; margin-left: 25px; - background-color: rgb(183, 231, 255); + background-color: rgb(176, 245, 218); } .exit-btn-nav:hover{ - background-color: #b0dcf7; + background-color: #b0f7da; }
学生 链接1 链接2
{key} {TestLink[key][6]} {TestLink[key][7]}