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;