wangyue 2 years ago
parent
commit
8db7670307
  1. 123
      api/app/lib/controllers/data/index.js
  2. 6
      api/app/lib/controllers/overview/operation.js
  3. 17
      api/app/lib/routes/data/index.js
  4. 15
      api/log/development.log
  5. 2
      api/package.json
  6. 1
      scripts/1.1.0/data/1.create_freight_type.sql
  7. BIN
      web/client/assets/images/quanju/all.png
  8. BIN
      web/client/assets/images/quanju/yuanhuan.webp
  9. BIN
      web/client/assets/images/quanju/zhichao.png
  10. 377
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  11. 22
      web/client/src/sections/quanju/containers/footer/build/index.js
  12. 60
      web/client/src/sections/quanju/containers/footer/build/style.less
  13. 34
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  14. 396
      web/client/src/sections/quanju/containers/footer/guanli/style.less
  15. 2113
      web/log/development.txt

123
api/app/lib/controllers/data/index.js

@ -1,93 +1,19 @@
'use strict'; 'use strict';
const fs = require('fs');
const xlsxDownload = require('../../../../utils/xlsxDownload.js');
const moment = require('moment');
const request = require('superagent');
// const { simpleExcelDown } = require('../../../../utils/xlsxDownload'); async function dataExport (ctx) {
async function dataExport(ctx) {
try { try {
// const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
// const { userId } = ctx.fs.api const { userId } = ctx.fs.api
// const { ids } = ctx.query; const { exp, ids, roadLevel, municipalType } = ctx.query;
// const fileList = [ if (!exp) {
// { throw '参数错误';
// n: '道路', }
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['村'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['县'],
// },
// {
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['乡'],
// },
// {
// n: '桥梁',
// tableName: 'bridge'
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// n: '运政业户',
// tableName: 'municipal_business',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'road'],
// },
// {
// n: '工程一览',
// tableName: 'project',
// defaultKey: ['done', 'type'],
// defaultValue: [false, 'bridge'],
// },
// {
// n: '治超',
// tableName: 'overspeed',
// },
// {
// n: '公交线路',
// tableName: 'bus_line',
// },
// {
// n: '公交车辆',
// tableName: 'bus_car',
// },
// ]
<<<<<<< HEAD
// const exportData = await models.BusCar.destroy({
// where: {
// id: { $in: ids.split(',') }
// }
// })
=======
const modalList = [ const modalList = [
{ {
n: '道路', n: '道路',
@ -140,25 +66,12 @@ async function dataExport(ctx) {
tableName: 'Report', tableName: 'Report',
}, },
] ]
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
// const fileName = `摄像头信息列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv' const modalOption = modalList.find(item => item.k == exp);
// const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName }) if (!modalOption) {
// const fileData = fs.readFileSync(filePath); throw '参数错误';
}
<<<<<<< HEAD
// ctx.status = 200;
// ctx.set('Content-Type', 'application/x-xls');
// ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName));
// ctx.body = fileData;
} catch (error) {
// ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
// ctx.status = 400;
// ctx.body = {
// message: typeof error == 'string' ? error : undefined
// }
}
=======
let findOption = { let findOption = {
where: {} where: {}
} }
@ -205,10 +118,9 @@ async function dataExport(ctx) {
message: typeof error == 'string' ? error : undefined message: typeof error == 'string' ? error : undefined
} }
} }
>>>>>>> d8f96cea72338cf7a61dea293bd6d0cd5da48bb0
} }
async function godTrans(ctx) { async function godTrans (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
@ -229,5 +141,6 @@ async function godTrans(ctx) {
} }
module.exports = { module.exports = {
dataExport dataExport,
godTrans
}; };

6
api/app/lib/controllers/overview/operation.js

@ -92,9 +92,15 @@ async function vehicleStatistic (ctx) {
type: 'vehicle' type: 'vehicle'
} }
}) })
const freightTransport = await models.Statistic.findOne({
where: {
type: 'freight'
}
})
const vehicleState = { const vehicleState = {
passengerTransport: passengerTransport ? passengerTransport.count : 0, passengerTransport: passengerTransport ? passengerTransport.count : 0,
freightTransport: freightTransport ? freightTransport.count : 0,
taxi: await models.MunicipalVehicle.count({ taxi: await models.MunicipalVehicle.count({
where: { where: {
type: '出租车' type: '出租车'

17
api/app/lib/routes/data/index.js

@ -20,6 +20,23 @@ module.exports = function (app, router, opts) {
router.get('/data/god_trans', dataIndex.godTrans); router.get('/data/god_trans', dataIndex.godTrans);
// 运政 // 运政
//货运
async function setVehicleType (ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'freight'
}
await next()
}
app.fs.api.logAttr['GET/vehicle/freight'] = { content: '获取运政列表', visible: true };
router.get('/vehicle/freight', setVehicleType, vehicle.get);
app.fs.api.logAttr['PUT/vehicle/freight'] = { content: '编辑运政数据', visible: true };
router.put('/vehicle/freight', setVehicleType, vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/freight/:id'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/freight/:id', setVehicleType, vehicle.del);
//客运车 //客运车
async function setVehicleType (ctx, next) { async function setVehicleType (ctx, next) {
ctx.request.body = { ctx.request.body = {

15
api/log/development.log

@ -10815,7 +10815,9 @@ 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
<<<<<<< HEAD
2022-08-12 09:20:22.775 - debug: [FS-LOGGER] Init. 2022-08-12 09:20:22.775 - debug: [FS-LOGGER] Init.
2022-08-12 09:20:23.676 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2022-08-12 09:20:23.676 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 09:20:23.676 - info: [FS-AUTH] Inject auth and api mv into router. 2022-08-12 09:20:23.676 - info: [FS-AUTH] Inject auth and api mv into router.
@ -10918,3 +10920,16 @@ headers: {}
' at f:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + ' at f:\\Highways4Good\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)' ' at Array.forEach (<anonymous>)'
} }
=======
=======
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
>>>>>>> 19b9beb06f6736a29ddc681ae749b4770d47bbb5
2022-08-12 09:32:24.787 - debug: [FS-LOGGER] Init.
2022-08-12 09:32:24.871 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 09:32:24.871 - info: [FS-AUTH] Inject auth and api mv into router.
2022-08-12 11:04:42.222 - debug: [FS-LOGGER] Init.
2022-08-12 11:04:42.302 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-08-12 11:04:42.302 - info: [FS-AUTH] Inject auth and api mv into router.

2
api/package.json

@ -5,7 +5,7 @@
"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:123@10.8.30.32:5432/highways4good -f http://localhost:14000", "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:linux": "export NODE_ENV=development&&node server -p 4000 -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"
}, },

1
scripts/1.1.0/data/1.create_freight_type.sql

@ -0,0 +1 @@
INSERT INTO statistic (name, count, type) values ('货运车', 0, 'freight');

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
web/client/assets/images/quanju/yuanhuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

@ -4,198 +4,209 @@ import { Col, Progress, Row } from 'antd';
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
// import ReactEcharts from 'echarts-for-react'; // import ReactEcharts from 'echarts-for-react';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
function Rightbottom(props) { function Rightbottom (props) {
const { width, height, total,data, text } = props const { width, height, total, data, text } = props
const chartRef = useRef(null); const chartRef = useRef(null);
let colorList = [ let colorList = [
"rgba(7,185,254,1)", "rgba(7,185,254,1)",
"rgba(28,96,254,1)", "rgba(28,96,254,1)",
"rgba(4,251,240,1)", "rgba(4,251,240,1)",
"rgba(255,194,20,1)", "rgba(255,194,20,1)",
'rgba(255,255,255,1)' 'rgba(255,255,255,1)'
] ]
let underColorList = [ let underColorList = [
"rgba(7,185,254,0.5)", "rgba(7,185,254,0.5)",
"rgba(28,96,254,0.5)", "rgba(28,96,254,0.5)",
"rgba(4,251,240,0.5)", "rgba(4,251,240,0.5)",
"rgba(255,194,20,0.5)", "rgba(255,194,20,0.5)",
'rgba(255,255,255,0.5)', 'rgba(255,255,255,0.5)',
] ]
let name = [], emptyName = [] let name = [], emptyName = []
// const name = data?.map(d) // const name = data?.map(d)
// const safetyData = [ // const safetyData = [
// {name: '一级公路', value: 42}, // {name: '一级公路', value: 42},
// {name: '二级公路', value: 17}, // {name: '二级公路', value: 17},
// {name: '三级公路', value: 17}, // {name: '三级公路', value: 17},
// {name: '四级公路', value: 30}, // {name: '四级公路', value: 30},
// {name: '等外公路', value: 30}, // {name: '等外公路', value: 30},
// ] // ]
const rightLegend = ['一级公路', '二级公路', '三级公路','四级公路','等外公路'] const rightLegend = ['一级公路', '二级公路', '三级公路', '四级公路', '等外公路']
// let data=[ // const rightLegend = ['三级及以上','四级']
// {name: "四级公路", value: 2969}, // let data=[
// {name: "等外公路", value: 171}, // {name: "四级公路", value: 2969},
// {name: "三级公路", value: 103}, // {name: "等外公路", value: 171},
// {name: "二级公路", value: 15}, // {name: "三级公路", value: 103},
// ] // {name: "二级公路", value: 15},
// console.log(data.map(i=>i.name),'jjj') // ]
let dataq = rightLegend.map((item,index)=>{ // console.log(data.map(i=>i.name),'jjj')
if(data.map(i=>i.name).includes(item)){ console.log(data);
return {name:item,value:data.filter(i1=>i1.name===item)[0].value} let dataq = rightLegend.map((item, index) => {
}else{ console.log(item, index);
return {name:item,value:0} if (data.map(i => i.name).includes(item)) {
} console.log(item);
}) console.log(1);
console.log(dataq,'数据') return { name: item, value: data.filter(i1 => i1.name === item)[0].value }
dataq?.sort((a,b)=>b.value - a.value) } else {
dataq?.forEach(d => { console.log(2);
name.push(d.name) return { name: item, value: 0 }
emptyName.push({ }
name: '', })
value: d.value console.log(dataq, '数据')
dataq?.sort((a, b) => b.value - a.value)
dataq?.forEach(d => {
name.push(d.name)
emptyName.push({
name: '',
value: d.value
})
}) })
}) const chartTitle = '道路总公里';
const chartTitle = '道路总公里'; const title = '基础设施安全监测版块';
const title = '基础设施安全监测版块'; // const number = 2738;
// const number = 2738; // const leftLegend = ['地灾', '桥梁', '基坑', '边坡', '水库大坝']
// const leftLegend = ['地灾', '桥梁', '基坑', '边坡', '水库大坝']
const legendColor = undefined;
var titleNum = 15 const legendColor = undefined;
const option = {
tooltip: {
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",
itemWidth: 10,
itemHeight: 10,
// right: '30%',
left: '50%',
top: 'center',
align: 'left',
data: name,
formatter: (name) => {
for (let i = 0; i < option.series[1].data.length; i += 1) {
if (name === option.series[1].data[i].name) {
let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
return arr.join('\t');
}
}
},
textStyle: {
rich: {
a: {
color: '#E9F7FF',
fontSize: 14,
padding:[0,10]
},
b: {
fontSize: 16,
fontFamily: 'YouSheBiaoTiHei',
color: '#fff',
padding:[0,0,0,15]
},
}
}
},
grid: {
left: '10%'
},
series: [ var titleNum = 15
{ const option = {
name: "底层背景",
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
radius: ["50%", "62%"],
center: ['25%', '50%'],
color: underColorList,
label: {
show: false
},
labelLine: {
show: false
},
tooltip: { tooltip: {
show: false, 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: {
data: emptyName, // orient: "vertical",
}, // itemWidth: 10,
{ // itemHeight: 10,
name: "公路等级统计", // // right: '30%',
type: "pie", // left: '50%',
radius: ["57%", "70%"], // top: 'center',
center: ['25%', '50%'], // align: 'left',
color: colorList, // data: name,
label: { // formatter: (name) => {
show: false // for (let i = 0; i < option.series[1].data.length; i += 1) {
// if (name === option.series[1].data[i].name) {
// let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
// return arr.join('\t');
// }
// }
// },
// textStyle: {
// rich: {
// a: {
// color: '#E9F7FF',
// fontSize: 14,
// padding:[0,10]
// },
// b: {
// fontSize: 16,
// fontFamily: 'YouSheBiaoTiHei',
// color: '#fff',
// padding:[0,0,0,15]
// },
// }
// }
// },
grid: {
left: '10%'
}, },
data: dataq,
},
],
};
let currentIndex = -1; // 当前高亮图形在饼图数据中的下标
useEffect(() => {
let myChart = echarts.init(chartRef.current);
// const highlightPie = () =>{ // 取消所有高亮并高亮当前图形
// for(var idx in safetyOption.series[0].data)
// // 遍历饼图数据,取消所有图形的高亮效果
// myChart.dispatchAction({
// type: 'downplay',
// seriesIndex: 0,
// dataIndex: idx
// });
// // 高亮当前图形
// myChart.dispatchAction({
// type: 'highlight',
// seriesIndex: 0,
// dataIndex: currentIndex
// });
// // myChart.dispatchAction({
// // type: 'showTip',
// // seriesIndex: 0,
// // dataIndex: currentIndex,
// // });
// }
// const selectPie=() =>{ // 高亮效果切换到下一个图形
// var dataLen = safetyOption.series[0].data.length;
// currentIndex = (currentIndex + 1) % dataLen;
// highlightPie();
// }
// let changePieInterval = setInterval(selectPie, 1000);
// myChart.onChartReady = (instance) => {
// chartRef.current.safetyChart = instance;
// }
myChart.setOption(option);
return ()=>{
// clearInterval(changePieInterval)
}
}, [data]);
return ( series: [
<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> name: "底层背景",
<div className='build-right-bottom-title'> type: "pie",
<h2>{total||0}</h2> hoverAnimation: false,
<span>道路总公里</span> legendHoverLink: false,
</div> radius: ["50%", "62%"],
<img src='/assets/images/quanju/chart-circle.png'></img> center: ['25%', '50%'],
<div ref={chartRef} style={{ width: width || "70%", height: height || "90%" }} id="ech"></div> color: underColorList,
</div> label: {
); show: false
},
labelLine: {
show: false
},
tooltip: {
show: false,
},
data: emptyName,
},
{
name: "公路等级统计",
type: "pie",
radius: ["57%", "70%"],
center: ['25%', '50%'],
color: colorList,
label: {
show: false
},
data: dataq,
},
],
};
let currentIndex = -1; // 当前高亮图形在饼图数据中的下标
useEffect(() => {
let myChart = echarts.init(chartRef.current);
// const highlightPie = () =>{ // 取消所有高亮并高亮当前图形
// for(var idx in safetyOption.series[0].data)
// // 遍历饼图数据,取消所有图形的高亮效果
// myChart.dispatchAction({
// type: 'downplay',
// seriesIndex: 0,
// dataIndex: idx
// });
// // 高亮当前图形
// myChart.dispatchAction({
// type: 'highlight',
// seriesIndex: 0,
// dataIndex: currentIndex
// });
// // myChart.dispatchAction({
// // type: 'showTip',
// // seriesIndex: 0,
// // dataIndex: currentIndex,
// // });
// }
// const selectPie=() =>{ // 高亮效果切换到下一个图形
// var dataLen = safetyOption.series[0].data.length;
// currentIndex = (currentIndex + 1) % dataLen;
// highlightPie();
// }
// let changePieInterval = setInterval(selectPie, 1000);
// myChart.onChartReady = (instance) => {
// chartRef.current.safetyChart = instance;
// }
// myChart.setOption(option);
return () => {
// clearInterval(changePieInterval)
}
}, [data]);
return (
<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> */}
<div className='build-right-bottom-title'>
<h2>{total || 0}</h2>
<span>道路总公里</span>
</div>
<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>
);
} }
export default Rightbottom export default Rightbottom

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

@ -81,9 +81,11 @@ 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) => {
let list = datas.sort((a, b) => {
return b.number - a.number return b.number - a.number
}) })
list=list.filter(item=>item.name!=="其他")
// console.log(list,'红红火') // console.log(list,'红红火')
//道路等级数据 //道路等级数据
@ -141,29 +143,29 @@ const Build = (props) => {
return ( return (
<> <>
<div className='bgbuild-left'> <div className='bgbuild-left'>
<Module title={"各状态公路数量统计"} style={{ <Module title={"在建公路工程"} style={{
width: "100%", width: "100%",
height: " 33%" height: " 33%"
}} customize={true}> }} customize={true}>
<div style={{ height: "100%", position: "relative" }} > <div style={{ height: "100%", position: "relative" }} >
<span style={{ position: "absolute", width: "10%", color: "#FFF", backgroundColor: 'rgba(216, 240, 255, 0.1)', right: "5%", textAlign: "center" }}></span> {/* <span style={{ position: "absolute", width: "10%", color: "#FFF", backgroundColor: 'rgba(216, 240, 255, 0.1)', right: "5%", textAlign: "center" }}>条</span> */}
{buildingnumber && buildingnumber.buildedRoad !== 0 && totalgongli !== 0 ? <div className='build-left-top'> {buildingnumber && buildingnumber.buildedRoad !== 0 && totalgongli !== 0 ? <div className='build-left-top'>
<div className='build-left-top-item'> {/* <div className='build-left-top-item'>
<div> <div>
{/* <i>&#9658;</i> */} <i>&#9658;</i>
<span /> <span />
<span>在建公路数量</span> <span>在建公路数量</span>
</div> </div>
<div>{buildingnumber?.buildingRoad || 0}</div> <div>{buildingnumber?.buildingRoad || 0}</div>
</div> </div> */}
<img src='/assets/images/quanju/zhuangtaigonglui.png' className='build-left-top-center' /> <img src='/assets/images/quanju/yuanhuan.webp' className='build-left-top-center' />
<div className='build-left-top-item'> <div className='build-left-top-item'>
<div>{sunonlineproject || 0}</div>
<div> <div>
{/* <i>&#9658;</i> */} {/* <i>&#9658;</i> */}
<span /> {/* <span /> */}
<span>已建公路数量</span> <span>在建数量</span>
</div> </div>
<div>{buildingnumber?.buildedRoad || 0}</div>
</div> </div>
</div> : <NoData />} </div> : <NoData />}
</div> </div>

60
web/client/src/sections/quanju/containers/footer/build/style.less

@ -23,36 +23,42 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.build-left-top-center{ .build-left-top-center{
width: 35%; width: 100%;
height: 50%; height: 100%;
margin: 0 10px; margin: 0 10px;
} }
.build-left-top-item{ .build-left-top-item{
width: 25%; width: 25%;
height: 50%; height: 50%;
background-image: url('/assets/images/quanju/zhuangtaigognlubiankuang.png'); // background-image: url('/assets/images/quanju/zhuangtaigognlubiankuang.png');
background-size: 95%; background-size: 95%;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: absolute;
float: left;
// text-align: center; // text-align: center;
div{ div{
&:nth-child(1){ &:nth-child(1){
// width: 80%;
// height: 100%;
// margin: 1% auto 0;
font-size: 2.375rem;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
text-align: center;
// line-height: 49px;
text-shadow: 0px 2px 4px #1C60FE;
}
&:nth-child(2){
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
span{ span{
&:nth-child(1){ &:nth-child(1){
width: 0.5rem;
height: 0.5rem;
margin-right: 5px;
background: #07B9FE;
clip-path: polygon(0 0, 100% 0, 0 100%, 0 0);
transform: rotate(134deg);
}
&:nth-child(2){
font-size: 1rem; font-size: 1rem;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
@ -62,18 +68,6 @@
} }
} }
&:nth-child(2){
// width: 80%;
// height: 100%;
// margin: 1% auto 0;
font-size: 2.375rem;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
text-align: center;
// line-height: 49px;
text-shadow: 0px 2px 4px #1C60FE;
}
} }
} }
} }
@ -294,12 +288,20 @@
color: #E9F7FF; color: #E9F7FF;
} }
} }
img{ .img1{
width: 19%; width: 35%;
position: absolute; position: absolute;
left: 16%; left: 30%;
top:29% top:5%;
} }
.img2{
width: 40%;
position: absolute;
left: 40%;
top:5%;
z-index: 10;
}
} }
} }

