数据同步添加提示
This commit is contained in:
parent
f540a39788
commit
3c4cc76991
|
|
@ -555,48 +555,88 @@ export default {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
getAttTempData(query).then(res => {
|
getAttTempData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
getAttDataPull(query).then(res => {
|
getAttDataPull(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 3) {
|
} else if (type === 3) {
|
||||||
getAbsenteeismData(query).then(res => {
|
getAbsenteeismData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 4) {
|
} else if (type === 4) {
|
||||||
getLegalHolidayData(query).then(res => {
|
getLegalHolidayData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 5) {
|
} else if (type === 5) {
|
||||||
getLeaveData(query).then(res => {
|
getLeaveData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 6) {
|
} else if (type === 6) {
|
||||||
insertDayReportData(query).then(res => {
|
insertDayReportData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 7) {
|
} else if (type === 7) {
|
||||||
insertMonthReportTempData(query).then(res => {
|
insertMonthReportTempData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
} else if (type === 8) {
|
} else if (type === 8) {
|
||||||
updateMonthReportData(query).then(res => {
|
updateMonthReportData(query).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
if(res.code === 200){
|
||||||
|
this.$message({ message: '数据同步成功', type:'success' })
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '数据同步失败', type: 'error' })
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue