From ef721b34f160f50a6ed419be216c190eefece773 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Wed, 27 Jul 2022 17:15:25 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E9=99=8D=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quanju/containers/footer/guanli/index.js | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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 784b4ff6..f14ce2c8 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -19,6 +19,11 @@ const Guanli = (props) => { }) setleftDatas(res.payload.data) console.log(res.payload.data,'哈哈哈') + } + const data_string=(str)=> { + str.match('/([^.]*)$/g') + + } const requestRightDatas = async()=>{ const res = await dispatch(getjiandetail()) @@ -28,13 +33,20 @@ const Guanli = (props) => { let d = res.payload.data?.overSpeedList?.filter((item,index)=>{ return escape(item.processingTime).indexOf("%u")<0 }) - // let d2 = d.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) - let d2 = d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) + + 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,'好评') + console.log(item.processingTime.match(/([^.]*)$/)[0],'kk') + }) + d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) setrightDatas(res.payload.data) setrightitemlist(d) - console.log(d,'对比的数据') - console.log(d2,'完美') - console.log(res.payload.data,'嘿嘿嘿') + // console.log(d,'对比的数据') + // console.log(d2,'完美') + // console.log(res.payload.data,'嘿嘿嘿') } useEffect(()=>{ requestleftDatas(); From b24fa5313b059f084c79642a076f59f72c3dacb6 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Wed, 27 Jul 2022 19:54:49 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E9=99=8D=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/footer/build/Rightbottom.js | 2 +- .../containers/footer/build/Rightcenter.js | 2 +- .../quanju/containers/footer/build/index.js | 11 +++++--- .../quanju/containers/footer/build/style.less | 4 +-- .../containers/footer/guanli/LeftItem.js | 28 ++++--------------- .../quanju/containers/footer/guanli/index.js | 2 +- .../containers/footer/guanli/style.less | 1 + 7 files changed, 18 insertions(+), 32 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 cfa0348b..17788224 100644 --- a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js +++ b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js @@ -54,7 +54,7 @@ function Rightbottom(props) { textStyle: { color: '#fff', }, - formatter: (values) => `${values.seriesName}
${values.marker} ${values.name}${values.value}公里`, + formatter: (values) => `${values.seriesName}
${values.marker} ${values.name}${values.value}条`, }, legend: { orient: "vertical", diff --git a/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js b/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js index c7a497ab..ad0ac359 100644 --- a/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js +++ b/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js @@ -83,7 +83,7 @@ const RNAKS = [FIRST, SECOND, THIRD]
-
在建公路工程数量
+
在建公路工程数量/个

{sundata}

{ const requestbuildingnumber = async ()=>{ const res = await dispatch(getdaolutongji()); let alltype = Object.keys(res.payload.data?.roadType || {}).map((item)=>({name:item,value:Number(keepThreeNum(res.payload.data.roadType[item]))})) - console.log(alltype,'打他啊') + // console.log(alltype,'打他啊') setdata(alltype.filter(item=>item.name==='县'||item.name==="乡"||item.name==='村')) setbuildingnumber(res.payload.data) - console.log(res.payload.data,'哈哈哈') + // console.log(res.payload.data,'哈哈哈') } @@ -118,7 +118,9 @@ const Build = (props) => { - {buildingnumber&&buildingnumber.buildedRoad!==0&&totalgongli!==0?
+
+ + {buildingnumber&&buildingnumber.buildedRoad!==0&&totalgongli!==0?
{/* */} @@ -137,6 +139,7 @@ const Build = (props) => {
{buildingnumber?.buildedRoad || 0}
:} +
{ {safetyData&&sunsafetyData!==0?:}
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 40ddc797..7af5871d 100644 --- a/web/client/src/sections/quanju/containers/footer/build/style.less +++ b/web/client/src/sections/quanju/containers/footer/build/style.less @@ -178,7 +178,7 @@ align-items: center; justify-content: center; position: absolute; - left: 16%; + left: 15%; top:38%; h2{ font-size: 1.25rem; @@ -278,7 +278,7 @@ justify-content: center; position: absolute; align-items: center; - left: 19%; + left: 15%; top:38%; h2{ font-size: 1.25rem; diff --git a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js index ea90e7dd..72c666e7 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js @@ -15,7 +15,7 @@ export default function LeftItem({datas}) { textStyle: { color: '#fff', }, - formatter: (values) => ` ${values.name}${datas.processed}个`, + formatter: (values) => `${values.name}${datas.processed}条`, }, title: { text: `${(datas.processed*100/datas.total).toFixed(2)}%`, @@ -78,6 +78,7 @@ export default function LeftItem({datas}) { }, series: [{ type: 'bar', + showBackground: true,//这里只有显示背景才能出现背景灰色的线 data: [{ name: '已处理', value: (datas.processed*100/datas.total).toFixed(2), @@ -97,34 +98,15 @@ export default function LeftItem({datas}) { coordinateSystem: 'polar', roundCap: true, barWidth: 8, - barGap: '-100%', // 两环重叠 - z: 2, - },{ // 灰色环 - type: 'bar', - data: [{ - value: 100, - itemStyle: { - color: '#092B7B ', - shadowColor: 'rgba(0, 0, 0, 0.2)', - shadowBlur: 5, - shadowOffsetY: 2 - } - }], - coordinateSystem: 'polar', - roundCap: true, - barWidth: 8, - barGap: '-100%', // 两环重叠 - z: 1 - }] + }, + ] } - - - chartInstance.setOption(option); }, []) return (
+
{datas.name}
{datas.total}
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 f14ce2c8..9ac77028 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -14,7 +14,7 @@ const Guanli = (props) => { 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) diff --git a/web/client/src/sections/quanju/containers/footer/guanli/style.less b/web/client/src/sections/quanju/containers/footer/guanli/style.less index 3ddaa180..c406eb6b 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/style.less +++ b/web/client/src/sections/quanju/containers/footer/guanli/style.less @@ -19,6 +19,7 @@ .guanli-left-item{ box-sizing: border-box; width: 85%; + position: relative; // height: 30%; height: 24vh; margin: 0 auto 3%; From a505f335562f1bcf97f1a81bf3548555d8aab6d4 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Wed, 27 Jul 2022 20:17:51 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/fillion/actions/infor.js | 33 +++ .../fillion/components/infor/details.js | 36 +++- .../sections/fillion/components/inforTable.js | 192 ++++++++++++++---- .../fillion/components/operationalTable.js | 3 - web/client/src/utils/webapi.js | 8 + 5 files changed, 222 insertions(+), 50 deletions(-) diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js index 583d9454..bced63ba 100644 --- a/web/client/src/sections/fillion/actions/infor.js +++ b/web/client/src/sections/fillion/actions/infor.js @@ -290,4 +290,37 @@ export function delVehicle(query) { msg: { error: '删除车辆信息失败' }, // reducer: { name: 'reportstatistic' } }); +} + +export function getPurchase(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + query: query, + actionType: 'GET_PURCHASE', + url: ApiTable.getPurchase, + msg: { error: '获取治超信息失败' }, + // reducer: { name: 'reportstatistic' } + }); +} +export function putPurchase(query) { + return dispatch => basicAction({ + type: 'put', + dispatch: dispatch, + data: query, + actionType: 'PUT_PURCHASE', + url: ApiTable.putPurchase, + msg: { error: '获取治超信息失败' }, + // reducer: { name: 'reportstatistic' } + }); +} +export function delPurchase(query) { + return dispatch => basicAction({ + type: 'del', + dispatch: dispatch, + actionType: 'DEL_PURCHASE', + url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId), + msg: { error: '删除车辆信息失败' }, + // reducer: { name: 'reportstatistic' } + }); } \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index cd0baa95..8f1e99f7 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" const UserModal = (props) => { - const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, engineering } = props + const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor } = props const [newlys, setNewlys] = useState() //必填数据 const [newlysay, setNewlysay] = useState() //处理hou const [records, setRecords] = useState()//处理 @@ -65,6 +65,13 @@ 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(() => { const arr = [] @@ -117,6 +124,13 @@ const UserModal = (props) => { setRecordsay(arr.splice(1, 2)) // setEstablishment(arr.splice(-1, 1)) setRecords(arr) + }if (rewkeys === 'zhichao') { + _.forIn(recortd, function (value, key) { + arr.push({ value: value, type: key }) + }); + setRecordsay(arr.splice(1, 2)) + // setEstablishment(arr.splice(-1, 1)) + setRecords(arr) } }, [recortd]) useEffect(() => { @@ -230,6 +244,24 @@ const UserModal = (props) => { return true } } + if (rewkeys === 'zhichao') { + if (typecard == '111') { + console.log(values) + const query = { ...values, overspeedId:records?.[0]?.value || '' } + dispatch(putPurchase(query)).then((res) => { + setSuccess(res.success) + setMonitor(res) + }) + return true + } else { + const query = { ...values } + dispatch(putPurchase(query)).then((res) => { + setSuccess(res.success) + setMonitor(res) + }) + return true + } + } } else { return false } }} diff --git a/web/client/src/sections/fillion/components/inforTable.js b/web/client/src/sections/fillion/components/inforTable.js index 5690aae7..d7af023b 100644 --- a/web/client/src/sections/fillion/components/inforTable.js +++ b/web/client/src/sections/fillion/components/inforTable.js @@ -1,21 +1,30 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState,useRef } from 'react'; import { connect } from 'react-redux'; import { Spin, Button, Popconfirm, Col, Input,Row } from 'antd'; import ProTable from '@ant-design/pro-table'; import './protable.less' import moment from 'moment'; -import { getReportStatistic } from "../actions/infor" +import { getPurchase,delPurchase } from "../actions/infor" import UserModal from './infor/details'; const InForTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props const [rowSelected, setRowSelected] = useState([]) - const [counts, setCounts] = useState()//shuju const [modalVisible, setModalVisible] = useState(false); const [modalRecord, setModalRecord] = useState(); const [typecard, setTypecard] = useState(); - + const [recortd, setRecortd] = useState() + const [monitor, setMonitor] = useState() + const [delet, setDelet] = useState() + const [nameOfInspectionPoint, setNameOfInspectionPoint] = useState()//检测点名称 + const [licensePlate, setLicensePlate] = useState()//车牌号 + const [numberOfAxles, setNumberOfAxles] = useState()//车轴数 + const [overrunRateUpper, setOverrunRateUpper] = useState()//超限率上限 + const [overrunRateFloor, setOverrunRateFloor] = useState()//超限率下限 + const [testTime, setTestTime] = useState()//超限率下限 + const ref = useRef() + useEffect(() => { ref.current.reload() }, [monitor,delet,modalVisible]) //打开弹窗 const openModal = (type, record) => { setModalVisible(true); @@ -45,31 +54,52 @@ const InForTable = (props) => { const columns = [ { - title: '检测点名称', + title: '区/县', dataIndex: 'placeName', fixed: 'left', width: 120, options: 1, + search: false, backgroundColor: "#ffffff", fieldProps: { - onChange: (value, cs) => { - setSitename(value.currentTarget.value) - }, placeholder: '请输入检测点名称进行搜索', getPopupContainer: (triggerNode) => triggerNode.parentNode, }, + render: (dom, record) => { + return record.districtcounty + }, }, { - title: '车牌号', + title: '检测点名称', // search: false, dataIndex: 'containers1', fixed: 'left', width: 120, render: (dom, record) => { - return record.address + return record.nameOfInspectionPoint + }, + fieldProps: { + onChange: (value, cs) => { + setNameOfInspectionPoint(value.currentTarget.value) + }, + placeholder: '请输入车牌号进行搜索', + getPopupContainer: (triggerNode) => triggerNode.parentNode, + } + },{ + title: '车牌号码', + // search: false, + dataIndex: 'containers444', + + fixed: 'left', + width: 120, + render: (dom, record) => { + return record.licensePlate }, fieldProps: { + onChange: (value, cs) => { + setLicensePlate(value.currentTarget.value) + }, placeholder: '请输入车牌号进行搜索', getPopupContainer: (triggerNode) => triggerNode.parentNode, } @@ -80,9 +110,12 @@ const InForTable = (props) => { dataIndex: 'containers2', width: 120, render: (dom, record) => { - return record.address + return record.numberOfAxles }, fieldProps: { + onChange: (value, cs) => { + setNumberOfAxles(value.currentTarget.value) + }, placeholder: '请输入车轴数进行搜索', getPopupContainer: (triggerNode) => triggerNode.parentNode, } @@ -95,20 +128,28 @@ const InForTable = (props) => { // width: 120, render: (dom, record) => { - return record.address + return record.overrunRate + }, + fieldProps: { + placeholder: '请输入超限率进行搜索', + getPopupContainer: (triggerNode) => triggerNode.parentNode, }, - // fieldProps: { - // placeholder: '请输入超限率进行搜索', - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // }, renderFormItem: (item, { type, defaultRender, formItemProps, fieldProps, ...rest }, form) => { return - + { + setOverrunRateUpper(value.currentTarget.value) + }} + placeholder='输入超限率上限'/> - + { + setOverrunRateFloor(value.currentTarget.value) + }} + placeholder='输入超限率下限'/> @@ -123,7 +164,7 @@ const InForTable = (props) => { width: 120, render: (dom, record) => { - return record.address + return record.overrunWeight }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -137,7 +178,7 @@ const InForTable = (props) => { width: 120, render: (dom, record) => { - return record.address + return record.grossVehicleWeight }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -151,7 +192,7 @@ const InForTable = (props) => { width: 120, render: (dom, record) => { - return record.address + return record.vehicleCargoWeightLimit }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -164,9 +205,12 @@ const InForTable = (props) => { valueType: 'dateTime', width: 120, render: (dom, record) => { - return record.address + return record.testTime }, fieldProps: { + onChange: (value, cs) => { + setTestTime(cs) + }, getPopupContainer: (triggerNode) => triggerNode.parentNode, } }, { @@ -178,7 +222,7 @@ const InForTable = (props) => { width: 120, render: (dom, record) => { - return record.address + return record.nameOfBusinessOwner }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -193,7 +237,7 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.businessAddress }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -208,7 +252,7 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.notifier }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -223,7 +267,7 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.notificationMethod }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -235,10 +279,10 @@ const InForTable = (props) => { valueType: 'dateRange', - width: 140, + width: 240, render: (dom, record) => { - return record.address + return record.notificationResults }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -253,7 +297,7 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.processingTime }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -268,7 +312,7 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.deductPoints }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -283,7 +327,23 @@ const InForTable = (props) => { width: 140, render: (dom, record) => { - return record.address + return record.fine + }, + fieldProps: { + getPopupContainer: (triggerNode) => triggerNode.parentNode, + } + }, + { + title: '备注', + search: false, + dataIndex: 'containers14', + valueType: 'dateRange', + + + width: 140, + + render: (dom, record) => { + return record.remarks }, fieldProps: { getPopupContainer: (triggerNode) => triggerNode.parentNode, @@ -301,9 +361,18 @@ const InForTable = (props) => { onClick={() => { openModal('edit', record) setTypecard('111') - + setRecortd(record) }} - >编辑
+ >编辑
} }, @@ -342,6 +411,7 @@ const InForTable = (props) => {
{ finishedProductTable = c; }} @@ -355,20 +425,26 @@ const InForTable = (props) => { }, }} columns={columns} - - dataSource={(counts || {}).rows || []} + dataSource={counts || []} + onReset={(v) => { + setNameOfInspectionPoint('') + setLicensePlate('') + setNumberOfAxles('') + setOverrunRateUpper('') + setOverrunRateFloor('') + setTestTime('') + }} request={async (params) => { const query = { - startDate: day[0], - endDate: day[1], - placeType: placeType, - regionId: regionId, - placeName: sitename, - limit: params.pageSize, - offset: ((params.current ? params.current : 1) - 1) * params.pageSize + nameOfInspectionPoint:nameOfInspectionPoint, + licensePlate:licensePlate, + numberOfAxles:numberOfAxles, + overrunRateUpper:overrunRateUpper, + overrunRateFloor:overrunRateFloor, + testTime:testTime } setRowSelected([]); - const res = await dispatch(getReportStatistic(query)); + const res = await dispatch(getPurchase(query)); setCounts(res.payload.data) return { ...res, @@ -390,15 +466,41 @@ const InForTable = (props) => { >
- + rewkeys={'zhichao'} + data={data} + recortd={recortd} + setMonitor={setMonitor} + // sitename={sitename} + setRecortd={setRecortd} + /> : ''}
) } +const data={ + "districtcounty": "区/县", + "nameOfInspectionPoint": "检测点名称", + "licensePlate": "车牌号码", + "numberOfAxles": "车轴数", + "overrunRate": "超限率", + "overrunWeight": "超限重量", + "grossVehicleWeight": "车货总重", + "vehicleCargoWeightLimit": "车货限重", + "testTime": "检测时间", + "nameOfBusinessOwner": "经营业户名称", + "businessAddress": "经营业户地址", + "notifier": "通知人", + "notificationMethod": "通知方式", + "notificationResults": "通知结果", + "processingTime": "处理时间", + "deductPoints": "扣分", + "fine": "罚款", + "remarks": "备注" +} function mapStateToProps(state) { const { auth, depMessage } = state; const pakData = (dep) => { diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js index 0bbda6b8..cc827d2a 100644 --- a/web/client/src/sections/fillion/components/operationalTable.js +++ b/web/client/src/sections/fillion/components/operationalTable.js @@ -11,9 +11,6 @@ import HightModal from './highways/highwaysdata'; const OperaTionalTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props const [rowSelected, setRowSelected] = useState([]) - // const [regionId, setRegionId] = useState()//区域id - // const [placeType, setPlaceType] = useState()//场所 - // const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期 const [sitename, setSitename] = useState()//场所名称 const [counts, setCounts] = useState()//shuju const [modalVisible, setModalVisible] = useState(false); diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 6a4e3a3e..a4723aba 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -90,6 +90,14 @@ delRoadway:'road/{roadId}', //公交信息 getCircuit:'bus/line',putCircuit:'bus/line',delCircuit:'bus/line/{lineId}', getVehicle:'bus/car',putVehicle:'bus/car',delVehicle:'bus/car/{carId}', + + + + +//治超管理 +getPurchase:'overspeed', +putPurchase:'overspeed', +delPurchase:'overspeed/{overspeedId}', }; From ffa95765cd0939bdca0c50e9304a74368cf3eca1 Mon Sep 17 00:00:00 2001 From: wanyiwei Date: Thu, 28 Jul 2022 08:39:07 +0800 Subject: [PATCH 4/6] =?UTF-8?q?*=E5=A4=A7=E5=B1=8F=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=9D=A1=E4=BB=B6=E8=BF=87=E6=BB=A4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=AA=E5=B1=95=E7=A4=BA=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=9A=84=E5=AF=B9=E5=BA=94=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/footer/operation/left.js | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/operation/left.js b/web/client/src/sections/quanju/containers/footer/operation/left.js index 92e69c9a..7e7e9f81 100644 --- a/web/client/src/sections/quanju/containers/footer/operation/left.js +++ b/web/client/src/sections/quanju/containers/footer/operation/left.js @@ -10,6 +10,7 @@ const Left = (props) => { const [treeData, setTreeData] = useState([]) const [treeDataList, setTreeDataList] = useState([]) const [expandedKeys, setExpandedKeys] = useState([]); + const [searchValue, setSearchValue] = useState(''); const [autoExpandParent, setAutoExpandParent] = useState(true); const onExpand = (newExpandedKeys) => { @@ -20,6 +21,7 @@ const Left = (props) => { useEffect(() => { const { dispatch } = props dispatch(getBusTierList()) + }, []) const { busTier } = props const style = { height: "97%", marginTop: "3%" } @@ -35,10 +37,45 @@ const Left = (props) => { setSearchValue(value); setAutoExpandParent(true); }; + const loop = (treeData) => + treeData.map((item) => { + const index = item.title.indexOf(searchValue); + const beforeStr = item.title.substr(0, index); + const afterStr = item.title.substr(index + searchValue.length); + const title = + index > -1 ? ( + + {beforeStr} + {searchValue} + {afterStr} + + ) : ( + {item.title} + ); + if (item.children && item.children.length > 0) { + const children = loop(item.children); + return { + ...item, + title: index > -1 || children.length ? title : null, + children: children.length ? children : undefined + }; + } + return index > -1 + ? { + ...item, + title + } + : { + ...item, + title: null + }; + }) + .filter((item) => !!item.title); useEffect(() => { let busTierList = [] let busTierOpen = [] let dataList = [] + busTier && busTier.data && busTier.data.forEach((e, index) => { if (index == 0) { busTierOpen.push(e.name) @@ -115,8 +152,8 @@ const Left = (props) => { onExpand={onExpand} expandedKeys={expandedKeys} autoExpandParent={autoExpandParent} - treeData={treeData} - /> :
暂无数据
+ treeData={loop(treeData)} + /> :
暂无数据
}
From a810356b9906fa2ef8e11822a01cefa4427483b6 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Thu, 28 Jul 2022 08:51:24 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/footer/guanli/LeftItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js index 72c666e7..2a74b7ab 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js @@ -106,7 +106,7 @@ export default function LeftItem({datas}) { }, []) return (
- + {/* */}
{datas.name}
{datas.total}
From a3fe9bee43370f1e5ceb69dcdef1b9b7cbf9c84c Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Thu, 28 Jul 2022 09:18:18 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A4=A7=E5=B1=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/quanju/containers/footer/guanli/LeftItem.js | 2 +- .../src/sections/quanju/containers/footer/guanli/index.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js index 2a74b7ab..4f24ae2c 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js @@ -109,7 +109,7 @@ export default function LeftItem({datas}) { {/* */}
{datas.name} -
{datas.total}
+
{datas.total}
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 9ac77028..631b4f00 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -18,7 +18,7 @@ const Guanli = (props) => { return parseInt(b.total) - parseInt(a.total) }) setleftDatas(res.payload.data) - console.log(res.payload.data,'哈哈哈') + // console.log(res.payload.data,'哈哈哈') } const data_string=(str)=> { str.match('/([^.]*)$/g') @@ -44,9 +44,9 @@ const Guanli = (props) => { d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) setrightDatas(res.payload.data) setrightitemlist(d) - // console.log(d,'对比的数据') + console.log(d,'对比的数据') // console.log(d2,'完美') - // console.log(res.payload.data,'嘿嘿嘿') + console.log(res.payload.data,'嘿嘿嘿') } useEffect(()=>{ requestleftDatas(); @@ -57,7 +57,7 @@ const Guanli = (props) => { const renderContent = () => { return
{rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime }, index) => { - if(index<30){ + if(index<120){ return
{licensePlate} {overrunRate}%