Browse Source

提交全部

dev
xingyongchun 2 years ago
parent
commit
31f0421fae
  1. 58
      api/log/development.log
  2. BIN
      web/client/assets/images/zhexian.png
  3. BIN
      web/client/assets/images/zhuzhuang.png
  4. 27
      web/client/src/sections/fillion/actions/infor.js
  5. 1
      web/client/src/sections/fillion/components/bridgeTable.js
  6. 217
      web/client/src/sections/fillion/components/highways/guanli.js
  7. 629
      web/client/src/sections/fillion/components/highwaysTable.js
  8. 3
      web/client/src/sections/fillion/components/transportationTable.js
  9. 2
      web/client/src/sections/fillion/nav-item.js
  10. 2
      web/client/src/sections/fillion/routes.js
  11. 11
      web/client/src/sections/quanju/actions/example.js
  12. 10
      web/client/src/sections/quanju/containers/footer/conserve/action/index.js
  13. 17
      web/client/src/sections/quanju/containers/footer/conserve/index.js
  14. 159
      web/client/src/sections/quanju/containers/footer/conserve/left/Lb.js
  15. 25
      web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
  16. 8
      web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js
  17. 25
      web/client/src/sections/quanju/containers/footer/conserve/left/left-top.js
  18. 109
      web/client/src/sections/quanju/containers/footer/conserve/left/lunbo.js
  19. 238
      web/client/src/sections/quanju/containers/footer/conserve/left/lunbozujian.js
  20. 123
      web/client/src/sections/quanju/containers/footer/conserve/left/shituzujian.js
  21. 149
      web/client/src/sections/quanju/containers/footer/conserve/left/zhexin.js
  22. 2
      web/client/src/sections/quanju/containers/footer/conserve/left/zidong.js
  23. 7
      web/client/src/utils/webapi.js
  24. 1626
      web/log/development.txt

58
api/log/development.log

@ -11136,3 +11136,61 @@ headers: {}
2022-08-31 21:11:34.625 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-08-31 21:11:34.625 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-31 21:11:34.625 - info: [FS-AUTH] Inject auth and api mv into router. 2022-08-31 21:11:34.625 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes >>>>>>> Stashed changes
2022-09-01 01:09:46.801 - debug: [FS-LOGGER] Init.
2022-09-01 01:09:47.410 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 01:09:47.410 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 16:38:47.964 - error: [FS-ERRHD]
{
message: 'request aborted',
stack: 'BadRequestError: request aborted\n' +
' at IncomingMessage.onAborted (f:\\项目\\sihao\\Highways4Good\\api\\node_modules\\raw-body\\index.js:238:10)\n' +
' at IncomingMessage.emit (events.js:314:20)\n' +
' at abortIncoming (_http_server.js:533:9)\n' +
' at socketOnClose (_http_server.js:526:3)\n' +
' at Socket.emit (events.js:326:22)\n' +
' at TCP.<anonymous> (net.js:675:12)\n' +
' at TCP.callbackTrampoline (internal/async_hooks.js:126:14)',
name: 'BadRequestError',
code: 'ECONNABORTED',
expected: 234,
length: 234,
received: 190,
type: 'request.aborted'
}
2022-09-01 16:41:01.852 - error: [FS-ERRHD]
{
message: 'request aborted',
stack: 'BadRequestError: request aborted\n' +
' at IncomingMessage.onAborted (f:\\项目\\sihao\\Highways4Good\\api\\node_modules\\raw-body\\index.js:238:10)\n' +
' at IncomingMessage.emit (events.js:314:20)\n' +
' at abortIncoming (_http_server.js:533:9)\n' +
' at socketOnClose (_http_server.js:526:3)\n' +
' at Socket.emit (events.js:326:22)\n' +
' at TCP.<anonymous> (net.js:675:12)\n' +
' at TCP.callbackTrampoline (internal/async_hooks.js:126:14)',
name: 'BadRequestError',
code: 'ECONNABORTED',
expected: 175,
length: 175,
received: 146,
type: 'request.aborted'
}
2022-09-01 17:03:43.087 - debug: [FS-LOGGER] Init.
2022-09-01 17:03:44.040 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:03:44.040 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:07:15.155 - debug: [FS-LOGGER] Init.
2022-09-01 17:07:15.234 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:07:15.234 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:07:18.088 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:12:04.208 - debug: [FS-LOGGER] Init.
2022-09-01 17:12:04.286 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:12:04.287 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:12:06.685 - debug: [FS-LOGGER] Init.
2022-09-01 17:12:06.763 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 17:12:06.763 - info: [FS-AUTH] Inject auth and api mv into router.
2022-09-01 17:13:23.786 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:20:58.071 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 17:26:53.932 - error: path: /department, error: TypeError: Cannot read property 'userInfo' of undefined
2022-09-01 18:25:21.474 - debug: [FS-LOGGER] Init.
2022-09-01 18:25:22.990 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-01 18:25:22.990 - info: [FS-AUTH] Inject auth and api mv into router.

BIN
web/client/assets/images/zhexian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

BIN
web/client/assets/images/zhuzhuang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

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

@ -1,5 +1,6 @@
import { basicAction } from '@peace/utils' import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils' import { ApiTable } from '$utils'
import { Request } from '@peace/utils'
export function getDepMessage() { export function getDepMessage() {
return dispatch => basicAction({ return dispatch => basicAction({
@ -162,7 +163,7 @@ export function getHighways(query) {
query: query, query: query,
actionType: 'GET_HIGHWAYS', actionType: 'GET_HIGHWAYS',
url: ApiTable.getHighways, url: ApiTable.getHighways,
msg: { error: '获取路政信息失败' }, msg: { error: '获取设施统计信息失败' },
}); });
} }
@ -173,7 +174,7 @@ export function putHighways(query) {
data: query, data: query,
actionType: 'GET_HIGHWAYS', actionType: 'GET_HIGHWAYS',
url: ApiTable.putHighways, url: ApiTable.putHighways,
msg: { option: '编辑路政信息' }, msg: { option: '编辑设施统计信息' },
}); });
} }
@ -390,3 +391,25 @@ export function putShippingList(query) {
msg: { option: '编辑货运信息' }, msg: { option: '编辑货运信息' },
}); });
} }
//获取管养单位概况
export function getCustodyunit() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_CUSTODY_UNIT',
url: ApiTable.getCustodyunit,
msg: { error: '获取管养单位概况失败' },
// reducer: { name: 'roadMaintenances' }
});
}
export function postCustodyunit(query) {
return dispatch => basicAction({
type: 'post',
data: query,
dispatch: dispatch,
actionType: 'POST_CUSTODY_UNIT',
url: ApiTable.postCustodyunit,
msg: { option: '编辑管养单位概况' },
// reducer: { name: 'roadMaintenances' }
});
}

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

