diff --git a/src/views/projectFront/laborManage/attendanceGroup.vue b/src/views/projectFront/laborManage/attendanceGroup.vue index 7c237709..5073f291 100644 --- a/src/views/projectFront/laborManage/attendanceGroup.vue +++ b/src/views/projectFront/laborManage/attendanceGroup.vue @@ -527,7 +527,7 @@ style="border: 0 !important; color: #f56c6c" type="text" icon="el-icon-delete" - @click="deleteBtn(scope.row)" + @click="deleteAttendanceBatchPersonnel(scope.row)" >删除 @@ -1122,8 +1122,8 @@ export default { }); }, // 删除考勤组人员 - deleteAttendanceBatchPersonnel() { - if (this.$refs.selectworkerTable.selection.length === 0) + deleteAttendanceBatchPersonnel(row) { + if (this.$refs.selectworkerTable.selection.length === 0 && !row.id) return this.$message.warning("请勾选需要删除的数据!"); this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", { confirmButtonText: "确定", @@ -1135,7 +1135,7 @@ export default { deleteWorkerListFromAttendanceGroupV2Api({ id: this.attendanceInfo.id, - workerIdList: ids, + workerIdList: row.id ? [row.id] : ids, }).then((res) => { this.getDataList(); this.getSelectedPersonListFn();