From 52f835d29089c356229b1df1047f24eb0dd58830 Mon Sep 17 00:00:00 2001 From: xingjx Date: Mon, 11 Dec 2023 18:00:43 +0800 Subject: [PATCH] =?UTF-8?q?fix():=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingBusinessAly/CarTypeAly/loadable.jsx | 1 + .../ParkingBusinessAly/NightParkStat/loadable.jsx | 1 + .../ParkTurnoverAly/loadable.jsx | 1 + .../ParkingBusinessAly/ParkUsageAly/loadable.jsx | 1 + .../ParkingAlyDuration/loadable.jsx | 3 ++- .../ParkingAlyOverview/loadable.jsx | 1 + .../ParkingAlyPeriod/loadable.jsx | 24 ++++++++++++++++------ .../ParkingLiveData/loadable.jsx | 1 + .../TemporaryParkStat/loadable.jsx | 1 + .../ParkingBusinessAly/echarts.config.js | 22 ++++++++++++++++---- .../OperationCenter/UserMgm/UserInfo/index.scss | 1 + .../OutParkingRecordInquiry/loadable.jsx | 2 +- .../OutBusinessRecord/OutPayOrders/loadable.jsx | 15 +++++++++++++- .../OutSegmentMgm/ChargeRulesMgm/AddModal.jsx | 2 +- .../OutSegment/ConfigParking/MSPages.jsx | 1 + 15 files changed, 63 insertions(+), 14 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx index 03058ff..e17215b 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx @@ -27,6 +27,7 @@ function CarTypeAly() { end_time: moment().endOf("day").format("YYYY-MM-DD"), date_type: '1', type: 'region', + operator_id:'0', car_parking_type: "3", }; // 分页数据 diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx index 6ed4ee2..744537a 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/NightParkStat/loadable.jsx @@ -26,6 +26,7 @@ function NightParkStat() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), car_parking_type:'3', + operator_id:'0', date_type: '1', }; // 分页数据 diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx index a31981c..8458307 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx @@ -26,6 +26,7 @@ function ParkTurnoverAly() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), date_type: '1', // + operator_id:'0', car_parking_type: '3' }; // 分页数据 diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx index cc77f84..541ccfb 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkUsageAly/loadable.jsx @@ -27,6 +27,7 @@ function ParkUsageAly() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), car_parking_type: '3', + operator_id:'0', date_type: '1', // }; // 分页数据 diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx index d7f00bb..72bf527 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyDuration/loadable.jsx @@ -26,6 +26,7 @@ function ParkingAlyDuration() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), car_parking_type: '3', + operator_id:'0', date_type: '1', //date_type: 1, }; @@ -418,7 +419,7 @@ function ParkingAlyDuration() { }, xAxis: { //data: xAxisData, - data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], + data: ['0-1小时','1-2小时','2-3小时','3-4小时','4-5小时','5-6小时','6-7小时','7-8小时','8-9小时','9-10小时','10-11小时','11-12小时','12-13小时','13-14小时','14-15小时','15-16小时','16-17小时','17-18小时','18-19小时','19-20小时','20-21小时','21-22小时','22-23小时','23-24小时'], type: 'category', axisLine: { lineStyle: { diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx index 97f85c7..5bc688d 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyOverview/loadable.jsx @@ -26,6 +26,7 @@ function ParkingAlyOverview() { const defaultData = { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), + operator_id:'0', date_type: '1', car_parking_type: '3', }; diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx index 08c9dcf..9f72c0c 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx @@ -21,7 +21,8 @@ function ParkingAlyPeriod() { const defaultData = { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), - car_parking_type:'3', + operator_id: '0', + car_parking_type: '3', date_type: '1', paytype: '0' }; @@ -48,7 +49,7 @@ function ParkingAlyPeriod() { total: 0, list: [], }); - const [keyVal,setKeyVal] = useState() + const [keyVal, setKeyVal] = useState() //出入场车流量分析 const [revenueData, setRevenueData] = useState({}); //停车饱和度趋势分析 @@ -131,7 +132,7 @@ function ParkingAlyPeriod() { setRevenueData({}) return } - const areaNames = data[0].name ? [...new Set(data.map((item) => item.name))] : [ '出场车次','入场车次']; + const areaNames = data[0].name ? [...new Set(data.map((item) => item.name))] : ['出场车次', '入场车次']; // 获取所有横坐标 const dates = [...new Set(data.map((item) => item.hour))].sort( (a, b) => a.hour - b.hour @@ -172,7 +173,12 @@ function ParkingAlyPeriod() { }; }); - setRevenueData(lineChartOption(areaNames, xAxisData, "车次数(个)", seriesData)); + setRevenueData({...lineChartOption(areaNames, xAxisData, "车次数(个)", seriesData), + tooltip: { + trigger: "axis", + //formatter: "{a}
{b}:{c}", + }, + }); }; //停车饱和趋势分析分析 折线图 const getParkOption = (data) => { @@ -225,7 +231,7 @@ function ParkingAlyPeriod() { }; }); - setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData,areaNames)); + setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData, areaNames)); }; //停车饱和趋势分析分析 折线图 hour 时间对比 const getParkOptionHour = (data) => { @@ -276,7 +282,13 @@ function ParkingAlyPeriod() { }; }); - setHourData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData)); + setHourData({ + ...lineChartOption(areaNames, xAxisData, "饱和度", seriesData), + // tooltip: { + // trigger: "axis", + // formatter: "{a}
{b}:{c}", + // }, + }); }; function getParkingIncome(data) { ajax diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx index c997ebc..996dcec 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingLiveData/loadable.jsx @@ -26,6 +26,7 @@ function ParkingLiveData() { const defaultData = { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), + operator_id:'0', }; // 分页数据 const [pageInfo, setPageInfo] = useState({ diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx index edc780e..9230eff 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/TemporaryParkStat/loadable.jsx @@ -26,6 +26,7 @@ function TemporaryParkStat() { start_time: moment().subtract('days').startOf('day').format("YYYY-MM-DD"), end_time: moment().endOf("day").format("YYYY-MM-DD"), car_parking_type:'3', + operator_id:'0', date_type: '1', } // 分页数据 diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js index c9f1679..330255d 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/echarts.config.js @@ -16,10 +16,24 @@ const lineChartOption = (areaNames, xAxisData, yAxisName, seriesData, reName) => itemWidth: 18, itemHeight: 12, width: '40%', + // textStyle: { + // fontSize: 14, + // color: 'white', + // }, + formatter: [ + '{a|{name}}' + ].join('\n'), textStyle: { fontSize: 14, color: 'white', - } + rich: { + a: { + width: 55, + fontSize: 12, + lineHeight: 12 + } + }, + }, }, xAxis: { data: xAxisData, @@ -98,10 +112,10 @@ const ringChartOption = (areaNames, ringData, formatter) => { formatter: formatter ? formatter : '{b}:{d}%', rich: { time: { - fontSize: 10, - color: '#999' + fontSize: 10, + color: '#999' } - } + } }, emphasis: { label: { diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss index 29d395b..f04894d 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss +++ b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss @@ -258,6 +258,7 @@ $color-primary: var(--color-primary); margin: 10px 0; display: block; width: 900px; + font-size: 14px; .new-item-bind { display: inline-block; width: 400px; diff --git a/src/pages/OutRoadMgm/OutBusinessRecord/OutParkingRecordInquiry/loadable.jsx b/src/pages/OutRoadMgm/OutBusinessRecord/OutParkingRecordInquiry/loadable.jsx index 11e6763..8316e02 100644 --- a/src/pages/OutRoadMgm/OutBusinessRecord/OutParkingRecordInquiry/loadable.jsx +++ b/src/pages/OutRoadMgm/OutBusinessRecord/OutParkingRecordInquiry/loadable.jsx @@ -105,7 +105,7 @@ function OutParkingRecordInquiry() { placeholder: "请选择商户名称", }, { - name: "parking_lot", + name: "road", type: "Input", label: "停车场名称", placeholder: "请选择停车场名称", diff --git a/src/pages/OutRoadMgm/OutBusinessRecord/OutPayOrders/loadable.jsx b/src/pages/OutRoadMgm/OutBusinessRecord/OutPayOrders/loadable.jsx index cf7c4a2..81875a1 100644 --- a/src/pages/OutRoadMgm/OutBusinessRecord/OutPayOrders/loadable.jsx +++ b/src/pages/OutRoadMgm/OutBusinessRecord/OutPayOrders/loadable.jsx @@ -6,6 +6,7 @@ import { message, Pagination, Table, Space, Modal, Button } from "antd"; import ajax from "@/services"; import { TableModule } from "@/components"; import "./index.scss"; +import moment from "moment"; function OutPayOrders() { const columns = [ { @@ -148,7 +149,18 @@ function OutPayOrders() { } }); } - + //限制条件 + const limitCon = (e) => { + console.log(e, moment(e.end_time) - moment(e.start_time) > 90 * 24 * 1000 * 3600) + if (moment(e.end_time) - moment(e.start_time) > 31 * 24 * 1000 * 3600 && !e.plate && !e.road && (!e.payment_channels || e.payment_channels == 0) && (!e.payment_equipment || e.payment_equipment == 0)) { + message.error('全部数据搜索时间段不超过31天!') + return 1 + } + if (moment(e.end_time) - moment(e.start_time) > 90 * 24 * 1000 * 3600 && !e.plate) { + message.error('请输入要检索的车牌号!') + return 1 + } + } return ( <> diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx index 995379f..34f4d99 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx @@ -35,7 +35,7 @@ function AddModal(props) { }, ]; } else { - return record.property.rules.map((item) => { + return record.property.rules?.map((item) => { item.key = Math.floor(Math.random() * 1000).toString() + Date.now().toString().substring(0, 6); diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/MSPages.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/MSPages.jsx index 2202e5e..08e385e 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/MSPages.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/MSPages.jsx @@ -52,6 +52,7 @@ function MSPages(props) { }); //提交编辑接口 const commitMS = () => { + console.log(form.validateFields()) form .validateFields() .then((res) => {