@ -1825,7 +1825,6 @@ const BrideTable = (props) => {
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
} }
} }
}} }}
search={{ search={{
defaultCollapsed: false, defaultCollapsed: false,

217
web/client/src/sections/fillion/components/highways/guanli.js

@ -2,19 +2,18 @@ import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional, putHighways } from "../../actions/infor" import { putOperaTional, postCustodyunit } from "../../actions/infor"
import _ from 'lodash' import _ from 'lodash'
const Guanli = (props) => { const Guanli = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props
const [success, setSuccess] = useState() const [success, setSuccess] = useState()
console.log(recortd)
useEffect(() => { useEffect(() => {
return () => { return () => {
setRecortd() setRecortd()
} }
}, [setRecortd]) }, [setRecortd])
// console.log(recortd)
return ( return (
<Spin spinning={false}> <Spin spinning={false}>
{/* { {/* {
@ -24,249 +23,69 @@ const Guanli = (props) => {
visible={visible} visible={visible}
onVisibleChange={onVisibleChange} onVisibleChange={onVisibleChange}
onFinish={(values) => { onFinish={(values) => {
if (rewkeys === 'passenger') {
setDelet(values)
const query = { ...values, id: recortd?.id }
dispatch(putOperaTional(query)).then((res) => {
setSuccess(res.success)
})
return true
}
if (rewkeys === 'highways') {
setDelet(values) setDelet(values)
const query = { ...values, id: recortd?.id } const query = { ...values, id: recortd?.id,serialNumber:recortd?.id }
dispatch(putHighways(query)).then((res) => { console.log('邢永春',query)
dispatch(postCustodyunit(query)).then((res) => {
setSuccess(res.success) setSuccess(res.success)
}) })
return true return true
}
}} }}
initialValues={recortd} initialValues={recortd}
> >
{typecard == 'compile' ? <ProForm.Group>
<ProForm.Group
>
<ProFormText <ProFormText
name='name' name='responsibleUnitForManagementAndMaintenance'
width="md"
label='类型'
placeholder="请输入名称"
// value={recortd?.[0]?.value}
// disabled
/>
<ProFormText
name='count'
width="md"
label='数量'
placeholder="请输入数量"
rules={[
{
required: true,
message: '请输入整数',
pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/>
<ProFormText
name='count'
width="md"
label='数量'
placeholder="请输入数量"
rules={[
{
required: true,
message: '请输入整数',
pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/>
</ProForm.Group>
: <ProForm.Group>
<ProFormText
name='count'
width="md" width="md"
label='管养责任单位' label='管养责任单位'
placeholder="请输入管养责任单位" placeholder="请输入管养责任单位"
rules={[ disabled
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='maintenanceUnit'
width="md" width="md"
label='养护单位' label='养护单位'
placeholder="请输入养护单位" placeholder="请输入养护单位"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='management'
width="md" width="md"
label='管理人员' label='管理人员'
placeholder="请输入管理人员" placeholder="请输入管理人员"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='worker'
width="md" width="md"
label='工人' label='工人'
placeholder="请输入工人" placeholder="请输入工人"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='publicWelfarePost'
width="md" width="md"
label='公益岗位' label='公益岗位'
placeholder="请输入公益岗位" placeholder="请输入公益岗位"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='countyHighway'
width="md" width="md"
label='县道' label='县道'
placeholder="请输入县道" placeholder="请输入县道"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='townshipRoad'
width="md" width="md"
label='乡道' label='乡道'
placeholder="请输入乡道" placeholder="请输入乡道"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='villageRoad'
width="md" width="md"
label='村道' label='村道'
placeholder="请输入村道" placeholder="请输入村道"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/><ProFormText /><ProFormText
name='count' name='bridge'
width="md" width="md"
label='桥梁' label='桥梁'
placeholder="请输入桥梁" placeholder="请输入桥梁"
rules={[
{
required: true,
// message: '请输入整数',
// pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/> />
</ProForm.Group>} </ProForm.Group>
</ModalForm> </ModalForm>
{/* : ''
} */}
</Spin> </Spin>
) )

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

@ -1,31 +1,471 @@
// import React, { useEffect, useState, useRef } from 'react';
// import { connect } from 'react-redux';
// import { Spin, Button, Popconfirm, Badge } from 'antd';
// import ProTable from '@ant-design/pro-table';
// import './protable.less'
// import { getHighways,getCustodyunit } from "../actions/infor"
// import HightModal from './highways/highwaysdata';
// import Guanli from './highways/guanli';
// const HigwaysTable = (props) => {
// const { dispatch, user, } = props
// const [rowSelected, setRowSelected] = useState([])
// const [modalVisible, setModalVisible] = useState(false);
// const [counts, setCounts] = useState()//shuju
// const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
// const [modalVisibleyilans, setModalVisibleyilans] = useState(false);
// const [modalRecord, setModalRecord] = useState();
// const [typecard, setTypecard] = useState();
// const [recortd, setRecortd] = useState()
// const [sitename, setSitename] = useState()//桥梁名称
// const [delet, setDelet] = useState()
// const [activeKey, setActiveKey] = useState('tab1');
// const [whichofits, setWhichofits] = useState('sheshi')
// const [differentiate, setDifferentiate] = useState('bridge')
// const ref = useRef()
// useEffect(() => { ref.current.reload() }, [delet])
// //打开弹窗
// const hightModal = (type, record) => {
// setModalVisibleyilan(true);
// // setModalType(type);
// if (type == 'edit') {
// setModalRecord(record);
// } else {
// setModalRecord(null);
// }
// }
// const openModal = (type, record) => {
// setModalVisible(true);
// // setModalType(type);
// if (type == 'edit') {
// setModalRecord(record);
// } else {
// setModalRecord(null);
// }
// }
// const yilanModal = (type, record) => {
// setModalVisibleyilans(true);
// // setModalType(type);
// if (type == 'edit') {
// setModalRecord(record);
// } else {
// setModalRecord(null);
// }
// }
// const columns = {
// tab1: [
// {
// title: '类型',
// dataIndex: 'placeName',
// fixed: 'left',
// width: 120,
// search: false,
// options: 1,
// backgroundColor: "#ffffff",
// fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
// placeholder: '请输入类型进行搜索',
// },
// render: (dom, record) => {
// return record.name
// },
// },
// {
// title: '数量',
// search: false,
// dataIndex: 'containers',
// fixed: 'left',
// width: 120,
// render: (dom, record) => {
// return record.count
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// },
// {
// title: '操作',
// dataIndex: 'creatTime',
// valueType: 'dateTimeRange',
// hideInSearch: true,
// width: 160,
// fixed: 'right',
// render: (dom, record) => {
// return <div><Button type="link"
// onClick={() => {
// hightModal('edit', record)
// setTypecard('compile')
// setRecortd(record)
// }}
// >编辑</Button></div>
// }
// },
// ],
// tab2: [
// {
// title: '管养责单位',
// dataIndex: 'placeName',
// fixed: 'left',
// width: 120,
// options: 1,
// backgroundColor: "#ffffff",
// fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
// placeholder: '请输入项目名称进行搜索',
// },
// render: (dom, record) => {
// return record.entryName
// },
// },
// {
// title: '养护单位',
// search: false,
// dataIndex: 'time1',
// valueType: 'dateRange',
// // fixed: 'left',
// width: 120,
// render: (dom, record) => {
// return record.projectMileage
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// },
// {
// title: '管理人员(人)',
// search: false,
// dataIndex: 'time2',
// valueType: 'dateRange',
// // align: 'right',
// width: 120,
// render: (dom, record) => {
// return record.investment
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// },
// {
// title: '工人(人)',
// search: false,
// dataIndex: 'time3',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.buildUnit
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// }, {
// title: '公益岗位(人)',
// search: false,
// dataIndex: 'time4',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.constructionControlUnit
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// }, {
// title: '县道(km)',
// search: false,
// dataIndex: 'time5',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.designUnit
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// }, {
// title: '乡道(km)',
// search: false,
// dataIndex: 'time6',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.constructionUnit
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// }, {
// title: '村道(km)',
// search: false,
// dataIndex: 'time7',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.supervisorAndSupervisor
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// }, {
// title: '桥梁(座)',
// search: false,
// dataIndex: 'time8',
// valueType: 'dateRange',
// width: 120,
// render: (dom, record) => {
// return record.projectProgress
// },
// fieldProps: {
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// }
// },
// {
// title: '操作',
// dataIndex: 'creatTime',
// valueType: 'dateTimeRange',
// hideInSearch: true,
// width: 160,
// fixed: 'right',
// render: (dom, record) => {
// return <div><Button type="link"
// onClick={() => {
// yilanModal('edit', record)
// setTypecard('compile')
// setRecortd(record)
// }}
// >编辑</Button><Popconfirm title='是否确认删除' onConfirm={() => { deldatas(record.id) }}>
// <Button type="link">删除</Button>
// </Popconfirm></div>
// }
// },
// {
// key: "direction",
// hideInTable: true,
// dataIndex: "direction",
// order: 6,
// renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
// return (
// <div> <Button
// type="primary"
// style={{ width: "100px" }}
// onClick={() => {
// yilanModal('edit', record)
// setTypecard('')
// }}
// >
// 新增
// </Button>
// {/* <Button
// type="primary"
// style={{ width: "100px", marginLeft: 20 }}
// >
// 导入
// </Button> */}
// </div>
// );
// },
// },
// ]
// }
// return (
// <Spin spinning={false}>
// <div className='protable-transpor'>
// <ProTable
// actionRef={ref}
// toolbar={{
// multipleLine: true,
// menu: {
// activeKey,
// onChange: (key) => setActiveKey(key),
// items: [
// {
// key: 'tab1',
// label: <span onClick={() => {
// setWhichofits('sheshi')
// setDifferentiate('bridge')
// }}>设施统计{activeKey === 'tab1'}</span>,
// },
// {
// key: 'tab2',
// label: <span onClick={() => {
// setWhichofits('guanli')
// setDifferentiate('project')
// }}>管理养护{activeKey === 'tab2'}</span>,
// },
// ],
// },
// }}
// form={{
// submitter: whichofits == "sheshi" ? false : true
// }}
// scroll={{ x: 800 }}
// options={false}
// ref={c => { finishedProductTable = c; }}
// style={{ width: "100% ", overflow: "auto", height: '760px' }}
// rowKey='id'
// // rowSelection={{
// // selectedRowKeys: rowSelected,
// // onChange: (selectedRowKeys) => {
// // setRowSelected(selectedRowKeys);
// // },
// // }}
// columns={columns[activeKey]}
// dataSource={counts || []}
// request={async (params) => {
// if (whichofits == 'sheshi') {
// console.log('differentiate','我我我我吧')
// const query = {
// name: sitename
// }
// setRowSelected([]);
// const res = await dispatch(getHighways(query));
// setCounts(res.payload.data)
// return {
// ...res,
// total: res.payload.data ? res.payload.data.count : 0
// }
// } if (whichofits == 'guanli') {
// console.log('first','afsvcsvcsvsdfv fsdv fdv b')
// const query = {
// }
// setRowSelected([]);
// const res = await dispatch(getCustodyunit(query));
// setCounts(res.payload.data)
// return {
// ...res,
// total: res.payload.data ? res.payload.data.count : 0
// }
// }
// }}
// >
// </ProTable>
// </div>
// {modalVisibleyilan ? <HightModal
// visible={modalVisibleyilan}
// onVisibleChange={setModalVisibleyilan}
// modalRecord={modalRecord}
// typecard={typecard}
// rewkeys={'highways'}
// recortd={recortd}
// setRecortd={setRecortd}
// setDelet={setDelet}
// /> : ''}
// {modalVisibleyilans ? <Guanli
// visible={modalVisibleyilans}
// onVisibleChange={setModalVisibleyilans}
// modalRecord={modalRecord}
// typecard={typecard}
// rewkeys={'guanli'}
// recortd={recortd}
// setRecortd={setRecortd}
// setDelet={setDelet}
// /> : ''}
// </Spin >
// )
// }
// const date = {
// "bridgeCode": "桥梁代码",
// "bridgeName": "桥梁名称",
// "centralStation": "中心桩号",
// "crossingFigureType": "跨越地物类型",
// "crossingFigureName": "跨越地物名称",
// "natureOfCharges": "收费性质",
// "rampCode": "匝道编码",
// "sectionType": "路段类型",
// "crossingFigureType1": "跨越地物类型1",
// "crossingFigureName1": "跨越地物名称1",
// "originalBridgeCode": "原桥梁代码",
// "whetherWideRoadAndNarrowBridge": "是否宽路窄桥",
// }
// function mapStateToProps(state) {
// const { auth, depMessage } = state;
// const pakData = (dep) => {
// return dep.map((d) => {
// return {
// title: d.name,
// value: d.id,
// // children: d.type >= 2 ? [] : pakData(d.subordinate)
// children: pakData(d.subordinate)
// }
// })
// }
// let depData = pakData(depMessage.data || [])
// return {
// user: auth.user,
// depMessage: depMessage.data || [],
// depLoading: depMessage.isRequesting,
// depData,
// };
// }
// export default connect(mapStateToProps)(HigwaysTable);
import React, { useEffect, useState, useRef } from 'react'; import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Badge } from 'antd'; import { Spin, Button, Popconfirm } from 'antd';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
import './protable.less' import './protable.less'
import { getHighways } from "../actions/infor" import { getRoadway, getHighways, getCustodyunit, delProject } from "../actions/infor"
import HightModal from './highways/highwaysdata'; import HightModal from './highways/highwaysdata';
import Guanli from './highways/guanli'; import Guanli from './highways/guanli';
const TransporTationTable = (props) => {
const HigwaysTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props
const { dispatch, user, } = props
const [rowSelected, setRowSelected] = useState([]) const [rowSelected, setRowSelected] = useState([])
const [modalVisible, setModalVisible] = useState(false); const [sitename, setSitename] = useState()//名称
const [counts, setCounts] = useState()//shuju const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalVisibleyilan, setModalVisibleyilan] = useState(false); const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
const [modalVisibleyilans, setModalVisibleyilans] = useState(false); const [modalVisibleyilans, setModalVisibleyilans] = useState(false);
const [modalRecord, setModalRecord] = useState(); const [modalRecord, setModalRecord] = useState();
const [typecard, setTypecard] = useState(); const [typecard, setTypecard] = useState();
const [activeKey, setActiveKey] = useState('tab1');
const [recortd, setRecortd] = useState() const [recortd, setRecortd] = useState()
const [sitename, setSitename] = useState()//桥梁名称 const [whichofits, setWhichofits] = useState('sheshi')
const [delet, setDelet] = useState() const [delet, setDelet] = useState()
const [activeKey, setActiveKey] = useState('tab1'); const [differentiate, setDifferentiate] = useState('road')
const [whichofits, setWhichofits] = useState('qiaoliang') const [grade, setGrade] = useState('县')
const [differentiate, setDifferentiate] = useState('bridge')
const ref = useRef() const ref = useRef()
useEffect(() => { ref.current.reload() }, [delet]) useEffect(() => { ref.current.reload() }, [whichofits, delet])
//打开弹窗
//打开弹窗 //打开弹窗
const hightModal = (type, record) => { const hightModal = (type, record) => {
setModalVisibleyilan(true); setModalVisibleyilan(true);
@ -36,23 +476,6 @@ const HigwaysTable = (props) => {
setModalRecord(null); setModalRecord(null);
} }
} }
const deldatas = (id) => { // 工程
const query = {
projectId: id
}
// dispatch(delProject(query)).then((res) => {
// setDelet(res)
// })
}
const openModal = (type, record) => {
setModalVisible(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
} else {
setModalRecord(null);
}
}
const yilanModal = (type, record) => { const yilanModal = (type, record) => {
setModalVisibleyilans(true); setModalVisibleyilans(true);
// setModalType(type); // setModalType(type);
@ -116,13 +539,15 @@ const HigwaysTable = (props) => {
} }
}, },
], tab2: [ ],
tab2: [
{ {
title: '管养责单位', title: '管养责单位',
dataIndex: 'placeName', dataIndex: 'placeName',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
options: 1, options: 1,
search: false,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
fieldProps: { fieldProps: {
onChange: (value, cs) => { onChange: (value, cs) => {
@ -132,7 +557,7 @@ const HigwaysTable = (props) => {
}, },
render: (dom, record) => { render: (dom, record) => {
return record.entryName return record.responsibleUnitForManagementAndMaintenance
}, },
}, },
{ {
@ -144,7 +569,7 @@ const HigwaysTable = (props) => {
// fixed: 'left', // fixed: 'left',
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.projectMileage return record.maintenanceUnit
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -158,7 +583,7 @@ const HigwaysTable = (props) => {
// align: 'right', // align: 'right',
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.investment return record.management
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -174,7 +599,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.buildUnit return record.worker
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -188,7 +613,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.constructionControlUnit return record.publicWelfarePost
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -202,7 +627,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.designUnit return record.countyHighway
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -216,7 +641,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.constructionUnit return record.townshipRoad
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -230,7 +655,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.supervisorAndSupervisor return record.villageRoad
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -244,7 +669,7 @@ const HigwaysTable = (props) => {
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {
return record.projectProgress return record.bridge
}, },
fieldProps: { fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -264,85 +689,15 @@ const HigwaysTable = (props) => {
setTypecard('compile') setTypecard('compile')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}> >编辑</Button></div>
<Button type="link">删除</Button>
</Popconfirm></div>
} }
}, },
{
key: "direction",
hideInTable: true,
dataIndex: "direction",
order: 6,
renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
return (
<div> <Button
type="primary"
style={{ width: "100px" }}
onClick={() => {
yilanModal('edit', record)
setTypecard('')
}}
>
新增
</Button>
{/* <Button
type="primary"
style={{ width: "100px", marginLeft: 20 }}
>
导入
</Button> */}
</div>
);
},
},
] ]
} }
return ( return (
<Spin spinning={false}> <Spin spinning={false}>
{/* <div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
form={{
submitter: false
}}
// ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
setSitename('')
}}
// rowSelection={{
// selectedRowKeys: rowSelected,
// onChange: (selectedRowKeys) => {
// setRowSelected(selectedRowKeys);
// },
// }}
columns={columns}
dataSource={counts || []}
request={async (params) => {
const query = {
name: sitename
}
setRowSelected([]);
const res = await dispatch(getHighways(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}}
>
</ProTable></div> */}
<div className='protable-transpor'> <div className='protable-transpor'>
<ProTable <ProTable
actionRef={ref} actionRef={ref}
@ -356,14 +711,14 @@ const HigwaysTable = (props) => {
{ {
key: 'tab1', key: 'tab1',
label: <span onClick={() => { label: <span onClick={() => {
setWhichofits('qiaoliang') setWhichofits('sheshi')
setDifferentiate('bridge') setDifferentiate('bridge')
}}>设施统计{activeKey === 'tab1'}</span>, }}>设施统计{activeKey === 'tab1'}</span>,
}, },
{ {
key: 'tab2', key: 'tab2',
label: <span onClick={() => { label: <span onClick={() => {
setWhichofits('gongcheng') setWhichofits('guanli')
setDifferentiate('project') setDifferentiate('project')
}}>管理养护{activeKey === 'tab2'}</span>, }}>管理养护{activeKey === 'tab2'}</span>,
}, },
@ -372,7 +727,7 @@ const HigwaysTable = (props) => {
}, },
}} }}
form={{ form={{
submitter: whichofits == "qiaoliang" ? false : true submitter:false
}} }}
scroll={{ x: 800 }} scroll={{ x: 800 }}
options={false} options={false}
@ -389,40 +744,38 @@ const HigwaysTable = (props) => {
// }, // },
// }} // }}
columns={columns[activeKey]} columns={columns[activeKey]}
dataSource={counts || []} dataSource={counts || []}
request={async (params) => { request={async (params) => {
if (whichofits == 'qiaoliang') { console.log(whichofits)
if (whichofits == 'sheshi') {
const query = { const query = {
name: sitename
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getHighways(query)); const res = await dispatch(getHighways(query));
// console.log(res)
setCounts(res.payload.data) setCounts(res.payload.data)
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
} }
} if (whichofits == 'gongcheng') { } if (whichofits == 'guanli') {
const query = { const query = {
type: 'bridge',
entryName: sitename
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getProject(query)); const res = await dispatch(getCustodyunit(query));
setCounts("") setCounts(res.payload.data)
return { return {
...res, ...res,
// total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
} }
} }
}} }}
search={{ search={{
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
// whichofits == "qiaoliang" ? "" : <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate) }}> // <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,grade,differentiate) }}>
// <Button // <Button
// > // >
// 导出 // 导出
@ -430,7 +783,6 @@ const HigwaysTable = (props) => {
// </Popconfirm> // </Popconfirm>
], ],
}} }}
> >
</ProTable> </ProTable>
</div> </div>
@ -457,20 +809,17 @@ const HigwaysTable = (props) => {
</Spin > </Spin >
) )
} }
const date = { const data = [
"bridgeCode": "桥梁代码", { name: "管养责任单位", type: 'responsibleUnitForManagementAndMaintenance' },
"bridgeName": "桥梁名称", { name: "养护单位", type: 'maintenanceUnit' },
"centralStation": "中心桩号", { name: "管理人员", type: 'management' },
"crossingFigureType": "跨越地物类型", { name: "工人", type: 'worker' },
"crossingFigureName": "跨越地物名称", { name: "公益岗位", type: 'publicWelfarePost' },
"natureOfCharges": "收费性质", { name: "县道", type: 'countyHighway' },
"rampCode": "匝道编码", { name: "乡道", type: 'townshipRoad' },
"sectionType": "路段类型", { name: "村道", type: 'villageRoad' },
"crossingFigureType1": "跨越地物类型1", { name: "桥梁", type: 'bridge' },
"crossingFigureName1": "跨越地物名称1", ]
"originalBridgeCode": "原桥梁代码",
"whetherWideRoadAndNarrowBridge": "是否宽路窄桥",
}
function mapStateToProps(state) { function mapStateToProps(state) {
const { auth, depMessage } = state; const { auth, depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
@ -491,4 +840,4 @@ function mapStateToProps(state) {
depData, depData,
}; };
} }
export default connect(mapStateToProps)(HigwaysTable); export default connect(mapStateToProps)(TransporTationTable);

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

