From 1552ffa0edeee323c5f9e7a4e2d8de3e9ef348d8 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Mon, 29 Jan 2024 17:29:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=99=E5=B8=88=E5=9B=9E=E9=80=80?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddOpenCourse.vue | 36 +++--------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index 95d0ddf9..4bcc0529 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -125,7 +125,7 @@ 面授时间
- - - - -
@@ -552,13 +530,12 @@ const formDataRule = { const { validate } = Form.useForm(formData, formDataRule); const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间'); function timeChange(time, timeStr) { - formData.value.beginTime = timeStr; + formData.value.beginTime = timeStr[0]; + formData.value.endTime = timeStr[1]; // formData.value.duration = durationText.value // formData.value.duration || (formData.value.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute')) } -function timeChangeEnd(time,timeStr){ - formData.value.endTime = timeStr; -} + function search() { tableRef.value.fetch(); } @@ -592,7 +569,6 @@ const createNewCourse = () => { type: props.type, offcourseId: params.value.offcourseId, draftTaskId: params.value.draftTaskId, - name:courseName.value }); dateTime.value = []; validated.value = 0; @@ -626,10 +602,6 @@ async function coursePlanConfirm() { message.info('讲师费已进入审批阶段,无法编辑') return } - if(dateTime.value.length<2){ - message.info('请选择开始时间和结束时间') - return - } await validate().catch(({ errorFields }) => { message.warning(errorFields[0].errors.join()); throw Error("数据校验不通过"); From 16c81bada85c49a678d102a9a62c1d554fb4e803 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 30 Jan 2024 10:18:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=A8=E9=83=A8=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 1 + .../drawers/router/RouterFaceStu.vue | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index 24f88d90..fd519e53 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -178,6 +178,7 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork', export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj }) //签到 export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj) +export const attendanceSignAll = (obj) => http.post('/stu/task/all/sign', obj) //请假 export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj) diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index cfc8c996..30ca2244 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -81,7 +81,7 @@ -
+
批量签到
+
+
全部签到
+
导出签到数据
@@ -183,6 +186,11 @@ const signOptions = ref([ value: 0, label: "请假", }, + { + id: 3, + value: 0, + label: "未签到", + }, ]); const props = defineProps({ type: { @@ -365,7 +373,19 @@ const batchSign = () => { }, }); }; - +const batchSignAll = () => { + dialog({ + content: "确定全部签到吗?", + ok: async () => { + message.success("全部签到成功"); + tableRef.value.toLoading(); + await api.attendanceSignAll({ + courseId: offcoursePlanId.value + }); + tableRef.value.fetch(); + }, + }); +}; function stuSign(text) { text.record.signStatus = !text.record.signStatus; text.record.leaveStatus = !text.record.signStatus; @@ -739,7 +759,7 @@ const change = (e) => { display: flex; justify-content: center; align-items: center; - + margin-bottom: 10px; .img1 { width: 19px; height: 19px;