|
|
@ -10,6 +10,15 @@ import "./index.scss"; |
|
|
|
// import { useLocation } from "react-router-dom"; |
|
|
|
|
|
|
|
function OffPeakParkingRecords() { |
|
|
|
//搜索的结果 |
|
|
|
const [tableData, setTableData] = useState([]); |
|
|
|
const [visible, setVisible] = useState(false) |
|
|
|
const [currentRecord, setCurrentRecord] = useState({}) |
|
|
|
const [bigPic, setBigPic] = useState(); |
|
|
|
const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 |
|
|
|
//搜索的总结果数 |
|
|
|
const [total, setTotal] = useState(0); |
|
|
|
const [parkList, setParkList] = useState([]) |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
title: "停车场名称", |
|
|
@ -74,7 +83,7 @@ function OffPeakParkingRecords() { |
|
|
|
label: "停车场名称", |
|
|
|
placeholder: "请输入", |
|
|
|
name: "park_name", |
|
|
|
roadName:1 |
|
|
|
options: [{label: '全部', value: ""}, ...parkList] |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "Input", |
|
|
@ -90,10 +99,6 @@ function OffPeakParkingRecords() { |
|
|
|
name: "in_out_type", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
value: '0', |
|
|
|
label: '全部' |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: '1', |
|
|
|
label: '入场' |
|
|
|
}, |
|
|
@ -124,20 +129,11 @@ function OffPeakParkingRecords() { |
|
|
|
]; |
|
|
|
//搜索参数初始化 |
|
|
|
const initFormData = { |
|
|
|
merchantName: "0", |
|
|
|
road_name: "", |
|
|
|
parking_num: "", |
|
|
|
operator: "", |
|
|
|
exceedTime: "", |
|
|
|
park_name: "", |
|
|
|
plate: "", |
|
|
|
in_out_type: "1", |
|
|
|
}; |
|
|
|
//搜索的结果 |
|
|
|
const [tableData, setTableData] = useState([]); |
|
|
|
const [visible,setVisible] = useState(false) |
|
|
|
const [currentRecord,setCurrentRecord] = useState({}) |
|
|
|
const [bigPic, setBigPic] = useState(); |
|
|
|
const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 |
|
|
|
//搜索的总结果数 |
|
|
|
const [total, setTotal] = useState(0); |
|
|
|
|
|
|
|
function search(params) { |
|
|
|
ajax.getOffPeakRecords(params).then((res) => { |
|
|
|
if (res.status === 20000) { |
|
|
@ -147,6 +143,20 @@ function OffPeakParkingRecords() { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
const ajaxGetPark = () => { |
|
|
|
ajax.getParkList().then(res => { |
|
|
|
if (res.status == 20000) { |
|
|
|
setParkList([...res.data]) |
|
|
|
} else { |
|
|
|
setParkList([]) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(()=>{ |
|
|
|
ajaxGetPark() |
|
|
|
},[]) |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
<TableModule |
|
|
|