@ -3785,7 +3785,10 @@ const TransporTationTable = (props) => {
columns={columns[activeKey]} columns={columns[activeKey]}
dataSource={counts || []} dataSource={counts || []}
request={async (params) => { request={async (params) => {
console.log(whichofits)
if (whichofits == '县') { if (whichofits == '县') {
console.log('differentiate','我我我我吧')
const query = { const query = {
level: '县', level: '县',
road: sitename road: sitename

2
web/client/src/sections/fillion/nav-item.js

@ -15,7 +15,7 @@ export function getNavItem(user, dispatch) {
<Link to="/fillion/bridge">桥梁管理</Link> <Link to="/fillion/bridge">桥梁管理</Link>
</Menu.Item> </Menu.Item>
<Menu.Item key="fillionhighways"> <Menu.Item key="fillionhighways">
<Link to="/fillion/highways">路政管理</Link> <Link to="/fillion/highways">管养管理</Link>
</Menu.Item> </Menu.Item>
<Menu.Item key="fillionoperational"> <Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link> <Link to="/fillion/operational">运政管理</Link>

2
web/client/src/sections/fillion/routes.js

@ -44,7 +44,7 @@ export default [{
key: 'fillionhighways', key: 'fillionhighways',
menuSelectKeys: ['fillionhighways'], menuSelectKeys: ['fillionhighways'],
component: HigHways, component: HigHways,
breadcrumb: '路政管理', breadcrumb: '管养管理',
}, { }, {
path: '/operational', path: '/operational',
key: 'fillionoperational', key: 'fillionoperational',

11
web/client/src/sections/quanju/actions/example.js

@ -146,3 +146,14 @@ export function getRoadMaintenanceList() {
reducer: { name: 'roadMaintenances' } reducer: { name: 'roadMaintenances' }
}); });
} }
//获取管养单位概况
export function getCustodyunit() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_CUSTODY_UNIT',
url: ApiTable.getCustodyunit,
msg: { error: '获取管养单位概况失败' },
// reducer: { name: 'roadMaintenances' }
});
}

10
web/client/src/sections/quanju/containers/footer/conserve/action/index.js

@ -35,3 +35,13 @@ export function getxiuyang() {
reducer: { name: 'xiuyang' } reducer: { name: 'xiuyang' }
}); });
} }
export function getMaintenance() {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_MAINTENANCE',
url: ApiTable.getMaintenance,
msg: { error: '获取养护费用信息失败' },
// reducer: { name: 'xiuyang' }
});
}

