Browse Source

Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev

release_0.0.4
dengyinhuan 2 years ago
parent
commit
a8f1f1fd57
  1. 2
      web/client/src/sections/auth/containers/login.js
  2. 34
      web/client/src/sections/fillion/actions/infor.js
  3. 21
      web/client/src/sections/fillion/components/bridgeTable.js
  4. 18
      web/client/src/sections/fillion/components/highwaysTable.js
  5. 98
      web/client/src/sections/fillion/components/infor/details.js
  6. 23
      web/client/src/sections/fillion/components/inforTable.js
  7. 29
      web/client/src/sections/fillion/components/operationalTable.js
  8. 1
      web/client/src/sections/fillion/components/project/project.js
  9. 16
      web/client/src/sections/fillion/components/publicTable.js
  10. 31
      web/client/src/sections/fillion/components/transportationTable.js
  11. 28
      web/client/src/sections/fillion/containers/bridge.js
  12. 23
      web/client/src/sections/fillion/containers/highways.js
  13. 16
      web/client/src/sections/fillion/containers/infor.js
  14. 28
      web/client/src/sections/fillion/containers/operational.js
  15. 26
      web/client/src/sections/fillion/containers/promotional.js
  16. 24
      web/client/src/sections/fillion/containers/public.js
  17. 30
      web/client/src/sections/fillion/containers/transportation.js
  18. 90
      web/client/src/sections/quanju/containers/footer/operation/left.js
  19. 8
      web/client/src/sections/quanju/containers/footer/operation/right.js
  20. 7
      web/log/development.txt

2
web/client/src/sections/auth/containers/login.js

