Browse Source

feat:fix bugs

dev
zhaobing 1 year ago
parent
commit
ea1ec2a844
  1. 4
      api/app/lib/controllers/data/vehicle.js
  2. 10
      web/client/src/sections/fillion/components/highwaysTable.js

4
api/app/lib/controllers/data/vehicle.js

@ -7,8 +7,8 @@ async function get(ctx) {
const { type } = ctx.request.body; const { type } = ctx.request.body;
const { name } = ctx.query; const { name } = ctx.query;
const sequelize = ctx.fs.dc.orm const sequelize = ctx.fs.dc.orm
const sqlStr = `select sum(p.road_marking) 标线,sum(p.roadside_ditch) 边沟, const sqlStr = `select sum(p.road_marking) "标线(米)",sum(p.roadside_ditch) "边沟(米)",
sum(p.guardrail) 护栏, sum(p.roadside_trees) 行道树,sum(p.wrong_lane) 错车道 sum(p.guardrail) "护栏(米)", sum(p.roadside_trees) "行道树(棵)",sum(p.wrong_lane) "错车道(个)"
from ( from (
select t.*,row_number() over (partition by t.luduan order by t.time desc ) rn 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, select code_road||'-'||road_section_start||'-'||road_section_end luduan,

10
web/client/src/sections/fillion/components/highwaysTable.js

@ -270,6 +270,7 @@ const TransporTationTable = (props) => {
multipleLine: true, multipleLine: true,
menu: { menu: {
type: 'tab',
activeKey, activeKey,
onChange: (key) => setActiveKey(key), onChange: (key) => setActiveKey(key),
items: [ items: [
@ -298,7 +299,7 @@ const TransporTationTable = (props) => {
options={false} options={false}
ref={c => { finishedProductTable = c; }} ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' //rowKey='id'
onReset={(v) => { onReset={(v) => {
setSitename('') setSitename('')
}} }}
@ -317,7 +318,12 @@ const TransporTationTable = (props) => {
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getHighways(query)); 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]) => ({ const additionalProperties = Object.entries(res.payload.data?.conserveData[0]).map(([key, value]) => ({
id: null, id: null,
name: key, name: key,

Loading…
Cancel
Save