签到bug修复
This commit is contained in:
@@ -441,8 +441,10 @@ export default {
|
||||
const attendanceIndex = user.attendances.findIndex(
|
||||
(i) => i.attendanceDay === dayIndex
|
||||
);
|
||||
|
||||
if (attendanceIndex > -1) {
|
||||
const attendance = user.attendances[attendanceIndex];
|
||||
|
||||
// 如果存在签到记录,使用对应项目的颜色
|
||||
return {
|
||||
backgroundColor: attendance.color || '#fdf6e4',
|
||||
@@ -477,6 +479,7 @@ export default {
|
||||
projectId: 0,
|
||||
userId: this.selectUser.userId,
|
||||
attendanceDay: this.selectIndex,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
addOaAttendance(this.form).then(res => {
|
||||
this.getList()
|
||||
@@ -487,6 +490,7 @@ export default {
|
||||
this.form = {
|
||||
projectId: 0,
|
||||
attendanceDay: this.selectIndex,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
// 集体赋予状态
|
||||
addBatchOaAttendance(this.form).then(res => {
|
||||
@@ -501,6 +505,7 @@ export default {
|
||||
projectId: 1,
|
||||
userId: this.selectUser.userId,
|
||||
attendanceDay: this.selectIndex,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
addOaAttendance(this.form).then(res => {
|
||||
this.getList()
|
||||
@@ -511,6 +516,7 @@ export default {
|
||||
this.form = {
|
||||
projectId: 1,
|
||||
attendanceDay: this.selectIndex,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
// 集体赋予状态
|
||||
addBatchOaAttendance(this.form).then(res => {
|
||||
@@ -604,7 +610,6 @@ export default {
|
||||
this.$message({message: '请选择工作时长', type: 'warning'})
|
||||
return;
|
||||
}
|
||||
let time = this.timeFlag === 0 ? this.form.dayLength : this.form.hour
|
||||
|
||||
|
||||
if (!this.selectAll) {
|
||||
@@ -613,7 +618,8 @@ export default {
|
||||
userId: this.selectUser.userId,
|
||||
attendanceDay: this.selectIndex,
|
||||
dayLength: this.timeFlag === 0 ? this.form.dayLength : undefined,
|
||||
hour: this.timeFlag === 1 ? this.form.hour : undefined
|
||||
hour: this.timeFlag === 1 ? this.form.hour : undefined,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
addOaAttendance(this.form).then(res => {
|
||||
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
||||
@@ -625,7 +631,8 @@ export default {
|
||||
projectId: project.projectId,
|
||||
attendanceDay: this.selectIndex,
|
||||
dayLength: this.timeFlag === 0 ? this.form.dayLength : undefined,
|
||||
hour: this.timeFlag === 1 ? this.form.hour : undefined
|
||||
hour: this.timeFlag === 1 ? this.form.hour : undefined,
|
||||
selectTime:this.queryParams.selectTime
|
||||
}
|
||||
// 集体赋予状态
|
||||
addBatchOaAttendance(this.form).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user