Browse Source

调整名字

release_0.0.1
dengyinhuan 3 years ago
parent
commit
91ad17e31e
  1. 9
      web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
  2. 9
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  3. 2
      web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
  4. 30
      web/client/src/sections/quanju/containers/footer/build/index.js

9
web/client/src/sections/quanju/containers/footer/build/Leftbottom.js

@ -132,7 +132,14 @@ function Leftbottom(props) {
// };
const option = {
tooltip: {
trigger: "item",
show: true,
trigger: 'item',
position: 'right',
backgroundColor: 'rgba(0,0,0,0.7)',
textStyle: {
color: '#fff',
},
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>公里`,
},
// title: {
// text:total,//主标题文本

9
web/client/src/sections/quanju/containers/footer/build/Rightbottom.js

@ -47,7 +47,14 @@ function Rightbottom(props) {
var titleNum = 15
const option = {
tooltip: {
trigger: "item",
show: true,
trigger: 'item',
position: 'right',
backgroundColor: 'rgba(0,0,0,0.7)',
textStyle: {
color: '#fff',
},
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>公里`,
},
legend: {
orient: "vertical",

2
web/client/src/sections/quanju/containers/footer/build/Rightcenter.js

@ -83,7 +83,7 @@ const RNAKS = [FIRST, SECOND, THIRD]
<div className='build-right-center'>
<div className='build-right-center-top'>
<img src="/assets/images/quanju/gonglugongcheng.png"></img>
<div>线公路工程数量</div>
<div>公路工程数量</div>
<h2>{sundata}</h2>
</div>
<AutoRollComponent content={renderContent()}

30
web/client/src/sections/quanju/containers/footer/build/index.js

@ -12,6 +12,7 @@ import RightBottom from './Rightbottom'
import AutoRollComponent from './AutoRollComponent'
import './style.less'
import {getdaolutongji,getxuanchuan} from '../../../actions/example'
import { number } from 'echarts';
const Build = (props) => {
const { dispatch } = props
let data1 = [
@ -71,18 +72,21 @@ const Build = (props) => {
return resValue
}
let datas = Object.keys(buildingnumber?.townRoad || {}).map((item)=>({name:item,number:buildingnumber.townRoad[item].roadCount,gongli:Number(keepThreeNum(buildingnumber.townRoad[item].mileage))}))
let list = datas.sort((a,b)=>{
return b.number - a.number
})
// console.log(list,'红红火')
//道路等级数据
let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item)=>({name:item,value:Number(keepThreeNum(buildingnumber.roadLevel[item]))}))
let onlineproject = Object.keys(buildingnumber?.townProject||{}).map((item)=>({name:item,total:buildingnumber.townProject[item]}))
let sunonlineproject = onlineproject.reduce((x,y)=>x+y.total,0)
let safetyData = alldengji.filter(item=>item.name!=='null')
let sundata = data.reduce((x,y)=>x+y.value,0)
let sunsafetyData = safetyData.reduce((x,y)=>x+y.value,0)
console.log(safetyData,'好凶猛')
console.log(data1,'对比')
let sunonlineproject = onlineproject?.reduce((x,y)=>x+y.total,0)
let safetyData = alldengji?.filter(item=>item.name!=='null')
let sundata = data?.reduce((x,y)=>x+y.value,0)
let sunsafetyData = safetyData?.reduce((x,y)=>x+y.value,0)
// console.log(safetyData,'好凶猛')
// console.log(data1,'对比')
// console.log(totalgongli,"好好的")
// console.log(keepThreeNum(totalgongli),'jjjjj')
useEffect(()=>{
@ -97,7 +101,7 @@ const Build = (props) => {
// },0,15)
const rendercontent = ()=>{
return (<div className='build-left-center-content'>
{datas.map(({name,number,gongli},index)=><div className='build-left-center-item' key={index}>
{list.map(({name,number,gongli},index)=><div className='build-left-center-item' key={index}>
<span>{name}</span>
<span>{number}</span>
<span>{gongli}</span>
@ -130,7 +134,7 @@ const Build = (props) => {
</div>
</div>
</Module>
<Module title={"各乡镇道路占比统计"} style={{ width: "100%",
<Module title={"各乡镇道路分布统计"} style={{ width: "100%",
height:" 33%",marginTop:'3%'
}} customize = {true}>
<div className='build-left-center'>
@ -162,7 +166,7 @@ const Build = (props) => {
<Module title={"道路统计"} style={{ width: "100%",
height:" 30%",marginTop:'3%'
}} customize = {true}>
<LeftBottom
{ data?<LeftBottom
data={data}
width='100%'
height='100%'
@ -170,7 +174,7 @@ const Build = (props) => {
total={keepThreeNum(sundata)}
// colorList={colorList}
// underColorList={underColorList}
/>
/>:<div style={{color:"#fff",textAlign:'center',height:"100%",display:'flex',alignItems: "center",justifyContent: "space-around"}}></div>}
</Module>
</div>
@ -191,11 +195,11 @@ const Build = (props) => {
<Module title={"公路等级统计"} style={{ width: "100%",
height:" 30%",marginTop:'3%'
}} customize = {true}>
<RightBottom width='100%'
{safetyData?<RightBottom width='100%'
height='100%'
text='道路总公里'
total={sunsafetyData}
data={keepThreeNum(safetyData)}/>
data={keepThreeNum(safetyData)}/>:<div style={{color:"#fff",textAlign:'center',height:"100%",display:'flex',alignItems: "center",justifyContent: "space-around"}}>暂无数据</div>}
</Module>
</div>
</div>

Loading…
Cancel
Save