From c0e84f762fd6fec3ecb8926b8921220d4d5f9abe Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 09:39:38 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BC=A0=E5=8F=82=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapComponets/ParkingViewMarkers/index.jsx | 91 +--------------------- .../MemberStat/ParkingAly/loadable.jsx | 1 + .../MemberStat/PayAly/loadable.jsx | 2 +- .../MemberStat/RegisterAly/loadable.jsx | 1 + .../DataAnalysisPrediction/ParkingOverview/Map.jsx | 20 ++--- src/services/ParkingOverview/index.js | 2 +- 6 files changed, 15 insertions(+), 102 deletions(-) diff --git a/src/components/MapComponets/ParkingViewMarkers/index.jsx b/src/components/MapComponets/ParkingViewMarkers/index.jsx index 16fd2de..268db19 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.jsx +++ b/src/components/MapComponets/ParkingViewMarkers/index.jsx @@ -75,7 +75,7 @@ function Markers(props) { if (map && !massLayer) { let _massLayer = new AMap.MassMarks([], { zIndex: 5, // 海量点图层叠加的顺序 - cursor: "pointer", + // cursor: "pointer", style: style, // 该层内标注是否避让 // allowCollision: true, }); // 创建海量点图层 @@ -126,99 +126,10 @@ function Markers(props) { const addMarker = (markerArr, _massLayer) => { _massLayer.setData(markerArr); _massLayer.on("click", function (e) { - console.log(e.data.option); clickCb(e.data.option); - // Mapmove.setPosition(e.data.lnglat); }); setMassLayer(_massLayer); _massLayer.setMap(map); - - // for (let [key, value] of Object.entries(markerArr)) { - // if (!value.hasOwnProperty("massMarkers")) { - // value.massMarkers = []; - // value.nodes.forEach((elem) => { - // console.log(elem); - // // let marker = new AMap.LabelMarker({ - // // position: [elem.lnglat[1], elem.lnglat[0]], - // // // zIndex: 1006, - // // icon: icon(elem.type), - // // // text: text(elem[tooltipKey]), - // // // content: markerContent(elem.type), - // // // offset: new AMap.Pixel(-13, -30), - // // }); - - // // marker.data = elem; - // // value.massMarkers.push(marker); - // // // marker.bindTooltip(`<span>${elem[tooltipKey]}</span>`, { - // // // offset: [20, -5], - // // // direction: "right", - // // // }); - // // marker.on("mouseover", function (e) { - // // console.log(e.data); - // // var position = e.data.data && e.data.data.position; - // // if (position) { - // // Mapmove.setLabel( - // // '<div class="amap-info-window">' + - // // position + - // // '<div class="amap-info-sharp"></div>' + - // // "</div>" - // // ); - // // Mapmove.setPosition(position); - // // map.add(Mapmove); - // // } - // // }); - // // marker.on("mouseout", function () { - // // map.remove(Mapmove); - // // }); - // }); - // _massLayer.add(value.massMarkers); - // } else { - // _massLayer.add(value.massMarkers); - // } - // } - // _massLayer.setData(markerArr); - // massMarks.setMap(map); - // if (clickCb) { - // _massLayer.on("click", (e) => { - // console.log(e); - // // if (data.length == "1") { - // // let elem = data[0].data.data.data; - // // clickCb(elem); - // // } else { - // // map.openPopup(renderMarkerList(data), e.latlng, { - // // className: "markers-list-box", - // // }); - // // let dom = document.querySelectorAll(".marker-list-item"); - // // dom.forEach((elem) => { - // // elem.addEventListener("click", function (e) { - // // map.closePopup(); - // // let type = e.target.dataset.type, - // // id = e.target.dataset.id; - // // let marker = massObjRef.current["type_" + type].nodes.filter( - // // (i) => i.locationId == id - // // )[0]; - // // let elem = marker.data; - // // clickCb(elem); - // // }); - // // }); - // // } - // }); - // } - }; - - const renderMarkerList = (data) => { - let template = `<div class="marker-list-content"> - <div class="marker-list-header">请选择点位</div> - <div class="marker-list"> - `; - data.forEach((elem) => { - let _data = elem.data.data; - if (_data.name && _data.locationId) { - template += `<div class="marker-list-item" data-type="${_data.type}" data-id="${_data.locationId}" title="${_data.name}">${_data.name}</div>`; - } - }); - template += `</div></div>`; - return template; }; return null; diff --git a/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx index d123da7..5fafbe7 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx @@ -229,6 +229,7 @@ function ParkingAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportParking({ ...FormDatas, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx index 38c0bc1..fcde1d9 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx @@ -242,7 +242,7 @@ function PayAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportPayFx({ ...FormDatas, - is_excel: 1, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx index a8ad728..5bb41a8 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx @@ -232,6 +232,7 @@ function RegisterAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportRegister({ ...FormDatas, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx index 8bdc018..ac5cba4 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx @@ -76,22 +76,22 @@ function BaseMap(props) { }; }, []); - useEffect(() => { - if (map) { - if (scrollZoom) { - map.scrollWheelZoom.enable(); - } else { - map.scrollWheelZoom.disable(); - } - } - }, [scrollZoom]); + // useEffect(() => { + // if (map) { + // if (scrollZoom) { + // map.scrollWheelZoom.enable(); + // } else { + // map.scrollWheelZoom.disable(); + // } + // } + // }, [scrollZoom]); useEffect(() => { if (map && Option) { AMap.plugin(["AMap.PlaceSearch"], function () { const placeSearch = new AMap.PlaceSearch({ pageSize: 5, // 单页显示结果条数 pageIndex: 1, // 页码 - city: "010", // 兴趣点城市 + city: "0532", // 兴趣点城市 citylimit: true, //是否强制限制在设置的城市内搜索 // map: map, // 展现结果的地图实例 // panel: "panel", // 结果列表将在此容器中进行展示。 diff --git a/src/services/ParkingOverview/index.js b/src/services/ParkingOverview/index.js index 085fc59..9d51308 100644 --- a/src/services/ParkingOverview/index.js +++ b/src/services/ParkingOverview/index.js @@ -44,7 +44,7 @@ export default { //获取位置模糊检索 searchGeocode: (params) => { return ajax({ - url: "https://restapi.amap.com/v3/geocode/geo", + url: "/api/ana/overview/geocode", type: "get", data: params, }); From 6eb00de48801ee9a27f535db0b5a094c9fc47ba2 Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 10:45:52 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AD=97=E6=AE=B5=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapComponets/ParkingViewMarkers/index.jsx | 25 ++++++++++++-- .../MapComponets/ParkingViewMarkers/index.scss | 39 ++++++++++++---------- .../ParkingOverview/loadable.jsx | 2 +- 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/components/MapComponets/ParkingViewMarkers/index.jsx b/src/components/MapComponets/ParkingViewMarkers/index.jsx index 268db19..dde7a2b 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.jsx +++ b/src/components/MapComponets/ParkingViewMarkers/index.jsx @@ -3,6 +3,7 @@ import "./index.scss"; import mgreen from "@/assets/images/equip/home/mark_green.png"; import mgred from "@/assets/images/equip/home/mark_red.png"; import mgyellow from "@/assets/images/equip/home/mark_yellow.png"; +//当前移入点 function Markers(props) { const map = props.__map__; @@ -14,7 +15,6 @@ function Markers(props) { // contentCb, // 生成弹窗显示内容方法事件 clickCb, // 点击事件 } = props; - //当前移入点 var Mapmove = new AMap.Marker({ content: " ", map: map }); const [massLayer, setMassLayer] = useState(null); // 海量点图层 const massLayerRef = useRef(massLayer); @@ -128,7 +128,28 @@ function Markers(props) { _massLayer.on("click", function (e) { clickCb(e.data.option); }); - setMassLayer(_massLayer); + _massLayer.on("mouseover", function (e) { + console.log(e); + Mapmove.setPosition(e.data.lnglat); + Mapmove.setLabel({ + content: `${e.data.name} (${e.data?.option?.userTotal}/${e.data?.option?.berthTotal})`, + }); + // if (position) { + // Mapmove.setContent( + // '<div class="amap-info-window">' + + // position + + // '<div class="amap-info-sharp"></div>' + + // "</div>" + // ); + // Mapmove.setPosition(position); + // // map.add(Mapmove); + // } + }); + + _massLayer.on("mouseout", function () { + // map.remove(Mapmove); + }); + // setMassLayer(_massLayer); _massLayer.setMap(map); }; diff --git a/src/components/MapComponets/ParkingViewMarkers/index.scss b/src/components/MapComponets/ParkingViewMarkers/index.scss index a46817b..50e3f72 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.scss +++ b/src/components/MapComponets/ParkingViewMarkers/index.scss @@ -82,22 +82,27 @@ font-size: 14px; } -.amap-info-window { - width: 150px; - background: #fff; - border-radius: 3px; - padding: 3px 7px; - box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5); - position: relative; -} +// .amap-info-window { +// width: 150px; +// background: #fff; +// border-radius: 3px; +// padding: 3px 7px; +// box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5); +// position: relative; +// } -.amap-info-sharp { - position: absolute; - top: 21px; - bottom: 0; - left: 50%; - margin-left: -8px; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-top: 8px solid #fff; +// .amap-info-sharp { +// position: absolute; +// top: 21px; +// bottom: 0; +// left: 50%; +// margin-left: -8px; +// border-left: 8px solid transparent; +// border-right: 8px solid transparent; +// border-top: 8px solid #fff; +// } +.amap-marker { + .amap-marker-label { + color: #172c4d; + } } \ No newline at end of file diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index f9f34ae..00a4c6f 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -1265,7 +1265,7 @@ function ParkingOverview() { <div className="right_home"> <div> <div className="pkh_title"> - 客诉类受理分析 + 客诉类型分析 <Tooltip placement="bottom" title={ From 20443b9f25714ae0dc45c2b4e410ee163752b969 Mon Sep 17 00:00:00 2001 From: xingjx <xingjx@yisa.com> Date: Fri, 1 Dec 2023 11:36:29 +0800 Subject: [PATCH 03/12] =?UTF-8?q?fix():=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingBusinessAly/CarTypeAly/loadable.jsx | 6 +- .../ParkingBusinessAly/ParkBerthAly/index.scss | 3 + .../ParkingBusinessAly/ParkBerthAly/loadable.jsx | 9 +- .../ParkingAlyPeriod/loadable.jsx | 474 ++++++++++++------- .../ParkingBusinessAly/ParkingAlyReport/index.scss | 381 +++++++++++++++ .../ParkingAlyReport/loadable copy.jsx | 172 +++++++ .../ParkingAlyReport/loadable.jsx | 522 +++++++++++++++++---- .../ParkingLiveData/loadable.jsx | 4 +- .../ParkingBusinessAly/index.js | 10 +- 9 files changed, 1319 insertions(+), 262 deletions(-) create mode 100644 src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable copy.jsx diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx index ea539a5..9440227 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx @@ -26,8 +26,8 @@ function CarTypeAly() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), date_type: '1', - type:'region', - car_parking_type:"3", + type: 'region', + car_parking_type: "3", }; // 分页数据 const [pageInfo, setPageInfo] = useState({ @@ -325,7 +325,7 @@ function CarTypeAly() { const handleExport = () => { if (resultData.list.length > 0) { let { pn, page_size, ...params } = defaultParams; - ajax.getCarTypeAlyListExp(defaultParams).then( + ajax.getCarTypeAlyListExp({ ...defaultParams, export: 1 }).then( (res) => { if (res) { window.open(res.data.export_url) diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/index.scss b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/index.scss index c11bbaf..abee6d9 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/index.scss +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/index.scss @@ -301,6 +301,9 @@ $color-primary : var(--color-primary); background: #3e4557; width: 50%; margin-right: 20px; + .title-text { + margin-left: 20px; + } } .parkBerth-right { diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx index 05cb491..c9623ca 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx @@ -181,8 +181,8 @@ function ParkBerthAly() { let acc = [] data.map((item) => { let acr = [] - acr.push(item.average_duration) acr.push(item.turnover) + acr.push(item.average_duration) acc.push(acr) }) // 构建X轴数据 @@ -238,7 +238,7 @@ function ParkBerthAly() { }, yAxis: { //type: "value", - // name: yAxisName ? yAxisName : '', + name: '小时', axisLine: { show: false, }, @@ -255,6 +255,7 @@ function ParkBerthAly() { //color: ["#3AA9FF", "#F997DF"], series: [ { + name:'平均停车时长', symbolSize: 20, data: acc, type: 'scatter' @@ -304,7 +305,7 @@ function ParkBerthAly() { if (parseInt(res?.status) === 20000) { setResultData(res?.data || {}); if (res.data?.list?.length > 0) { - setBaseData(res?.data?.list[0]) + setBaseData({ ...res?.data?.list[0], all_utilization_rate: res?.data?.all_utilization_rate }) getParkingIncome({ ...postData, ...v, ...pageInfo, road_id: res?.data?.list[0].road_id }) } let maker = [] @@ -381,7 +382,7 @@ function ParkBerthAly() { > <i>?</i> </Tooltip> - <div className="title-text">全部车场日均泊位时长利用率:{ }</div> + <div className="title-text">全部车场日均泊位时长利用率:{baseData.all_utilization_rate || "--"}%</div> <div className="form-search"> <div className="form-item"> <Input diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx index 677ae77..e44d224 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx @@ -22,6 +22,7 @@ function ParkingAlyPeriod() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), date_type: '1', + paytype: '0' }; // 分页数据 const [pageInfo, setPageInfo] = useState({ @@ -50,6 +51,7 @@ function ParkingAlyPeriod() { const [revenueData, setRevenueData] = useState({}); //停车饱和度趋势分析 const [parkData, setParkData] = useState({}); + const [hourData, setHourData] = useState({}); const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 const [sessionTabList, setSessionTabList] = useSessionStorageState('parkingAlyPeriod', { value: { @@ -168,161 +170,15 @@ function ParkingAlyPeriod() { }; //停车饱和趋势分析分析 折线图 const getParkOption = (data) => { - // data = [ - // { - // "hour": 0, - // "occupancy_rate": "0.01%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 1, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 2, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 3, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 4, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 5, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 6, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 7, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 8, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 9, - // "occupancy_rate": "0.1%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 10, - // "occupancy_rate": "0.01%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 11, - // "occupancy_rate": "0.04%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 12, - // "occupancy_rate": "0.06%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 13, - // "occupancy_rate": "0.04%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 14, - // "occupancy_rate": "0.06%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 15, - // "occupancy_rate": "0.01%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 16, - // "occupancy_rate": "0.04%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 17, - // "occupancy_rate": "0.04%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 18, - // "occupancy_rate": "0.07%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 19, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 20, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 21, - // "occupancy_rate": "0.01%", - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 22, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // }, - // { - // "hour": 23, - // "occupancy_rate": 0, - // "charge_type": "2", - // "charge_type_name": "二类区" - // } - // ] - const areaNames = data[0].charge_type_name ? [...new Set(data.map((item) => item.charge_type_name))] : ['']; + let areaNames = data[0].charge_type_name ? [...new Set(data.map((item) => item.charge_type_name))] : ['']; // 获取所有横坐标 - const dates = [...new Set(data.map((item) => item.hour))].sort( + let dates = [...new Set(data.map((item) => item.hour))].sort( (a, b) => a.hour - b.hour ); // 构建数据对象 - const seriesData = areaNames.map((areaName, index) => { + let seriesData = areaNames.map((areaName, index) => { // 获取数据 - const areaData = data[0].charge_type_name ? data.filter((item) => item.charge_type_name === areaName) : data + let areaData = data[0].charge_type_name ? data.filter((item) => item.charge_type_name === areaName) : data // 构建数据对象 return { name: areaName, @@ -336,7 +192,7 @@ function ParkingAlyPeriod() { }, }, data: dates.map((item) => { - for (const { hour, occupancy_rate } of areaData) { + for (var { hour, occupancy_rate } of areaData) { if (hour === item) return parseFloat(occupancy_rate); } return 0; @@ -344,7 +200,7 @@ function ParkingAlyPeriod() { }; }); // 构建X轴数据 - const xAxisData = dates.map((date) => { + let xAxisData = dates.map((date) => { return { value: date, align: "center", @@ -358,7 +214,52 @@ function ParkingAlyPeriod() { setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData)); }; + //停车饱和趋势分析分析 折线图 hour 时间对比 + const getParkOptionHour = (data) => { + let areaNames = data[0].date ? [...new Set(data.map((item) => item.date))] : ['']; + // 获取所有横坐标 + let dates = [...new Set(data.map((item) => item.hour))].sort( + (a, b) => a.hour - b.hour + ); + // 构建数据对象 + let seriesData = areaNames.map((areaName, index) => { + // 获取数据 + let areaData = data[0].date ? data.filter((item) => item.date === areaName) : data + // 构建数据对象 + return { + name: areaName, + type: "line", + itemStyle: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + color: 'white',//字体颜色 + fontSize: 10//字体大小 + }, + }, + data: dates.map((item) => { + for (var { hour, occupancy_rate } of areaData) { + if (hour === item) return parseFloat(occupancy_rate); + } + return 0; + }), + }; + }); + // 构建X轴数据 + let xAxisData = dates.map((date) => { + return { + value: date, + align: "center", + lineStyle: { + color: "skyblue", // 设置线的颜色为天蓝色 + shadowBlur: 6, + }, + + }; + }); + setHourData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData)); + }; function getParkingIncome(data) { ajax .getParkingAlyPeriodLine(data) @@ -374,8 +275,244 @@ function ParkingAlyPeriod() { ajax .getParkingAlyPeriodParkLine(data) .then((res) => { + res = { + "status": 20000, + "message": "success", + "data": { + "list": { + "hour_list": [ + { + "hour": "0", + "occupied_berths": "1", + "total_berths": "7209", + "occupancy_rate": "0.01%", + "date": "2023-10-10" + + }, + { + "hour": "9", + "occupied_berths": "9", + "total_berths": "7209", + "occupancy_rate": "0.12%", + "date": "2023-10-10" + }, + { + "hour": "10", + "occupied_berths": "2", + "total_berths": "7209", + "occupancy_rate": "0.03%", + "date": "2023-10-10" + }, + { + "hour": "11", + "occupied_berths": "2", + "total_berths": "7209", + "occupancy_rate": "0.03%", + "date": "2023-10-10" + }, + { + "hour": "12", + "occupied_berths": "3", + "total_berths": "7209", + "occupancy_rate": "0.04%", + "date": "2023-10-10" + }, + { + "hour": "13", + "occupied_berths": "2", + "total_berths": "7209", + "occupancy_rate": "0.03%", + "date": "2023-10-10" + }, + { + "hour": "14", + "occupied_berths": "3", + "total_berths": "7209", + "occupancy_rate": "0.04%", + "date": "2023-10-11" + }, + { + "hour": "15", + "occupied_berths": "1", + "total_berths": "7209", + "occupancy_rate": "0.01%", + "date": "2023-10-11" + }, + { + "hour": "16", + "occupied_berths": "1", + "total_berths": "7209", + "occupancy_rate": "0.01%", + "date": "2023-10-11" + }, + { + "hour": "17", + "occupied_berths": "1", + "total_berths": "7209", + "occupancy_rate": "0.01%", + "date": "2023-10-11" + }, + { + "hour": "18", + "occupied_berths": "4", + "total_berths": "7209", + "occupancy_rate": "0.06%", + "date": "2023-10-11" + } + ], + "area_list": [ + { + "hour": 0, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 1, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 2, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 3, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 4, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 5, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 6, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 7, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 8, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 9, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 10, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 11, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 12, + "occupancy_rate": 0, + "charge_type": "", + "charge_type_name": "" + }, + { + "hour": 13, + "occupancy_rate": "0.25%", + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 14, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 15, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 16, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 17, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 18, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 19, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 20, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 21, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 22, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + }, + { + "hour": 23, + "occupancy_rate": 0, + "charge_type": "2", + "charge_type_name": "二类区" + } + ] + } + } + } if (res.status === 20000) { - getParkOption(res.data.list); + getParkOption(res.data.list?.area_list); + getParkOptionHour(res.data.list?.hour_list); + } }) .catch((err) => console.error(err)); @@ -688,6 +825,7 @@ function ParkingAlyPeriod() { <i>?</i> </Tooltip> <ReactEcharts + key="99" option={revenueData} style={{ height: "300px", width: "100%", overflow: "hidden" }} /> @@ -704,7 +842,7 @@ function ParkingAlyPeriod() { <Select className="form-con" placeholder="请选择" - defaultValue={'0'} + //defaultValue={'0'} options={[ { label: '按时间对比', @@ -715,18 +853,32 @@ function ParkingAlyPeriod() { value: '1', }, ]} - value={formData.pay_me} + value={formData.paytype} onChange={(v) => - setFormData({ ...formData, pay_me: v }) + setFormData({ ...formData, paytype: v }) } /> </div> - <ReactEcharts - option={parkData} - style={{ height: "300px", width: "100%", overflow: "hidden" }} - /> - </div> + { + formData.paytype == 0 ? <> + <ReactEcharts + key="1" + option={hourData} + style={{ height: "300px", width: "100%", overflow: "hidden" }} + /> + </> + : + <> + <ReactEcharts + key="2" + option={parkData} + style={{ height: "300px", width: "100%", overflow: "hidden" }} + /> + </> + + } + </div> </div> </div> </div> diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/index.scss b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/index.scss index 1838f71..78857d5 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/index.scss +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/index.scss @@ -1,5 +1,386 @@ @import "@/assets/css/mixin.scss"; + $color-container-bg : var(--color-container-bg); $color-user-list-bg : var(--color-user-list-bg); $color-text : var(--color-text); $color-primary : var(--color-primary); + +.edit-order-inquiry { + display: flex; + padding-top: 10px; + width: 100%; + height: 100%; + overflow-y: auto; + @include scrollBar(var(--color-user-list-bg), #3B97FF); + + .paid-search { + display: block; + width: 375px; + padding: 10px 10px 20px 20px; + + .title { + width: 100%; + font-size: 16px; + font-family: Microsoft YaHei, Microsoft YaHei-Bold; + font-weight: 700; + text-align: left; + color: var(--color-text); + margin-bottom: 20px; + } + + .form-Wrap { + height: calc(100% - 45px); + overflow-y: auto; + scrollbar-width: none; + -ms-overflow-style: none; + + &::-webkit-scrollbar { + display: none; + } + } + + .ant-select-selector, + .ant-picker, + .ant-input { + background-color: var(--color-search-list-item-bg) !important; + box-shadow: none !important; + color: var(--color-search-list-item-value); + border-color: var(--color-search-list-item-bd) !important; + } + + .yisa-search { + width: 100%; + display: flex; + align-items: center; + margin-bottom: 24px; + + label { + color: var(--color-search-list-item-text); + flex: 0 0 27%; + max-width: 27%; + text-align: right; + padding-right: 8px; + + .daf { + display: inline-block; + } + } + + .form-con { + flex: 1; + width: 220px; + } + } + + .form-btn { + display: flex; + flex-flow: row nowrap; + justify-content: space-between; + margin: 40px 0px 0px; + padding: 0 3px; + + .ant-btn+.ant-btn { + margin-left: 10px; + } + + .ant-btn span { + font-size: 16px; + font-family: Microsoft YaHei, Microsoft YaHei-Regular; + font-weight: 400; + text-align: center; + color: #ffffff; + } + + .reset { + width: 90px; + height: 36px; + background: var(--button-default-bg); + } + + .submit { + width: calc(100% - 100px); + height: 36px; + } + } + } + + .ant-btn+.ant-btn { + margin-left: 10px; + } + + .green { + background-color: #67c23a; + border-color: #67c23a; + } + + .soll-result { + overflow: auto; + + .result { + display: block !important; + } + } + + .paid-result { + width: calc(100% - 375px); + padding-bottom: 15px; + padding: 20px; + background: var(--color-user-list-bg); + border-top-left-radius: 20px; + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); + + .result-hd-overview { + color: #ffffff; + //background: #3e4557; + border-radius: 4px; + margin-bottom: 20px; + display: flex; + + .result-header { + height: 108px; + width: 33%; + margin: 0 10px; + display: flex; + align-items: center; + + .result-content { + margin: auto; + + .title { + height: 19px; + font-size: 14px; + font-family: Microsoft YaHei, Microsoft YaHei-Regular; + font-weight: 400; + text-align: center; + color: #DBE5FF; + display: inline-block; + } + + i { + border: 1px solid; + border-radius: 22px; + display: inline-block; + text-align: center; + font-size: 10px; + width: 15px; + cursor: pointer; + } + + .num { + height: 27px; + font-size: 20px; + font-family: Alibaba PuHuiTi, Alibaba PuHuiTi-Bold; + font-weight: 700; + text-align: left; + color: #ffffff; + text-align: center; + } + } + } + + .rea { + background: url("../../../../assets/images/red.png"); + background-size: 100% 100%; + } + + .reb { + background: url("../../../../assets/images/blue.png"); + background-size: 100% 100%; + } + + .rec { + background: url("../../../../assets/images/green.png"); + background-size: 100% 100%; + } + + .red { + background: url("../../../../assets/images/yellow.png"); + background-size: 100% 100%; + } + } + + .result { + @include flex-columns; + + .result-box { + color: #ffffff; + background: #3e4557; + border-radius: 4px; + margin-bottom: 20px; + + .result-box-title { + height: 21px; + font-size: 16px; + font-family: Microsoft YaHei, Microsoft YaHei-Bold; + font-weight: 700; + text-align: left; + margin: 18px 0 18px 18px; + display: inline-block; + + } + + i { + border: 1px solid; + border-radius: 22px; + display: inline-block; + text-align: center; + font-size: 12px; + width: 22px; + cursor: pointer; + } + + .ant-table .ant-table-thead tr th { + background: #3e4557; + } + } + .result-title { + display: inline-block; + p { + display: inline; + margin: 0 5px; + color: #3aa9ff; + font-size: 18px; + } + } + .export-btn { + display: inline-block; + text-align: center; + float: right; + width: 68px; + height: 34px; + line-height: 34px; + background: linear-gradient(180deg, #3aa9ff, #59b7ff); + border-radius: 4px; + margin-right: 15px; + margin-bottom: 10px; + cursor: pointer; + } + .row-head { + height: 32px; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 13px; + + .number-wrapper { + display: inline-flex; + align-items: center; + font-size: 14px; + + .letter { + color: var(--color-text); + font-size: 14px; + } + + .total-number { + color: var(--color-primary); + font-weight: bold; + margin: 0 4px; + font-size: 14px; + } + } + } + + .cc-result-flow { + width: 100%; + height: calc(100% - 34px - 13px); + + .yisa-table { + width: 100%; + height: calc(100% - 32px - 15px); + overflow-y: auto !important; + @include scrollBar(var(--color-user-list-bg), #3B97FF); + + .ant-table-thead { + th { + background: #616b83 !important; + } + } + + .ant-table-tbody { + td { + background: #3E4557 !important; + border-bottom-color: var(--color-table-border-bottom-color); + } + + tr:nth-child(even) { + td { + background: #3E4557 !important; + } + } + } + } + } + } + + } + +} + +.modal-pay-configuration { + + .submitBtn { + text-align: center; + margin: 20px 0 0; + + .ant-btn { + width: 80px; + height: 35px; + border: none; + border-radius: 4px; + + span { + color: #ffffff; + } + } + + .submit { + background: #409eff; + } + + .cancel { + background: var(--button-default-bg); + margin-left: 20px; + } + } +} + +.tab-title { + display: flex; + + .title { + height: 30px; + line-height: 30px; + margin-right: 10px; + } + + .btn { + font-size: 10px; + } +} + +.edit-order-inquiry { + /*定义滚动条高宽及背景 + 高宽分别对应横竖滚动条的尺寸*/ + ::-webkit-scrollbar { + width: 6px; + height: 16px; + background-color: #5c5c5c; +} + +/*定义滚动条轨道 + 内阴影+圆角*/ +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + border-radius: 10px; + background-color: #9da2ab; +} + +/*定义滑块 + 内阴影+圆角*/ +::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + background-color: #3b97ff; +} +} \ No newline at end of file diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable copy.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable copy.jsx new file mode 100644 index 0000000..bf33f98 --- /dev/null +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable copy.jsx @@ -0,0 +1,172 @@ +import React, { useState, useRef, useEffect } from "react"; +import { + message, + Pagination, + Table, + Input, + Space, + Modal, + Button, + Select, + Tabs, + Descriptions, + Timeline +} from "antd"; +import moment from "moment"; +import ajax from '@/services' +import { TableModule } from "@/components"; +import { dictionary } from "@/config/common.js"; +import "./index.scss"; +function ParkingAlyReport() { + const [resultData, setResultData] = useState([]) + const [total, setTotal] = useState(0); + const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 + const columns = [ + { + title: "停车场名称", + dataIndex: "road_name", + key: "road_name", + align: "center", + fixed: "right", + }, + { + title: "泊位总数", + dataIndex: "total_berths", + key: "total_berths", + align: "center", + fixed: "right", + }, + { + title: "停车记录数(次)", + dataIndex: "record_count", + key: "record_count", + align: "center", + fixed: "right", + }, + { + title: "订单应收金额(元)", + dataIndex: "receivable_amount", + key: "receivable_amount", + align: "center", + fixed: "right", + }, + { + title: "日均泊位周转次数(次)", + dataIndex: "average_turn_times", + key: "average_turn_times", + align: "center", + fixed: "right", + }, + { + title: "平均泊位利用率", + dataIndex: "average_use_rate", + key: "average_use_rate", + align: "center", + fixed: "right", + }, + { + title: "平均停车时长", + dataIndex: "average_park_time", + key: "average_park_time", + align: "center", + fixed: "right", + }, + ]; + + //检索条件 + const formSearch = [ + { + name: "area_id", + type: "TreeSelect", + label: "区域", + }, + { + name: "operator_id", + type: "Select", + label: "运营商", + options: searchSelectList || [], + }, + { + name: "car_parking_type", + type: "Select", + label: "车场类型", + options: [ + { + label: '全部', + value: '3', + }, + { + label: '路内车场', + value: '1', + }, + { + label: '路外车场', + value: '2', + }, + ], + }, + { + name: "road_name", + type: "Input", + label: "停车场", + placeholder: "请输入停车场名称", + }, + { + name: "timePeriod", + type: "RangePicker", + label: "时间段", + defaultValue: [moment().startOf("day"), moment()], + }, + ]; + + //列表数据 + function search(e) { + ajax.getParkingAlyReportList(e).then((res) => { + let { status, data, total } = res + if (status == 20000) { + if (data.list) { + setResultData(data.list) + setTotal(data.total_records) + } else { + setResultData(data) + setTotal(total) + } + } else { + setResultData([]) + message.error(res.message) + } + }) + } + + // 获取下拉数据 + const getSelectList = () => { + ajax.getOperator().then((e) => { + setSearchSelectList([ + ...searchSelectList, + ...e.data + ]) + }) + }; + + useEffect(() => { + getSelectList(); + }, []); + + return ( + <> + <TableModule + columns={columns} + tableData={resultData} + formSearch={formSearch} + search={search} + total={total} + rowKey={"road_name"} + exportUrl={'/api/ana/dataanalysis/parking_total_analysis_export'} + initFormData={{}} + pageName={'parkingAlyReport'} + /> + </> + ); +} + +export default ParkingAlyReport; \ No newline at end of file diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx index bf33f98..553e1a5 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx @@ -1,26 +1,88 @@ -import React, { useState, useRef, useEffect } from "react"; -import { - message, - Pagination, - Table, - Input, - Space, - Modal, - Button, - Select, - Tabs, - Descriptions, - Timeline -} from "antd"; +import React, { useState, useEffect } from "react"; +import { ResultFlowResult, DataSelect } from "@/components"; +import { Select, Input, Button, Table, message, Pagination, Tabs, DatePicker, Modal, Cascader, Tooltip } from "antd"; +import { useSessionStorageState } from "ahooks"; +import { lineChartOption, ringChartOption } from "../echarts.config"; +import { dictionary } from "@/config/common" +import { useNavigate } from "react-router-dom"; +import { setTabList } from "@/store/common.js"; +import { useSelector, useDispatch } from "react-redux"; +import { QuestionCircleFilled } from "@ant-design/icons" +import { Icon } from "@/components" import moment from "moment"; -import ajax from '@/services' -import { TableModule } from "@/components"; -import { dictionary } from "@/config/common.js"; +import ReactEcharts from "echarts-for-react"; import "./index.scss"; +import ajax from "@/services"; function ParkingAlyReport() { - const [resultData, setResultData] = useState([]) - const [total, setTotal] = useState(0); + // session缓存 + const [defaultParams, setDefaultParams] = useSessionStorageState( + "formData_parkingAlyReport", + { defaultValue: null } + ); + //区域的下拉数据 + const [areaList, setAreaList] = useState([]); + // 默认数据 + const defaultData = { + start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), + end_time: moment().endOf("day").format("YYYY-MM-DD"), + date_type: '1', + //car_parking_type: '3', + }; + // 分页数据 + const [pageInfo, setPageInfo] = useState({ + pn: 1, + page_size: 15 + }); + // 表单数据 + const [formData, setFormData] = useState({ + ...defaultData, + ...defaultParams, + }); + // 搜索提交数据-存储 + const [holdData, setHoldData] = useState(formData); + // 访问接口,isAjax改变时执行 + const [isAjax, setIsAjax] = useState(false); + // 检索按钮加载状态 + const [loading, setLoading] = useState(false); + // 表格加载状态 + const [tabLoading, setTabLoading] = useState(false); + // 表格返回数据 + const [resultData, setResultData] = useState({ + total_records: 0, + list: [], + }); + + // 停车资源利用率排行榜返回数据 + const [tableData, setTableData] = useState({ + list: { + area_list: [], + road_list: [], + }, + area_total_records: "", + road_total_records: "" + }); const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 + const [sessionTabList, setSessionTabList] = useSessionStorageState('parkingAlyReport', { + value: { + } + }) + useEffect(() => { + if (sessionTabList && Object.values(sessionTabList).length > 0) { + setFormData({ + ...formData, ...sessionTabList + }) + getListData({ + ...sessionTabList + }) + } else { + getListData() + } + }, [isAjax]) + useEffect(() => { + setSessionTabList({ + ...formData + }) + }, [formData]) const columns = [ { title: "停车场名称", @@ -72,71 +134,132 @@ function ParkingAlyReport() { fixed: "right", }, ]; - - //检索条件 - const formSearch = [ - { - name: "area_id", - type: "TreeSelect", - label: "区域", - }, - { - name: "operator_id", - type: "Select", - label: "运营商", - options: searchSelectList || [], + const paginationProps = { + className: "pagination-common", + showQuickJumper: true, + showSizeChanger: true, + current: pageInfo.pn, + //total: resultData?.totalRecords, + pageSize: pageInfo.page_size, + pageSizeOptions: Array.from( + new Set([...[15], ...(dictionary?.pageSizeOptions || [])]) + ), + onChange: (current, size) => { + setPageInfo({ + ...pageInfo, + ...{ pn: current, length: size } + }); + //setIsAjax(!isAjax) + getListData({}, { pn: current }) }, - { - name: "car_parking_type", - type: "Select", - label: "车场类型", - options: [ - { - label: '全部', - value: '3', - }, - { - label: '路内车场', - value: '1', - }, - { - label: '路外车场', - value: '2', - }, - ], - }, - { - name: "road_name", - type: "Input", - label: "停车场", - placeholder: "请输入停车场名称", - }, - { - name: "timePeriod", - type: "RangePicker", - label: "时间段", - defaultValue: [moment().startOf("day"), moment()], - }, - ]; + } - //列表数据 - function search(e) { - ajax.getParkingAlyReportList(e).then((res) => { - let { status, data, total } = res - if (status == 20000) { - if (data.list) { - setResultData(data.list) - setTotal(data.total_records) + // 访问接口,获取表格 + // useEffect(() => { + // getData(); + // }, [isAjax]); + //时间状态切换 + const TimeChange = () => { + let e = formData.date_type; + let str = "day"; + let mat = "YYYY-MM-DD"; + if (e == 4) { + str = "year"; + mat = "YYYY"; + } else if (e == 3) { + str = "month"; + mat = "YYYY-MM"; + } else if (e == 2) { + str = "week"; + mat = "YYYY-MM-DD"; + } + return { str, mat }; + }; + //切换时间变化 + const SetTimeNow = (e) => { + let start = ""; + let end = ""; + if (e == 4) { + start = moment().format("YYYY"); + end = moment().format("YYYY"); + } else if (e == 3) { + start = moment().startOf('month').format("YYYY-MM-DD"); + end = moment().endOf("month").format("YYYY-MM-DD"); + } else if (e == 2) { + start = moment().day(1).format("YYYY-MM-DD"); + end = moment().day(7).format("YYYY-MM-DD"); + } else { + start = moment().startOf("day").format("YYYY-MM-DD"); + end = moment().endOf("day").format("YYYY-MM-DD"); + } + setFormData({ + ...formData, + date_type: e, + start_time: start, + end_time: end, + }); + }; + + // 获取排行榜列表数据 + const getListData = (v) => { + let postData = { ...formData }; + if (!loading) { + postData = { ...holdData }; + } + setDefaultParams({ ...postData, ...pageInfo }); + if (moment(formData.end_time) - moment(formData.start_time) > 1000 * 31 * 24 * 3600) { + message.error("时间范围限制为31天!") + setLoading(false); + setTabLoading(false); + return + } + setTabLoading(true); + ajax.getParkingAlyReportList({ ...postData, ...v, ...pageInfo }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + setResultData(res?.data || {}); } else { - setResultData(data) - setTotal(total) + message.error(res?.message); } - } else { - setResultData([]) - message.error(res.message) + setLoading(false); + setTabLoading(false); + }, + (err) => { + console.log(err); + setLoading(false); + setTabLoading(false); } - }) - } + ); + }; + + // 检索数据 + const handleSearch = () => { + setLoading(true); + setPageInfo({ ...pageInfo, ...{ pn: 1 } }); + setHoldData(formData); + setIsAjax(!isAjax); + }; + + // 导出 + const handleExport = () => { + if (resultData?.list?.length > 0) { + let { pn, page_size, ...params } = defaultParams; + ajax.getParkingAlyReportExp(defaultParams).then( + (res) => { + if (res) { + window.open(res.data.export_url) + } else { + message.error(res?.message); + } + }, + (err) => { + console.log(err); + } + ); + } else { + message.error("暂无数据"); + } + }; // 获取下拉数据 const getSelectList = () => { @@ -151,20 +274,237 @@ function ParkingAlyReport() { useEffect(() => { getSelectList(); }, []); - + //区域下拉框数据 + useEffect(() => { + ajax + .getAreaTree() + .then((res) => { + if (res.status === 20000) { + setAreaList(res.data); + } + }) + .catch((err) => { + console.error(err); + }); + }, []); return ( <> - <TableModule - columns={columns} - tableData={resultData} - formSearch={formSearch} - search={search} - total={total} - rowKey={"road_name"} - exportUrl={'/api/ana/dataanalysis/parking_total_analysis_export'} - initFormData={{}} - pageName={'parkingAlyReport'} - /> + <div className="edit-order-inquiry"> + <div className="paid-search"> + <div className="title">查询条件</div> + <div className="form-Wrap"> + <div className="yisa-search"> + <label>区域</label> + <Cascader + className="form-con" + popupClassName="start-exception-deal-cascader" + options={areaList} + placeholder="请选择区域" + expandTrigger="hover" + fieldNames={{ + label: "name", + value: "id", + children: "children", + }} + value={formData.area_id} + onChange={(v, option) => { + setFormData({ ...formData, area_id: v ? v : null }); + }} + /> + </div> + <div className="yisa-search"> + <label>运营商</label> + <Select + className="form-con" + placeholder="请选择" + options={searchSelectList || []} + value={formData.operator_id} + onChange={(v) => + setFormData({ ...formData, operator_id: v }) + } + /> + </div> + <div className="yisa-search"> + <label>车场类型</label> + <Select + className="form-con" + placeholder="请选择车场类型" + options={[ + { + label: '全部', + value: '3', + }, + { + label: '路内车场', + value: '1', + }, + { + label: '路外车场', + value: '2', + }, + ]} + value={formData.car_parking_type} + onChange={(v) => + setFormData({ ...formData, car_parking_type: v }) + } + /> + </div> + <div className="yisa-search"> + <label>停车场</label> + <Input + className="form-con" + placeholder="请输入" + value={formData?.road_name} + onChange={(e) => + setFormData({ ...formData, road_name: e.target.value }) + } + /> + </div> + + <div className="yisa-search"> + <label>日期 + <div className="daf"> + <Select + value={formData.date_type} + // style={{ + // width: "100%", + // }} + placeholder="请选择" + options={[ + { + value: "1", + label: "日", + }, + { + value: "2", + label: "周", + }, + { + value: "3", + label: "月", + }, + ]} + onChange={(e) => SetTimeNow(e)} + /> + </div> + </label> + <DatePicker + style={{ width: "100%" }} + // showTime + format={TimeChange().mat} + picker={TimeChange().str} + allowClear={false} + value={formData.start_time ? moment(formData.start_time) : null} + onChange={(date, dateString) => { + if (TimeChange().str == "week") { + setFormData({ + ...formData, + start_time: date + ? moment(date).day(1).format("YYYY-MM-DD") + : null, + }); + } else if (TimeChange().str == "day") { + if (date > moment(formData.end_time)) { + setFormData({ + ...formData, + end_time: dateString, + start_time: formData.end_time, + }); + } else { + setFormData({ + ...formData, + start_time: dateString, + }); + } + } else if (TimeChange().str == "month") { + setFormData({ ...formData, start_time: moment(date).format("YYYY-MM-DD"), end_time: moment(date).endOf("month").format("YYYY-MM-DD") }); + } else { + setFormData({ ...formData, start_time: dateString }); + } + }} + disabledDate={(current) => current > moment(formData.end_time)} + /> + + </div> + <div className="yisa-search"> + <label>至</label> + <DatePicker + style={{ width: "100%" }} + // showTime + format={TimeChange().mat} + picker={TimeChange().str} + allowClear={false} + value={formData.end_time ? moment(formData.end_time) : null} + onChange={(date, dateString) => { + if (TimeChange().str == "week") { + setFormData({ + ...formData, + end_time: date + ? moment(date).day(7).format("YYYY-MM-DD") + : null, + }); + } else if (TimeChange().str == "day") { + if (date < moment(formData.start_time)) { + setFormData({ + ...formData, + start_time: dateString, + end_time: formData.start_time, + }); + } else { + setFormData({ + ...formData, + end_time: dateString, + }); + } + } else if (TimeChange().str == "month") { + setFormData({ ...formData, start_time: moment(date).startOf('month').format("YYYY-MM-DD"), end_time: moment(date).format("YYYY-MM-DD") }); + } else { + setFormData({ ...formData, end_time: dateString }); + } + }} + disabledDate={(current) => + current < moment(formData.start_time) + } + /> + </div> + + <div className="form-btn"> + <Button + className="reset" + onClick={() => setFormData(defaultData)} + > + 重置 + </Button> + <Button + className="submit" + type="primary" + onClick={handleSearch} + loading={loading} + > + 查询 + </Button> + </div> + </div> + </div> + <div className="paid-result soll-result"> + <div className="result"> + <div className="result-title">共查询到<p>{resultData?.total_records || 0}</p>条结果</div> + <div className="export-btn" onClick={handleExport}>导出</div> + <Table + columns={columns} + dataSource={resultData.list || []} + bordered + size="middle" + pagination={false} + // scroll={{ + // x: 'calc(700px + 50%)', + // y: 240, + // }} + /> + <Pagination {...paginationProps} className="pagination-common" total={resultData?.total_records} /> + </div> + </div> + </div> </> ); } diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx index 2ffec8c..9b7e70e 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx @@ -157,7 +157,7 @@ function ParkingLiveData() { const areaData = data[0].name ? data.filter((item) => item.name === areaName) : data // 构建该地区的数据对象 return { - name: areaNames.length > 1 ? areaName : '', + name: areaNames.length > 1 ? areaName : '占用率', type: "line", itemStyle: { label: { @@ -188,7 +188,7 @@ function ParkingLiveData() { }; }); - setParkingData(lineChartOption(areaNames, xAxisData, "数量(次)", seriesData)); + setParkingData(lineChartOption(areaNames, xAxisData, "泊位占用率", seriesData)); }; //泊位占用率 环形图 const getParkingOption = (data) => { diff --git a/src/services/DataAnalysisPrediction/ParkingBusinessAly/index.js b/src/services/DataAnalysisPrediction/ParkingBusinessAly/index.js index 38a1205..4f97c83 100644 --- a/src/services/DataAnalysisPrediction/ParkingBusinessAly/index.js +++ b/src/services/DataAnalysisPrediction/ParkingBusinessAly/index.js @@ -40,7 +40,14 @@ const getParkingAlyReportList = (params) => { data: params, }); }; - +//停车业务分析-停车场分析报表-导出 +const getParkingAlyReportExp = (params) => { + return ajax({ + url: "/api/ana/dataanalysis/parking_total_analysis_export", + type: "post", + data: params, + }); +}; //停车业务分析-停车时长分析-停车时长分析 柱状图 const getParkingAlyDurationBar = (params) => { return ajax({ @@ -233,6 +240,7 @@ export default { getParkingAlyOverviewList, getParkingAlyReportList, + getParkingAlyReportExp, getParkingAlyDurationBar, getParkingAlyDurationBerthList, From 57d2524f37872a4540fed5962204d7150a15b6c4 Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 11:44:20 +0800 Subject: [PATCH 04/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E8=BD=A6?= =?UTF-8?q?=E5=9C=BA=E4=BF=A1=E6=81=AF=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapComponets/ParkingViewMarkers/index.jsx | 42 ++++++++++++---------- .../ParkingOverview/loadable.jsx | 2 ++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/components/MapComponets/ParkingViewMarkers/index.jsx b/src/components/MapComponets/ParkingViewMarkers/index.jsx index dde7a2b..d55c4b6 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.jsx +++ b/src/components/MapComponets/ParkingViewMarkers/index.jsx @@ -13,6 +13,7 @@ function Markers(props) { iconAnchor = [15, 20], // 图片偏移量 tooltipKey = "name", // 提示信息的key // contentCb, // 生成弹窗显示内容方法事件 + mover = false, clickCb, // 点击事件 } = props; var Mapmove = new AMap.Marker({ content: " ", map: map }); @@ -128,27 +129,30 @@ function Markers(props) { _massLayer.on("click", function (e) { clickCb(e.data.option); }); - _massLayer.on("mouseover", function (e) { - console.log(e); - Mapmove.setPosition(e.data.lnglat); - Mapmove.setLabel({ - content: `${e.data.name} (${e.data?.option?.userTotal}/${e.data?.option?.berthTotal})`, + if (mover) { + _massLayer.on("mouseover", function (e) { + console.log(e); + Mapmove.setPosition(e.data.lnglat); + Mapmove.setLabel({ + content: `${e.data.name} (${e.data?.option?.userTotal}/${e.data?.option?.berthTotal})`, + }); + // if (position) { + // Mapmove.setContent( + // '<div class="amap-info-window">' + + // position + + // '<div class="amap-info-sharp"></div>' + + // "</div>" + // ); + // Mapmove.setPosition(position); + // // map.add(Mapmove); + // } }); - // if (position) { - // Mapmove.setContent( - // '<div class="amap-info-window">' + - // position + - // '<div class="amap-info-sharp"></div>' + - // "</div>" - // ); - // Mapmove.setPosition(position); - // // map.add(Mapmove); - // } - }); - _massLayer.on("mouseout", function () { - // map.remove(Mapmove); - }); + _massLayer.on("mouseout", function () { + map.remove(Mapmove); + }); + } + // setMassLayer(_massLayer); _massLayer.setMap(map); }; diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index 00a4c6f..f1d0acc 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -1064,6 +1064,7 @@ function ParkingOverview() { ); }; useEffect(() => { + setLeftCar(false); setDaySel("1"); setDaySet("1"); setDaySes("1"); @@ -1364,6 +1365,7 @@ function ParkingOverview() { iconAnchor={[15, 20]} // 图片偏移量 tooltipKey={"name"} // 提示信息的key // contentCb, // 生成弹窗显示内容方法事件 + mover={true} clickCb={(ele) => { ClickMap(ele); }} // 点击事件 From 651804ca64136f89ef2c0595e63368d6cef11e2e Mon Sep 17 00:00:00 2001 From: xingjx <xingjx@yisa.com> Date: Fri, 1 Dec 2023 11:52:31 +0800 Subject: [PATCH 05/12] =?UTF-8?q?fix():=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingAlyPeriod/loadable.jsx | 236 +-------------------- .../ParkingBusinessAly/echarts.config.js | 4 +- 2 files changed, 3 insertions(+), 237 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx index e44d224..d6c0173 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx @@ -212,7 +212,7 @@ function ParkingAlyPeriod() { }; }); - setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData)); + setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData,areaNames)); }; //停车饱和趋势分析分析 折线图 hour 时间对比 const getParkOptionHour = (data) => { @@ -275,240 +275,6 @@ function ParkingAlyPeriod() { ajax .getParkingAlyPeriodParkLine(data) .then((res) => { - res = { - "status": 20000, - "message": "success", - "data": { - "list": { - "hour_list": [ - { - "hour": "0", - "occupied_berths": "1", - "total_berths": "7209", - "occupancy_rate": "0.01%", - "date": "2023-10-10" - - }, - { - "hour": "9", - "occupied_berths": "9", - "total_berths": "7209", - "occupancy_rate": "0.12%", - "date": "2023-10-10" - }, - { - "hour": "10", - "occupied_berths": "2", - "total_berths": "7209", - "occupancy_rate": "0.03%", - "date": "2023-10-10" - }, - { - "hour": "11", - "occupied_berths": "2", - "total_berths": "7209", - "occupancy_rate": "0.03%", - "date": "2023-10-10" - }, - { - "hour": "12", - "occupied_berths": "3", - "total_berths": "7209", - "occupancy_rate": "0.04%", - "date": "2023-10-10" - }, - { - "hour": "13", - "occupied_berths": "2", - "total_berths": "7209", - "occupancy_rate": "0.03%", - "date": "2023-10-10" - }, - { - "hour": "14", - "occupied_berths": "3", - "total_berths": "7209", - "occupancy_rate": "0.04%", - "date": "2023-10-11" - }, - { - "hour": "15", - "occupied_berths": "1", - "total_berths": "7209", - "occupancy_rate": "0.01%", - "date": "2023-10-11" - }, - { - "hour": "16", - "occupied_berths": "1", - "total_berths": "7209", - "occupancy_rate": "0.01%", - "date": "2023-10-11" - }, - { - "hour": "17", - "occupied_berths": "1", - "total_berths": "7209", - "occupancy_rate": "0.01%", - "date": "2023-10-11" - }, - { - "hour": "18", - "occupied_berths": "4", - "total_berths": "7209", - "occupancy_rate": "0.06%", - "date": "2023-10-11" - } - ], - "area_list": [ - { - "hour": 0, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 1, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 2, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 3, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 4, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 5, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 6, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 7, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 8, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 9, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 10, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 11, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 12, - "occupancy_rate": 0, - "charge_type": "", - "charge_type_name": "" - }, - { - "hour": 13, - "occupancy_rate": "0.25%", - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 14, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 15, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 16, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 17, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 18, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 19, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 20, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 21, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 22, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - }, - { - "hour": 23, - "occupancy_rate": 0, - "charge_type": "2", - "charge_type_name": "二类区" - } - ] - } - } - } if (res.status === 20000) { getParkOption(res.data.list?.area_list); getParkOptionHour(res.data.list?.hour_list); diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js index 8b694ba..46d4e9f 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js @@ -1,5 +1,5 @@ -const lineChartOption = (areaNames, xAxisData, yAxisName, seriesData) => { +const lineChartOption = (areaNames, xAxisData, yAxisName, seriesData, reName) => { return { title: { text: "", @@ -12,7 +12,7 @@ const lineChartOption = (areaNames, xAxisData, yAxisName, seriesData) => { type: "scroll", top: 0, left: 'center', - data: areaNames.length > 1 ? areaNames : [], + data: areaNames.length > 1 ? areaNames : reName || [], itemWidth: 18, itemHeight: 12, width: '40%', From 8aaf24605761be24b32f33194a13e5b2174db8e9 Mon Sep 17 00:00:00 2001 From: xingjx <xingjx@yisa.com> Date: Fri, 1 Dec 2023 13:09:05 +0800 Subject: [PATCH 06/12] =?UTF-8?q?fix():=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingBusinessAly/ParkingAlyReport/loadable.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx index 553e1a5..fff96cc 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx @@ -201,12 +201,12 @@ function ParkingAlyReport() { }; // 获取排行榜列表数据 - const getListData = (v) => { + const getListData = (v, pn = {}) => { let postData = { ...formData }; if (!loading) { postData = { ...holdData }; } - setDefaultParams({ ...postData, ...pageInfo }); + setDefaultParams({ ...postData, ...pageInfo, ...pn }); if (moment(formData.end_time) - moment(formData.start_time) > 1000 * 31 * 24 * 3600) { message.error("时间范围限制为31天!") setLoading(false); @@ -214,7 +214,7 @@ function ParkingAlyReport() { return } setTabLoading(true); - ajax.getParkingAlyReportList({ ...postData, ...v, ...pageInfo }).then( + ajax.getParkingAlyReportList({ ...postData, ...v, ...pageInfo, ...pn }).then( (res) => { if (parseInt(res?.status) === 20000) { setResultData(res?.data || {}); From 6a2463e5019b206bfb6a0f202cfe9397f6ebba22 Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 13:37:29 +0800 Subject: [PATCH 07/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E7=82=B9?= =?UTF-8?q?=E4=BD=8D=E4=BF=A1=E6=81=AF=E6=9C=AA=E6=AD=A3=E5=B8=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MapComponets/ParkingViewMarkers/index.jsx | 7 +++---- src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/MapComponets/ParkingViewMarkers/index.jsx b/src/components/MapComponets/ParkingViewMarkers/index.jsx index d55c4b6..384ce0f 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.jsx +++ b/src/components/MapComponets/ParkingViewMarkers/index.jsx @@ -131,7 +131,6 @@ function Markers(props) { }); if (mover) { _massLayer.on("mouseover", function (e) { - console.log(e); Mapmove.setPosition(e.data.lnglat); Mapmove.setLabel({ content: `${e.data.name} (${e.data?.option?.userTotal}/${e.data?.option?.berthTotal})`, @@ -148,9 +147,9 @@ function Markers(props) { // } }); - _massLayer.on("mouseout", function () { - map.remove(Mapmove); - }); + // _massLayer.on("mouseout", function () { + // map.remove(Mapmove); + // }); } // setMassLayer(_massLayer); diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index f1d0acc..0fd8ed4 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -360,7 +360,7 @@ function ParkingOverview() { } } else { let dasd = Option.filter((ele) => ele.name == data)[0] || {}; - console.log(data, dasd, Option); + // console.log(data, dasd, Option); setCenter({ lng: dasd?.longitude || "", lat: dasd?.latitude || "", From bd05a15a5e7f7f5cffb73ba6f353f908e43e5413 Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 14:37:46 +0800 Subject: [PATCH 08/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E8=AF=B7=E6=B1=82=E9=A2=91=E7=B9=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index 0fd8ed4..ee1b8fa 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -41,8 +41,8 @@ import Poto from "@/assets/images/equip/home/poto.png"; import BaseMap from "./Map"; // import errorImg from "@/assets/images/layout/error.png" // import { useLocation } from "react-router-dom"; +let timer = null; function ParkingOverview() { - let timer = null; //地图数据展示is const MapS = [ { @@ -408,7 +408,11 @@ function ParkingOverview() { } ); } else { - setWei(data); + clearTimeout(timer); + timer = setTimeout(() => { + setWei(data); + }, 1000); + // ajax.ParkingOverview.searchGeocode({ // key: "a54fb01ed4e07686adc0eddf4e18afd7", // address: data, @@ -742,7 +746,7 @@ function ParkingOverview() { name: "停车收入(元)", min: 0, // /max: 50, - interval: 10, + // interval: 10, // splitNumber: 6, //设置坐标轴的分割段数 axisLabel: { //formatter: "{value}元", From 47311b2d13136d1f9602d3eaf38901caab9963f6 Mon Sep 17 00:00:00 2001 From: guoxin <guoxin@yisa.com> Date: Fri, 1 Dec 2023 15:59:46 +0800 Subject: [PATCH 09/12] =?UTF-8?q?fix():=E5=8F=8D=E9=A6=88=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E5=A2=9E=E5=8A=A0=E6=92=A4=E5=9B=9E=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CallbackSuggestion/index.scss | 50 +++++++++---- .../CallbackSuggestion/loadable.jsx | 84 ++++++++++++++++------ .../OperationCenter/CustomerManage/index.js | 9 +++ 3 files changed, 106 insertions(+), 37 deletions(-) diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss index f2e03ad..ad34a6d 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss +++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss @@ -229,7 +229,7 @@ $color-primary: var(--color-primary); .content { .feedbackMsg { background: #f3e6ca; - width: 65%; + width:1000px; height: 101px; margin-top: 10px; .margin-msg { @@ -245,23 +245,45 @@ $color-primary: var(--color-primary); } } - .reply { - background: #dbf2cb; - width: 65%; - height: 101px; - margin-top: 10px; - .margin-msg { - padding: 10px; - color: black; - .picFlex{ - display: flex; - .pic { - width: 34px; - margin-left: 25px; + .reject{ + .content{ + display: flex; + .reply { + background: #dbf2cb; + width:1000px; + height: 101px; + margin-top: 10px; + .margin-msg { + padding: 10px; + color: black; + .picFlex{ + display: flex; + .pic { + width: 34px; + margin-left: 25px; + } + } } } + .rejectContent{ + line-height: 102px; + margin-left: 20px; + font-size: 18px; + cursor: pointer; + color: #409eff; + } + } + .reapir{ + margin: 20px 500px; + color: gray; + .again{ + margin-left: 10px; + cursor: pointer; + color: #409eff; + } } } + } .text { margin-top: 20px; diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx index a7c3c04..0a279a9 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx +++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx @@ -196,15 +196,15 @@ function CallbackSuggestion(props) { const imgModal = () => { setImgVisible(false) setRepairData({ - content:'', - image:[] + content: '', + image: [] }) } const cancelImg = () => { setImgVisible(false) setRepairData({ - content:'', - image:[] + content: '', + image: [] }) } const getParkId = (record) => { @@ -251,8 +251,8 @@ function CallbackSuggestion(props) { if (lastFormData.page_size === length) { setFormData(Object.assign({}, formData, { pn: pn, page_size: length })) setLastFormData(Object.assign({}, lastFormData, { pn: pn, page_size: length })) - lastFormDataRef.current = Object.assign({}, lastFormData, { pn: pn , page_size: length}) - getData(Object.assign({}, formData, { pn: pn , page_size: length})) + lastFormDataRef.current = Object.assign({}, lastFormData, { pn: pn, page_size: length }) + getData(Object.assign({}, formData, { pn: pn, page_size: length })) } } //切换每页条数 @@ -301,6 +301,24 @@ function CallbackSuggestion(props) { Object.assign({}, repairData, { image: imgUrl }) ); } + //撤回 + const handleReject = (res) => { + let data = { + dialogueId: res.dialogueId, + id: getId + } + ajax.getRejectData(data).then(res => { + if (res.status === 20000) { + console.log(res.data); + setGetImgList(res.data.dialogueDetail) + } + }) + } + const [getAgain, setGetAgain] = useState(true) + const handleAgain = (res) => { + setGetAgain(false) + setRepairData({ content: res.replyContent }) + } const handleRepair = () => { let data = { ...repairData, @@ -316,8 +334,8 @@ function CallbackSuggestion(props) { setGetImg(res.data) setGetImgList(res.data.dialogueDetail) setRepairData({ - content:'', - image:[] + content: '', + image: [] }) } }) @@ -655,29 +673,49 @@ function CallbackSuggestion(props) { <Image src={res} /> ) - }):'' + }) : '' } </div> </div> </div> </div> : - <div className="reply"> - <div className="margin-msg"> - <div className="time">{res.replyTime}</div> - <div className="concent">{res.sysUserName}回复:<span>{res.replyContent}</span></div> - <div className="picFlex"> - {res.answerImgMap.length ? - res.answerImgMap.map(res => { - return ( - <div className="pic"><Image src={res} /></div> - ) - }) - : '' - } + <div className="reject"> + { + res.status == 0 ? <div className="content"> + <div className="reply"> + <div className="margin-msg"> + <div className="time">{res.replyTime}</div> + <div className="concent">{res.sysUserName}回复:<span>{res.replyContent}</span> + </div> + <div className="picFlex"> + {res.answerImgMap.length ? + res.answerImgMap.map(res => { + return ( + <div className="pic"><Image src={res} /></div> + ) + }) + : '' + } + </div> + </div> + </div> + <div className="rejectContent" onClick={() => { handleReject(res) }}>撤回</div> </div> - </div> + : + <> + { + getAgain == true ? + <div className="reapir">你撤回了一条消息 + <span className="again" onClick={() => { handleAgain(res) }}>重新编辑</span> + </div> : '' + } + + </> + } + </div> + } </div> diff --git a/src/services/OperationCenter/CustomerManage/index.js b/src/services/OperationCenter/CustomerManage/index.js index 29737e7..c78d7f0 100644 --- a/src/services/OperationCenter/CustomerManage/index.js +++ b/src/services/OperationCenter/CustomerManage/index.js @@ -81,10 +81,19 @@ const getComplainList = (params) => { data: params, }); }; +//客服管理-反馈建议-撤回 +const getRejectData = (params) => { + return ajax({ + url: "/api/ope/service/withDraw", + type: "get", + data: params, + }); +}; export default{ getCarErrorList, getAppealList, getFeedbackList, + getRejectData, checkFeedData, replyData, dealData, From b982b61b036aff4cb3ce8f83c79f1566760825a1 Mon Sep 17 00:00:00 2001 From: xingjx <xingjx@yisa.com> Date: Fri, 1 Dec 2023 17:19:11 +0800 Subject: [PATCH 10/12] =?UTF-8?q?fix():=E6=97=B6=E9=97=B4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9=EF=BC=8C=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=A1=B5=E9=9D=A2bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DataSelect/index.jsx | 2 +- src/components/TableModule/index.jsx | 38 +++++++++++++--------- .../ParkingBusinessAly/CarTypeAly/loadable.jsx | 2 +- .../ParkingBusinessAly/NightParkStat/loadable.jsx | 2 +- .../ParkTurnoverAly/loadable.jsx | 2 +- .../ParkingBusinessAly/ParkUsageAly/loadable.jsx | 2 +- .../ParkingAlyDuration/loadable.jsx | 2 +- .../ParkingAlyOverview/loadable.jsx | 3 +- .../ParkingAlyPeriod/loadable.jsx | 2 +- .../ParkingAlyReport/loadable.jsx | 2 +- .../TemporaryParkStat/loadable.jsx | 2 +- .../ArrearageRecoverAly/loadable.jsx | 2 +- .../ParkingIncomeAly/CityArrearageAly/loadable.jsx | 2 +- .../ParkingIncomeAly/CityIncomeAly/loadable.jsx | 2 +- .../ParkingIncomeAly/CityIncomeStat/loadable.jsx | 2 +- .../OrderArrearageAly/loadable.jsx | 2 +- .../ParkingIncomeAly/PriceAly/loadable.jsx | 2 +- .../OperationCenter/CarMgm/CarInfo/loadable.jsx | 12 ++++++- .../OperationCenter/UserMgm/UserInfo/index.scss | 5 ++- .../OperationCenter/UserMgm/UserInfo/loadable.jsx | 13 ++++++-- 20 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/components/DataSelect/index.jsx b/src/components/DataSelect/index.jsx index 2a6ef3c..47084a2 100644 --- a/src/components/DataSelect/index.jsx +++ b/src/components/DataSelect/index.jsx @@ -17,7 +17,7 @@ function DataSelect(props) { //时间状态切换 const TimeChange = () => { let e = formData?.date_type||''; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/components/TableModule/index.jsx b/src/components/TableModule/index.jsx index ae32ac0..95929d4 100644 --- a/src/components/TableModule/index.jsx +++ b/src/components/TableModule/index.jsx @@ -53,8 +53,9 @@ const TableModule = forwardRef((props, ref) => { userInfo = {},//用户信息页面数据 valueChange, mandatory, - locale={}, + locale = {}, limitCon,//自定义限制条件 + isQuickMenu = [], mandatory_name, pageName = '',//路由名字 } = props; @@ -197,6 +198,7 @@ const TableModule = forwardRef((props, ref) => { //重置 function reset() { searchForm.resetFields(); + setFormData({}) fetch() } function cascaderChange(value, options) { @@ -488,21 +490,21 @@ const TableModule = forwardRef((props, ref) => { <DatePicker showTime format={"YYYY-MM-DD HH:mm:ss"} allowClear={false} /> </Form.Item> <div style={{ margin: "-20px 0 10px 0" }}> - <QuickMenu - dropdownData={[ - { text: '昨日', value: 1 }, - { text: '今日', value: 0 }, - { text: '近三日', value: 2 }, - { text: '近一周', value: 6 }, - { text: '近一月', value: 29 }, - { text: '近半年', value: 180 }, - { text: '近一年', value: 365 }, - { text: '近两年', value: 730 }, - ]} - onChange={(v) => { - //setDeftime(v); - toDeftime(v, item.defaultName) - }} /> + <QuickMenu + dropdownData={isQuickMenu.length > 0 ? isQuickMenu : [ + { text: '昨日', value: 1 }, + { text: '今日', value: 0 }, + { text: '近三日', value: 2 }, + { text: '近一周', value: 6 }, + { text: '近一月', value: 29 }, + { text: '近半年', value: 180 }, + { text: '近一年', value: 365 }, + { text: '近两年', value: 730 }, + ]} + onChange={(v) => { + //setDeftime(v); + toDeftime(v, item.defaultName) + }} /> </div> </> @@ -581,6 +583,10 @@ const TableModule = forwardRef((props, ref) => { if (form.start_time !== void 0 && form.end_time !== void 0) { form.start_time = moment(form.start_time).format("YYYY-MM-DD HH:mm:ss"); form.end_time = moment(form.end_time).format("YYYY-MM-DD HH:mm:ss"); + if (exportUrl == "/api/ope/record/recharge_export") { //特殊情况,用户信息的充值记录导出 + form.startTime = moment(form.start_time).format("YYYY-MM-DD HH:mm:ss"); + form.endTime = moment(form.end_time).format("YYYY-MM-DD HH:mm:ss"); + } } exportAjax({ url: exportUrl, diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx index 9440227..e168a34 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx @@ -135,7 +135,7 @@ function CarTypeAly() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx index e7a7c09..888437f 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx @@ -184,7 +184,7 @@ function NightParkStat() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx index 314ce7b..0a586e2 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx @@ -115,7 +115,7 @@ function ParkTurnoverAly() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx index a0f55bb..168b23e 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx @@ -112,7 +112,7 @@ function ParkUsageAly() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx index 51b5936..f75ef0f 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx @@ -237,7 +237,7 @@ function ParkingAlyDuration() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx index 32b893b..9085854 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx @@ -186,7 +186,7 @@ function ParkingAlyOverview() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; @@ -533,6 +533,7 @@ function ParkingAlyOverview() { allowClear={false} value={formData.start_time ? moment(formData.start_time) : null} onChange={(date, dateString) => { + console.log(536,date,dateString) if (TimeChange().str == "week") { setFormData({ ...formData, diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx index d6c0173..313c2d6 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx @@ -85,7 +85,7 @@ function ParkingAlyPeriod() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx index fff96cc..fd4b899 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyReport/loadable.jsx @@ -161,7 +161,7 @@ function ParkingAlyReport() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx index ef1c915..1473979 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx @@ -88,7 +88,7 @@ function TemporaryParkStat() { //时间状态切换 const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == 4) { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx index 6227754..854672e 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx @@ -171,7 +171,7 @@ function ArrearageRecoverAly(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx index 8cd0e23..e98f96c 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx @@ -149,7 +149,7 @@ function CityArrearageAly(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeAly/loadable.jsx index be76058..667c208 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeAly/loadable.jsx @@ -191,7 +191,7 @@ function CityIncomeAly(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx index eeeaa8d..4e01155 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx @@ -143,7 +143,7 @@ function CityIncomeStat(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx index f847375..e0d7811 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx @@ -164,7 +164,7 @@ function OrderArrearageAly(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx index f870cba..934414a 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx @@ -140,7 +140,7 @@ function PriceAly(props) { const TimeChange = () => { let e = formData.date_type; - let str = "day"; + let str = "date"; let mat = "YYYY-MM-DD"; if (e == "year") { str = "year"; diff --git a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx index d80c6ac..d99b806 100644 --- a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx +++ b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx @@ -240,7 +240,7 @@ function CarInfo() { name: "timePeriod", type: "RangePicker", label: "时间段", - defaultValue: [moment().subtract(1, "month"), moment()], + defaultValue: [moment().subtract(90, "day"), moment()], }, ]; //退费记录检索条件 @@ -1107,6 +1107,14 @@ function CarInfo() { // searchOther() // }, [tabKey]) + //车辆信息,列表 限制条件 + const limitCon = (e) => { + if (e && moment(e.end_time) - moment(e.start_time) > 90 * 24 * 1000 * 3600) { + console.log(typeof e.order_mount_down, e.order_mount_up, e.order_mount_down > e.order_mount_up) + message.error('查询范围为90天!') + return 1 + } + } return ( <> {tag == 1 ? @@ -1116,6 +1124,8 @@ function CarInfo() { formSearch={formSearch} total={total} search={search} + limitCon={limitCon} + isQuickMenu={[{}]} rowKey={(record) => record.carId} pageName={'carInfo'} /> : diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss index 2c3837a..29d395b 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss +++ b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss @@ -254,13 +254,16 @@ $color-primary: var(--color-primary); } } .ltc-item-bind { - font-size: 18px; + font-size: 16px; margin: 10px 0; display: block; width: 900px; .new-item-bind { display: inline-block; width: 400px; + a { + margin-left: 10px; + } } .ltc-item-input { display: inline-block; diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx index 156d299..5d97ef3 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx +++ b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx @@ -590,6 +590,7 @@ function UserInfo() { }) const [bindData, setBindData] = useState([])//绑定 const [detailData, setDetailData] = useState([])// + const [baseDetailData, setBaseDetailData] = useState()//基本信息详情 const [ycddData, setYcddData] = useState([])//异常订单数据 const [detailVisible, setDetailVisible] = useState(false); const [ltcVisible, setLtcVisible] = useState(false); @@ -655,6 +656,7 @@ function UserInfo() { } //基本信息详情 function searchDetail(e) { + setBaseDetailData({...e}) ajax({ url: "/api/ope/user/get_base_info", type: "get", @@ -691,7 +693,8 @@ function UserInfo() { }).then((res) => { let { status, data, total } = res if (status == 20000) { - + message.success(res.message) + searchDetail(baseDetailData) } else { message.error(res.message) } @@ -972,6 +975,8 @@ function UserInfo() { formSearch={arr} total={total} search={searchOther} + initFormData={exportUrl == "/api/bpm/record/get_record_export" ? { start_time: moment().subtract(1, "month") } : {}} //初始化的表格搜索项 + isExport={exportUrl ? true : false} exportUrl={exportUrl} rowKey={'id'} /> @@ -1146,7 +1151,8 @@ function UserInfo() { createCol(['序号', '区域', '商户名称', '停车场名称', '车场类型', '车牌号', '泊位号', '入场时间', '离场时间', '停车时长', '应收金额', '优惠金额', '实收金额'], ['index', 'region', 'operator', 'road', 'road_type', 'plate', 'berth_id', 'in_time', 'out_time', 'admission_time', 'receivable_amount', 'preferential_amount', 'actual_amount'], 2), [ash[18], ash[0], ash[3], ash[4], ash[2], ash[5], ash[12]], - resultData + resultData, + "/api/bpm/record/get_record_export" ) : null} </Tabs.TabPane> <Tabs.TabPane tab="支付记录" key="3"> @@ -1155,7 +1161,8 @@ function UserInfo() { createCol(['订单ID', '停车场名称', '车牌号', '泊位号', '入场时间', '计费时间', '停车时长', '应收金额', '优惠金额', '实收金额', '支付渠道', '支付设备', '操作人', '付款车场', '支付时间', '第三方流水ID'], ['order_id', 'road', 'plate', 'berth_id', 'admission_time', 'charging_time', 'parking_duration', 'receivable_amount', 'discount_amount', 'paid_in_money', 'payment_channels', 'payment_equipment', 'dealer', 'pay_road', 'pay_time', 'third_party_flow_id'], 3), [ash[18], ash[2], ash[10], ash[15]], - resultData + resultData, + '/api/bpm/record/get_payment_export' ) : null} </Tabs.TabPane> <Tabs.TabPane tab="充值记录" key="4"> From 84bb40b564b5d328b4900bca1d30e3acc49a70a3 Mon Sep 17 00:00:00 2001 From: chenqiang <chenqiang@yisa.com> Date: Fri, 1 Dec 2023 17:29:27 +0800 Subject: [PATCH 11/12] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E5=81=9C?= =?UTF-8?q?=E8=BD=A6=E5=9C=BA=E8=AF=B7=E6=B1=82=E9=A2=91=E7=B9=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingOverview/loadable.jsx | 61 ++++++++++++---------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index ee1b8fa..4229d06 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -377,36 +377,39 @@ function ParkingOverview() { const AutoChangesize = (data) => { if (data) { if (Selectq == "1") { - ajax.ParkingOverview.searchPark({ - type: RoadSelect, - keywords: data, - }).then( - (res) => { - if (parseInt(res?.status) === 20000) { - setOption( - res?.data.map((ele) => { - return { - label: ( - <div className="labds"> - <EnvironmentOutlined /> - <span>{ele.parkName}</span> - </div> - ), - value: ele.parkName, - ...ele, - }; - }) - ); - } else { - message.error(res?.message); + clearTimeout(timer); + timer = setTimeout(() => { + ajax.ParkingOverview.searchPark({ + type: RoadSelect, + keywords: data, + }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + setOption( + res?.data.map((ele) => { + return { + label: ( + <div className="labds"> + <EnvironmentOutlined /> + <span>{ele.parkName}</span> + </div> + ), + value: ele.parkName, + ...ele, + }; + }) + ); + } else { + message.error(res?.message); + } + setLoading(true); + }, + (err) => { + console.log(err); + setLoading(true); } - setLoading(true); - }, - (err) => { - console.log(err); - setLoading(true); - } - ); + ); + }, 1000); } else { clearTimeout(timer); timer = setTimeout(() => { From a781dc78229469057f8850b863be8ab17e71f589 Mon Sep 17 00:00:00 2001 From: xingjx <xingjx@yisa.com> Date: Fri, 1 Dec 2023 17:48:45 +0800 Subject: [PATCH 12/12] =?UTF-8?q?fix():=E4=B8=8B=E6=8B=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx index d99b806..ac33879 100644 --- a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx +++ b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx @@ -211,7 +211,7 @@ function CarInfo() { options: [ { label: "已认证", - value: 0, + value: 2 , }, { label: "未认证",