From 16c81bada85c49a678d102a9a62c1d554fb4e803 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 30 Jan 2024 10:18:47 +0800 Subject: [PATCH] =?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;