17
web/client/src/sections/quanju/containers/footer/conserve/index.js

@ -4,7 +4,7 @@ import Right from './right'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import moment from 'moment'; import moment from 'moment';
import { getdaolutongji } from '../../../actions/example' import { getdaolutongji } from '../../../actions/example'
import { getHighways, getRoadMaintenances, getxiuyang } from './action' import { getHighways, getRoadMaintenances, getxiuyang,getMaintenance } from './action'
const Conserve = (props) => { const Conserve = (props) => {
@ -28,21 +28,22 @@ const Conserve = (props) => {
setRoadMaintenances(res.payload.data || []) setRoadMaintenances(res.payload.data || [])
}) })
dispatch(getxiuyang()).then(res => { dispatch(getxiuyang()).then(res => {
console.log(res);
// let obj = {}; // let obj = {};
setData(res.payload.data.filter(item => { setData(res.payload.data.filter(item => {
if (moment(item.maintenanceDate).format("MM") == (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) { if (moment(item.maintenanceDate).format("MM") == (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) {
return item return item
} }
})) }))
setShuju(res.payload.data.filter(item => { // setShuju(res.payload.data.filter(item => {
if ((new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth()) - 6 < moment(item.maintenanceDate).format("MM") && moment(item.maintenanceDate).format("MM") <= (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) { // if ((new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth()) - 6 < moment(item.maintenanceDate).format("MM") && moment(item.maintenanceDate).format("MM") <= (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) {
return item // return item
} // }
})) // }))
})
dispatch(getMaintenance()).then(res => {
setShuju(res.payload.data)
}) })
}, []) }, [])
console.log(shuju);
return ( return (
<div style={{ width: '100%', height: '100%', }}> <div style={{ width: '100%', height: '100%', }}>
<Left roadData={roadData} loading={loading} data={data} shuju={shuju} /> <Left roadData={roadData} loading={loading} data={data} shuju={shuju} />

159
web/client/src/sections/quanju/containers/footer/conserve/left/Lb.js

@ -3,151 +3,23 @@ import Module from '../../../public/module'
import { Spin } from 'antd' import { Spin } from 'antd'
import Lun from "../../leadership/right/lunbo" import Lun from "../../leadership/right/lunbo"
import "../../leadership/right/left.less" import "../../leadership/right/left.less"
import { getZhichaolist } from "../../../../actions/example" import { getZhichaodata } from "../../../../actions/example"
const Lefttbottoms = (props) => { const Lefttbottoms = (props) => {
// const { dispatch } = props const { data } = props
const style = { height: "28%", marginTop: "4%" } const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState() const [beijing, setBeijing] = useState()
const [list, setList] = useState([{
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "12",
xiang: "12",
xian: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
},])
const [rightDatas, setrightDatas] = useState([]) const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([]) const [nums, setNums] = useState([])
const [num, setNum] = useState() const [num, setNum] = useState()
const datas=data?.filter((item)=>{
return item.maintenanceUnit!==null
})
// const requestRightDatas = async () => { // const requestRightDatas = async () => {
// const res = await dispatch(getZhichaolist()) // const res = await dispatch(getZhichaodata())
// var pattern = /[\u4e00-\u9fa5]*/; // var pattern = /[\u4e00-\u9fa5]*/;
// let d = res.payload.data?.overSpeedList?.filter((item, index) => { // let d = res.payload.data?.overSpeeddata?.filter((item, index) => {
// return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false // return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
// }) // })
// console.log(res); // console.log(res);
@ -158,20 +30,19 @@ const Lefttbottoms = (props) => {
// }) // })
// d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) // d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// // setrightDatas(res.payload.data) // // setrightDatas(res.payload.data)
// setList(d) // setdata(d)
// } // }
// useEffect(() => { // useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => { // const zhichaodata = dispatch(getZhichaodata()).then((res) => {
// setNums(res.payload?.data?.processed) // setNums(res.payload?.data?.processed)
// }) // })
// requestRightDatas() // requestRightDatas()
// }, []) // }, [])
console.log(list);
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "50%" }}> <div style={{ width: "100%", height: "50%" }}>
{list?.map((item, index) => { {datas?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => { return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index) setBeijing(index)
setNum(index) setNum(index)
@ -180,10 +51,10 @@ const Lefttbottoms = (props) => {
setNum() setNum()
}}> }}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""} {beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "25%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.danwei}</div> <div style={{ width: "25%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.maintenanceUnit}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "33%" }}>{item.xian}</div> <div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "33%" }}>{item.management}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "52%" }}>{item.xiang}</div> <div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "52%" }}>{item.worker}</div>
<div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.cun}</div> <div style={{ width: "12%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.publicWelfarePost}</div>
{/* <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.qiao}</div> */} {/* <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.qiao}</div> */}
{/* { {/* {
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}> num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>

25
web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js

@ -1,7 +1,9 @@
import React from 'react' import React,{useState,useEffect} from 'react'
import Module from '../../../public/module' import Module from '../../../public/module'
import PieChart from '../chart/pie-chart'; import PieChart from '../chart/pie-chart';
import Lefttbottoms from "./Lb" import Lefttbottoms from "./Lb"
import { getCustodyunit } from "../../../../actions/example"
import { connect } from 'react-redux';
let color = [ let color = [
"rgba(7,185,254,1)", "rgba(7,185,254,1)",
@ -14,6 +16,14 @@ let underColor = [
"rgba(4,251,240,0.5)", "rgba(4,251,240,0.5)",
] ]
const LeftBottom = (props) => { const LeftBottom = (props) => {
const { dispatch, actions, user, loading } = props
const [data,setStata]=useState()
useEffect(()=>{
dispatch(getCustodyunit()).then((res)=>{
setStata(res.payload.data)
})
},[true])
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
const { roadData } = props const { roadData } = props
const list = roadData?.greenMileage || {} const list = roadData?.greenMileage || {}
@ -34,7 +44,7 @@ const LeftBottom = (props) => {
return ( return (
<> <>
<Module style={style} title={"已绿化里程统计"}> <Module style={style} title={"养护单位概况"}>
{/* <PieChart {/* <PieChart
data={value} data={value}
width='100%' width='100%'
@ -46,9 +56,16 @@ const LeftBottom = (props) => {
numLeft={'14.5%'} numLeft={'14.5%'}
underColorList={underColorList} underColorList={underColorList}
/> */} /> */}
<Lefttbottoms /> <Lefttbottoms data={data}/>
</Module> </Module>
</> </>
) )
} }
export default LeftBottom function mapStateToProps(state) {
const { auth } = state;
return {
user: auth.user,
}
}
export default connect(mapStateToProps)(LeftBottom)

