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: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.
@ -11077,3 +11078,32 @@ headers: {}
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-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",
"scripts": {
"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:linux": "export NODE_ENV=development&&node server -p 4000 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1",
"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 4001 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1",
"automate": "sequelize-automate -c sequelize-automate.config.js"
},
"author": "",

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

@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional,putHighways,putShippingList } from "../../actions/infor"
import _ from 'lodash'
import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional, putHighways } from "../../actions/infor"
import _ from 'lodash'
const HightModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props
const [success,setSuccess]=useState()
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props
const [success, setSuccess] = useState()
useEffect(() => {
return () => {
setRecortd()
@ -26,69 +26,62 @@ const HightModal = (props) => {
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 === 'freight') {
setDelet(values)
const query = { ...values, id:recortd?.id }
dispatch(putShippingList(query)).then((res) => {
setSuccess(res.success)
})
return true
const query = { ...values, id: recortd?.id }
dispatch(putOperaTional(query)).then((res) => {
setSuccess(res.success)
})
return true
}
if (rewkeys === 'highways') {
setDelet(values)
const query = { ...values, id:recortd?.id }
const query = { ...values, id: recortd?.id }
dispatch(putHighways(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}
}}
initialValues={recortd}
>
{/* {typecard == 'compile' ? */}
<ProForm.Group
>
<ProFormText
name='name'
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,'')
// }
]}
/>
<ProForm.Group
>
<ProFormText
name='name'
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,'')
// }
]}
/>
</ProForm.Group>
{/* : <ProForm.Group>
</ProForm.Group>
{/* : <ProForm.Group>
vfdscfd
</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 { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import { getHighways } 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('qiaoliang')
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);
useEffect(() => { ref.current.reload() }, [delet])
//打开弹窗
const hightModal = (type, record) => {
setModalVisibleyilan(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
} else {
setModalRecord(null);
}
}
}
const columns =
[
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) => {
setModalVisibleyilans(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
} else {
setModalRecord(null);
}
}
const columns = {
tab1: [
{
title: '类型',
dataIndex: 'placeName',
@ -45,7 +77,7 @@ const hightModal = (type, record) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入类型进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => {
return record.name
@ -74,32 +106,219 @@ const hightModal = (type, record) => {
fixed: 'right',
render: (dom, record) => {
return <div><Button type="link"
onClick={() => {
hightModal('edit', record)
setTypecard('compile')
setRecortd(record)
}}
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'>
{/* <div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
form={{
submitter:false
submitter: false
}}
// ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
setSitename('')
setSitename('')
}}
// rowSelection={{
// selectedRowKeys: rowSelected,
@ -109,10 +328,10 @@ const hightModal = (type, record) => {
// }}
columns={columns}
dataSource={counts || []}
dataSource={counts || []}
request={async (params) => {
const query = {
name:sitename
name: sitename
}
setRowSelected([]);
const res = await dispatch(getHighways(query));
@ -123,8 +342,99 @@ const hightModal = (type, record) => {
}
}}
>
</ProTable></div>
{modalVisibleyilan ? <HightModal
</ProTable></div> */}
<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}
onVisibleChange={setModalVisibleyilan}
modalRecord={modalRecord}
@ -134,9 +444,33 @@ const hightModal = (type, record) => {
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) => {

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

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

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

@ -1,239 +1,243 @@
import { Col, Row } from 'antd'
import React from 'react'
import { useEffect, useRef } from 'react'
import { useEffect, useRef, useState } from 'react'
import Module from '../../../public/module'
import * as echarts from 'echarts';
import ZheXian from "./zhexin"
import PieChart from "./shituzujian"
import Lunbo from './lunbo';
const LeftCenter = (props) => {
const style = { height: "31%", marginTop: "3%" }
const chartRef = useRef(null);
const { roadData } = props
const data = roadData?.greenMileage || {}
const grad = Object.keys(data).map(g => g + '级可绿化里程') || []
const value = Object.values(data)?.map(s => s.canBeGreen.toFixed(3))
let totalData = value?.reduce((pre, cur) => Number(pre) + Number(cur), 0) || 0
let max = Math.max.apply(Math, value) + 10 || 0
// const chartRef = useState();
// const { roadData } = props
const [flag, setFlag] = useState(true)
// const [fles, setFles] = useState(true)
// console.log(roadData);
// useEffect(() => {
// 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(() => {
let chartInstance = echarts.init(chartRef.current);
let colorArray = [
{
top: "#07B9FE",
bottom: "#10274B",
},
{
top: "#1978E5",
bottom: " #10274B",
},
{
top: "#1978E5",
bottom: "#10274B",
},
];
const option = {
tooltip: {
show: true,
trigger: "axis",
axisPointer: {
type: "none",
},
formatter: "{b}:{c}",
},
grid: {
left: "5%",
top: "12%",
right: "1%",
bottom: "8%",
width: '100%',
containLabel: true,
},
xAxis: {
type: "value",
show: true,
position: "bottom",
axisTick: {
show: true,
interval: 2,
lineStyle: {
color: "rgba(176,215,255,0.25)",
// type: "dashed",
},
},
axisLine: {
show: false,
lineStyle: {
color: "rgba(216,240,255,0.8000)",
},
},
axisLabel: {
interval: 2
},
splitLine: {
show: true,
lineStyle: {
color: "rgba(176,215,255,0.25)",
type: "dashed",
},
},
},
yAxis: [
{
type: "category",
axisTick: {
show: false,
alignWithLabel: false,
length: 5,
},
splitLine: {
//网格线
show: false,
},
inverse: true, //排序
axisLine: {
show: false,
lineStyle: {
color: "rgba(176,215,255,0.8)",
},
},
zlevel: 100,
data: grad,
},
{
type: "category",
axisTick: {
show: false,
alignWithLabel: false,
length: 5,
},
splitLine: {
//网格线
show: false,
},
axisLabel: {
show: true,
backgroundColor: {
image: '/assets/images/quanju/kelvhua_bdbg.png',
},
width: 70,
height: 22,
color: '#D8F0FF',
margin: 40,
verticalAlign: 'middle',
align: 'center',
textShadowColor: '#1AD0FF',
textShadowBlur: 6,
fontSize: 14
// formatter:(f) =>{console.log('f:',f);}
},
inverse: true, //排序
axisLine: {
show: false,
lineStyle: {
color: "rgba(176,215,255,0.8)",
},
},
data: value,
},
],
series: [
{
name: '背景',
type: "bar",
barWidth: 3,
barGap: "100%",
barCategoryGap: "50%",
color: "#15356E",
data: [max, max, max],
tooltip: {
show: false,
},
},
{
name: "",
type: "bar",
zlevel: 1,
barWidth: 3,
barGap: "-100%",
barCategoryGap: "50%",
data: value,
label: {
show: true,
position: 'right', // 位置
fontSize: 12,
lineHeight: 13,
distance: -2,
verticalAlign: "middle",
formatter: [
'{a| }',
].join(''), // 这里是数据展示的时候显示的数据
rich: {
a: {
backgroundColor: {
image: '/assets/images/quanju/circle2.png'
},
width: 15,
height: 15,
align: 'left',
verticalAlign: "center",
}
}
},
itemStyle: {
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]);
// textStyle: {
// color: "#fff",
// fontSize: "22",
// },
// subtextStyle: {
// color: "#90979c",
// fontSize: "16",
// },
// },
// tooltip: {
// trigger: "axis",
// axisPointer: {
// type: "shadow",
// textStyle: {
// color: "#fff",
// },
// },
// formatter: function (params) { //在此处直接用 formatter 属性
// // console.log(params) // 打印数据
// var showdata = params[0];
// // 根据自己的需求返回数据
// return `
// <div>时间:12452</div>
// <div>数据:<a style="color: #00E8D7">12121</a>次/分</div>
// `
// }
// },
// grid: {
// borderWidth: 0,
// top: 50,
// bottom: 20,
// right: 20,
// left: 60,
// textStyle: {
// color: "#fff",
// },
// },
// legend: {
// x: "60%",
// top: "5%",
// textStyle: {
// color: "#90979c",
// },
// show: false,
// // data: ["女", "男", "平均"],
// },
// calculable: true,
// xAxis: [
// {
// type: "category",
// axisLine: {
// lineStyle: {
// color: "rgba(216,240,255,0.8)",
// },
// },
// splitLine: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// splitArea: {
// show: false,
// },
// axisLabel: {
// interval: 0,
// },
// data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
// },
// ],
// yAxis: [
// {
// type: "value",
// splitLine: {
// show: true,
// lineStyle: {
// color: "rgba(176,215,255,0.2500)",
// type: "dashed",
// },
// },
// axisLine: {
// lineStyle: {
// color: "rgba(216,240,255,0.800)",
// },
// },
// axisTick: {
// show: false,
// },
// axisLabel: {
// interval: 0,
// },
// splitArea: {
// show: false,
// },
// },
// ],
// series: [
// {
// name: "男",
// type: "bar",
// stack: "总量",
// itemStyle: {
// normal: {
// color: {
// type: "linear",
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: "rgba(0,213,255)", // 0% 处的颜色
// },
// {
// offset: 1,
// color: "rgba(0,213,255,0.2)", // 100% 处的颜色
// },
// ],
// global: false, // 缺省为 false
// },
// barBorderRadius: 0,
// },
// },
// data: [
// 1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
// ],
// },
// {
// name: "总数",
// type: "line",
// symbolSize: 10,
// symbol: "circle",
// itemStyle: {
// normal: {
// color: "#1978E5",
// barBorderRadius: 0,
// label: {
// show: true,
// position: "top",
// textStyle: {
// color: "#D8F0FF",
// },
// formatter: function (p) {
// return p.value > 0 ? p.value : "";
// },
// },
// },
// },
// lineStyle: {
// normal: {
// width: 2,
// color: "#1978E5",
// },
// },
// data: flag ? [
// 1036, 3693, 2962, 3810, 2519, 1915, 1748, 4675, 6209, 4323, 2865, 4298,
// ] : "",
// },
// ],
// };
// chartInstance.setOption(option);
// window.addEventListener('resize', () => {
// if (chartInstance) {
// chartInstance.resize()
// }
// })
// }, [flag]);
return (
<>
<Module style={style} title={"可绿化里程统计"}>
<Row align='middle' style={{ padding: '10px 3% 0px 15px' }}>
<div onClick={() => {
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}>
<img src='/assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} />
<span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span>
</Col>
<Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff', textShadow: '0px 0px 4px #07B9FE' }}>{totalData.toFixed(3) || 0}</Col>
</Row>
<div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div>
</Row> */}
{/* <div ref={chartRef} style={{ height: "23vh", width: "100%" }}></div> */}
{/* <PieChart /> */}
{
flag ? <Lunbo /> : <ZheXian />
}
</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 * as echarts from 'echarts';
import { Badge, Spin } from 'antd';
import Leftbottom from "./lunbozujian"
const LeftTop = (props) => {
const seasonChartRef = useRef(null);
// const seasonChartRef = useRef(null);
const frequentlyChartRef = useRef(null);
const { roadData,loading } = props
let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season
useEffect(() => {
let chartInstance = echarts.init(seasonChartRef.current);
const seasonOption = {
tooltip: {
show: true
},
title: [
{
text: "季节性",
x: "center",
top: "55%",
textStyle: {
color: "#E9F7FF",
fontSize: 14,
},
},
{
text: roadData?.curingPeriod?.season || 0,
x: "center",
y: "35%",
textStyle: {
fontSize: "30",
color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei",
},
},
],
polar: {
radius: ["60%", "68%"],
center: ["50%", "50%"],
},
grid: {
left: "5%",
top: "12%",
right: "1%",
bottom: "8%",
containLabel: true,
},
angleAxis: {
max: total || 0,
show: false,
},
radiusAxis: {
type: "category",
show: true,
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: [
{
name: "",
type: "bar",
roundCap: true,
barWidth: 30,
showBackground: true,
data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }],
coordinateSystem: "polar",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#AAC8FF",
},
{
offset: 1,
color: "#0041BB",
},
]),
},
},
},
],
};
chartInstance.setOption(seasonOption);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
// const frequentlyChartRef = useRef(null);
// const { roadData, loading } = props
// let total = roadData?.curingPeriod?.frequent + roadData?.curingPeriod?.season
// useEffect(() => {
// let chartInstance = echarts.init(seasonChartRef.current);
// const seasonOption = {
// tooltip: {
// show: true
// },
// title: [
// {
// text: "季节性",
// x: "center",
// top: "55%",
// textStyle: {
// color: "#E9F7FF",
// fontSize: 14,
// },
// },
// {
// text: roadData?.curingPeriod?.season || 0,
// x: "center",
// y: "35%",
// textStyle: {
// fontSize: "30",
// color: "#FFFFFF",
// fontFamily: "YouSheBiaoTiHei",
// },
// },
// ],
// polar: {
// radius: ["60%", "68%"],
// center: ["50%", "50%"],
// },
// grid: {
// left: "5%",
// top: "12%",
// right: "1%",
// bottom: "8%",
// containLabel: true,
// },
// angleAxis: {
// max: total || 0,
// show: false,
// },
// radiusAxis: {
// type: "category",
// show: true,
// axisLabel: {
// show: false,
// },
// axisLine: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// roundCap: true,
// barWidth: 30,
// showBackground: true,
// data: [{ value: roadData?.curingPeriod?.season || 0, name: '季节性' }],
// coordinateSystem: "polar",
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
// {
// offset: 0,
// color: "#AAC8FF",
// },
// {
// offset: 1,
// color: "#0041BB",
// },
// ]),
// },
// },
// },
// ],
// };
// chartInstance.setOption(seasonOption);
// window.addEventListener('resize', () => {
// if (chartInstance) {
// chartInstance.resize()
// }
// })
}, [roadData])
useEffect(() => {
let chartInstance = echarts.init(frequentlyChartRef.current);
// }, [roadData])
// useEffect(() => {
// let chartInstance = echarts.init(frequentlyChartRef.current);
const frequentlyOption = {
tooltip: {
show: true,
trigger: "item",
},
title: [
{
text: "经常性",
x: "center",
top: "55%",
textStyle: {
color: "#E9F7FF",
fontSize: 14,
},
},
{
text: roadData?.curingPeriod?.frequent || 0,
x: "center",
y: "35%",
textStyle: {
fontSize: "30",
color: "#FFFFFF",
fontFamily: "YouSheBiaoTiHei",
},
},
],
polar: {
radius: ["60%", "68%"],
center: ["50%", "50%"],
},
grid: {
left: "10%",
top: "12%",
right: "1%",
bottom: "8%",
width: '70%',
containLabel: true,
},
angleAxis: {
max: total || 0,
show: false,
},
radiusAxis: {
type: "category",
show: true,
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: [
{
name: "",
type: "bar",
roundCap: true,
barWidth: 30,
showBackground: true,
data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }],
coordinateSystem: "polar",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#C5EFFF",
},
{
offset: 1,
color: "#07B9FE",
},
]),
},
},
},
// const frequentlyOption = {
// tooltip: {
// show: true,
// trigger: "item",
// },
// title: [
// {
// text: "经常性",
// x: "center",
// top: "55%",
// textStyle: {
// color: "#E9F7FF",
// fontSize: 14,
// },
// },
// {
// text: roadData?.curingPeriod?.frequent || 0,
// x: "center",
// y: "35%",
// textStyle: {
// fontSize: "30",
// color: "#FFFFFF",
// fontFamily: "YouSheBiaoTiHei",
// },
// },
// ],
// polar: {
// radius: ["60%", "68%"],
// center: ["50%", "50%"],
// },
// grid: {
// left: "10%",
// top: "12%",
// right: "1%",
// bottom: "8%",
// width: '70%',
// containLabel: true,
// },
// angleAxis: {
// max: total || 0,
// show: false,
// },
// radiusAxis: {
// type: "category",
// show: true,
// axisLabel: {
// show: false,
// },
// axisLine: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// series: [
// {
// name: "",
// type: "bar",
// roundCap: true,
// barWidth: 30,
// showBackground: true,
// data: [{ value: roadData?.curingPeriod?.frequent || 0, name: '经常性' }],
// coordinateSystem: "polar",
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
// {
// offset: 0,
// color: "#C5EFFF",
// },
// {
// offset: 1,
// color: "#07B9FE",
// },
// ]),
// },
// },
// },
],
};
chartInstance.setOption(frequentlyOption);
window.addEventListener('resize', () => {
if (chartInstance) {
chartInstance.resize()
}
})
}, [roadData])
// ],
// };
// chartInstance.setOption(frequentlyOption);
// window.addEventListener('resize', () => {
// if (chartInstance) {
// chartInstance.resize()
// }
// })
// }, [roadData])
const style = { height: "31%", marginTop: "3%" }
return (
<Module style={style} title={"路段养护周期统计"}>
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
<Module style={style} title={"路段养护周期统计"}>
{/* <div style={{ position: 'relative', width: '100%', height: '100%' }}>
<div style={{ width: '100%', height: '100%', display: 'flex', padding: '3%' }}>
<div ref={seasonChartRef} style={{ width: "50%" }}>
@ -216,8 +217,12 @@ const LeftTop = (props) => {
top: '66%',
zIndex: 999
}} />
</div>
</Module>
</div> */}
{/* <div style={{ height: "100%" }}> */}
<Leftbottom />
{/* </div> */}
</Module>
)
}
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 Hua from "./hudong"
import { Spin } from 'antd'
import Lunbo from "../right"
const Right = (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()
}, [])
// console.log(list);
console.log(list);
const renderBody = () => {
return (
<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": {
"test": "mocha",
"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",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save