@ -25,7 +25,7 @@ const Login = props => {
}, [error])
useEffect(() => {
user && user.authorized ? dispatch(push('/quanju')) : null
user && user.authorized ? dispatch(push('/screen/cockpit')) : null
}, [user])
const enterHandler = e => {

34
web/client/src/sections/fillion/actions/infor.js

@ -63,7 +63,7 @@ export function putSpecificVehicle(query) {
data: query,
actionType: 'put_SPECIFIC_VEHICLE',
url: ApiTable.putSpecificVehicle,
msg: { error: '编辑车辆信息失败' },
msg: { option: '编辑车辆信息' },
});
}
@ -74,7 +74,7 @@ export function putHouseholds(query) {
data: query,
actionType: 'put_HOUSEHOLDS',
url: ApiTable.putHouseholds,
msg: { error: '编辑业户信息失败' },
msg: { option: '编辑业户信息' },
});
}
@ -107,7 +107,7 @@ export function putRoadway(query) {
data: query,
actionType: 'PUT_ROADWAY',
url: ApiTable.putRoadway,
msg: { error: '编辑道路信息失败' },
msg: { option: '编辑道路信息' },
});
}
@ -129,7 +129,7 @@ export function putBridge(query) {
data: query,
actionType: 'PUT_BRIDGE',
url: ApiTable.putBridge,
msg: { error: '编辑桥梁信息失败' },
msg: { option: '编辑桥梁信息' },
});
}
@ -151,7 +151,7 @@ export function putProject(query) {
data: query,
actionType: 'GET_PROJECT',
url: ApiTable.putProject,
msg: { error: '编辑工程信息失败' },
msg: { option: '编辑工程信息' },
});
}
@ -173,7 +173,7 @@ export function putHighways(query) {
data: query,
actionType: 'GET_HIGHWAYS',
url: ApiTable.putHighways,
msg: { error: '编辑路政信息失败' },
msg: { option: '编辑路政信息' },
});
}
@ -195,7 +195,7 @@ export function putCircuit(query) {
data: query,
actionType: 'PUT_CIRCUIT',
url: ApiTable.putCircuit,
msg: { error: '编辑线路信息失败' },
msg: { option: '编辑线路信息' },
});
}
@ -217,7 +217,7 @@ export function putVehicle(query) {
data: query,
actionType: 'PUT_VEHICLE',
url: ApiTable.putVehicle,
msg: { error: '编辑车辆信息失败' },
msg: { option: '编辑车辆信息' },
});
}
@ -227,7 +227,7 @@ export function delRoadway(query) {
dispatch: dispatch,
actionType: 'DEL_ROADWAY',
url: ApiTable.delRoadway.replace("{roadId}", query?.roadId),
msg: { error: '删除车辆信息失败' },
msg: { option: '删除车辆信息' },
});
}
@ -237,7 +237,7 @@ export function delProject(query) {
dispatch: dispatch,
actionType: 'DEL_PROJECT',
url: ApiTable.delProject.replace("{projectId}", query?.projectId),
msg: { error: '删除工程信息失败' },
msg: { option: '删除工程信息' },
});
}
@ -247,7 +247,7 @@ export function delBridge(query) {
dispatch: dispatch,
actionType: 'DEL_BRIDGE',
url: ApiTable.delBridge.replace("{bridgeId}", query?.bridgeId),
msg: { error: '删除桥梁信息失败' },
msg: { option: '删除桥梁信息' },
});
}
@ -257,7 +257,7 @@ export function delSpecificVehicle(query) {
dispatch: dispatch,
actionType: 'DEL_SPECIFICVENICLE',
url: ApiTable.delSpecificVehicle.replace("{vehicleId}", query?.vehicleId),
msg: { error: '删除车辆信息失败' },
msg: { option: '删除车辆信息' },
});
}
@ -267,7 +267,7 @@ export function delHouseholds(query) {
dispatch: dispatch,
actionType: 'DEL_HOUSEHOLDS',
url: ApiTable.delHouseholds.replace("{businessId}", query?.businessId),
msg: { error: '删除业户信息失败' },
msg: { option: '删除业户信息' },
});
}
@ -277,7 +277,7 @@ export function delCircuit(query) {
dispatch: dispatch,
actionType: 'DEL_CIRCUIT',
url: ApiTable.delCircuit.replace("{lineId}", query?.lineId),
msg: { error: '删除运营线路信息失败' },
msg: { option: '删除运营线路信息' },
});
}
@ -287,7 +287,7 @@ export function delVehicle(query) {
dispatch: dispatch,
actionType: 'DEL_VEHICLE',
url: ApiTable.delVehicle.replace("{carId}", query?.carId),
msg: { error: '删除车辆信息失败' },
msg: { option: '删除车辆信息' },
});
}
@ -310,7 +310,7 @@ export function putPurchase(query) {
data: query,
actionType: 'PUT_PURCHASE',
url: ApiTable.putPurchase,
msg: { error: '获取治超信息失败' },
msg: { option: '编辑治超信息' },
});
}
@ -320,7 +320,7 @@ export function delPurchase(query) {
dispatch: dispatch,
actionType: 'DEL_PURCHASE',
url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId),
msg: { error: '删除车辆信息失败' },
msg: { option: '删除车辆信息' },
});
}

21
web/client/src/sections/fillion/components/bridgeTable.js

@ -24,6 +24,7 @@ const BrideTable = (props) => {
const [recortd, setRecortd] = useState()
const [whichofits, setWhichofits] = useState('qiaoliang')
const [delet, setDelet] = useState()
const [differentiate, setDifferentiate] = useState('bridge')
const ref = useRef()
useEffect(() => { ref.current.reload() }, [whichofits, delet])
@ -1750,22 +1751,6 @@ const BrideTable = (props) => {
setModalRecord(null);
}
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
return (
<Spin spinning={false}>
<div className='protable-transpor'>
@ -1782,12 +1767,14 @@ const BrideTable = (props) => {
key: 'tab1',
label: <span onClick={() => {
setWhichofits('qiaoliang')
setDifferentiate('bridge')
}}>桥梁{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => {
setWhichofits('gongcheng')
setDifferentiate('project')
}}>工程一览{activeKey === 'tab2'}</span>,
},
@ -1844,7 +1831,7 @@ const BrideTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,differentiate) }}>
<Button
>
导出

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