8
web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js

@ -13,9 +13,10 @@ const LeftCenter = (props) => {
// const chartRef = useState(); // const chartRef = useState();
// const { roadData } = props // const { roadData } = props
const [flag, setFlag] = useState(true) const [flag, setFlag] = useState(true)
return ( return (
<> <>
<Module style={style} title={"可绿化里程统计"}> <Module style={style} title={"各乡镇养护里程及费用"}>
<div onClick={() => { <div onClick={() => {
setFlag(false) setFlag(false)
console.log(flag); console.log(flag);
@ -24,10 +25,9 @@ const LeftCenter = (props) => {
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ }}>累计</p></div> <p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ }}>累计</p></div>
<div onClick={() => { <div onClick={() => {
setFlag(true) setFlag(true)
console.log(flag);
}} style={{ position: "absolute", width: "50px", left: "60%", top: "38%", height: "20px", background: "linear-gradient(270deg, rgba(15,74,159,0) 0%, rgba(17,75,160,0.95) 100%)", float: "right", textAlign: "center", zIndex: 100, marginRight: "2%", borderLeft: "solid 2px #6E7A83", }}> }} style={{ position: "absolute", width: "50px", left: "60%", top: "38%", height: "20px", background: "linear-gradient(270deg, rgba(15,74,159,0) 0%, rgba(17,75,160,0.95) 100%)", float: "right", textAlign: "center", zIndex: 100, marginRight: "2%", borderLeft: "solid 2px #6E7A83", }}>
{/* <img /> */} {/* <img /> */}
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ }} ></p></div > <p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ }} ></p></div >
{/* <Row align='middle' style={{ padding: '10px 3% 0px 15px' }}> {/* <Row align='middle' style={{ padding: '10px 3% 0px 15px' }}>
<Col span={15}> <Col span={15}>
<img src='/assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} /> <img src='/assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} />
@ -38,7 +38,7 @@ const LeftCenter = (props) => {
{/* <div ref={chartRef} style={{ height: "23vh", width: "100%" }}></div> */} {/* <div ref={chartRef} style={{ height: "23vh", width: "100%" }}></div> */}
{/* <PieChart /> */} {/* <PieChart /> */}
{ {
flag ? <Lunbo data={data} /> : <ZheXian data={data} shuju={shuju} /> flag ? <Lunbo data={data} /> : <ZheXian shuju={shuju} />
} }
</Module> </Module>
</> </>

25
web/client/src/sections/quanju/containers/footer/conserve/left/left-top.js

