Browse Source

(fixed)7274 导出信息无数据显示错误

master
ww664853070 2 years ago
parent
commit
55169041a7
  1. 12
      web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx

12
web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx

@ -287,7 +287,7 @@ const AchievementDetails = (props) => {
const twelveTask = item.twelve && item.twelve.task; const twelveTask = item.twelve && item.twelve.task;
const twelveCompletion = twelveAssessmentPerformance && twelveTask && twelveAssessmentPerformance / twelveTask; const twelveCompletion = twelveAssessmentPerformance && twelveTask && twelveAssessmentPerformance / twelveTask;
let days = moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days') let days = item.hiredate ? moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days') : 0
let day = days / 365 let day = days / 365
const workingYears = day.toFixed(1) const workingYears = day.toFixed(1)
return Object.assign({}, item, { return Object.assign({}, item, {
@ -322,11 +322,11 @@ const AchievementDetails = (props) => {
for (let d of allList) { for (let d of allList) {
exportTable += ` exportTable += `
<tr> <tr>
<td><div style="${tableStyle}">${d['department']}</div></td> <td><div style="${tableStyle}">${d['department'] ? d['department'] : ''}</div></td>
<td><div style="${tableStyle}">${d['sale']}</div></td> <td><div style="${tableStyle}">${d['sale'] ? d['sale'] : ''}</div></td>
<td><div style="${tableStyle}">${d['business']}</div></td> <td><div style="${tableStyle}">${d['business'] ? d['business'] : ''}</div></td>
<td><div style="${tableStyle}">${d['hiredate']}</div></td> <td><div style="${tableStyle}">${d['hiredate'] ? d['hiredate'] : ''}</div></td>
<td><div style="${tableStyle}">${d['regularDate']}</div></td> <td><div style="${tableStyle}">${d['regularDate'] ? d['regularDate'] : ''}</div></td>
<td><div style="${tableStyle}">${d['workingYears']}</div></td> <td><div style="${tableStyle}">${d['workingYears']}</div></td>
<td><div style="${tableStyle}">${d.one ? d.one.amount : ''}</div></td> <td><div style="${tableStyle}">${d.one ? d.one.amount : ''}</div></td>

Loading…
Cancel
Save