@ -29,23 +29,7 @@ const hightModal = (type, record) => {
} else {
setModalRecord(null);
}
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
}
const columns =
[
{

98
web/client/src/sections/fillion/components/infor/details.js

@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { DrawerForm, ProForm, ProFormText, ProFormSelect,ProFormDatePicker } from '@ant-design/pro-form';
import { putRoadway, putSpecificVehicle, putHouseholds, putCircuit, putVehicle, putPurchase } from "../../actions/infor"
import { putBridge } from "../../actions/infor"
import _ from 'lodash'
import _ from 'lodash'
const UserModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor,setDelet,whichofits } = props
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor, setDelet, whichofits } = props
const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理
@ -70,6 +70,7 @@ const UserModal = (props) => {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
array?.splice(6, 1)
setNewlysay(array)
}
}, [])
@ -150,54 +151,74 @@ const UserModal = (props) => {
onFinish={(values) => {
if (Object.values(values).length > 0) {
if (rewkeys === 'transportation') {
if (typecard == '111') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
})
return true
})
} else {
setDelet(values)
const query = { ...values, level: whichofits }
dispatch(putRoadway(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'bridge') {
if (typecard == '111') {
setDelet(values)
setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
})
return true
} else {
setDelet(values)
setDelet(values)
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (rewkeys === 'weihuo') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
const query = { ...values, vehicleId: records?.[0]?.value || '', type: '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
setDelet(values)
const query = { ...values, type: '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'chuzu') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
}
@ -205,16 +226,16 @@ const UserModal = (props) => {
if (rewkeys === 'yehu') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
const query = { ...values, businessId: records?.[0]?.value, type: values.type }
dispatch(putHouseholds(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
setDelet(values)
const query = { ...values, type: values.type }
dispatch(putHouseholds(query)).then((res) => {
})
return true
}
@ -223,14 +244,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
})
return true
} else {
setDelet(values)
setDelet(values)
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
})
return true
}
@ -240,14 +261,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
setDelet(values)
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
})
return true
}
@ -257,15 +278,15 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, overspeedId: records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
setMonitor(res)
})
return true
} else {
setDelet(values)
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
setMonitor(res)
})
return true
@ -283,7 +304,6 @@ const UserModal = (props) => {
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
placeholder="请输入名称"
value={recordsay?.[0]?.value}
// rules={[{ required: true, message: "必填" }]}
@ -291,7 +311,7 @@ const UserModal = (props) => {
name={newlys?.[1]?.type}
width="md"
label={newlys?.[1]?.name}
placeholder="请输入名称"
value={recordsay?.[1]?.value}
// rules={[{ required: true, message: "必填" }]}
@ -312,6 +332,7 @@ const UserModal = (props) => {
label='类型'
/> : null
}
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
@ -325,7 +346,7 @@ const UserModal = (props) => {
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
placeholder="请输入名称"
// value={recordssy?.[0]?.value}
// rules={[{ required: true, message: "必填" }]}
@ -333,7 +354,7 @@ const UserModal = (props) => {
name={newlys?.[1]?.type}
width="md"
label={newlys?.[1]?.name}
placeholder="请输入名称"
// value={recordssy?.[1]?.value}
// rules={[{ required: true, message: "必填" }]}
@ -354,10 +375,11 @@ const UserModal = (props) => {
label='类型'
/> : null
}
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}
/>
})}

23
web/client/src/sections/fillion/components/inforTable.js

