Browse Source

展示优化

dev
wenlele 1 year ago
parent
commit
cb6c2a1d94
  1. 9
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  2. 94
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

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

@ -64,7 +64,6 @@ const Guanli = (props) => {
} }
console.log(1111, qndmn);
useEffect(() => { useEffect(() => {
requestleftDatas(); requestleftDatas();
@ -79,7 +78,7 @@ const Guanli = (props) => {
if (index < 120) { if (index < 120) {
return <div key={index} className='guanli-right-item'> return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'> <Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", display: "flex" }}> <div style={{ width: '100%', height: "100%", marginTop: "0",paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}> {picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg' {picfile?.map(v => <img className='picfileimg'
@ -104,14 +103,14 @@ const Guanli = (props) => {
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"} {enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p> </span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> <p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span style={{ 执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}> }}>
{roadname} {roadname}
</span></p> </span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> <p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span style={{ 执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}> }}>
@ -170,7 +169,7 @@ const Guanli = (props) => {
<span>处罚</span> <span>处罚</span>
<span>处理日期</span> <span>处理日期</span>
</div> */} </div> */}
<div style={{ width: "100%", display: "flex", color: "#FFF" }}> <div style={{ width: "90%",margin:"auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div> <div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div> <div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div> </div>

94
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import Module from '../../../public/module' import Module from '../../../public/module'
import { Carousel, Tooltip,} from 'antd' import { Carousel, Tooltip, } from 'antd'
import Lun from "./lunbo" import Lun from "./lunbo"
import moment from 'moment' import moment from 'moment'
import "./left.less" import "./left.less"
@ -12,41 +12,41 @@ import AutoRollComponent from '../../build/AutoRollComponent'
const Rightbottom = (props) => { const Rightbottom = (props) => {
const { dispatch } = props const { dispatch } = props
const style = { height: "28%", marginTop: "4%" } const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState() const [beijing, setBeijing] = useState()
const [list, setList] = useState([]) const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([]) const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([]) const [nums, setNums] = useState([])
const [num, setNum] = useState() const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([]) const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => { const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist()) const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/; var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => { let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
}) })
console.log(res); console.log(res);
d.map((item, index) => { d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) { if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}` return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
} }
}) })
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// setrightDatas(res.payload.data) // setrightDatas(res.payload.data)
setList(d) setList(d)
} }
useEffect(() => { useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => { // const zhichaolist = dispatch(getZhichaolist()).then((res) => {
// setNums(res.payload?.data?.processed) // setNums(res.payload?.data?.processed)
// }) // })
// requestRightDatas() // requestRightDatas()
roadManagement() roadManagement()
}, []) }, [])
const roadManagement = async () => { const roadManagement = async () => {
await dispatch(getRoadadministration({})).then(res => { await dispatch(getRoadadministration({})).then(res => {
if (res.success) { if (res.success) {
setrightitemlist(res.payload.data?.rows || []) setrightitemlist(res.payload.data?.rows || [])
@ -57,18 +57,18 @@ const Rightbottom = (props) => {
} }
const renderContent = () => { const renderContent = () => {
return <div style={{ height: "100%" }}> return <div style={{ height: "100%" }}>
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => { {rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => {
if (index < 120) { if (index < 120) {
return <div key={index} className='guanli-right-item'> return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'> <Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", display: "flex" }}> <div style={{ width: '100%', height: "100%", marginTop: "0", paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}> {picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg' {picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200,display: 'inline-block', }} style={{ width: 200, height: 200, display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`} // src={`/_file-server/${v.storageUrl}`}
src={v.url} src={v.url}
width={`200px`} width={`200px`}
@ -89,14 +89,14 @@ const Rightbottom = (props) => {
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"} {enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p> </span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> <p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span style={{ 执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}> }}>
{roadname} {roadname}
</span></p> </span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}> <p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span style={{ 执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC", color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160 overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}> }}>
@ -120,20 +120,20 @@ const Rightbottom = (props) => {
}) : ""} }) : ""}
</div> </div>
} }
return ( return (
<> <>
<Module style={style} title={"道路隐患排查治理"}> <Module style={style} title={"道路隐患排查治理"}>
<div style={{ width: "100%", display: "flex", color: "#FFF" }}> <div style={{ width: "90%", margin: "auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div> <div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div> <div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div> </div>
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()} {rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()}
containerStyle={{ position: "relative", height: "90%", }} containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />} divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />}
</Module> </Module>
</> </>
) )
} }
export default Rightbottom export default Rightbottom
Loading…
Cancel
Save