办公V3
This commit is contained in:
@@ -144,7 +144,6 @@ import {
|
||||
listSchedule,
|
||||
listAttendCalc,
|
||||
listLeaveReq,
|
||||
listOvertimeReq,
|
||||
listPayPlan,
|
||||
listPayRun,
|
||||
listPayslip,
|
||||
@@ -213,6 +212,12 @@ export default {
|
||||
this.todoList = res.data || []
|
||||
this.heroStats.find(i => i.key === 'todo').value = this.todoList.length
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('加载待办任务失败:', err)
|
||||
this.$message.error('加载待办任务失败,可能是超管用户无角色导致')
|
||||
this.todoList = []
|
||||
this.heroStats.find(i => i.key === 'todo').value = 0
|
||||
})
|
||||
.finally(() => {
|
||||
this.todoLoading = false
|
||||
})
|
||||
@@ -227,11 +232,17 @@ export default {
|
||||
.then(res => {
|
||||
this.flowActions = res.rows || res.data || []
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('加载流程历史失败:', err)
|
||||
this.$message.error('加载流程历史失败')
|
||||
this.flowActions = []
|
||||
})
|
||||
.finally(() => {
|
||||
this.flowLoading = false
|
||||
})
|
||||
},
|
||||
async loadSummary() {
|
||||
try {
|
||||
const [orgRes, empRes, shiftRes, scheduleRes, attendRes, leaveRes, otRes, planRes, runRes, payslipRes] =
|
||||
await Promise.all([
|
||||
listOrg({ pageNum: 1, pageSize: 999 }),
|
||||
@@ -240,7 +251,6 @@ export default {
|
||||
listSchedule({ pageNum: 1, pageSize: 200 }),
|
||||
listAttendCalc({ pageNum: 1, pageSize: 200 }),
|
||||
listLeaveReq({ pageNum: 1, pageSize: 200 }),
|
||||
listOvertimeReq({ pageNum: 1, pageSize: 200 }),
|
||||
listPayPlan({ pageNum: 1, pageSize: 200 }),
|
||||
listPayRun({ pageNum: 1, pageSize: 200 }),
|
||||
listPayslip({ pageNum: 1, pageSize: 200 })
|
||||
@@ -270,6 +280,10 @@ export default {
|
||||
this.summary.payslipCount = payslips.length
|
||||
this.heroStats.find(i => i.key === 'employee').value = this.summary.empCount
|
||||
this.heroStats.find(i => i.key === 'attendance').value = this.summary.attendException
|
||||
} catch (err) {
|
||||
console.error('加载汇总数据失败:', err)
|
||||
// 静默失败,不影响页面显示
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user