@ -35,22 +35,6 @@ const InForTable = (props) => {
setModalRecord(null);
}
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const deldata = (id) => { // 治超删除
const query = {
overspeedId: id
@ -213,7 +197,7 @@ const InForTable = (props) => {
dataIndex: 'createdAt',
valueType: 'date',
render: (dom, record) => {
return record.testTime
return record.testTime.slice(0,10)
},
fieldProps: {
onChange: (value, cs) => {
@ -463,7 +447,10 @@ const InForTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
<Popconfirm title="确认导出?" onConfirm={() => {
console.log(rowSelected)
props.exports(rowSelected, counts) }}>
<Button
>
导出

29
web/client/src/sections/fillion/components/operationalTable.js

@ -22,6 +22,9 @@ const OperaTionalTable = (props) => {
const [recortd, setRecortd] = useState()
const [rewkeys, setRewkeys] = useState('keyun')
const [delet, setDelet] = useState()
const [differentiate, setDifferentiate] = useState()
const [genre, setGenre] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet])
@ -62,22 +65,6 @@ const OperaTionalTable = (props) => {
setModalRecord(null);
}
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const columns = {
tab1: [
{
@ -1880,6 +1867,8 @@ const OperaTionalTable = (props) => {
label: <span onClick={() => {
{
setRewkeys('chuzu')
setDifferentiate('vehicle')
setGenre('出租车')
}
}}>出租车{activeKey === 'tab2'}</span>,
@ -1889,13 +1878,17 @@ const OperaTionalTable = (props) => {
label: <span onClick={() => {
{
setRewkeys('weihuo')
setDifferentiate('vehicle')
setGenre('危货')
}
}}>危险货运{activeKey === 'tab3'}</span>,
}, {
key: 'tab4',
label: <span onClick={() => {
setRewkeys('yehu')
setDifferentiate('business')
setRewkeys('yehu')
}}>业户{activeKey === 'tab4'}</span>,
},
@ -1973,7 +1966,7 @@ const OperaTionalTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,differentiate,genre) }}>
<Button
>
导出

1
web/client/src/sections/fillion/components/project/project.js

@ -145,7 +145,6 @@ const ProjectModal = (props) => {
label: '否',
},
]}
width="xs"
name='done'
label='是否已完成'
rules={[{ required: true, message: "必填" }]}

16
web/client/src/sections/fillion/components/publicTable.js

@ -51,22 +51,6 @@ const PublicTable = (props) => {
setModalRecord(null);
}
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const deldata = (id) => { // 线路
const query = {
lineId: id

31
web/client/src/sections/fillion/components/transportationTable.js

@ -21,6 +21,8 @@ const TransporTationTable = (props) => {
const [recortd, setRecortd] = useState()
const [whichofits, setWhichofits] = useState('县')
const [delet, setDelet] = useState()
const [differentiate, setDifferentiate] = useState('road')
const [grade, setGrade] = useState('县')
const ref = useRef()
useEffect(() => { ref.current.reload() }, [whichofits, delet])
//打开弹窗
@ -60,22 +62,6 @@ const TransporTationTable = (props) => {
setDelet(res)
})
}
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const columns = {
tab1: [
{
@ -3750,23 +3736,33 @@ const TransporTationTable = (props) => {
key: 'tab1',
label: <span onClick={() => {
setWhichofits('县')
setDifferentiate('road')
setGrade('县')
}}>县道{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => {
setWhichofits('乡')
setGrade('乡')
setDifferentiate('road')
}}>乡道{activeKey === 'tab2'}</span>,
},
{
key: 'tab3',
label: <span onClick={() => {
setWhichofits('村')
setDifferentiate('road')
setGrade('村')
}}>村道{activeKey === 'tab3'}</span>,
}, {
key: 'tab4',
label: <span onClick={() => {
setWhichofits('gongcheng')
setDifferentiate('project')
}}>工程一览{activeKey === 'tab4'}</span>,
},
],
@ -3836,6 +3832,7 @@ const TransporTationTable = (props) => {
setRowSelected([]);
const res = await dispatch(getProject(query));
setCounts(res.payload.data)
console.log(res)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
@ -3846,7 +3843,7 @@ const TransporTationTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,grade,differentiate) }}>
<Button
>
导出

28
web/client/src/sections/fillion/containers/bridge.js

@ -9,24 +9,20 @@ const bridge = (props) => {
const [data, setData] = useState()
useEffect(() => {
// dispatch(getDepMessage())
setData(props)
}, []);
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
const exports = (ids, differentiate) => {
let idas = ids.toString()
if (differentiate == 'bridge') {
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${differentiate}&token=${user.token}`)
}if(differentiate=='project'){
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${differentiate}&token=${user.token}`)
}
}
return (
<> <BridgeTable data={data} exports={exports} />

23
web/client/src/sections/fillion/containers/highways.js

@ -12,22 +12,13 @@ const highways = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const exports = (ids,counts) => {
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
return (
<> <HighwaysTable data={data} exports={exports} />
</>

16
web/client/src/sections/fillion/containers/infor.js

@ -26,19 +26,11 @@ const infor = (props) => {
// }
//批量导出
const exports = (ids,counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
return (
<> <InForTable data={data} exports={exports} />

28
web/client/src/sections/fillion/containers/operational.js

@ -12,22 +12,18 @@ const operational = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
const exports = (ids,differentiate,genre) => {
let idas=ids.toString()
if(differentiate=='vehicle'){
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&municipalType=${genre}&token=${user.token}`)
}if(differentiate=='business'){
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&token=${user.token}`)
}
}
return (
<> <OperaTionalTable data={data} exports={exports} />
</>

26
web/client/src/sections/fillion/containers/promotional.js

@ -13,24 +13,16 @@ const promotional = (props) => {
setData(props)
}, []);
// //批量导出
// const exports = (ids, counts) => {
// // console.log(user);
// let reportIds = [];
// if (ids.length)
// reportIds = ids
// else
// reportIds = (counts || {}).ids || [];
// superagent.post('/_report/http')
// .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
// const resTextIs = res.text.split('/').pop()
// window.open(
// '/_api/' +
// `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
// })
// }
//批量导出
const exports = (ids,counts) => {
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
return (
<> <PromoTionalTable data={data} />
<> <PromoTionalTable data={data} exports={exports}/>
</>
)
}

24
web/client/src/sections/fillion/containers/public.js

@ -12,22 +12,14 @@ const Public = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
//批量导出
const exports = (ids,counts) => {
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
return (
<> <PublicTable data={data} exports={exports} />
</>

30
web/client/src/sections/fillion/containers/transportation.js

@ -12,22 +12,20 @@ const transportation = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids, counts) => {
// console.log(user);
let reportIds = [];
if (ids.length)
reportIds = ids
else
reportIds = (counts || {}).ids || [];
superagent.post('/_report/http')
.send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
const resTextIs = res.text.split('/').pop()
window.open(
'/_api/' +
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
//批量导出
const exports = (ids,grade,differentiate) => {
console.log(differentiate);
let idas=ids.toString()
if(differentiate=='road'){
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&roadLevel=${grade||''}&token=${user.token}`)
}if(differentiate=='project'){
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&token=${user.token}`)
}
}
return (
<> <TransporTationTable data={data} exports={exports} />
</>

90
web/client/src/sections/quanju/containers/footer/operation/left.js

@ -5,8 +5,6 @@ import Module from '../../public/module'
import { getBusTierList } from '../../../actions/example'
import './style.less'
const Left = (props) => {
const [treeData, setTreeData] = useState([])
const [treeDataList, setTreeDataList] = useState([])
@ -29,12 +27,12 @@ const Left = (props) => {
const onChange = (e) => {
const { value } = e.target;
let keys = []
const newExpandedKeys = treeDataList.filter(e => e.key.match(value))
let titles = []
const newExpandedKeys = treeDataList.filter(e => e.title != null && e.title.match(value))
newExpandedKeys.forEach(e => {
keys.push(e.key)
titles.push(e.title)
})
setExpandedKeys(keys);
setExpandedKeys(titles);
setSearchValue(value);
setAutoExpandParent(true);
};
@ -78,51 +76,53 @@ const Left = (props) => {
let busTierOpen = []
let dataList = []
let busTierNewList = []
if (busTier && busTier.data && busTier.data.length > 0) {
busTierNewList.push(busTier && busTier.data && busTier.data[0])
}
if (busTierNewList.length > 0) {
busTierNewList.forEach((e, index) => {
if (index == 0) {
busTierOpen.push(e.name)
}
busTierList.push({
key: e.name,
title: e.name,
children: e.child.map(s => {
return {
key: s.name,
title: s.name,
children: s.child.map(i => {
return {
key: i.name,
title: i.name,
children: i.child.map(x => {
return {
key: x.name,
title: x.name,
}
})
}
})
}
// Math.ceil(Math.random() * 100);
// if (busTier && busTier.data && busTier.data.length > 0) {
// busTierNewList.push(busTier && busTier.data && busTier.data[0])
// }
// if (busTierNewList.length > 0) {
// }
busTier && busTier.data && busTier.data.forEach((e, index) => {
if (index == 0) {
busTierOpen.push(e.name)
}
busTierList.push({
key: e.name,
title: e.name,
children: e.child.map(s => {
return {
key: s.name == '--' || s.name == null ? Math.ceil(Math.random() * 100) : s.name,
title: s.name,
children: s.child.map(i => {
return {
key: i.name == '--' || i.name == null ? Math.ceil(Math.random() * 100) : i.name,
title: i.name,
children: i.child.map(x => {
return {
key: x.name == '--' || x.name == null ? Math.ceil(Math.random() * 100) : x.name,
title: x.name == null ? '--' : x.name,
}
})
}
})
}
})
})
})
busTierNewList.forEach(e => {
e.child.forEach(i => {
i.child.forEach(s => {
s.child.forEach(x => {
dataList.push({
key: x.name,
title: x.name
})
})
busTier && busTier.data && busTier.data.forEach(e => {
e.child.forEach(i => {
i.child.forEach(s => {
s.child.forEach(x => {
dataList.push({
key: x.name,
title: x.name
})
})
})
})
}
})
setTreeData(busTierList)
setExpandedKeys(busTierOpen)
setTreeDataList(dataList)
@ -132,7 +132,7 @@ const Left = (props) => {
<Module style={style} customize={true} title={"公交车辆信息"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}>
<img src='assets/images/quanju/search.png' style={{ width: '5%', margin: '0 1.5% 1% 3.5%' }} />
<img src='/assets/images/quanju/search.png' style={{ width: '5%', margin: '0 1.5% 1% 3.5%' }} />
<Input
style={{
width: '90%',

8
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -37,7 +37,7 @@ const Right = () => {
dataLists.map((data, index) => (
<div key={index} style={{width:'100%',height:'40%'}}>
<div className='busInformation'>
<img src='assets/images/quanju/theBus.png' style={{ width: '15%', display:'block',float:'left' }} />
<img src='/assets/images/quanju/theBus.png' style={{ width: '15%', display:'block',float:'left' }} />
<span>
<h3>所属线路</h3>
<h4>{data.route}</h4>
@ -49,15 +49,15 @@ const Right = () => {
<div style={{
width:'98%',margin:'1% 1%',height:152,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{
width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{
width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
}}><img src='/assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
</div>
</div>
))

7
web/log/development.txt

@ -24236,6 +24236,7 @@
' at emitErrorCloseNT (internal/streams/destroy.js:68:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)'
}
<<<<<<< Updated upstream
2022-07-28 10:08:50.687 - error: [FS-ERRHD]
{
message: 'Error: read ECONNRESET',
@ -30704,3 +30705,9 @@
}
2022-07-28 16:51:10.270 - debug: [FS-LOGGER] Init.
2022-07-28 16:51:11.180 - info: [Router] Inject api: attachment/index
=======
2022-07-28 15:21:26.802 - debug: [FS-LOGGER] Init.
2022-07-28 15:21:27.251 - info: [Router] Inject api: attachment/index
2022-07-28 17:47:48.855 - debug: [FS-LOGGER] Init.
2022-07-28 17:47:49.287 - info: [Router] Inject api: attachment/index
>>>>>>> Stashed changes

Loading…
Cancel
Save