From 55c778674bf7389d9124e5a910216f0e19bdc754 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 4 Aug 2023 19:25:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=81=93=E8=B7=AF=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E6=8E=92=E6=9F=A5=E6=B2=BB=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 3 +- .../quanju/containers/footer/guanli/index.js | 102 ++++++++++++------ 2 files changed, 72 insertions(+), 33 deletions(-) diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 45edb9a6..118cef79 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -15,7 +15,8 @@ "args": [ "-p 13400", "-f http://localhost:13400", - "-g postgres://FashionAdmin:123456@10.8.16.184:5432/sihaogonglu", + // "-g postgres://FashionAdmin:123456@10.8.16.184:5432/sihaogonglu", + "-g postgres://postgres:123@10.8.30.32:5432/highways4good", // "-g postgres://FashionAdmin:123456@10.8.30.156:5432/highway4goodn0728", "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", "--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa", diff --git a/web/client/src/sections/quanju/containers/footer/guanli/index.js b/web/client/src/sections/quanju/containers/footer/guanli/index.js index 35507d0c..3e42faf5 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -1,18 +1,20 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { Carousel, Tooltip } from 'antd' +import { Carousel, Tooltip, Image } from 'antd' import AutoRollComponent from '../build/AutoRollComponent' import VideoMonitor from '../build/videoMonitor' import Module from '../../public/module' +import moment from 'moment' import LeftItem from './LeftItem' import { getjiandmanage, getjiandetail } from '../../../actions/example' +import { getRoadadministration } from '../../../../fillion/actions/luzheng' import './style.less' import NoData from '../../public/noData'; const Guanli = (props) => { const { dispatch } = props const [leftDatas, setleftDatas] = useState([]) const [rightDatas, setrightDatas] = useState([]) - const [rightitemlist, setrightitemlist] = useState() + const [rightitemlist, setrightitemlist] = useState([]) const requestleftDatas = async () => { const res = await dispatch(getjiandmanage()) res.payload.data?.sort((a, b) => { @@ -50,48 +52,80 @@ const Guanli = (props) => { // console.log(d2,'完美') // console.log(res.payload.data,'嘿嘿嘿') } + + const roadManagement = async () => { + await dispatch(getRoadadministration({})).then(res => { + if (res.success) { + setrightitemlist(res.payload.data?.rows || []) + } + }) + + + + } + + + useEffect(() => { requestleftDatas(); - requestRightDatas() + // requestRightDatas() + roadManagement() }, []) - // let datalist = newArry(30) - // datalist.fill({licensePlate:"赣A44454",overrunRate:"30%",fine:"200元",processingTime:"2020年4月1日"}) - // const content = ( - // ); const renderContent = () => { - // console.log(rightitemlist); + return
- {rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ id, licensePlate, overrunRate, fine, processingTime, deductPoints, nameOfInspectionPoint }, index) => { + {rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => { if (index < 120) { return
-
+
- {/* */} -
- -

{overrunRate ? overrunRate.toFixed(2) : 0}%{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}

-

超限

-
-
-

车牌号{licensePlate}{/* {item.licensePlate} */}

-

检测点{nameOfInspectionPoint}

-

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

-

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

+ {picfile?.length > 0 ? + {picfile?.map(v => )} + + : + } + + +
+

+ 执法日期: + {enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"} +

+

+ 执法道路: + {roadname} +

+

+ 执法成果: + {enforcementreslt}

+
} placement="leftTop" - overlayStyle={{ minWidth: 400, minHeight: 212, padding: 0, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }} + overlayStyle={{ minWidth: 500, minHeight: 200, paddingTop: 10, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }} overlayClassName='popover' > -
- {licensePlate} - {overrunRate}% - {deductPoints ? `-${deductPoints}分` : ""}和-{fine}{fine ? "元" : ""} - {processingTime} +
+
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
+
{enforcementreslt}
@@ -121,22 +155,26 @@ const Guanli = (props) => {
- -
+ + {/*
已处理 {rightDatas?.processed || 0} -
-
+
*/} + {/*
车牌号 超限 处罚 处理日期 +
*/} + o
+
执法日期
+
执法成果
{rightitemlist && rightitemlist.length !== 0 ? : } + divHeight={"100%"} divId={"chart-overview-deviceList"} /> : }
From 1f2cd35dd0724e859dbba52bf35299f9c2985d63 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 4 Aug 2023 19:31:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B7=AF=E6=94=BF=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/containers/luzheng.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/client/src/sections/fillion/containers/luzheng.js b/web/client/src/sections/fillion/containers/luzheng.js index 57cba564..01fc708b 100644 --- a/web/client/src/sections/fillion/containers/luzheng.js +++ b/web/client/src/sections/fillion/containers/luzheng.js @@ -51,7 +51,8 @@ function Assess(props) { const getData = () => { setLoading(true) - dispatch(getRoadadministration(query)).then(res => { + console.log(query,'query') + dispatch(getRoadadministration({...query})).then(res => { if(res?.success){ setdatasource(res?.payload?.data?.rows) settotal(res?.payload?.data?.count) @@ -146,8 +147,10 @@ function Assess(props) { setLoading(true) dispatch(delRoadadministration(record.id)).then(res => { setLoading(false) + if (res.success) { - getData() + setQuery({...query, page: 1, pageSize: 10, limit: 10}) + // getData(page) } }) }} @@ -165,6 +168,7 @@ function Assess(props) { defaultPageSize: 10, showSizeChanger: false, onChange: (page, pageSize) => { + console.log(page,'page') setQuery({ ...query, page, limit: pageSize From f50bf1b949178ca6cf4d6ffc45fc61155452a478 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 4 Aug 2023 19:33:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B7=AF=E6=94=BF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=AC=AC=E4=B8=80=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/containers/luzheng.js | 1 - 1 file changed, 1 deletion(-) diff --git a/web/client/src/sections/fillion/containers/luzheng.js b/web/client/src/sections/fillion/containers/luzheng.js index 01fc708b..d09f3825 100644 --- a/web/client/src/sections/fillion/containers/luzheng.js +++ b/web/client/src/sections/fillion/containers/luzheng.js @@ -147,7 +147,6 @@ function Assess(props) { setLoading(true) dispatch(delRoadadministration(record.id)).then(res => { setLoading(false) - if (res.success) { setQuery({...query, page: 1, pageSize: 10, limit: 10}) // getData(page)