@ -1,11 +1,21 @@
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef,useState } from 'react';
import Module from '../../../public/module' import Module from '../../../public/module'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { Badge, Spin } from 'antd'; import { Badge, Spin } from 'antd';
import Leftbottom from "./lunbozujian" import Leftbottom from "./lunbozujian"
import { getCustodyunit } from "../../../../actions/example"
import { connect } from 'react-redux';
const LeftTop = (props) => { const LeftTop = (props) => {
const { dispatch, actions, user, loading } = props
const [data,setStata]=useState()
useEffect(()=>{
dispatch(getCustodyunit()).then((res)=>{
setStata(res.payload.data)
})
},[true])
// const seasonChartRef = useRef(null); // const seasonChartRef = useRef(null);
// const frequentlyChartRef = useRef(null); // const frequentlyChartRef = useRef(null);
@ -196,7 +206,7 @@ const LeftTop = (props) => {
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
return ( return (
<Module style={style} title={"路段养护周期统计"}> <Module style={style} title={"管养单位概况"}>
{/* <div style={{ position: 'relative', width: '100%', height: '100%' }}> {/* <div style={{ position: 'relative', width: '100%', height: '100%' }}>
<div style={{ width: '100%', height: '100%', display: 'flex', padding: '3%' }}> <div style={{ width: '100%', height: '100%', display: 'flex', padding: '3%' }}>
<div ref={seasonChartRef} style={{ width: "50%" }}> <div ref={seasonChartRef} style={{ width: "50%" }}>
@ -219,10 +229,17 @@ const LeftTop = (props) => {
}} /> }} />
</div> */} </div> */}
{/* <div style={{ height: "100%" }}> */} {/* <div style={{ height: "100%" }}> */}
<Leftbottom /> <Leftbottom data={data}/>
{/* </div> */} {/* </div> */}
</Module> </Module>
) )
} }
export default LeftTop function mapStateToProps(state) {
const { auth } = state;
return {
user: auth.user,
}
}
export default connect(mapStateToProps)(LeftTop)

109
web/client/src/sections/quanju/containers/footer/conserve/left/lunbo.js

