From 0368aee8a2ccdc1bebdf7a048e67cf18c9c3014c Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 6 Jul 2023 17:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BB=E6=8A=A4=E7=AE=A1=E7=90=86=E7=9A=84?= =?UTF-8?q?=E9=81=93=E8=B7=AF=E7=B1=BB=E5=9E=8B=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/maintenanceTable.js | 24 ++++++++++++------- .../fillion/components/patrolTable.js | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js index f58c8dc7..a0d29e11 100644 --- a/web/client/src/sections/fillion/components/maintenanceTable.js +++ b/web/client/src/sections/fillion/components/maintenanceTable.js @@ -9,6 +9,7 @@ import { PinyinHelper } from '@peace/utils'; // @ts-ignore import styles from './protable.less'; import moment from 'moment'; +import { reportTypeText } from './patrolTable' const DetailForm = (props) => { const { visible, data, handleClose, loading } = props; @@ -32,7 +33,18 @@ const DetailForm = (props) => { {obj.key} { obj.name != 'scenePic' && obj.name.indexOf('conserve') == -1 ? - + :
{ @@ -120,13 +132,7 @@ const DetailList = (props) => { dataIndex: 'projectType', align: 'center', render: (text, record) => { - switch (text) { - case 'road': return '道路'; - case 'bridge': return '桥梁'; - case 'culvert': return '涵洞'; - case 'other': return '其他'; - default: return text; - } + return reportTypeText(text) } }, { title: '所属道路', @@ -380,7 +386,7 @@ const MaintenanceTable = (props) => { ); }; -function mapStateToProps(state) { +function mapStateToProps (state) { const { auth, depMessage, userList, reportList, reportDetail } = state; const pakData = (dep) => { return dep.map((d) => { diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index f6b5c20f..c6ba55c3 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/web/client/src/sections/fillion/components/patrolTable.js @@ -11,7 +11,7 @@ import PatrolGis from './gis/patrolGis'; import styles from './protable.less'; import moment from 'moment'; -const reportTypeText = (text) => { +export const reportTypeText = (text) => { switch (text) { case 'road': return '道路'; //