diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js index 59aa5408..8dd38fe0 100644 --- a/api/app/lib/controllers/data/vehicle.js +++ b/api/app/lib/controllers/data/vehicle.js @@ -7,8 +7,8 @@ async function get(ctx) { const { type } = ctx.request.body; const { name } = ctx.query; const sequelize = ctx.fs.dc.orm - const sqlStr = `select sum(p.road_marking) 标线,sum(p.roadside_ditch) 边沟, - sum(p.guardrail) 护栏, sum(p.roadside_trees) 行道树,sum(p.wrong_lane) 错车道 + const sqlStr = `select sum(p.road_marking) "标线(米)",sum(p.roadside_ditch) "边沟(米)", + sum(p.guardrail) "护栏(米)", sum(p.roadside_trees) "行道树(棵)",sum(p.wrong_lane) "错车道(个)" from ( select t.*,row_number() over (partition by t.luduan order by t.time desc ) rn from ( select code_road||'-'||road_section_start||'-'||road_section_end luduan, diff --git a/web/client/src/sections/fillion/components/highwaysTable.js b/web/client/src/sections/fillion/components/highwaysTable.js index 248e503c..af03ffd0 100644 --- a/web/client/src/sections/fillion/components/highwaysTable.js +++ b/web/client/src/sections/fillion/components/highwaysTable.js @@ -270,6 +270,7 @@ const TransporTationTable = (props) => { multipleLine: true, menu: { + type: 'tab', activeKey, onChange: (key) => setActiveKey(key), items: [ @@ -298,7 +299,7 @@ const TransporTationTable = (props) => { options={false} ref={c => { finishedProductTable = c; }} style={{ width: "100% ", overflow: "auto", height: '760px' }} - rowKey='id' + //rowKey='id' onReset={(v) => { setSitename('') }} @@ -317,7 +318,12 @@ const TransporTationTable = (props) => { } setRowSelected([]); const res = await dispatch(getHighways(query)); - let rslt = res.payload.data?.vehicleRes?.filter(item => item.name !== '路牌名') + let rslt = res.payload.data?.vehicleRes?.map(item => { + return { + ...item, + name: item.name + "(个)" + } + }) const additionalProperties = Object.entries(res.payload.data?.conserveData[0]).map(([key, value]) => ({ id: null, name: key,