From 3f4ddb163c4a587e633e49ace54c509809e0dba9 Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Fri, 9 Dec 2022 18:10:34 +0800 Subject: [PATCH] =?UTF-8?q?(fixed)7268=20=E6=B2=A1=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/performanceReport/performanceSummary.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx index e391c87..0b7e954 100644 --- a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx +++ b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx @@ -80,20 +80,20 @@ const AchievementDetails = (props) => { title: '入职日期', dataIndex: 'hiredate', width: 130, - render: (text, record, index) => moment(text).format('YYYY-MM-DD') + render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' }, { title: '转正日期', dataIndex: 'regularDate', width: 130, - render: (text, record, index) => moment(text).format('YYYY-MM-DD') + render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' }, { title: '工龄', dataIndex: 'workingYears', width: 130, render: (text, record, index) => { - let days = moment().diff(moment(record.hiredate).format('YYYY-MM-DD'), 'days') + let days = record.hiredate ? moment().diff(moment(record.hiredate).format('YYYY-MM-DD'), 'days') : 0 let day = days / 365 return day.toFixed(1) }