Browse Source

治超详情

dev
yangsen 3 years ago
parent
commit
cb765f028d
  1. 6
      api/log/development.log
  2. BIN
      web/client/assets/images/quanju/all.png
  3. 83
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  4. 2147
      web/log/development.txt

6
api/log/development.log

@ -10815,4 +10815,10 @@ headers: {}
2022-07-30 17:48:40.061 - debug: [FS-LOGGER] Init. 2022-07-30 17:48:40.061 - debug: [FS-LOGGER] Init.
2022-07-30 17:48:40.152 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-07-30 17:48:40.152 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 17:48:40.152 - info: [FS-AUTH] Inject auth and api mv into router. 2022-07-30 17:48:40.152 - info: [FS-AUTH] Inject auth and api mv into router.
<<<<<<< Updated upstream
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0 >>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
=======
2022-08-11 09:02:08.616 - debug: [FS-LOGGER] Init.
2022-08-11 09:02:08.699 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-11 09:02:08.699 - info: [FS-AUTH] Inject auth and api mv into router.
>>>>>>> Stashed changes

BIN
web/client/assets/images/quanju/all.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

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

@ -34,6 +34,7 @@ function Rightbottom(props) {
// ] // ]
const rightLegend = ['一级公路', '二级公路', '三级公路', '四级公路', '等外公路'] const rightLegend = ['一级公路', '二级公路', '三级公路', '四级公路', '等外公路']
// const rightLegend = ['三级及以上','四级']
// let data=[ // let data=[
// {name: "四级公路", value: 2969}, // {name: "四级公路", value: 2969},
// {name: "等外公路", value: 171}, // {name: "等外公路", value: 171},
@ -41,10 +42,15 @@ const rightLegend = ['一级公路', '二级公路', '三级公路','四级公
// {name: "二级公路", value: 15}, // {name: "二级公路", value: 15},
// ] // ]
// console.log(data.map(i=>i.name),'jjj') // console.log(data.map(i=>i.name),'jjj')
console.log(data);
let dataq = rightLegend.map((item, index) => { let dataq = rightLegend.map((item, index) => {
console.log(item, index);
if (data.map(i => i.name).includes(item)) { if (data.map(i => i.name).includes(item)) {
console.log(item);
console.log(1);
return { name: item, value: data.filter(i1 => i1.name === item)[0].value } return { name: item, value: data.filter(i1 => i1.name === item)[0].value }
} else { } else {
console.log(2);
return { name: item, value: 0 } return { name: item, value: 0 }
} }
}) })
@ -76,39 +82,39 @@ let dataq = rightLegend.map((item,index)=>{
}, },
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>段`, formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>段`,
}, },
legend: { // legend: {
orient: "vertical", // orient: "vertical",
itemWidth: 10, // itemWidth: 10,
itemHeight: 10, // itemHeight: 10,
// right: '30%', // // right: '30%',
left: '50%', // left: '50%',
top: 'center', // top: 'center',
align: 'left', // align: 'left',
data: name, // data: name,
formatter: (name) => { // formatter: (name) => {
for (let i = 0; i < option.series[1].data.length; i += 1) { // for (let i = 0; i < option.series[1].data.length; i += 1) {
if (name === option.series[1].data[i].name) { // if (name === option.series[1].data[i].name) {
let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`] // let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
return arr.join('\t'); // return arr.join('\t');
} // }
} // }
}, // },
textStyle: { // textStyle: {
rich: { // rich: {
a: { // a: {
color: '#E9F7FF', // color: '#E9F7FF',
fontSize: 14, // fontSize: 14,
padding:[0,10] // padding:[0,10]
}, // },
b: { // b: {
fontSize: 16, // fontSize: 16,
fontFamily: 'YouSheBiaoTiHei', // fontFamily: 'YouSheBiaoTiHei',
color: '#fff', // color: '#fff',
padding:[0,0,0,15] // padding:[0,0,0,15]
}, // },
} // }
} // }
}, // },
grid: { grid: {
left: '10%' left: '10%'
}, },
@ -180,7 +186,7 @@ let dataq = rightLegend.map((item,index)=>{
// myChart.onChartReady = (instance) => { // myChart.onChartReady = (instance) => {
// chartRef.current.safetyChart = instance; // chartRef.current.safetyChart = instance;
// } // }
myChart.setOption(option); // myChart.setOption(option);
return () => { return () => {
// clearInterval(changePieInterval) // clearInterval(changePieInterval)
} }
@ -188,12 +194,17 @@ let dataq = rightLegend.map((item,index)=>{
return ( return (
<div className='build-right-bottom'> <div className='build-right-bottom'>
<span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}></span> {/* <span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}>段</span> */}
<div className='build-right-bottom-title'> <div className='build-right-bottom-title'>
<h2>{total || 0}</h2> <h2>{total || 0}</h2>
<span>道路总公里</span> <span>道路总公里</span>
</div> </div>
<img src='/assets/images/quanju/chart-circle.png'></img> <div className='img1'>
<img src='/assets/images/quanju/all.png' />
</div>
<div className='img2'>
<img src='/assets/images/quanju/chart-circle.png' />
</div>
<div ref={chartRef} style={{ width: width || "70%", height: height || "90%" }} id="ech"></div> <div ref={chartRef} style={{ width: width || "70%", height: height || "90%" }} id="ech"></div>
</div> </div>
); );

2147
web/log/development.txt

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