From cdf8f4c01ecbd29cd8a296560008ccbf96725e7c Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Wed, 4 Sep 2024 10:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/attendance/roolcall.ts | 4 ++ .../src/views/attendance/roolcall/detail.vue | 38 +++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/SafeCampus.WEB/src/api/modules/attendance/roolcall.ts b/SafeCampus.WEB/src/api/modules/attendance/roolcall.ts index b07ffc8..0f11014 100644 --- a/SafeCampus.WEB/src/api/modules/attendance/roolcall.ts +++ b/SafeCampus.WEB/src/api/modules/attendance/roolcall.ts @@ -48,6 +48,10 @@ const attendanceRoolcallApi = { /** 修改点名任务 */ update(params: any) { return http.put("update", params); + }, + /** 手动点名 */ + manualRoll(params: any) { + return http.post("manualRoll", params); } }; diff --git a/SafeCampus.WEB/src/views/attendance/roolcall/detail.vue b/SafeCampus.WEB/src/views/attendance/roolcall/detail.vue index abbf889..8fe2a9e 100644 --- a/SafeCampus.WEB/src/views/attendance/roolcall/detail.vue +++ b/SafeCampus.WEB/src/views/attendance/roolcall/detail.vue @@ -20,7 +20,7 @@ -
+
+ 签到 +
{ const checkOut = (item: any, index: number) => { checkIndex.value = index; checkData.value = JSON.parse(JSON.stringify(item)); + + attendanceRoolcallApi.manualRoll([{ personId: item.personId, personSetId: item.personSetId, taskId: route.query.taskId }]).then(() => { + ElMessage({ + message: "点名成功", + type: "success" + }); + UnrecognizedD.value = UnrecognizedD.value.filter((item1: any) => item1.id !== item.id); + listData.value.map((item2: any) => { + if (item2.personId === item.personId) { + item2.status = 1; + } + }); + }); }; const submitFn = () => { if (!checkIndex.value && checkIndex.value !== 0) { @@ -162,7 +178,7 @@ const submitFn = () => { } visible.value = false; - attendanceRoolcallApi.update({ id: assignId.value, personId: checkData.value.personId, personSetId: checkData.value.personSetId }).then(() => { + attendanceRoolcallApi.update({ taskId: assignId.value, personId: checkData.value.personId, personSetId: checkData.value.personSetId }).then(() => { ElMessage({ message: "指派成功", type: "success" @@ -209,11 +225,26 @@ onMounted(() => { height: 190px; margin-bottom: 20px; .grid-content { + position: relative; box-sizing: border-box; - height: 100%; + + // height: 100%; padding: 15px; margin: 10px; background: #ffffff; + .btns { + position: absolute; + top: 0; + left: 0; + width: 100%; + background: rgb(0 0 0 / 80%); + opacity: 0; + } + &:hover { + .btns { + opacity: 1; + } + } .imgBox { display: flex; align-items: center; @@ -233,7 +264,6 @@ onMounted(() => { } } .info { - height: 80px; .label { margin-right: 8px; font-size: 14px;