From 18638fe98e7077ae589d478eb138c6b91b400d08 Mon Sep 17 00:00:00 2001 From: wuyx Date: Sun, 25 Dec 2022 16:58:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E9=9D=A2=E6=8E=88?= =?UTF-8?q?=E8=AF=BE=E9=99=84=E4=BB=B6/=E4=BD=9C=E4=B8=9A=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=9D=A2?= =?UTF-8?q?=E6=8E=88=E8=AF=BE=E6=8A=A5=E5=90=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileTypeImg.vue | 23 +- src/views/faceteach/FaceTeach.vue | 105 +++-- src/views/faceteach/FaceTeachSignUp.vue | 496 ++++++++++++++++++++++++ 3 files changed, 569 insertions(+), 55 deletions(-) create mode 100644 src/views/faceteach/FaceTeachSignUp.vue diff --git a/src/components/FileTypeImg.vue b/src/components/FileTypeImg.vue index 15ad1c4..6b7f252 100644 --- a/src/components/FileTypeImg.vue +++ b/src/components/FileTypeImg.vue @@ -1,7 +1,6 @@ \ No newline at end of file diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue index afee35f..035429e 100644 --- a/src/views/faceteach/FaceTeach.vue +++ b/src/views/faceteach/FaceTeach.vue @@ -24,7 +24,9 @@
- {{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + " 至 " + dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM') }} + {{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + " 至 " + + dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM') + }}
@@ -39,12 +41,12 @@ background: data.signFlag ? '#999' : 'rgb(57, 146, 249)', }" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }} - + 评估 {{data.isSurvery ? "已评估" : "评估"}} + }" class="btn" @click="toSurvery" v-else>{{ data.isSurvery ? "已评估" : "评估" }}
@@ -65,33 +67,34 @@ - +
- + -
+
此课程无附件
-
- -
{{ el.name }}
+
{{ el.slice(el.indexOf('-') + 1) }}
-
+
下载
-
+
下载
@@ -99,8 +102,8 @@
- -
+ +
{{ data.workDto?.workName }}
@@ -109,19 +112,23 @@
-
已结束
-
未开始
+
已结束
+
未开始
+ :style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" + class="submit" @click="toWork" v-else> 交作业
-
+
此课程无作业
- - + +
@@ -134,15 +141,18 @@
考试
-
已结束
-
未开始
+
已结束
+
未开始
去考试
-
+
此课程无考试
@@ -207,7 +217,7 @@ const state = reactive({ }); const { activeName, enclosure, isAllowSign } = toRefs(state); const handleClick = (tab, event) => { - console.log("附件",tab, event); + console.log("附件", tab, event); }; const download = (url) => { window.open(url); @@ -215,6 +225,13 @@ const download = (url) => { const downloads = (url) => { ElMessage.warning("未到开始时间,请耐心等待!"); }; + +function formateArr(strs) { + let arrs = strs.split(',') + console.log('112233', arrs) + return arrs +} + let timer = null; //判断能否签到 function isSignClick() { @@ -491,11 +508,13 @@ onUnmounted(() => { background: #ffffff; border-radius: 8px; margin-top: 20px; - .wenxintishi{ + + .wenxintishi { display: flex; justify-content: stretch; padding: 72px; } + .el-tabs__item { height: 69px; padding: 25px 7px 0px 52px; @@ -609,7 +628,7 @@ onUnmounted(() => { padding: 25px 0px; display: flex; position: relative; - + // align-items: center; } @@ -620,40 +639,40 @@ onUnmounted(() => { } .teacheritem { - .nameSpan{ + .nameSpan { width: 190px; display: flex; align-items: center; justify-content: center; - + .teacherName { - font-size: 14px; - font-weight: bold; - color: #394145; - display: flex; - align-items: center; + font-size: 14px; + font-weight: bold; + color: #394145; + display: flex; + align-items: center; } } - - + + } - + .teacheritem { - .nameSpan{ + .nameSpan { width: 190px; display: flex; align-items: center; justify-content: center; - + .teacherName { - font-size: 14px; - font-weight: bold; - color: #394145; - display: flex; - align-items: center; + font-size: 14px; + font-weight: bold; + color: #394145; + display: flex; + align-items: center; } } - + } .teacheritem .introduce { diff --git a/src/views/faceteach/FaceTeachSignUp.vue b/src/views/faceteach/FaceTeachSignUp.vue new file mode 100644 index 0000000..a32d6be --- /dev/null +++ b/src/views/faceteach/FaceTeachSignUp.vue @@ -0,0 +1,496 @@ + + + + + + From 19002928836f2b84fd4d01bb3e8d54540c31db08 Mon Sep 17 00:00:00 2001 From: wuyx Date: Sun, 25 Dec 2022 18:29:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E9=9D=A2=E6=8E=88=E8=AF=BE=E6=8A=A5?= =?UTF-8?q?=E5=90=8D=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 4 +++- src/views/faceteach/FaceTeachSignUp.vue | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 0188503..4c49774 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -57,4 +57,6 @@ export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post' export const ACTIVITY = '/activity' export const STUDY_RECORD = '/stu/task/thirdTask/submit post' -export const PROJECT_LIST = '/stu/project/list post' \ No newline at end of file +export const PROJECT_LIST = '/stu/project/list post' + +export const FACETEACH_SIGNUP = `/stu/project/stuFaceTeachSignUp` \ No newline at end of file diff --git a/src/views/faceteach/FaceTeachSignUp.vue b/src/views/faceteach/FaceTeachSignUp.vue index a32d6be..ce4d1a1 100644 --- a/src/views/faceteach/FaceTeachSignUp.vue +++ b/src/views/faceteach/FaceTeachSignUp.vue @@ -128,6 +128,7 @@ import { TASK_OFFCOURSE_NOTASK_SIGN, TASK_OFFCOURSE_SIGN, TASK_BROADCAST_SIGN, + FACETEACH_SIGNUP } from "@/api/api"; import { useRoute, useRouter } from "vue-router"; import { useUserInfo } from "@/api/utils"; @@ -166,7 +167,14 @@ let timer = null; // 报名 function onLineSignUp() { - alert('我是要报名的面授课') + request(FACETEACH_SIGNUP, { courseId }).then(res => { + console.log(res) + if (res.code == 200) { + ElMessage.success("报名成功"); + } + }).catch(err => { + console.log(err) + }); } function formateArr(strs) {