Browse Source

前台提交

dev
wangyue 3 years ago
parent
commit
7b83013067
  1. 30
      api/log/development.log
  2. 4
      api/package.json
  3. 107
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  4. 388
      web/client/src/sections/fillion/components/highwaysTable.js
  5. 10
      web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
  6. 442
      web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js
  7. 377
      web/client/src/sections/quanju/containers/footer/conserve/left/left-top.js
  8. 1
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  9. 2
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  10. 65625
      web/log/development.txt
  11. 2
      web/package.json

30
api/log/development.log

@ -1,3 +1,4 @@
<<<<<<< Updated upstream
2021-06-11 09:24:57.968 - debug: [FS-LOGGER] Init. 2021-06-11 09:24:57.968 - debug: [FS-LOGGER] Init.
2021-06-11 09:24:58.371 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2021-06-11 09:24:58.371 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2021-06-11 09:24:58.371 - info: [FS-AUTH] Inject auth and api mv into router. 2021-06-11 09:24:58.371 - info: [FS-AUTH] Inject auth and api mv into router.
@ -11077,3 +11078,32 @@ headers: {}
2022-08-12 15:35:49.622 - debug: [FS-LOGGER] Init. 2022-08-12 15:35:49.622 - debug: [FS-LOGGER] Init.
2022-08-12 15:35:49.700 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-08-12 15:35:49.700 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 15:35:49.700 - info: [FS-AUTH] Inject auth and api mv into router. 2022-08-12 15:35:49.700 - info: [FS-AUTH] Inject auth and api mv into router.
=======
2022-08-25 16:36:38.540 - debug: [FS-LOGGER] Init.
2022-08-25 16:36:38.625 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 16:36:38.626 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-25 16:59:51.659 - debug: [FS-LOGGER] Init.
2022-08-25 16:59:51.742 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-25 16:59:51.742 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-26 11:12:28.406 - debug: [FS-LOGGER] Init.
2022-08-26 11:12:28.488 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-26 11:12:28.489 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-29 16:04:37.717 - debug: [FS-LOGGER] Init.
2022-08-29 16:04:38.471 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-29 16:04:38.471 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-29 16:12:00.460 - debug: [FS-LOGGER] Init.
2022-08-29 16:12:00.541 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-29 16:12:00.541 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-30 09:43:41.776 - debug: [FS-LOGGER] Init.
2022-08-30 09:43:42.448 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 09:43:42.448 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes
<<<<<<< Updated upstream
2022-08-30 16:36:05.846 - debug: [FS-LOGGER] Init.
2022-08-30 16:36:05.939 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 16:36:05.939 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-30 16:36:13.025 - debug: [FS-LOGGER] Init.
2022-08-30 16:36:13.105 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-30 16:36:13.105 - info: [FS-AUTH] Inject auth and api mv into router.
=======
>>>>>>> Stashed changes

4
api/package.json

@ -5,8 +5,8 @@
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"test": "set DEBUG=true&&\"node_modules/.bin/mocha\" --harmony --reporter spec app/test/*.test.js", "test": "set DEBUG=true&&\"node_modules/.bin/mocha\" --harmony --reporter spec app/test/*.test.js",
"start": "set NODE_ENV=development&&node server -p 4000 -g postgres://postgres://postgres:123@10.8.30.32:5432/highways4good -f http://localhost:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-highways4good --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", "start": "set NODE_ENV=development&&node server -p 4001 -g postgres://postgres://postgres:123@10.8.30.32:5432/highways4good -f http://localhost:14000 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-highways4good --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"start:linux": "export NODE_ENV=development&&node server -p 4000 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1", "start:linux": "export NODE_ENV=development&&node server -p 4001 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1",
"automate": "sequelize-automate -c sequelize-automate.config.js" "automate": "sequelize-automate -c sequelize-automate.config.js"
}, },
"author": "", "author": "",

107
web/client/src/sections/fillion/components/highways/highwaysdata.js

