From 4a6e06b489c7f24ccaa88aff609b9090cc73b088 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 3 Aug 2023 01:23:07 +0800 Subject: [PATCH] fix bugs --- web/client/src/sections/fillion/components/maintenanceTable.js | 2 +- web/client/src/sections/fillion/components/patrolTable.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js index 3081015f..e312a354 100644 --- a/web/client/src/sections/fillion/components/maintenanceTable.js +++ b/web/client/src/sections/fillion/components/maintenanceTable.js @@ -217,7 +217,7 @@ const DetailList = (props) => { dataIndex: 'projectType', align: 'center', render: (text, record) => { - return record.projectType.length > 0 ? reportTypeText(text) : record.codeRoad.length > 0 ? record.codeRoad[0] === 'X' ? '县道' + return record.projectType.length > 0 ? reportTypeText(text) : record.codeRoad?.length > 0 ? record.codeRoad[0] === 'X' ? '县道' : record.codeRoad[0] === 'Y' ? '乡道' : '村道' : '' } }, { diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index ab6d56e6..cbf2d374 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/web/client/src/sections/fillion/components/patrolTable.js @@ -295,7 +295,7 @@ const DetailList = (props) => { dataIndex: 'projectType', align: 'center', render: (text, record) => { - return record.projectType.length > 0 ? reportTypeText(text) : record.codeRoad.length > 0 ? record.codeRoad[0] === 'X' ? '县道' + return record.projectType.length > 0 ? reportTypeText(text) : record.codeRoad?.length > 0 ? record.codeRoad[0] === 'X' ? '县道' : record.codeRoad[0] === 'Y' ? '乡道' : '村道' : '' } } : '',