From f5c79f21d6dfd668ebd5a188070dedb1d9fe1714 Mon Sep 17 00:00:00 2001 From: xingjx Date: Wed, 27 Dec 2023 10:51:14 +0800 Subject: [PATCH] =?UTF-8?q?fix():bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableModule/index.jsx | 32 +++++++++---- src/pages/FinancialMgm/PayRecordTotal/loadable.jsx | 4 ++ .../EquipmentMgm/MonitorEquipment/loadable.jsx | 2 +- .../ArrearsRecover/ArrearsCar/loadable.jsx | 6 +-- .../OperationCenter/UserMgm/UserInfo/loadable.jsx | 5 +- .../OutDeviceMgm/OutMonitorMgm/loadable.jsx | 2 +- .../OutSegmentMgm/ChargeRulesMgm/AddModal.jsx | 26 ++++++---- .../OutSegmentMgm/ChargeRulesMgm/TimePart.jsx | 2 +- .../OutSegmentMgm/ChargeRulesMgm/loadable.jsx | 56 ++++++++++++++++------ .../OutSegmentMgm/OutSegment/AddParking.jsx | 47 +++++++++++++++++- .../ConfigParking/CarMgm/BlacklistManagement.jsx | 3 +- .../ConfigParking/CarMgm/WhitelistManagement.jsx | 3 +- .../OutSegment/ConfigParking/CarMgm/index.jsx | 12 ++--- .../OutSegmentMgm/OutSegment/loadable.jsx | 2 +- 14 files changed, 151 insertions(+), 51 deletions(-) diff --git a/src/components/TableModule/index.jsx b/src/components/TableModule/index.jsx index 8a7dfc0..09d88cf 100644 --- a/src/components/TableModule/index.jsx +++ b/src/components/TableModule/index.jsx @@ -574,16 +574,28 @@ const TableModule = forwardRef((props, ref) => { key={item.name} defaultValue={item.defaultValue} > - : + e.parentNode} disabled={isEdit} style={{ width: "40%" }} - options={[ - { - label: "测试", - value: 1, - }, - ]} + options={getNewOperationName} /> diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx index fb89a24..6f6837e 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx @@ -164,7 +164,7 @@ function TimePart(props) { diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx index 4e965bd..5c4c590 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx @@ -89,7 +89,8 @@ function ChargeRulesMgm() {
{ - delChargeRule(record.id); + setUserId(record.id) + setDeleteModal(true) }} > 删除 @@ -135,7 +136,9 @@ function ChargeRulesMgm() { }; //子ref const childRef = useRef(null); - + const [show, setShow] = useState(true); + const [userId, setUserId] = useState(); + const [deleteModal, setDeleteModal] = useState(false); //搜索的结果 const [tableData, setTableData] = useState([]); //搜索的总结果数 @@ -182,11 +185,16 @@ function ChargeRulesMgm() { } //删除计费规则 function delChargeRule(id) { + setShow(false) ajax.delChargeRule({ id }).then((res) => { if (res.status === 20000) { message.success("删除成功"); + setShow(true) research(); } + }).catch(e => { + setShow(true) + console.log(e) }); } //research @@ -205,18 +213,38 @@ function ChargeRulesMgm() { //TODO 调用到子组件的搜索 return ( <> - + { + show ? + + : null + } + { setDeleteModal(false) }} + onOk={() => { delChargeRule(userId); }} + //footer={null} + className="applyCopyModal" + title='提示' + > +
+ 确认是否删除该记录! +
+ {/*
+ + +
*/} +
{addModal.visible && ( { if (res.status === 20000) { setAreaList(res.data); + if (record.area) { + form.setFieldsValue({ area_id: getAreaArr(res.data, record.area) }) + } } }) .catch((err) => { @@ -301,7 +304,7 @@ function AddParking(props) { moment(record.open_end_time, "HH:mm:ss"), ], filings_time: moment(record.filings_time), - area_id: getAreaArr(areaList, record.area), + //area_id: record.area, } : {} } @@ -456,6 +459,48 @@ function AddParking(props) { ); + case 2: + return ( + <> + + + + + + + ); + case 3: + return ( + <> + + + + + + + ); + case 4: + return ( + <> + + + + + + + ); default: child = ( { diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx index dbc31c6..3763dc5 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx @@ -17,7 +17,7 @@ import moment from "moment"; import ajax from "@/services"; const { RangePicker } = DatePicker; const { TextArea } = Input; -function WhitelistManagement() { +function WhitelistManagement({ id }) { const [searchForm] = Form.useForm(); const [editForm] = Form.useForm(); const columns = [ @@ -225,6 +225,7 @@ function WhitelistManagement() { res.id = currentId; ajax.editWhiteVehicle({ ...res, + road_id: id, effective_begin_date: moment(res.effective_date[0]).format("YY-MM-DD HH:mm:ss"), effective_end_date: moment(res.effective_date[1]).format("YY-MM-DD HH:mm:ss") }).then((res) => { diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx index 51ef500..339122a 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx @@ -7,32 +7,32 @@ import OffPeakVehicleManagement from "./OffPeakVehicleManagement"; import BlacklistManagement from "./BlacklistManagement"; import WhitelistManagement from "./WhitelistManagement"; function CarMgm(props) { - const {id} =props + const { id } = props const tabsItems = [ { label: "车辆组管理", key: "1", - children: , + children: , }, { label: "车辆管理", key: "2", - children: , + children: , }, { label: "错峰车辆管理", key: "3", - children: , + children: , }, { label: "黑名单管理", key: "4", - children: , + children: , }, { label: "白名单管理", key: "5", - children: , + children: , }, ]; return ( diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx index 8f684c8..cae903f 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx @@ -150,7 +150,7 @@ function OutSegment() {
{ - console.log(record) + //console.log(record) setEditModal({ ...editModal, visible: true,