@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react'; 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,putShippingList } from "../../actions/infor" import { putOperaTional, putHighways } from "../../actions/infor"
import _ from 'lodash' import _ from 'lodash'
const HightModal = (props) => { const HightModal = (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()
useEffect(() => { useEffect(() => {
return () => { return () => {
setRecortd() setRecortd()
@ -26,69 +26,62 @@ const HightModal = (props) => {
onFinish={(values) => { onFinish={(values) => {
if (rewkeys === 'passenger') { if (rewkeys === 'passenger') {
setDelet(values) setDelet(values)
const query = { ...values, id:recortd?.id } const query = { ...values, id: recortd?.id }
dispatch(putOperaTional(query)).then((res) => { dispatch(putOperaTional(query)).then((res) => {
setSuccess(res.success) setSuccess(res.success)
}) })
return true return true
} if (rewkeys === 'freight') {
setDelet(values)
const query = { ...values, id:recortd?.id }
dispatch(putShippingList(query)).then((res) => {
setSuccess(res.success)
})
return true
} }
if (rewkeys === 'highways') { if (rewkeys === 'highways') {
setDelet(values) setDelet(values)
const query = { ...values, id:recortd?.id } const query = { ...values, id: recortd?.id }
dispatch(putHighways(query)).then((res) => { dispatch(putHighways(query)).then((res) => {
setSuccess(res.success) setSuccess(res.success)
}) })
return true return true
} }
}} }}
initialValues={recortd} initialValues={recortd}
> >
{/* {typecard == 'compile' ? */} {/* {typecard == 'compile' ? */}
<ProForm.Group <ProForm.Group
> >
<ProFormText <ProFormText
name='name' name='name'
width="md" width="md"
label='类型' label='类型'
placeholder="请输入名称" placeholder="请输入名称"
// value={recortd?.[0]?.value} // value={recortd?.[0]?.value}
disabled disabled
/> />
<ProFormText <ProFormText
name='count' name='count'
width="md" width="md"
label='数量' label='数量'
placeholder="请输入数量" placeholder="请输入数量"
rules={[ rules={[
{required: true, {
message:'请输入整数', required: true,
pattern:RegExp(/^[0-9]\d*$/,'g'), message: '请输入整数',
pattern: RegExp(/^[0-9]\d*$/, 'g'),
},
// getValueFromEvent=(event)=>{ },
// return event.target.value.replace(/\D/g,'') // getValueFromEvent=(event)=>{
// } // return event.target.value.replace(/\D/g,'')
]} // }
]}
/>
/>
</ProForm.Group> </ProForm.Group>
{/* : <ProForm.Group> {/* : <ProForm.Group>
vfdscfd vfdscfd
</ProForm.Group>} */} </ProForm.Group>} */}

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

@ -1,37 +1,69 @@
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, Badge } 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 { getHighways } from "../actions/infor"
import HightModal from './highways/highwaysdata'; import HightModal from './highways/highwaysdata';
import Guanli from './highways/guanli';
const HigwaysTable = (props) => { const HigwaysTable = (props) => {
const { dispatch, user, } = props const { dispatch, user, } = props
const [rowSelected, setRowSelected] = useState([]) const [rowSelected, setRowSelected] = useState([])
const [modalVisible, setModalVisible] = useState(false);
const [counts, setCounts] = useState()//shuju const [counts, setCounts] = useState()//shuju
const [modalVisibleyilan, setModalVisibleyilan] = useState(false); const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
const [modalVisibleyilans, setModalVisibleyilans] = useState(false);
const [modalRecord, setModalRecord] = useState(); const [modalRecord, setModalRecord] = useState();
const [typecard, setTypecard] = useState(); const [typecard, setTypecard] = useState();
const [recortd, setRecortd] = useState() const [recortd, setRecortd] = useState()
const [sitename, setSitename] = useState()//桥梁名称 const [sitename, setSitename] = useState()//桥梁名称
const [delet, setDelet] = useState() const [delet, setDelet] = useState()
const [activeKey, setActiveKey] = useState('tab1');
const [whichofits, setWhichofits] = useState('qiaoliang')
const [differentiate, setDifferentiate] = useState('bridge')
const ref = useRef() const ref = useRef()
useEffect(() => { ref.current.reload() }, [ delet]) useEffect(() => { ref.current.reload() }, [delet])
//打开弹窗 //打开弹窗
const hightModal = (type, record) => { const hightModal = (type, record) => {
setModalVisibleyilan(true); setModalVisibleyilan(true);
// setModalType(type); // setModalType(type);
if (type == 'edit') { if (type == 'edit') {
setModalRecord(record); setModalRecord(record);
} else { } else {
setModalRecord(null); setModalRecord(null);
}
} }
} const deldatas = (id) => { // 工程
const columns = 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) => {
setModalVisibleyilans(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
} else {
setModalRecord(null);
}
}
const columns = {
tab1: [
{ {
title: '类型', title: '类型',
dataIndex: 'placeName', dataIndex: 'placeName',
@ -45,7 +77,7 @@ const hightModal = (type, record) => {
setSitename(value.currentTarget.value) setSitename(value.currentTarget.value)
}, },
placeholder: '请输入类型进行搜索', placeholder: '请输入类型进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}, },
render: (dom, record) => { render: (dom, record) => {
return record.name return record.name
@ -74,32 +106,219 @@ const hightModal = (type, record) => {
fixed: 'right', fixed: 'right',
render: (dom, record) => { render: (dom, record) => {
return <div><Button type="link" return <div><Button type="link"
onClick={() => { onClick={() => {
hightModal('edit', record) hightModal('edit', record)
setTypecard('compile') setTypecard('compile')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button></div> >编辑</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 ( return (
<Spin spinning={false}> <Spin spinning={false}>
<div className='protable-transpor'> {/* <div className='protable-transpor'>
<ProTable <ProTable
actionRef={ref} actionRef={ref}
scroll={{ x: 800 }} scroll={{ x: 800 }}
options={false} options={false}
form={{ form={{
submitter:false submitter: false
}} }}
// ref={c => { finishedProductTable = c; }} // ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }} style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id' rowKey='id'
onReset={(v) => { onReset={(v) => {
setSitename('') setSitename('')
}} }}
// rowSelection={{ // rowSelection={{
// selectedRowKeys: rowSelected, // selectedRowKeys: rowSelected,
@ -109,10 +328,10 @@ const hightModal = (type, record) => {
// }} // }}
columns={columns} columns={columns}
dataSource={counts || []} dataSource={counts || []}
request={async (params) => { request={async (params) => {
const query = { const query = {
name:sitename name: sitename
} }
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getHighways(query)); const res = await dispatch(getHighways(query));
@ -123,8 +342,99 @@ const hightModal = (type, record) => {
} }
}} }}
> >
</ProTable></div> </ProTable></div> */}
{modalVisibleyilan ? <HightModal <div className='protable-transpor'>
<ProTable
actionRef={ref}
toolbar={{
multipleLine: true,
menu: {
activeKey,
onChange: (key) => setActiveKey(key),
items: [
{
key: 'tab1',
label: <span onClick={() => {
setWhichofits('qiaoliang')
setDifferentiate('bridge')
}}>设施统计{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => {
setWhichofits('gongcheng')
setDifferentiate('project')
}}>管理养护{activeKey === 'tab2'}</span>,
},
],
},
}}
form={{
submitter: whichofits == "qiaoliang" ? false : true
}}
scroll={{ x: 800 }}
options={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[activeKey]}
dataSource={counts || []}
request={async (params) => {
if (whichofits == 'qiaoliang') {
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 == 'gongcheng') {
const query = {
type: 'bridge',
entryName: sitename
}
setRowSelected([]);
const res = await dispatch(getProject(query));
setCounts("")
return {
...res,
// total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
// whichofits == "qiaoliang" ? "" : <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate) }}>
// <Button
// >
// 导出
// </Button>
// </Popconfirm>
],
}}
>
</ProTable>
</div>
{modalVisibleyilan ? <HightModal
visible={modalVisibleyilan} visible={modalVisibleyilan}
onVisibleChange={setModalVisibleyilan} onVisibleChange={setModalVisibleyilan}
modalRecord={modalRecord} modalRecord={modalRecord}
@ -134,9 +444,33 @@ const hightModal = (type, record) => {
setRecortd={setRecortd} setRecortd={setRecortd}
setDelet={setDelet} setDelet={setDelet}
/> : ''} /> : ''}
{modalVisibleyilans ? <Guanli
visible={modalVisibleyilans}
onVisibleChange={setModalVisibleyilans}
modalRecord={modalRecord}
typecard={typecard}
rewkeys={'guanli'}
recortd={recortd}
setRecortd={setRecortd}
setDelet={setDelet}
/> : ''}
</Spin > </Spin >
) )
} }
const date = {
"bridgeCode": "桥梁代码",
"bridgeName": "桥梁名称",
"centralStation": "中心桩号",
"crossingFigureType": "跨越地物类型",
"crossingFigureName": "跨越地物名称",
"natureOfCharges": "收费性质",
"rampCode": "匝道编码",
"sectionType": "路段类型",
"crossingFigureType1": "跨越地物类型1",
"crossingFigureName1": "跨越地物名称1",
"originalBridgeCode": "原桥梁代码",
"whetherWideRoadAndNarrowBridge": "是否宽路窄桥",
}
function mapStateToProps(state) { function mapStateToProps(state) {
const { auth, depMessage } = state; const { auth, depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {

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

@ -1,6 +1,7 @@
import React from 'react' import React 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"
let color = [ let color = [
"rgba(7,185,254,1)", "rgba(7,185,254,1)",
@ -28,13 +29,13 @@ const LeftBottom = (props) => {
} }
}) })
let colorList = value?.map(c =>c.colorList) let colorList = value?.map(c => c.colorList)
let underColorList = value?.map(c =>c.underColorList) let underColorList = value?.map(c => c.underColorList)
return ( return (
<> <>
<Module style={style} title={"已绿化里程统计"}> <Module style={style} title={"已绿化里程统计"}>
<PieChart {/* <PieChart
data={value} data={value}
width='100%' width='100%'
height='100%' height='100%'
@ -44,7 +45,8 @@ const LeftBottom = (props) => {
textLeft={'20%'} textLeft={'20%'}
numLeft={'14.5%'} numLeft={'14.5%'}
underColorList={underColorList} underColorList={underColorList}
/> /> */}
<Lefttbottoms />
</Module> </Module>
</> </>
) )

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

@ -1,239 +1,243 @@
import { Col, Row } from 'antd' import { Col, Row } from 'antd'
import React from 'react' import React from 'react'
import { useEffect, useRef } from 'react' import { 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 ZheXian from "./zhexin"
import PieChart from "./shituzujian"
import Lunbo from './lunbo';
const LeftCenter = (props) => { const LeftCenter = (props) => {
const style = { height: "31%", marginTop: "3%" } const style = { height: "31%", marginTop: "3%" }
const chartRef = useRef(null); // const chartRef = useState();
const { roadData } = props // const { roadData } = props
const data = roadData?.greenMileage || {} const [flag, setFlag] = useState(true)
const grad = Object.keys(data).map(g => g + '级可绿化里程') || [] // const [fles, setFles] = useState(true)
const value = Object.values(data)?.map(s => s.canBeGreen.toFixed(3)) // console.log(roadData);
let totalData = value?.reduce((pre, cur) => Number(pre) + Number(cur), 0) || 0 // useEffect(() => {
let max = Math.max.apply(Math, value) + 10 || 0 // 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 = {
// // backgroundColor: "#344b58",
// title: {
// x: "4%",
useEffect(() => { // textStyle: {
let chartInstance = echarts.init(chartRef.current); // color: "#fff",
let colorArray = [ // fontSize: "22",
{ // },
top: "#07B9FE", // subtextStyle: {
bottom: "#10274B", // color: "#90979c",
}, // fontSize: "16",
{ // },
top: "#1978E5", // },
bottom: " #10274B", // tooltip: {
}, // trigger: "axis",
{ // axisPointer: {
top: "#1978E5", // type: "shadow",
bottom: "#10274B", // textStyle: {
}, // color: "#fff",
]; // },
const option = { // },
tooltip: { // formatter: function (params) { //在此处直接用 formatter 属性
show: true, // // console.log(params) // 打印数据
trigger: "axis", // var showdata = params[0];
axisPointer: { // // 根据自己的需求返回数据
type: "none", // return `
}, // <div>时间:12452</div>
formatter: "{b}:{c}", // <div>数据:<a style="color: #00E8D7">12121</a>次/分</div>
}, // `
grid: { // }
left: "5%", // },
top: "12%", // grid: {
right: "1%", // borderWidth: 0,
bottom: "8%", // top: 50,
width: '100%', // bottom: 20,
containLabel: true, // right: 20,
}, // left: 60,
// textStyle: {
xAxis: { // color: "#fff",
type: "value", // },
show: true, // },
position: "bottom", // legend: {
axisTick: { // x: "60%",
show: true, // top: "5%",
interval: 2, // textStyle: {
lineStyle: { // color: "#90979c",
color: "rgba(176,215,255,0.25)", // },
// type: "dashed", // show: false,
}, // // data: ["女", "男", "平均"],
}, // },
axisLine: { // calculable: true,
show: false, // xAxis: [
lineStyle: { // {
color: "rgba(216,240,255,0.8000)", // type: "category",
}, // axisLine: {
}, // lineStyle: {
axisLabel: { // color: "rgba(216,240,255,0.8)",
interval: 2 // },
}, // },
// splitLine: {
splitLine: { // show: false,
show: true, // },
lineStyle: { // axisTick: {
color: "rgba(176,215,255,0.25)", // show: false,
type: "dashed", // },
}, // splitArea: {
}, // show: false,
}, // },
yAxis: [ // axisLabel: {
{ // interval: 0,
type: "category", // },
axisTick: { // data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
show: false, // },
alignWithLabel: false, // ],
length: 5, // yAxis: [
}, // {
splitLine: { // type: "value",
//网格线 // splitLine: {
show: false, // show: true,
}, // lineStyle: {
inverse: true, //排序 // color: "rgba(176,215,255,0.2500)",
axisLine: { // type: "dashed",
show: false, // },
lineStyle: { // },
color: "rgba(176,215,255,0.8)", // axisLine: {
}, // lineStyle: {
}, // color: "rgba(216,240,255,0.800)",
zlevel: 100, // },
data: grad, // },
}, // axisTick: {
{ // show: false,
type: "category", // },
axisTick: { // axisLabel: {
show: false, // interval: 0,
alignWithLabel: false, // },
length: 5, // splitArea: {
}, // show: false,
splitLine: { // },
//网格线 // },
show: false, // ],
}, // series: [
axisLabel: { // {
show: true, // name: "男",
backgroundColor: { // type: "bar",
image: '/assets/images/quanju/kelvhua_bdbg.png', // stack: "总量",
}, // itemStyle: {
width: 70, // normal: {
height: 22, // color: {
color: '#D8F0FF', // type: "linear",
margin: 40, // x: 0,
verticalAlign: 'middle', // y: 0,
align: 'center', // x2: 0,
textShadowColor: '#1AD0FF', // y2: 1,
textShadowBlur: 6, // colorStops: [
fontSize: 14 // {
// formatter:(f) =>{console.log('f:',f);} // offset: 0,
}, // color: "rgba(0,213,255)", // 0% 处的颜色
inverse: true, //排序 // },
axisLine: { // {
show: false, // offset: 1,
lineStyle: { // color: "rgba(0,213,255,0.2)", // 100% 处的颜色
color: "rgba(176,215,255,0.8)", // },
}, // ],
// global: false, // 缺省为 false
}, // },
data: value, // barBorderRadius: 0,
}, // },
], // },
series: [ // data: [
{ // 1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
name: '背景', // ],
type: "bar", // },
barWidth: 3, // {
barGap: "100%", // name: "总数",
barCategoryGap: "50%", // type: "line",
color: "#15356E", // symbolSize: 10,
data: [max, max, max], // symbol: "circle",
tooltip: { // itemStyle: {
show: false, // normal: {
}, // color: "#1978E5",
}, // barBorderRadius: 0,
{ // label: {
name: "", // show: true,
type: "bar", // position: "top",
zlevel: 1, // textStyle: {
barWidth: 3, // color: "#D8F0FF",
barGap: "-100%", // },
barCategoryGap: "50%", // formatter: function (p) {
data: value, // return p.value > 0 ? p.value : "";
label: { // },
show: true, // },
position: 'right', // 位置 // },
fontSize: 12, // },
lineHeight: 13, // lineStyle: {
distance: -2, // normal: {
verticalAlign: "middle", // width: 2,
formatter: [ // color: "#1978E5",
'{a| }', // },
].join(''), // 这里是数据展示的时候显示的数据 // },
rich: { // data: flag ? [
a: { // 1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
backgroundColor: { // ] : "",
image: '/assets/images/quanju/circle2.png' // },
}, // ],
width: 15, // };
height: 15, // chartInstance.setOption(option);
align: 'left', // window.addEventListener('resize', () => {
verticalAlign: "center", // if (chartInstance) {
} // chartInstance.resize()
} // }
}, // })
itemStyle: { // }, [flag]);
normal: {
show: true,
color: function (params) {
return {
type: "linear",
colorStops: [
{
offset: 0,
color: colorArray[params.dataIndex].bottom,
},
{
offset: 1,
color: colorArray[params.dataIndex].top,
},
],
// globalCoord: false,
};
},
barBorderRadius: 70,
borderWidth: 0,
borderColor: "#333",
},
},
emphasis: {
disabled: true //禁止移入柱子改变颜色
}
},
],
};
chartInstance.setOption(option);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, [roadData]);
return ( return (
<> <>
<Module style={style} title={"可绿化里程统计"}> <Module style={style} title={"可绿化里程统计"}>
<div onClick={() => {
<Row align='middle' style={{ padding: '10px 3% 0px 15px' }}> setFlag(false)
console.log(flag);
}} style={{ position: "absolute", top: "38%", left: "80%", width: "50px", 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: "4%", borderLeft: "solid 2px #6E7A83" }} >
{/* <img /> */}
<p style={{ color: "rgba(216,240,255,0.8000)", fontSize: "0.4vh", lineHeight: "20px",/* position: "absolute", top: "0px" */ }}>累计</p></div>
<div onClick={() => {
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", }}>
{/* <img /> */}
<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' }}>
<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%' }} />
<span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span> <span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span>
</Col> </Col>
<Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff', textShadow: '0px 0px 4px #07B9FE' }}>{totalData.toFixed(3) || 0}</Col> <Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff', textShadow: '0px 0px 4px #07B9FE' }}>{totalData.toFixed(3) || 0}</Col>
</Row> </Row> */}
<div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div> {/* <div ref={chartRef} style={{ height: "23vh", width: "100%" }}></div> */}
{/* <PieChart /> */}
{
flag ? <Lunbo /> : <ZheXian />
}
</Module> </Module>
</> </>
) )

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

@ -2,201 +2,202 @@ import React, { useEffect, useRef } 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"
const LeftTop = (props) => { const LeftTop = (props) => {
const seasonChartRef = useRef(null); // const seasonChartRef = useRef(null);
const frequentlyChartRef = useRef(null); // const frequentlyChartRef = useRef(null);
const { roadData,loading } = props // const { roadData, loading } = props
let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season // let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season
useEffect(() => { // useEffect(() => {
let chartInstance = echarts.init(seasonChartRef.current); // let chartInstance = echarts.init(seasonChartRef.current);
const seasonOption = { // const seasonOption = {
tooltip: { // tooltip: {
show: true // show: true
}, // },
title: [ // title: [
{ // {
text: "季节性", // text: "季节性",
x: "center", // x: "center",
top: "55%", // top: "55%",
textStyle: { // textStyle: {
color: "#E9F7FF", // color: "#E9F7FF",
fontSize: 14, // fontSize: 14,
}, // },
}, // },
{ // {
text: roadData?.curingPeriod?.season || 0, // text: roadData?.curingPeriod?.season || 0,
x: "center", // x: "center",
y: "35%", // y: "35%",
textStyle: { // textStyle: {
fontSize: "30", // fontSize: "30",
color: "#FFFFFF", // color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei", // fontFamily: "YouSheBiaoTiHei",
}, // },
}, // },
], // ],
polar: { // polar: {
radius: ["60%", "68%"], // radius: ["60%", "68%"],
center: ["50%", "50%"], // center: ["50%", "50%"],
}, // },
grid: { // grid: {
left: "5%", // left: "5%",
top: "12%", // top: "12%",
right: "1%", // right: "1%",
bottom: "8%", // bottom: "8%",
containLabel: true, // containLabel: true,
}, // },
angleAxis: { // angleAxis: {
max: total || 0, // max: total || 0,
show: false, // show: false,
}, // },
radiusAxis: { // radiusAxis: {
type: "category", // type: "category",
show: true, // show: true,
axisLabel: { // axisLabel: {
show: false, // show: false,
}, // },
axisLine: { // axisLine: {
show: false, // show: false,
}, // },
axisTick: { // axisTick: {
show: false, // show: false,
}, // },
}, // },
series: [ // series: [
{ // {
name: "", // name: "",
type: "bar", // type: "bar",
roundCap: true, // roundCap: true,
barWidth: 30, // barWidth: 30,
showBackground: true, // showBackground: true,
data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }], // data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }],
coordinateSystem: "polar", // coordinateSystem: "polar",
itemStyle: { // itemStyle: {
normal: { // normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{ // {
offset: 0, // offset: 0,
color: "#AAC8FF", // color: "#AAC8FF",
}, // },
{ // {
offset: 1, // offset: 1,
color: "#0041BB", // color: "#0041BB",
}, // },
]), // ]),
}, // },
}, // },
}, // },
], // ],
}; // };
chartInstance.setOption(seasonOption); // chartInstance.setOption(seasonOption);
window.addEventListener('resize', () => { // window.addEventListener('resize', () => {
if (chartInstance) { // if (chartInstance) {
chartInstance.resize() // chartInstance.resize()
} // }
}) // })
}, [roadData]) // }, [roadData])
useEffect(() => { // useEffect(() => {
let chartInstance = echarts.init(frequentlyChartRef.current); // let chartInstance = echarts.init(frequentlyChartRef.current);
const frequentlyOption = { // const frequentlyOption = {
tooltip: { // tooltip: {
show: true, // show: true,
trigger: "item", // trigger: "item",
}, // },
title: [ // title: [
{ // {
text: "经常性", // text: "经常性",
x: "center", // x: "center",
top: "55%", // top: "55%",
textStyle: { // textStyle: {
color: "#E9F7FF", // color: "#E9F7FF",
fontSize: 14, // fontSize: 14,
}, // },
}, // },
{ // {
text: roadData?.curingPeriod?.frequent || 0, // text: roadData?.curingPeriod?.frequent || 0,
x: "center", // x: "center",
y: "35%", // y: "35%",
textStyle: { // textStyle: {
fontSize: "30", // fontSize: "30",
color: "#FFFFFF", // color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei", // fontFamily: "YouSheBiaoTiHei",
}, // },
}, // },
], // ],
polar: { // polar: {
radius: ["60%", "68%"], // radius: ["60%", "68%"],
center: ["50%", "50%"], // center: ["50%", "50%"],
}, // },
grid: { // grid: {
left: "10%", // left: "10%",
top: "12%", // top: "12%",
right: "1%", // right: "1%",
bottom: "8%", // bottom: "8%",
width: '70%', // width: '70%',
containLabel: true, // containLabel: true,
}, // },
angleAxis: { // angleAxis: {
max: total || 0, // max: total || 0,
show: false, // show: false,
}, // },
radiusAxis: { // radiusAxis: {
type: "category", // type: "category",
show: true, // show: true,
axisLabel: { // axisLabel: {
show: false, // show: false,
}, // },
axisLine: { // axisLine: {
show: false, // show: false,
}, // },
axisTick: { // axisTick: {
show: false, // show: false,
}, // },
}, // },
series: [ // series: [
{ // {
name: "", // name: "",
type: "bar", // type: "bar",
roundCap: true, // roundCap: true,
barWidth: 30, // barWidth: 30,
showBackground: true, // showBackground: true,
data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }], // data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }],
coordinateSystem: "polar", // coordinateSystem: "polar",
itemStyle: { // itemStyle: {
normal: { // normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{ // {
offset: 0, // offset: 0,
color: "#C5EFFF", // color: "#C5EFFF",
}, // },
{ // {
offset: 1, // offset: 1,
color: "#07B9FE", // color: "#07B9FE",
}, // },
]), // ]),
}, // },
}, // },
}, // },
], // ],
}; // };
chartInstance.setOption(frequentlyOption); // chartInstance.setOption(frequentlyOption);
window.addEventListener('resize', () => { // window.addEventListener('resize', () => {
if (chartInstance) { // if (chartInstance) {
chartInstance.resize() // chartInstance.resize()
} // }
}) // })
}, [roadData]) // }, [roadData])
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%" }}>
@ -216,8 +217,12 @@ const LeftTop = (props) => {
top: '66%', top: '66%',
zIndex: 999 zIndex: 999
}} /> }} />
</div> </div> */}
</Module> {/* <div style={{ height: "100%" }}> */}
<Leftbottom />
{/* </div> */}
</Module>
) )
} }
export default LeftTop export default LeftTop

1
web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js

@ -4,6 +4,7 @@ import { getRoadmaintain, getdaolutongji } from "../../../../actions/example"
import moment from 'moment' import moment from 'moment'
import Hua from "./hudong" import Hua from "./hudong"
import { Spin } from 'antd' import { Spin } from 'antd'
import Lunbo from "../right"
const Right = (props) => { const Right = (props) => {
const { dispatch } = props const { dispatch } = props

2
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -36,7 +36,7 @@ const Rightbottom = (props) => {
}) })
requestRightDatas() requestRightDatas()
}, []) }, [])
// console.log(list); console.log(list);
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "50%" }}> <div style={{ width: "100%", height: "50%" }}>

65625
web/log/development.txt

File diff suppressed because it is too large

2
web/package.json

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params", "start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", "start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save