|
|
@ -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) => ( |
|
|
|
// <div style={{ width: "100px", wordBreak: "break-all" }}>{record.merchantName}</div> |
|
|
|
// ) |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: "操作人", |
|
|
|
// dataIndex: "operator", |
|
|
|
// key: "operator", |
|
|
|
// align: "center", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: "车牌号", |
|
|
|
// dataIndex: "licensePlateNumber", |
|
|
|
// align: "center", |
|
|
|
// render: (text, record, index) => ( |
|
|
|
// <div style={{ width: "100px", wordBreak: "break-all" }}>{record.licensePlateNumber}</div> |
|
|
|
// ) |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// 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) => ( |
|
|
|
// <div style={{ width: "130px", wordBreak: "break-all" }}>{record.entryExitTime}</div> |
|
|
|
// ) |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: "操作时间", |
|
|
|
// dataIndex: "operationTime", |
|
|
|
// align: "center", |
|
|
|
// render: (text, record, index) => ( |
|
|
|
// <div style={{ width: "130px", wordBreak: "break-all" }}>{record.operationTime}</div> |
|
|
|
// ) |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// 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 ( |
|
|
|
<TableModule |
|
|
|
// columns={columns} |
|
|
|
// tableData={tableData} |
|
|
|
// formSearch={formSearch} |
|
|
|
// search={search} |
|
|
|
// total={total} |
|
|
|
// mandatory={'parking_num'} |
|
|
|
// mandatory_name={'泊位号'} |
|
|
|
// pagename="PDA操作记录" |
|
|
|
// pageName={'entryExitOptPDA'} |
|
|
|
// initFormData={initFormData} |
|
|
|
// exportUrl="/api/bpm/record/get_pda_export" |
|
|
|
columns={columns} |
|
|
|
tableData={tableData} |
|
|
|
formSearch={formSearch} |
|
|
|
search={search} |
|
|
|
total={total} |
|
|
|
initFormData={initFormData} |
|
|
|
exportUrl="/api/off_peak/park_info/get_park_list/export" |
|
|
|
/> |
|
|
|
); |
|
|
|
} |
|
|
|