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 = { const option = {
tooltip: { 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: { // title: {
// text:total,//主标题文本 // text:total,//主标题文本

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

@ -47,7 +47,14 @@ function Rightbottom(props) {
var titleNum = 15 var titleNum = 15
const option = { const option = {
tooltip: { 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: { legend: {
orient: "vertical", 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'>
<div className='build-right-center-top'> <div className='build-right-center-top'>
<img src="/assets/images/quanju/gonglugongcheng.png"></img> <img src="/assets/images/quanju/gonglugongcheng.png"></img>
<div>线公路工程数量</div> <div>公路工程数量</div>
<h2>{sundata}</h2> <h2>{sundata}</h2>
</div> </div>
<AutoRollComponent content={renderContent()} <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 AutoRollComponent from './AutoRollComponent'
import './style.less' import './style.less'
import {getdaolutongji,getxuanchuan} from '../../../actions/example' import {getdaolutongji,getxuanchuan} from '../../../actions/example'
import { number } from 'echarts';
const Build = (props) => { const Build = (props) => {
const { dispatch } = props const { dispatch } = props
let data1 = [ let data1 = [
@ -71,18 +72,21 @@ const Build = (props) => {
return resValue 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 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 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 onlineproject = Object.keys(buildingnumber?.townProject||{}).map((item)=>({name:item,total:buildingnumber.townProject[item]}))
let sunonlineproject = onlineproject.reduce((x,y)=>x+y.total,0) let sunonlineproject = onlineproject?.reduce((x,y)=>x+y.total,0)
let safetyData = alldengji.filter(item=>item.name!=='null') let safetyData = alldengji?.filter(item=>item.name!=='null')
let sundata = data.reduce((x,y)=>x+y.value,0) let sundata = data?.reduce((x,y)=>x+y.value,0)
let sunsafetyData = safetyData.reduce((x,y)=>x+y.value,0) let sunsafetyData = safetyData?.reduce((x,y)=>x+y.value,0)
console.log(safetyData,'好凶猛') // console.log(safetyData,'好凶猛')
console.log(data1,'对比') // console.log(data1,'对比')
// console.log(totalgongli,"好好的") // console.log(totalgongli,"好好的")
// console.log(keepThreeNum(totalgongli),'jjjjj') // console.log(keepThreeNum(totalgongli),'jjjjj')
useEffect(()=>{ useEffect(()=>{
@ -97,7 +101,7 @@ const Build = (props) => {
// },0,15) // },0,15)
const rendercontent = ()=>{ const rendercontent = ()=>{
return (<div className='build-left-center-content'> 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>{name}</span>
<span>{number}</span> <span>{number}</span>
<span>{gongli}</span> <span>{gongli}</span>
@ -130,7 +134,7 @@ const Build = (props) => {
</div> </div>
</div> </div>
</Module> </Module>
<Module title={"各乡镇道路占比统计"} style={{ width: "100%", <Module title={"各乡镇道路分布统计"} style={{ width: "100%",
height:" 33%",marginTop:'3%' height:" 33%",marginTop:'3%'
}} customize = {true}> }} customize = {true}>
<div className='build-left-center'> <div className='build-left-center'>
@ -162,7 +166,7 @@ const Build = (props) => {
<Module title={"道路统计"} style={{ width: "100%", <Module title={"道路统计"} style={{ width: "100%",
height:" 30%",marginTop:'3%' height:" 30%",marginTop:'3%'
}} customize = {true}> }} customize = {true}>
<LeftBottom { data?<LeftBottom
data={data} data={data}
width='100%' width='100%'
height='100%' height='100%'
@ -170,7 +174,7 @@ const Build = (props) => {
total={keepThreeNum(sundata)} total={keepThreeNum(sundata)}
// colorList={colorList} // colorList={colorList}
// underColorList={underColorList} // underColorList={underColorList}
/> />:<div style={{color:"#fff",textAlign:'center',height:"100%",display:'flex',alignItems: "center",justifyContent: "space-around"}}></div>}
</Module> </Module>
</div> </div>
@ -191,11 +195,11 @@ const Build = (props) => {
<Module title={"公路等级统计"} style={{ width: "100%", <Module title={"公路等级统计"} style={{ width: "100%",
height:" 30%",marginTop:'3%' height:" 30%",marginTop:'3%'
}} customize = {true}> }} customize = {true}>
<RightBottom width='100%' {safetyData?<RightBottom width='100%'
height='100%' height='100%'
text='道路总公里' text='道路总公里'
total={sunsafetyData} 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> </Module>
</div> </div>
</div> </div>

Loading…
Cancel
Save