34
web/client/src/sections/quanju/containers/footer/guanli/index.js

@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Carousel } from 'antd' import { Carousel,Tooltip } from 'antd'
import AutoRollComponent from '../build/AutoRollComponent' import AutoRollComponent from '../build/AutoRollComponent'
import Module from '../../public/module' import Module from '../../public/module'
import LeftItem from './LeftItem' import LeftItem from './LeftItem'
@ -55,15 +55,43 @@ const Guanli = (props) => {
},[]) },[])
// let datalist = newArry(30) // let datalist = newArry(30)
// datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"}) // datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"})
// const content = (
// );
const renderContent = () => { const renderContent = () => {
return <div style={{height:"100%"}}> return <div style={{height:"100%"}}>
{rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime,deductPoints }, index) => { {rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime,deductPoints }, index) => {
if(index<120){ if(index<120){
return <div key={index} className='guanli-right-item'> return <div key={index} className='guanli-right-item'>
<div className='popover'>
<Tooltip title={ <div className='popover-content'>
<div style={{ width: "100%", height: "100%", marginTop: "0"}}>
{/* <img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} /> */}
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}>
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} />
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{overrunRate?overrunRate:0}{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", top:'5px'}}>
<p style={{ color: "rgba(216,240,255,0.8)", marginTop: "30px", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>车牌号<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{licensePlate}{/* {item.licensePlate} */}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>检测点<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>123456</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>处罚<span style={{ color: "#FF0001", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{deductPoints?`-${deductPoints}`:""}-{fine}{fine?"元":""}{/* {item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"} */}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{processingTime}{/* {item.processingTime ? item.processingTime : "--"} */}</span></p>
</div>
</div>
</div>}
placement="leftTop"
overlayStyle={{ minWidth:400, minHeight: 212,padding:0,margin:0,backgroundImage:`url(../../../../../assets/images/leadership/beijinglan.png)`}}
overlayClassName='popover'
>
<span>{licensePlate}</span> <span>{licensePlate}</span>
<span>{overrunRate}%</span> <span>{overrunRate}%</span>
<span>{deductPoints?`-${deductPoints}`:""}-{fine}{fine?"元":""}</span> <span>{deductPoints?`-${deductPoints}`:""}-{fine}{fine?"元":""}</span>
<span>{processingTime}</span> <span>{processingTime}</span>
</Tooltip>
</div>
</div> </div>
} }
}):""} }):""}
@ -101,9 +129,9 @@ const Guanli = (props) => {
<span>处罚</span> <span>处罚</span>
<span>处理日期</span> <span>处理日期</span>
</div> </div>
{rightitemlist && rightitemlist.length!==0?<AutoRollComponent content={renderContent()} {rightitemlist && rightitemlist.length!==0?<div><AutoRollComponent content={renderContent()}
containerStyle={{ position: "relative", height: "90%", }} containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-deviceList"} />:<NoData style={{height:"70%"}}/>} divHeight={"100%"} divId={"chart-overview-deviceList"} /></div>:<NoData style={{height:"70%"}}/>}
</Module> </Module>
</div> </div>
</> </>

396
web/client/src/sections/quanju/containers/footer/guanli/style.less

@ -1,177 +1,301 @@
@media screen and (max-width:1366px){ @media screen and (max-width:1366px) {
html{ html {
font-size: 12px; font-size: 12px;
} }
} }
// .guanli{ // .guanli{
// // box-sizing: border-box; // // box-sizing: border-box;
// padding: 0 15px 0 15px; // padding: 0 15px 0 15px;
// width: 100%; // width: 100%;
// height: 100%; // height: 100%;
// position: relative; // position: relative;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
.guanli-left{ .guanli-left {
width: 25%; width: 25%;
height: 100%; height: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
.guanli-left-item{
box-sizing: border-box; .guanli-left-item {
width: 85%; box-sizing: border-box;
position: relative; width: 85%;
// height: 30%; position: relative;
height: 24vh; // height: 30%;
margin: 0 auto 3%; height: 24vh;
margin: 0 auto 3%;
display: flex;
align-items: center;
padding: 0 10%;
justify-content: space-between;
border: 2px solid rgba(28, 96, 254, 0.5000);
.guanli-left-item-left {
width: 45%;
height: 60%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
padding: 0 10%;
justify-content: space-between; span {
border: 2px solid rgba(28,96,254,0.5000); font-size: 1.25rem;
.guanli-left-item-left{ font-family: PingFangSC-Regular, PingFang SC;
width: 45%; font-weight: 400;
height: 60%; color: rgba(216, 240, 255, 0.8000);
}
div {
display: flex; display: flex;
flex-direction: column; justify-content: center;
align-items: center; // align-items: ;
span{ font-size: 2.125rem;
font-size: 1.25rem; font-family: YouSheBiaoTiHei;
color: #FFFFFF;
height: 70%;
width: 100%;
background: url('/assets/images/quanju/guanlijiance_1.png') no-repeat;
background-size: 100% 80%;
background-position: center bottom;
span {
font-size: 1rem;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: rgba(216,240,255,0.8000); padding-top: 10%;
} margin-left: 5px;
div{ // height: 0;
display: flex; color: rgba(216, 240, 255, 0.8000);
justify-content: center;
// align-items: ;
font-size: 2.125rem;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
height: 70%;
width: 100%;
background: url('/assets/images/quanju/guanlijiance_1.png') no-repeat;
background-size: 100% 80%;
background-position: center bottom;
span{
font-size: 1rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
padding-top: 10%;
margin-left: 5px;
// height: 0;
color: rgba(216,240,255,0.8000);
}
} }
// background-color: pink;
} }
.guanli-left-item-right{
width: 40%; // background-color: pink;
height: 50%; }
position: relative;
span{ .guanli-left-item-right {
position: absolute; width: 40%;
width: 8px; height: 50%;
height: 8px; position: relative;
background-color: #fff;
top:1.5%; span {
left: 50%; position: absolute;
z-index: 10; width: 8px;
border-radius: 4px; height: 8px;
display: block; background-color: #fff;
} top: 1.5%;
left: 50%;
// background-color: pink; z-index: 10;
border-radius: 4px;
display: block;
} }
// background-color: pink; // background-color: pink;
} }
// background-color: pink;
} }
.guanli-right{ }
width: 25%;
height: 100%; .guanli-right {
position: absolute; width: 25%;
right: 0; height: 100%;
.guanli-right-top{ position: absolute;
width: 100%; right: 0;
.guanli-right-top {
width: 100%;
// height: 5%; // height: 5%;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
padding-right: 10px; padding-right: 10px;
img{
img {
width: 4%; width: 4%;
// height: 40%; // height: 40%;
} }
span{
&:nth-child(2){ span {
&:nth-child(2) {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: rgba(216,240,255,0.8000); color: rgba(216, 240, 255, 0.8000);
margin:0 10px 0 2px margin: 0 10px 0 2px
} }
&:nth-child(3){
&:nth-child(3) {
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
margin-right: 10px; margin-right: 10px;
} }
&:nth-child(4){
&:nth-child(4) {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: rgba(216,240,255,0.8000); color: rgba(216, 240, 255, 0.8000);
}
}
}
.guanli-right-title{
width: 90%;
height: 5%;
margin: auto;
display: flex;
align-items: center;
justify-content: space-around;
background: rgba(21,77,160,0.2000);
span{
font-size: 12px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
flex:1;
text-align: center;
// &:nth-child(1){
// }
} }
} }
.guanli-right-item{
width: 90%;
// height: 4%; }
height: 3vh;
margin: auto; .guanli-right-title {
display: flex; width: 90%;
align-items: center; height: 5%;
justify-content: space-around; margin: auto;
&:hover{ display: flex;
background:linear-gradient(270deg, rgba(0,124,230,0) 0%, rgba(0,70,200,0.8700) 100%); align-items: center;
} justify-content: space-around;
// background: rgba(21,77,160,0.2000); background: rgba(21, 77, 160, 0.2000);
span{
font-size: 0.875rem; span {
font-family: PingFangSC-Regular, PingFang SC; font-size: 12px;
font-weight: 400; font-family: PingFangSC-Medium, PingFang SC;
color: rgba(216,240,255,0.8000); font-weight: 500;
line-height: 20px; color: #FFFFFF;
flex:1; flex: 1;
text-align: center; text-align: center;
// &:nth-child(1){ // &:nth-child(1){
// } // }
}
} }
} }
.guanli-right-item {
width: 90%;
// height: 4%;
height: 3vh;
margin: auto;
display: flex;
align-items: center;
justify-content: space-around;
&:hover {
background: linear-gradient(270deg, rgba(0, 124, 230, 0) 0%, rgba(0, 70, 200, 0.8700) 100%);
}
// background: rgba(21,77,160,0.2000);
span {
font-size: 0.875rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(216, 240, 255, 0.8000);
line-height: 20px;
flex: 1;
text-align: center;
// &:nth-child(1){
// }
}
}
}
.popover-content {
// background-color: red;
// .ant-popover-inner-content{
// padding: 0!important;
// }
// .address {
// width: 80%;
// height: 80%;
// top: 10%;
// position: absolute;
// // background-color: pink;
// .address1 {
// width: 194px;
// height: 20px;
// margin: 16px 0 24px 26px;
// span {
// &:nth-child(1) {
// margin-right: 20px;
// width: 42px;
// height: 20px;
// display: inline-block;
// overflow-wrap: break-word;
// color: rgba(216, 240, 255, 0.8);
// font-size: 14px;
// font-family: PingFangSC-Regular;
// white-space: nowrap;
// line-height: 20px;
// text-align: left;
// }
// &:nth-child(2) {
// width: 28px;
// height: 20px;
// display: inline-block;
// overflow-wrap: break-word;
// color: rgba(238, 244, 255, 1);
// font-size: 14px;
// font-family: PingFangSC-Medium;
// white-space: nowrap;
// line-height: 20px;
// text-align: left;
// }
// }
// }
// .address2 {
// width: 194px;
// height: 20px;
// margin: 16px 0 24px 26px;
// span {
// &:nth-child(1) {
// margin-right: 35px;
// width: 28px;
// height: 20px;
// display: inline-block;
// overflow-wrap: break-word;
// color: rgba(216, 240, 255, 0.8);
// font-size: 14px;
// font-family: PingFangSC-Regular;
// white-space: nowrap;
// line-height: 20px;
// text-align: right;
// }
// &:nth-child(2) {
// width: 126px;
// height: 20px;
// display: inline-block;
// overflow-wrap: break-word;
// color: rgba(255, 255, 255, 1);
// font-size: 14px;
// font-family: PingFangSC-Medium;
// white-space: nowrap;
// line-height: 20px;
// text-align: right;
// }
// }
// }
// }
}
.popover {
.ant-tooltip-inner{
min-width: 0 !important;
min-height: 0 !important;
background-color: rgba(0, 0, 0, 0) !important;
}
// .ant-popover-arrow {
// .ant-popover-arrow-content {
// display: none;
// }
// span {
// display: none;
// }
// }
// .ant-popover-inner {
// .ant-popover-inner-content {
// padding: 0;
// }
// }
// .ant-popover-inner{padding:0 !important;}
}

2113
web/log/development.txt

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