suyanyan преди 2 месеца
родител
ревизия
cdf8f4c01e
променени са 2 файла, в които са добавени 38 реда и са изтрити 4 реда
  1. +4
    -0
      SafeCampus.WEB/src/api/modules/attendance/roolcall.ts
  2. +34
    -4
      SafeCampus.WEB/src/views/attendance/roolcall/detail.vue

+ 4
- 0
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);
}
};



+ 34
- 4
SafeCampus.WEB/src/views/attendance/roolcall/detail.vue Целия файл

@@ -20,7 +20,7 @@
<el-row :gutter="20">
<el-col :span="24"
><el-row class="rowbg">
<el-col :xl="4" :lg="4" :md="6" :sm="8" :xs="12" v-for="(item, index) in listData" :key="index"
<el-col :xl="3" :lg="4" :md="6" :sm="8" :xs="12" v-for="(item, index) in listData" :key="index"
><div class="grid-content">
<div class="imgBox" :class="{ active: item.status === 1 ? true : false }">
<el-image
@@ -42,6 +42,9 @@
{{ item.personSetName }}
</div>
</div>
<div v-if="item.status !== 1" class="btn btns" style="justify-content: center; border-top: none">
<el-button size="small" type="primary" @click="checkOut(item, index)">签到</el-button>
</div>
</div></el-col
>
</el-row></el-col
@@ -151,6 +154,19 @@ const assignFn = (item: any) => {
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;


Зареждане…
Отказ
Запис