@ -11,14 +11,20 @@ import { getxiugai } from "../action/index"
const Lunbo = (props) => { const Lunbo = (props) => {
const { data } = props const { data } = props
if (!data || !data.length) {
return ''
}
console.log(data)
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
const [list, setList] = useState([]) const [list, setList] = useState([])
const [num, setNum] = useState({ value: 0 }) const [num, setNum] = useState({ value: 0 })
const [falg, setFalg] = useState(2) const [falg, setFalg] = useState(2)
const [namedata, setNamedata] = useState()
const [state, setState] = useState([ const [state, setState] = useState([
{ value: data ? data[0].roadLengthCounty || 0 : 0, name: "县道" }, { value: data ? data[0].roadLengthCounty || 0 : 0, name: "县道" },
{ value: data ? data[0].roadLengthTownship || 0 : 0, name: "乡道" }, { value: data ? data[0].roadLengthTownship || 0 : 0, name: "乡道" },
{ value: data ? data[0].roadLengthVillage || 0 : 0, name: "村道" } { value: data ? data[0].roadLengthVillage || 0 : 0, name: "村道" },
]) ])
const [mon, setMon] = useState([ const [mon, setMon] = useState([
{ value: data ? data[0].roadCostCounty || 0 : 0, name: "县费用" }, { value: data ? data[0].roadCostCounty || 0 : 0, name: "县费用" },
@ -26,96 +32,8 @@ const Lunbo = (props) => {
{ value: data ? data[0].roadCostVillage || 0 : 0, name: "村费用" } { value: data ? data[0].roadCostVillage || 0 : 0, name: "村费用" }
]) ])
const [lenght, setLenght] = useState(data ? data.length : "") const [lenght, setLenght] = useState(data ? data.length : "")
// useEffect(() => {
// dispatch(getxiugai()).then((res) => {
// console.log(res);
// })
// }, [])
console.log(data ? data : "");
const ref = useRef() const ref = useRef()
const renderBody = (num) => { const renderBody = (num) => {
// data.map((item, index) => {
// switch (num) {
// case 1:
// setState([
// { value: 335, name: "直达" },
// { value: 679, name: "营销广告" },
// { value: 1548, name: "搜索引擎" },
// ])
// break
// case 2:
// setState([
// { value: 100, name: "直达" },
// { value: 1000, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 3:
// setState([
// { value: 200, name: "直达" },
// { value: 100, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 4:
// setState([
// { value: 3, name: "直达" },
// { value: 50, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 5:
// setState([
// { value: 888, name: "直达" },
// { value: 6, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 6:
// setState([
// { value: 123, name: "直达" },
// { value: 596, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 7:
// setState([
// { value: 100, name: "直达" },
// { value: 36, name: "营销广告" },
// { value: 0, name: "搜索引擎" },
// ])
// break
// case 8:
// setState([
// { value: 100, name: "直达" },
// { value: 5693, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 9:
// setState([
// { value: 3, name: "直达" },
// { value: 753, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 10:
// setState([
// { value: 121212, name: "直达" },
// { value: 23, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// case 11:
// setState([
// { value: 2563, name: "直达" },
// { value: 2, name: "营销广告" },
// { value: 20, name: "搜索引擎" },
// ])
// break
// default:
// break
// }
setState([{ value: data ? data[num].roadLengthCounty || 0 : 0, name: "县道" }, { value: data ? data[num].roadLengthTownship || 0 : 0, name: "乡道" }, { value: data ? data[num].roadLengthVillage || 0 : 0, name: "村道" }]) setState([{ value: data ? data[num].roadLengthCounty || 0 : 0, name: "县道" }, { value: data ? data[num].roadLengthTownship || 0 : 0, name: "乡道" }, { value: data ? data[num].roadLengthVillage || 0 : 0, name: "村道" }])
setMon([ setMon([
{ value: data ? data[num].roadCostCounty || 0 : 0, name: "县费用" }, { value: data ? data[num].roadCostCounty || 0 : 0, name: "县费用" },
@ -123,7 +41,6 @@ const Lunbo = (props) => {
{ value: data ? data[num].roadCostVillage || 0 : 0, name: "村费用" } { value: data ? data[num].roadCostVillage || 0 : 0, name: "村费用" }
]) ])
} }
// console.log("shuju", data, data?.length);
const timerStart = () => { const timerStart = () => {
clearTimer() clearTimer()
ref.current = setTimeout(() => { ref.current = setTimeout(() => {
@ -138,10 +55,8 @@ const Lunbo = (props) => {
renderBody(num.value + 1) renderBody(num.value + 1)
} }
setNum(n_num) setNum(n_num)
console.log(num);
} }
console.log(n_num);
console.log(num);
// renderBody(num.value) // renderBody(num.value)
}, 5000) }, 5000)
} }
@ -165,12 +80,14 @@ const Lunbo = (props) => {
} }
} }
console.log(num.value);
return ( return (
<div onMouseOver={clearTimer} <div onMouseOver={clearTimer}
onMouseOut={timerStart} > onMouseOut={timerStart}
style={{}}
>
<div></div> <div></div>
<PieChart state={state} num={num.value} mon={mon} /> <div style={{position:'absolute',color:'#ffffff',top:'45%',left:'59%',fontSize:24,fontFamily: 'YouSheBiaoTiHei',}}>{data[num.value].countyName}</div>
<PieChart state={state} num={num.value} mon={mon} namedata={namedata} />
<div style={{ width: "90%", height: "1.5vh", backgroundColor: "rgba(176,215,255,0.12)", marginLeft: "5%", position: "absolute", bottom: "36%" }}> <div style={{ width: "90%", height: "1.5vh", backgroundColor: "rgba(176,215,255,0.12)", marginLeft: "5%", position: "absolute", bottom: "36%" }}>
{ {
data ? data.map((item, index) => { data ? data.map((item, index) => {

238
web/client/src/sections/quanju/containers/footer/conserve/left/lunbozujian.js

@ -3,230 +3,21 @@ import Module from '../../../public/module'
import { Spin } from 'antd' import { Spin } from 'antd'
import Lun from "../../leadership/right/lunbo" import Lun from "../../leadership/right/lunbo"
import "../../leadership/right/left.less" import "../../leadership/right/left.less"
import { getZhichaolist } from "../../../../actions/example" import { getZhichaodata } from "../../../../actions/example"
const Lefttbottom = (props) => { const Lefttbottom = (props) => {
// const { dispatch } = props const { data } = props
const style = { height: "28%", marginTop: "4%" } const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState() const [beijing, setBeijing] = useState()
const [list, setList] = useState([{ // const [data, setdata] = useState(data)
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
}, {
deductPoints: "12",
fine: "2000",
id: 50364,
licensePlate: "苏L12345",
nameOfInspectionPoint: "才华无限",
overrunRate: 100,
processingTime: "2022.7.30",
testTime: "2022-07-29T00:00:00.000Z",
cun: "207.829",
xiang: "207.829",
xian: "207.829",
qiao: "12",
danwei: "蟹堡王章鱼哥海绵宝宝派大星"
},])
const [rightDatas, setrightDatas] = useState([]) const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([]) const [nums, setNums] = useState([])
const [num, setNum] = useState() const [num, setNum] = useState()
// const requestRightDatas = async () => { // const requestRightDatas = async () => {
// const res = await dispatch(getZhichaolist()) // const res = await dispatch(getZhichaodata())
// var pattern = /[\u4e00-\u9fa5]*/; // var pattern = /[\u4e00-\u9fa5]*/;
// let d = res.payload.data?.overSpeedList?.filter((item, index) => { // let d = res.payload.data?.overSpeeddata?.filter((item, index) => {
// return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false // return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
// }) // })
// console.log(res); // console.log(res);
@ -237,20 +28,19 @@ const Lefttbottom = (props) => {
// }) // })
// d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) // d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// // setrightDatas(res.payload.data) // // setrightDatas(res.payload.data)
// setList(d) // setdata(d)
// } // }
// useEffect(() => { // useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => { // const zhichaodata = dispatch(getZhichaodata()).then((res) => {
// setNums(res.payload?.data?.processed) // setNums(res.payload?.data?.processed)
// }) // })
// requestRightDatas() // requestRightDatas()
// }, []) // }, [])
console.log(list);
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "50%" }}> <div style={{ width: "100%", height: "50%" }}>
{list?.map((item, index) => { {data?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => { return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index) setBeijing(index)
setNum(index) setNum(index)
@ -259,11 +49,11 @@ const Lefttbottom = (props) => {
setNum() setNum()
}}> }}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""} {beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "20%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.danwei}</div> <div style={{ width: "20%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.responsibleUnitForManagementAndMaintenance}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "23%" }}>{item.xian}</div> <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "23%" }}>{item.countyHighway}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.xiang}</div> <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.townshipRoad}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "58%" }}>{item.cun}</div> <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "58%" }}>{item.villageRoad}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.qiao}</div> <div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.bridge}</div>
{/* { {/* {
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}> num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} /> <img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />

123
web/client/src/sections/quanju/containers/footer/conserve/left/shituzujian.js

@ -1,64 +1,100 @@
import React from 'react' import React,{useState} from 'react'
import { useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import _ from 'lodash';
const PieChart = (props) => { const PieChart = (props) => {
const { width, height, data, colorList, underColorList, total, text, textLeft, numLeft, state, num, mon } = props const { width, height, datas, colorList, underColorList, total, text, textLeft, numLeft, state, num, mon,namedata } = props
const chartRef = useRef(null); const chartRef = useRef(null);
let name = [], emptyName = [] const [styloptr,setStyloptr]=useState()//费用
const [extent,setExtent]=useState()//长度
let states = []
let monstate=[]
useEffect(()=>{
// state.map((item) => {
// states.push({ name: item.name, value: Math.round(item.value * 100) / 100 })
// })
let arr=null
state.map((item)=>{
arr+=item.value
setExtent(arr.toFixed(3))
})
let aui=null
mon.map((item)=>{
aui+=Number(item.value)
setStyloptr(Math.ceil(aui))
})
},[num])
const data = [
{ value: styloptr, name: "金额", bgColor: "#1d2c44", progressColor: "#9494ff",clr:'元' },
{ value: extent, name: "里程", bgColor: "#2a303a", progressColor: "#f8be15",clr:'km' },
];
useEffect(() => { useEffect(() => {
let states=[]
state.map((item)=>{
states.push({value:item.value.toFixed(3),name:item.name})
})
let mons=[]
mon.map((item)=>{
mons.push({value:Math.ceil(item.value),name:item.name})
})
let chartInstance = echarts.init(chartRef.current); let chartInstance = echarts.init(chartRef.current);
const option = { const option = {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
formatter: "{a} <br/>{b}: {c} ({d}%)", formatter: "{a} <br/>{b}: {c} ({d}%)",
show: true,
}, },
legend: { legend: {
orient: "vertical", orient: "vertical",
right: "1%", right: "5%",
bottom: "15%", bottom: "15%",
// width: "260px", // width: "260px",
formatter: [ // formatter: (name) => {
'{a|{name}}' // for (let i = 0; i < option.series[1].data.length; i += 1) {
].join('\n'), // if (name === option.series[1].data[i].name) {
textStyle: { // let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
rich: { // return arr.join('\t');
a: { // }
width: 55, // }
fontSize: 12, show:false,
lineHeight: 12 } ,
}
},
},
}
,
series: [ series: [
{ {
name: "访问来源", name: "",
type: "pie", type: "pie",
// selectedMode: "single", // selectedMode: "single",
color: ["rgba(4, 251, 240, 1)", "rgba(7, 185, 254, 1)", "rgba(28, 96, 254, 1)"],
radius: [0, "40%"], radius: [0, "40%"],
center: ['30%', '50%'], center: ['30%', '50%'],
label: { label: {
normal: { normal: {
position: "inner", position: "inner",
show: false,
}, },
}, },
labelLine: { labelLine: {
normal: { normal: {
show: false, // show: false,
}, },
}, },
data: state || 0, data: states,
}, },
{ {
name: "访问来源", name: "",
type: "pie", type: "pie",
radius: ["50%", "75%"], radius: ["50%", "75%"],
center: ['30%', '50%'], center: ['30%', '50%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
data: mon || 0, color: ["rgba(4, 251, 240, 1)", "rgba(7, 185, 254, 1)", "rgba(28, 96, 254, 1)"],
data: mons,
label: { label: {
normal: { normal: {
formatter: "{b}:{c}" + "\n\r" + "({d}%)", formatter: "{b}:{c}" + "\n\r" + "({d}%)",
@ -75,7 +111,7 @@ const PieChart = (props) => {
}, },
labelLine: { labelLine: {
normal: { normal: {
show: false, // show: false,
}, },
}, },
}, },
@ -89,8 +125,41 @@ const PieChart = (props) => {
}) })
}, [num]) }, [num])
return ( return (
<div style={{ width: width || '100%', height: height || '100%' }}> <div >
<div ref={chartRef} style={{ width: '100%', height: '23vh' }}></div> <div ref={chartRef} style={{ width: '100%', height: '23vh',position:'relative' }}></div>
<div style={{position:'absolute',top:'53%',left:'59%',flexWrap:' wrap'}}>{data?.map((item, index) => {
// let bgWid = (c.value / number * 100).toFixed(2) + '%'
const { progressColor} = item;
return (
<div style={{ marginBottom: 20 }} key={index}>
<div
style={{
position: "relative",
display: "flex",
width: 250,
}}
>
<div
style={{
position: "absolute",
height: 10,
width: 10,
top: 5,
backgroundColor: progressColor,
}}
></div>
<div style={{ marginLeft: 20,color:'#ffffff' }}>{item.name}</div>
<div style={{ marginLeft: 10 ,color:'#ffffff'}}>{item.value}</div>
<div style={{ marginLeft: 10 ,color:'#ffffff'}}>{item.clr}</div>
</div>
</div>
);
})}</div>
</div> </div>
) )

149
web/client/src/sections/quanju/containers/footer/conserve/left/zhexin.js

@ -6,73 +6,52 @@ import moment from 'moment';
const ZheXian = (props) => { const ZheXian = (props) => {
const { shuju } = props
if (!shuju || !shuju.length) {
return ''
}
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
const chartRef = useState(); const chartRef = useRef();
const { roadData, shuju } = props const zhuzhuang='../../../../../../assets/images/zhuzhuang.png'
const [flag, setFlag] = useState(true) const zhexian='../../../../../../assets/images/zhexian.png'
const [fles, setFles] = useState(true) useEffect(() => {
const [one, setOne] = useState()
const [two, setTwo] = useState()
const [san, setSan] = useState()
const [si, setSi] = useState()
const [five, setFive] = useState()
const [six, setSix] = useState()
}, [true])
useEffect(() => { useEffect(() => {
setOne(shuju?.filter(item => { let columnar = []
if (new Date().getMonth() - 5 == moment(item.maintenanceDate).format("MM")) { shuju?.map((item) => {
return item let adhn=item?.roadLengthCounty + item?.roadLengthTownship + item?.roadLengthVillage
}
})) columnar.push(adhn.toFixed(3))
setTwo(shuju?.filter(item => { })
if (new Date().getMonth() - 4 == moment(item.maintenanceDate).format("MM")) { columnar.reverse()
return item let broken=[]
} shuju?.map((item) => {
})) console.log(Number(item?.roadCostCounty))
setSan(shuju?.filter(item => { broken.push(Math.ceil(Number(item?.roadCostCounty) + Number(item?.roadCostTownship) + Number(item?.roadCostVillage)))
if (new Date().getMonth() - 3 == moment(item.maintenanceDate).format("MM")) { })
return item broken.reverse()
}
})) let date = new Date()
setSi(shuju?.filter(item => { let year = date.getFullYear()
if (new Date().getMonth() - 2 == moment(item.maintenanceDate).format("MM")) { let month = date.getMonth() + 1
return item let newYear = 0
} let newMonth = 0
})) let newDateArr = []
setFive(shuju?.filter(item => { for (let i = 0; i < 7; i++) { //这里是获取前六个月,所以循环6次,根据需要修改
if (new Date().getMonth() - 1 == moment(item.maintenanceDate).format("MM")) { if (month - i < 1) { //这里的判断是如果当前月份往前推到了去年 需要做的处理
return item newYear = year - 1
newMonth = month - i + 12 >= 10 ? month - i + 12 : '0' + (month - i + 12)
newDateArr.push(newYear + '-' + newMonth) //这里拼接格式化,在时间中间加了个-,根据实际需求来
} else {
newMonth = month - i >= 10 ? month - i : '0' + (month - i) //这里是对月份小于10做加前面加0处理
newDateArr.push(year + '-' + newMonth)
} }
}))
setSix(shuju?.filter(item => {
if (new Date().getMonth() == moment(item.maintenanceDate).format("MM")) {
return item
} }
})) newDateArr.splice(0, 1)
}, [shuju]) newDateArr.reverse()
useEffect(() => {
let chartInstance = echarts.init(chartRef.current); let chartInstance = echarts.init(chartRef.current);
// let colorArray = [
// {
// top: "#07B9FE",
// bottom: "#10274B",
// },
// {
// top: "#1978E5",
// bottom: " #10274B",
// },
// {
// top: "#1978E5",
// bottom: "#10274B",
// },
// ];
// let xData = (function () {
// var data = [];
// for (var i = 1; i < 13; i++) {
// data.push(i + "月份");
// }
// return data;
// })();
const option = { const option = {
// backgroundColor: "#344b58", // backgroundColor: "#344b58",
title: { title: {
@ -95,15 +74,7 @@ const ZheXian = (props) => {
color: "#fff", color: "#fff",
}, },
}, },
formatter: function (params) { //在此处直接用 formatter 属性 formatter: "{a} <br/>{b}: {c}",
// console.log(params) // 打印数据
var showdata = params[0];
// 根据自己的需求返回数据
return `
<div>时间12452</div>
<div>数据<a style="color: #00E8D7">12121</a>/</div>
`
}
}, },
grid: { grid: {
borderWidth: 0, borderWidth: 0,
@ -122,7 +93,7 @@ const ZheXian = (props) => {
color: "#90979c", color: "#90979c",
}, },
show: false, show: false,
// data: ["女", "男", "平均"],
}, },
calculable: true, calculable: true,
xAxis: [ xAxis: [
@ -145,7 +116,7 @@ const ZheXian = (props) => {
axisLabel: { axisLabel: {
interval: 0, interval: 0,
}, },
data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], data: newDateArr,
}, },
], ],
yAxis: [ yAxis: [
@ -176,9 +147,9 @@ const ZheXian = (props) => {
], ],
series: [ series: [
{ {
name: "", name: "",
type: "bar", type: "bar",
stack: "总量",
itemStyle: { itemStyle: {
normal: { normal: {
color: { color: {
@ -202,12 +173,10 @@ const ZheXian = (props) => {
barBorderRadius: 0, barBorderRadius: 0,
}, },
}, },
data: [ data: columnar||[],
1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
],
}, },
{ {
name: "总数", name: "",
type: "line", type: "line",
symbolSize: 10, symbolSize: 10,
symbol: "circle", symbol: "circle",
@ -233,9 +202,7 @@ const ZheXian = (props) => {
color: "#1978E5", color: "#1978E5",
}, },
}, },
data: flag ? [ data: broken,
1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
] : "",
}, },
], ],
}; };
@ -245,26 +212,20 @@ const ZheXian = (props) => {
chartInstance.resize() chartInstance.resize()
} }
}) })
}, [flag]); }, []);
console.log(one, "fdskafdlafl");
console.log(two, "fdskafdlafl");
console.log(san, "fdskafdlafl");
console.log(si, "fdskafdlafl");
console.log(five, "fdskafdlafl");
console.log(six, "fdskafdlafl");
return ( return (
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
<div /* onClick={() => { <div /* onClick={() => {
setFlag(!flag) setFlag(!flag)
console.log(flag); console.log(flag);
}} */ style={{ position: "absolute", top: "41%", left: "80%", width: "72px", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", zIndex: 100, marginRight: "4%", borderLeft: "solid 2px #6E7A83" }} > }} */ style={{ position: "absolute", top: "38%", left: "14%", width: "72px", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", zIndex: 100, marginRight: "4%", borderLeft: "solid 2px #6E7A83" }} >
<img /> <img style={{marginBottom:4,marginLeft:-32}} src={zhexian} />
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px" }}>修建</p></div> <p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px",marginLeft:36 }}></p></div>
<div /* onClick={() => { <div /* onClick={() => {
setFlag(false) setFlag(false)
}} */style={{ position: "absolute", width: "72px", left: "55%", top: "41%", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", marginRight: "4%", borderLeft: "solid 2px #6E7A83" }}> }} */style={{ position: "absolute", width: "72px", left: "34%", top: "38%", height: "20px", backgroundColor: "rgba(216,240,255,0.1000)", float: "right", textAlign: "center", marginRight: "4%", borderLeft: "solid 2px #6E7A83" }}>
<img /> <img style={{marginBottom:4,marginLeft:-32}} src={zhuzhuang}/>
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px" }} >改建</p></div > <p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px", position: "absolute", top: "0px",marginLeft:36 }} >km</p></div >
<div ref={chartRef} style={{ width: '100%', height: '23vh' }}></div> <div ref={chartRef} style={{ width: '100%', height: '23vh' }}></div>
</div> </div>
) )

2
web/client/src/sections/quanju/containers/footer/conserve/left/zidong.js

@ -38,7 +38,7 @@ export default class AutoRollComponent extends Component {
this.scrollElem.style.overflow = 'hidden'; this.scrollElem.style.overflow = 'hidden';
} }
this.repeat(); this.repeat();
} catch (e) { console.log(e) } } catch (e) { }
} }

7
web/client/src/utils/webapi.js

@ -101,7 +101,7 @@ export const ApiTable = {
//公交信息 //公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}', getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}', getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
// 获取月修养护公里数 // 获取月修养护公里数
getXiuyang: "road/maintenance/cost/query", getXiuyang: "road/maintenance/cost/query",
@ -274,6 +274,11 @@ export const ApiTable = {
//公交信息 //公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}', getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}', getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
//单位概况
getCustodyunit:'/road/maintenance',
postCustodyunit:'/road/maintenance',
//养护费用
getMaintenance:'/road/maintenance/cost/nanchang/query'
}; };

1626
web/log/development.txt

File diff suppressed because it is too large
Loading…
Cancel
Save