diff --git a/src/components/TableModule/index.jsx b/src/components/TableModule/index.jsx
index 0c6064d..7f23c2d 100644
--- a/src/components/TableModule/index.jsx
+++ b/src/components/TableModule/index.jsx
@@ -229,6 +229,14 @@ const TableModule = forwardRef((props, ref) => {
),
}
}
+ if (form.time) {
+ form = {
+ ...form,
+ time: moment(form.time).format(
+ "YYYY-MM-DD"
+ )
+ }
+ }
if (areaName !== null) form[areaName] = areaSelectedList;
if (form.deal_time_start !== void 0 && form.deal_time_end !== void 0) {//暂时写法
form.deal_time_start = moment(form.deal_time_start).format("YYYY-MM-DD HH:mm:ss");
@@ -688,6 +696,19 @@ const TableModule = forwardRef((props, ref) => {
);
break;
+ case "datePicker":
+ children = (
+ <>
+
+
+
+ >
+ )
+ break;
case "RangePicker":
children = (
<>
@@ -816,6 +837,12 @@ const TableModule = forwardRef((props, ref) => {
),
};
}
+ if (form.time) {
+ form = {
+ ...form,
+ time: moment(form.time).format('YYYY-MM-DD')
+ }
+ }
if (areaName !== null) form[areaName] = areaSelectedList;
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");
diff --git a/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/index.scss b/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/index.scss
index e69de29..d5b67b3 100644
--- a/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/index.scss
+++ b/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/index.scss
@@ -0,0 +1,6 @@
+.share-park-btn {
+ color: #02A7F0;
+ &:hover {
+ cursor: pointer;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/loadable.jsx b/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/loadable.jsx
index b69760e..2f795db 100644
--- a/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/loadable.jsx
+++ b/src/pages/OffPeak/OffPeakShareRecords/ShareParkMgm/loadable.jsx
@@ -5,156 +5,116 @@ import { message, Pagination, Table, Space, Modal, Button } from "antd";
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks';
import ajax from "@/services";
import { TableModule } from "@/components";
-// import "./index.scss";
+import "./index.scss";
// import errorImg from "@/assets/images/layout/error.png"
// import { useLocation } from "react-router-dom";
function ShareParkMgm() {
const columns = [
- // {
- // title: "序号",
- // dataIndex: "index",
- // key: "index",
- // align:"center",
- // render: (_, record, index) => {
- // return index + 1;
- // },
- // },
- // {
- // title: "商户名称",
- // dataIndex: "merchantName",
- // align: "center",
- // render: (text, record, index) => (
- // {record.merchantName}
- // )
- // },
- // {
- // title: "操作人",
- // dataIndex: "operator",
- // key: "operator",
- // align: "center",
- // },
- // {
- // title: "车牌号",
- // dataIndex: "licensePlateNumber",
- // align: "center",
- // render: (text, record, index) => (
- // {record.licensePlateNumber}
- // )
- // },
- // {
- // title: "路段",
- // dataIndex: "section",
- // key: "section",
- // align: "center",
- // },
- // {
- // title: "泊位号",
- // dataIndex: "parkingSpotNumber",
- // key: "parkingSpotNumber",
- // align: "center",
- // },
- // {
- // title: "出入场类型",
- // dataIndex: "entryExitType",
- // align: "center",
- // key: "entryExitType",
- // },
- // {
- // title: "出入场时间",
- // dataIndex: "entryExitTime",
- // align: "center",
- // render: (text, record, index) => (
- // {record.entryExitTime}
- // )
- // },
- // {
- // title: "操作时间",
- // dataIndex: "operationTime",
- // align: "center",
- // render: (text, record, index) => (
- // {record.operationTime}
- // )
- // },
- // {
- // title: "间隔时长",
- // dataIndex: "intervalDuration",
- // key: "intervalDuration",
- // align: "center",
- // },
+ {
+ title: "序号",
+ dataIndex: "index",
+ key: "index",
+ align:"center",
+ width: 80,
+ render: (_, record, index) => {
+ return index + 1;
+ },
+ },
+ {
+ title: '停车场名称',
+ dataIndex: 'park_name',
+ align: 'center',
+ },
+ {
+ title: '创建人',
+ dataIndex: 'create_person',
+ align: 'center',
+ },
+ {
+ title: '可预约车位数',
+ dataIndex: 'kyycws',
+ align: 'center',
+ width: 150
+ },
+ {
+ title: '时间规则',
+ dataIndex: 'time_rules',
+ align: 'center',
+ width: 150
+ },
+ {
+ title: '操作',
+ align: 'center',
+ render: (_, record) => {
+ return (
+ <>
+ handleEdit(record)}>修改
+ >
+ )
+ }
+ }
];
const formSearch = [
- // {
- // type: "Select",
- // label: "商户名称",
- // name: "merchantName",
- // placeholder:"请选择商户名称"
- // },
- // {
- // type: "Input",
- // label: "路段",
- // placeholder: "请输入路段",
- // name: "road_name",
- // },
- // {
- // type: "Input",
- // label: "泊位号",
- // placeholder: "请输入泊位号",
- // name: "parking_num",
- // },
- // {
- // type: "Input",
- // label: "操作人",
- // placeholder: "请输入操作人",
- // name: "operator",
- // },
- // {
- // type: "Input",
- // label: "间隔时长大于分钟数",
- // placeholder: "请输入内容",
- // name: "exceedTime",
- // },
- // {
- // type: "RangePicker",
- // label: "操作时间",
- // name: "operationTime",
- // },
+ {
+ type: "Select",
+ label: "商户名称",
+ name: "merchantName",
+ placeholder:"请选择商户名称"
+ },
+ {
+ type: "Input",
+ label: "车场名称",
+ placeholder: "请输入车场名称",
+ name: "parkName",
+ hiddenCount: 1
+ },
+ {
+ type: "Input",
+ label: "创建人",
+ placeholder: "请输入创建人",
+ name: "createPerson",
+ hiddenCount: 1
+ }
];
+
+ const handleEdit = (data) => {
+ console.log(data)
+ }
+
//搜索参数初始化
const initFormData = {
merchantName: "0",
- road_name: "",
- parking_num: "",
- operator: "",
- exceedTime: "",
+ parkName: "",
+ createPerson: ""
};
//搜索的结果
const [tableData, setTableData] = useState([]);
//搜索的总结果数
const [total, setTotal] = useState(0);
function search(params) {
- // ajax.getPDAList(params).then((res) => {
- // if (res.status === 20000) {
- // setTableData(res.data.list);
- // setTotal(res.data.total);
- // }
- // });
+ ajax.getShareParkData(params).then((res) => {
+ if (res.status === 20000) {
+ setTableData(res.data.list);
+ setTotal(res.data.total);
+ }
+ });
}
return (
);
}
diff --git a/src/pages/OffPeak/OffPeakShareRecords/StallCount/loadable.jsx b/src/pages/OffPeak/OffPeakShareRecords/StallCount/loadable.jsx
index 10828b4..3d31406 100644
--- a/src/pages/OffPeak/OffPeakShareRecords/StallCount/loadable.jsx
+++ b/src/pages/OffPeak/OffPeakShareRecords/StallCount/loadable.jsx
@@ -1,7 +1,6 @@
import React, { useState, useRef, useEffect } from "react";
-import { message, Pagination, Table, Space, Modal, Button } from "antd";
// import { dictionary, utils } from "@/config/common";
-// import moment from 'moment'
+import moment from 'moment'
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks';
import ajax from "@/services";
import { TableModule } from "@/components";
@@ -9,152 +8,88 @@ import { TableModule } from "@/components";
// import errorImg from "@/assets/images/layout/error.png"
// import { useLocation } from "react-router-dom";
+
function StallCount() {
const columns = [
- // {
- // title: "序号",
- // dataIndex: "index",
- // key: "index",
- // align:"center",
- // render: (_, record, index) => {
- // return index + 1;
- // },
- // },
- // {
- // title: "商户名称",
- // dataIndex: "merchantName",
- // align: "center",
- // render: (text, record, index) => (
- // {record.merchantName}
- // )
- // },
- // {
- // title: "操作人",
- // dataIndex: "operator",
- // key: "operator",
- // align: "center",
- // },
- // {
- // title: "车牌号",
- // dataIndex: "licensePlateNumber",
- // align: "center",
- // render: (text, record, index) => (
- // {record.licensePlateNumber}
- // )
- // },
- // {
- // title: "路段",
- // dataIndex: "section",
- // key: "section",
- // align: "center",
- // },
- // {
- // title: "泊位号",
- // dataIndex: "parkingSpotNumber",
- // key: "parkingSpotNumber",
- // align: "center",
- // },
- // {
- // title: "出入场类型",
- // dataIndex: "entryExitType",
- // align: "center",
- // key: "entryExitType",
- // },
- // {
- // title: "出入场时间",
- // dataIndex: "entryExitTime",
- // align: "center",
- // render: (text, record, index) => (
- // {record.entryExitTime}
- // )
- // },
- // {
- // title: "操作时间",
- // dataIndex: "operationTime",
- // align: "center",
- // render: (text, record, index) => (
- // {record.operationTime}
- // )
- // },
- // {
- // title: "间隔时长",
- // dataIndex: "intervalDuration",
- // key: "intervalDuration",
- // align: "center",
- // },
+ {
+ title: '日期',
+ dataIndex: 'time',
+ width: 180,
+ align: 'center'
+ },
+ {
+ title: '停车场名称',
+ dataIndex: 'parkName',
+ width: 200,
+ align: 'center'
+ },
+ {
+ title: '总车位数',
+ dataIndex: 'total',
+ width: 200,
+ align: 'center'
+ },
+ {
+ title: '总可预约车位数',
+ dataIndex: 'zkyycws',
+ width: 200,
+ align: 'center'
+ },
+ {
+ title: '已预约车位数',
+ dataIndex: 'yyycws',
+ width: 200,
+ align: 'center'
+ },
+ {
+ title: '剩余可预约车位数',
+ dataIndex: 'sykyycws',
+ width: 200,
+ align: 'center'
+ }
];
const formSearch = [
- // {
- // type: "Select",
- // label: "商户名称",
- // name: "merchantName",
- // placeholder:"请选择商户名称"
- // },
- // {
- // type: "Input",
- // label: "路段",
- // placeholder: "请输入路段",
- // name: "road_name",
- // },
- // {
- // type: "Input",
- // label: "泊位号",
- // placeholder: "请输入泊位号",
- // name: "parking_num",
- // },
- // {
- // type: "Input",
- // label: "操作人",
- // placeholder: "请输入操作人",
- // name: "operator",
- // },
- // {
- // type: "Input",
- // label: "间隔时长大于分钟数",
- // placeholder: "请输入内容",
- // name: "exceedTime",
- // },
- // {
- // type: "RangePicker",
- // label: "操作时间",
- // name: "operationTime",
- // },
+ {
+ type: 'datePicker',
+ label: '时间',
+ name: 'time'
+ },
+ {
+ type: 'Input',
+ label: '车场名称',
+ name: 'parkName',
+ placeholder: '请输入车场名称',
+ hiddenCount: 1
+ }
];
//搜索参数初始化
const initFormData = {
- merchantName: "0",
- road_name: "",
- parking_num: "",
- operator: "",
- exceedTime: "",
+ time: moment().startOf("day"),
+ parkName: ""
};
//搜索的结果
const [tableData, setTableData] = useState([]);
//搜索的总结果数
const [total, setTotal] = useState(0);
function search(params) {
- // ajax.getPDAList(params).then((res) => {
- // if (res.status === 20000) {
- // setTableData(res.data.list);
- // setTotal(res.data.total);
- // }
- // });
+ ajax.getStallCountData(params).then((res) => {
+ if (res.status === 20000) {
+ setTableData(res.data.list);
+ setTotal(res.data.total);
+ }
+ });
}
return (
);
}
diff --git a/src/services/OffPeak/index.js b/src/services/OffPeak/index.js
index 6f33073..8563f03 100644
--- a/src/services/OffPeak/index.js
+++ b/src/services/OffPeak/index.js
@@ -6,6 +6,25 @@ const getBookInfoList = (params) => {
data: params,
});
}
+
+const getStallCountData = (params) => {
+ return ajax({
+ url: "/api/off_peak/park_info/get_park_list",
+ type: "get",
+ data: params,
+ });
+}
+
+const getShareParkData = (params) => {
+ return ajax({
+ url: "/api/off_peak/park_info/get_share_park_list",
+ type: "get",
+ data: params,
+ });
+}
+
export default {
- getBookInfoList
+ getBookInfoList,
+ getStallCountData,
+ getShareParkData
}
\ No newline at end of file