diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js index b33c19a6..0e00c751 100644 --- a/web/client/src/sections/fillion/components/maintenanceTable.js +++ b/web/client/src/sections/fillion/components/maintenanceTable.js @@ -90,6 +90,8 @@ const DetailList = (props) => { } } + let daySet = {}; + const columns = [ { title: '编号', @@ -97,6 +99,14 @@ const DetailList = (props) => { dataIndex: 'id', align: 'center', render: (text, record) => { + let day = moment(record.time).format("YYYYMMDD") + if (daySet[day]) { + daySet[day].add(Symbol()) + } else { + daySet[day] = new Set() + daySet[day].add(Symbol()) + } + return day * 10000 + daySet[day].size return moment(record.time).format("YYYYMMDD") * 10000 + record.id; } }, { @@ -104,6 +114,15 @@ const DetailList = (props) => { key: 'projectType', dataIndex: 'projectType', align: 'center', + render: (text, record) => { + switch (text) { + case 'road': return '道路'; + case 'bridge': return '桥梁'; + case 'culvert ': return '涵洞'; + case 'other': return '其他'; + default: return text; + } + } }, { title: '所属道路', key: 'road', diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index e8b49e3c..c2bfd650 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/web/client/src/sections/fillion/components/patrolTable.js @@ -90,7 +90,7 @@ const DetailList = (props) => { }) } } - + let daySet = {}; const columns = [ { title: '编号', @@ -98,6 +98,14 @@ const DetailList = (props) => { dataIndex: 'id', align: 'center', render: (text, record) => { + let day = moment(record.time).format("YYYYMMDD") + if (daySet[day]) { + daySet[day].add(Symbol()) + } else { + daySet[day] = new Set() + daySet[day].add(Symbol()) + } + return day * 10000 + daySet[day].size return moment(record.time).format("YYYYMMDD") * 10000 + record.id; } }, @@ -106,6 +114,15 @@ const DetailList = (props) => { key: 'projectType', dataIndex: 'projectType', align: 'center', + render: (text, record) => { + switch (text) { + case 'road': return '道路'; + case 'bridge': return '桥梁'; + case 'culvert ': return '涵洞'; + case 'other': return '其他'; + default: return text; + } + } }, { title: '所属道路', @@ -388,7 +405,7 @@ const PatrolTable = (props) => { ); }; -function mapStateToProps(state) { +function mapStateToProps (state) { const { auth, depMessage, userList, reportList, reportDetail } = state; const pakData = (dep) => { return dep.map((d) => {