From 02e754b8ebfc728b654a29fa8a88be403e77dbb1 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Fri, 21 Oct 2022 17:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E8=81=8C=E5=B9=B4=E9=99=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/humanAffairs/containers/employeeInformation.jsx | 2 +- .../src/sections/humanAffairs/containers/personnelFiles.jsx | 4 ++-- .../sections/humanAffairs/containers/personnelFilesDetail.jsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx b/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx index 12c193a..d923548 100644 --- a/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx +++ b/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx @@ -380,7 +380,7 @@ const employeeInformation = (props) => { key: "employmentLife", sorter: (a, b) => { }, render: (_, r, index) => { - return (r.hiredate ? {moment(new Date()).diff(r.hiredate, 'years') + '年'} : '-') + return (r.hiredate ? {String(moment(new Date()).diff(r.hiredate, 'years', true)).substring(0, 3) + '年'} : '-') }, }, { title: '试用期时间', diff --git a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx index 33379d3..56f6e6e 100644 --- a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx +++ b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx @@ -241,7 +241,7 @@ const Rest = (props) => { return (