diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/conter.less b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/conter.less new file mode 100644 index 00000000..1ae8c8f1 --- /dev/null +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/conter.less @@ -0,0 +1,98 @@ +li{ + list-style-type:none +} + +.wy-rightTop{ + .ant-select-selector, .ant-select-selection-placeholder{ + background-color:#011f59 !important; + border:#1E7BD6 1px solid !important; + font-family: PingFangSC-Regular, PingFang SC !important; + height: 25px !important; + // line-height: 25px !important; +}.ant-select-selection-item{ + line-height: 25px !important; +} +.anticon{ + color: #fff !important; +} +} + + +.contain { + position: relative; + top: 5%; + left: 45%; + width: 100%; + height: 100%; + transition: all 30s; + transform: translateX(-50%); + color: #fff; + overflow: hidden; + cursor: pointer; +} +.contain .ul { + height: 100%; + list-style: none; +} +.contain .ul .items { + position: absolute; + top: 0px; + width: 100%; + height: 100%; +} +.ul li.show{ + display: block; +} +.ul li { + display: none; +} +.ul li img { + width: 100%; + height: 100%; +} +.contain .dots { + position: absolute; + left: 50%; + bottom: 30px; + height: 10px; + transform: translateX(-50%); +} +.dots li { + float: left; + width: 10px; + height: 10px; + margin: 0px 5px; + border-radius: 50%; + transition: all .3s; + // background-color: antiquewhite; + list-style: none; +} +// .dots li.active { +// background-color: blue; +// } +.control .left { + position: absolute; + top: 80%; + left: 85%; + // padding: 5px; + // transform: translateY(-50%); + width: 20px; + height: 50px; + font-size: 20px; + cursor: pointer; +} +// .control .left:hover { +// background-color: #000000, +// } +.control .right { + position: absolute; + top: 80%; + right: 3%; + // padding: 5px; + // transform: translateY(-50%); + font-size: 20px; + cursor: pointer; +} +// .control .right:hover { +// background-color: rgba(0, 0, 0, .3); +// } \ No newline at end of file diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js index 6887caaa..421d00fc 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react' import Lun from "../right/lunbo" import { getRoadmaintain, getdaolutongji } from "../../../../actions/example" import moment from 'moment' +import Hua from "./hudong" import { Spin } from 'antd' const Right = (props) => { @@ -13,7 +14,9 @@ const Right = (props) => { const [num, setNum] = useState() useEffect(() => { const daolus = dispatch(getRoadmaintain()).then((res) => { + console.log(res); setList(res.payload.data.reportList.filter((item, index) => { + return item.projectType == "road" })) setNums(res.payload.data.reportCount.filter((item, index) => { @@ -58,6 +61,9 @@ const Right = (props) => { { num == index ?
+
+ +

{item.roadSectionStart ? item.roadSectionStart : ""}{item.roadSectionStart && item.roadSectionEnd ? "——" : ""}{item.roadSectionEnd ? item.roadSectionEnd : ""}{item.roadSectionStart || item.roadSectionEnd ? "" : "--"}

养护类型日常养护

diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js new file mode 100644 index 00000000..04a9f9c4 --- /dev/null +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js @@ -0,0 +1,170 @@ +import { values } from 'lodash'; +import React, { Component } from 'react'; +import './conter.less'; +class ReactCarousel extends Component { + chunk(arr, size) { + var arr1 = new Array(); + for (var i = 0; i < Math.ceil(arr.length / size); i++) { + arr1[i] = new Array(); + } + var j = 0; + var x = 0; + for (var i = 0; i < arr.length; i++) { + if (!((i % size == 0) && (i != 0))) { + arr1[j][x] = arr[i]; + x++; + // console.log("j=" + j + " " + "x=" + x); + } else { + j++; + x = 0; + // console.log("else:" + "j=" + j + " " + "x=" + x); + arr1[j][x] = arr[i]; + // console.log(arr1); + x++; + } + } + return arr1; + } + + constructor(props) { + super(props); + this.state = { + shuzu: [{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段2", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段3", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段4", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }], + imgs: [], + showIndex: 0, //显示第几个图片 + timer: null, // 定时器 + show: false, // 前后按钮显示 + // arr1: "" + } + // console.log(this.state.imgs); + this.state.imgs = [{ name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段2", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段3", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段4", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }, + { name: "南昌县迎宾大道管制路段", images: "/assets/images/leadership/shiyantu.png" }] + + + } + + + render() { + return ( +
+
{ this.stop() }} //鼠标进入停止自动播放 + onMouseLeave={() => { this.start() }} //鼠标退出自动播放 + > +
    + { + + this.state.imgs.map((value, index) => { + console.log(this.props); + return ( +
  • + {value.name ?
    +
    +
    + + {Math.ceil(Math.random() * 10)} +
    +
    +
    : ""} + {/*
    {value[1].name}
    +
    {value[2].name}
    +
    {value[3].name}
    */} +
  • + ) + }) + } +
+ {/*
    + { + this.state.imgs.map((value, index) => { + return ( +
  • { this.change(index) }}> +
  • ) + }) + } + +
*/} + {/*
+ { this.previous(e) }}> + + + { this.next(e) }}> + + +
*/} +
+
+ ) + } + componentDidMount() { //一开始自动播放 + this.start(); + } + + componentWillUnmount() { //销毁前清除定时器 + this.stop(); + } + stop = () => { //暂停 + let { timer } = this.state; + clearInterval(timer); + } + start = () => { //开始 + let { timer } = this.state; + timer = setInterval(() => { + this.next(); + }, 3000); + this.setState({ + timer + }) + } + change = (index) => { //点击下面的按钮切换当前显示的图片 + let { showIndex } = this.state; + showIndex = index; + this.setState({ + showIndex + }) + } + previous = (e) => { //上一张 + let ev = e || window.event; + let { showIndex, imgs } = this.state; + if (showIndex <= 0) { + showIndex = imgs.length - 1; + } else { + showIndex--; + } + this.setState({ + showIndex + }) + } + next = (e) => { //下一张 + let ev = e || window.event; + let { showIndex, imgs } = this.state; + if (showIndex >= imgs.length - 1) { + showIndex = 0; + } else { + showIndex++; + } + this.setState({ + showIndex + }) + } +} +export default ReactCarousel; \ No newline at end of file diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js b/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js index bae7c0f6..294a8bc9 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/left/echarts/leftbottomecharts.js @@ -8,6 +8,7 @@ const Leftbottomecharts = (props) => { const [count, setCount] = useState([]) const [value, setValue] = useState([]) const [flag, setFlag] = useState(true) + const [years, setYears] = useState() useEffect(() => { const res = dispatch(getdaolutongji()).then((res) => { console.log(res); @@ -17,7 +18,10 @@ const Leftbottomecharts = (props) => { setCount(res.payload.data.construction.map((item, index) => { return item.count.toFixed(3) })) - setValue() + setValue(res.payload.data.constructionRebuild.map((item, index) => { + return item.count + })) + // setYears() }); }, []) // console.log(list, count); diff --git a/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js index 8127c2d2..5c9894be 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js @@ -65,7 +65,7 @@ const Rightbottom = (props) => {

车牌号{item.licensePlate}

-

检测点123456

+

检测点{item.nameOfInspectionPoint ? item.nameOfInspectionPoint : "--"}

处罚{item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"}

日期{item.processingTime ? item.processingTime : "--"}

diff --git a/web/package.json b/web/package.json index 91478736..7cd3d607 100644 --- a/web/package.json +++ b/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 4000 -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",