From dbd78c882f1de18f40c2ad5f5ee53b4e62fc4248 Mon Sep 17 00:00:00 2001 From: yangsen <952208207@qq.com> Date: Fri, 12 Aug 2022 15:33:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?(*)=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/footer/build/Rightbottom.js | 4 +- .../quanju/containers/footer/build/index.js | 2 +- .../quanju/containers/footer/build/style.less | 2 +- .../quanju/containers/footer/guanli/index.js | 160 +++++++++--------- 4 files changed, 84 insertions(+), 84 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js index 10e64fc1..fdc5d7ea 100644 --- a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js +++ b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js @@ -217,8 +217,8 @@ function Rightbottom (props) { {/* */}
-

{siji[0] + siji[1]+sanji[2] + sanji[3] + sanji[4] || 0}

- 路段总数 +

{total || 0}

+ 道路总公里
{/*
diff --git a/web/client/src/sections/quanju/containers/footer/build/index.js b/web/client/src/sections/quanju/containers/footer/build/index.js index 71030183..8f3f1326 100644 --- a/web/client/src/sections/quanju/containers/footer/build/index.js +++ b/web/client/src/sections/quanju/containers/footer/build/index.js @@ -170,7 +170,7 @@ const Build = (props) => {
: } - diff --git a/web/client/src/sections/quanju/containers/footer/build/style.less b/web/client/src/sections/quanju/containers/footer/build/style.less index f2e3030d..8bc78504 100644 --- a/web/client/src/sections/quanju/containers/footer/build/style.less +++ b/web/client/src/sections/quanju/containers/footer/build/style.less @@ -309,7 +309,7 @@ justify-content: center; position: absolute; align-items: center; - left: 44%; + left: 40%; top: 35%; h2 { 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 6085aa4f..3ec9942c 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -1,42 +1,42 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { Carousel,Tooltip } from 'antd' +import { Carousel, Tooltip } from 'antd' import AutoRollComponent from '../build/AutoRollComponent' import Module from '../../public/module' import LeftItem from './LeftItem' -import {getjiandmanage,getjiandetail} from '../../../actions/example' +import { getjiandmanage, getjiandetail } from '../../../actions/example' 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 requestleftDatas = async()=>{ + const { dispatch } = props + const [leftDatas, setleftDatas] = useState([]) + const [rightDatas, setrightDatas] = useState([]) + const [rightitemlist, setrightitemlist] = useState() + const requestleftDatas = async () => { const res = await dispatch(getjiandmanage()) - res.payload.data?.sort((a,b)=>{ + res.payload.data?.sort((a, b) => { return parseInt(b.total) - parseInt(a.total) - }) + }) setleftDatas(res.payload.data) // console.log(res.payload.data,'哈哈哈') } - const data_string=(str)=> { - str.match('/([^.]*)$/g') - - + const data_string = (str) => { + str.match('/([^.]*)$/g') + + } - const requestRightDatas = async()=>{ + const requestRightDatas = async () => { const res = await dispatch(getjiandetail()) // let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) - + var pattern = /[\u4e00-\u9fa5]*/; // console.log(res.payload.data,'好的号的') - 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 }) - - d.map((item,index)=>{ - if(parseInt(item.processingTime.match(/([^.]*)$/)[0])<10){ + + d.map((item, index) => { + if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) { return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}` } // console.log(d3,'好评') @@ -49,96 +49,96 @@ const Guanli = (props) => { // console.log(d2,'完美') // console.log(res.payload.data,'嘿嘿嘿') } - useEffect(()=>{ + useEffect(() => { requestleftDatas(); requestRightDatas() - },[]) + }, []) // 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) => { - if(index<120){ - return
-
- -
+ return
+ {rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ id, licensePlate, overrunRate, fine, processingTime, deductPoints, nameOfInspectionPoint }, index) => { + if (index < 120) { + return
+ +
{/* */}
-

{overrunRate?overrunRate:0}{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}

+

{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 ? "" : "--"} */}

+

检测点{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 : "--"} */}

-
-
} - placement="leftTop" - overlayStyle={{ minWidth:400, minHeight: 212,padding:0,margin:0,backgroundImage:`url(../../../../../assets/images/leadership/beijinglan.png)`}} - overlayClassName='popover' - - > - {licensePlate} - {overrunRate}% - {deductPoints?`-${deductPoints}分`:""}和-{fine}{fine?"元":""} - {processingTime} -
-
-
- } - }):""} +
+
} + placement="leftTop" + overlayStyle={{ minWidth: 400, minHeight: 212, padding: 0, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }} + overlayClassName='popover' + + > +
+ {licensePlate} + {overrunRate}% + {deductPoints ? `-${deductPoints}分` : ""}和-{fine}{fine ? "元" : ""} + {processingTime} +
+ +
+ } + }) : ""}
- } - const renderLeftContent = ()=>{ + } + const renderLeftContent = () => { // setleftDatas(leftDatas=>leftDatas.sort((a,b)=>b.total - a.total)) - - return leftDatas && leftDatas.length!==0?leftDatas.map((item,index)=> + + return leftDatas && leftDatas.length !== 0 ? leftDatas.map((item, index) => - ):"" - + ) : "" + } // renderContent() return ( <> -
- - {leftDatas && leftDatas.length!==0?:} - -
-
- -
- - 已处理 - {rightDatas?.processed||0} - +
+ + {leftDatas && leftDatas.length !== 0 ? : } +
-
- 车牌号 - 超限 - 处罚 - 处理日期 +
+ +
+ + 已处理 + {rightDatas?.processed || 0} + +
+
+ 车牌号 + 超限 + 处罚 + 处理日期 +
+ {rightitemlist && rightitemlist.length !== 0 ? : } +
- {rightitemlist && rightitemlist.length!==0?:} - -
) } -function mapStateToProps(state) { +function mapStateToProps (state) { const { auth, depMessage } = state; const pakData = (dep) => { return dep.map((d) => { From d3d19bafbe9609a3835fc1ad279b55f99b190260 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Fri, 12 Aug 2022 15:41:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/infor/details.js | 48 ++++++++++++++----- .../fillion/components/operationalTable.js | 16 ++++--- 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index 1cc3e87c..096d0b60 100644 --- a/web/client/src/sections/fillion/components/infor/details.js +++ b/web/client/src/sections/fillion/components/infor/details.js @@ -2,11 +2,11 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Form, Spin, Table } from 'antd'; import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; -import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle } from "../../actions/infor" +import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle,putPurchase } from "../../actions/infor" import { putBridge } from "../../actions/infor" import _ from 'lodash' const UserModal = (props) => { - const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, engineering } = props + const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename,setDelet, dispatch, setRecortd, engineering,whichofits } = props const [newlys, setNewlys] = useState() //必填数据 const [newlysay, setNewlysay] = useState() //处理hou const [records, setRecords] = useState()//处理 @@ -64,6 +64,12 @@ const UserModal = (props) => { }); setNewlys(array?.splice(0, 2)) setNewlysay(array) + }if (rewkeys === 'zhichao') { + _.forIn(data, function (value, key) { + array.push({ name: value, type: key }) + }); + setNewlys(array?.splice(0, 2)) + setNewlysay(array) } }, []) useEffect(() => { @@ -136,8 +142,7 @@ const UserModal = (props) => { onFinish={(values) => { if (Object.values(values).length > 0) { if (rewkeys === 'transportation') { - - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } dispatch(putRoadway(query)).then((res) => { @@ -154,8 +159,8 @@ const UserModal = (props) => { return true } } - if (rewkeys === 'bridge') { - if (typecard == '111') { + if (rewkeys === 'bridge') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, roadId: records?.[0]?.value || '' } dispatch(putBridge(query)).then((res) => { @@ -172,7 +177,7 @@ const UserModal = (props) => { } } if (rewkeys === 'weihuo' || rewkeys === 'chuzu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' } dispatch(putSpecificVehicle(query)).then((res) => { @@ -189,7 +194,7 @@ const UserModal = (props) => { } } if (rewkeys === 'yehu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' } dispatch(putHouseholds(query)).then((res) => { @@ -205,7 +210,7 @@ const UserModal = (props) => { return true } } if (rewkeys === 'xianlu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, lineId: records?.[0]?.value || '' } dispatch(putCircuit(query)).then((res) => { @@ -222,7 +227,7 @@ const UserModal = (props) => { } } if (rewkeys === 'cheliang') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, carId: records?.[0]?.value || '' } dispatch(putVehicle(query)).then((res) => { @@ -234,6 +239,27 @@ const UserModal = (props) => { const query = { ...values } dispatch(putVehicle(query)).then((res) => { + }) + return true + } + } + if (rewkeys == 'zhichao') { + + if (typecard == 'compile') { + console.log(typecard) + + setDelet(values) + const query = { ...values, overspeedId: records?.[0]?.value || '' } + dispatch(putPurchase(query)).then((res) => { + console.log(res) + }) + return true + } else { + setDelet(values) + const query = { ...values } + dispatch(putPurchase(query)).then((res) => { + console.log(res) + }) return true } @@ -243,7 +269,7 @@ const UserModal = (props) => { }} initialValues={recortd} > - {typecard == '111' ? + {typecard == 'compile' ?
@@ -161,7 +161,7 @@ const [genre,setGenre]=useState() return
@@ -749,7 +749,7 @@ const [genre,setGenre]=useState() return
{ deldata(record.id) }}> @@ -1382,7 +1382,7 @@ const [genre,setGenre]=useState() return
{ deldata(record.id) }}> @@ -1850,9 +1850,11 @@ const [genre,setGenre]=useState() fixed: 'right', render: (dom, record) => { return
{ deldatas(record.id) }}>