diff --git a/src/components/Export/ExportBtnNew/index.jsx b/src/components/Export/ExportBtnNew/index.jsx index 4dd006b..66c71d2 100644 --- a/src/components/Export/ExportBtnNew/index.jsx +++ b/src/components/Export/ExportBtnNew/index.jsx @@ -171,7 +171,7 @@ function ExportBtn(props) { } else { ajax({ url, type: ajaxType, data: { export_type: checkedType, start, end, isimg:0, ...formData, ...other } }).then((res) => { if (res.status === 20000) { - downloadFile(res.data.url) + downloadFile(res.data.url || res.data.export_url) handleCancel() // setInProcess("2"); // setProcess(res.data?.task_url) diff --git a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx index d49e58d..237874a 100644 --- a/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx @@ -194,7 +194,7 @@ const ModalDetail = (props) => { }) const [pageInfo, setPageInfo] = useState({ pn: 1, - length: 10 + length: 15 }) const tableColumns = [ @@ -232,19 +232,28 @@ const ModalDetail = (props) => { const paginationProps = { className: "pagination-common", - showQuickJumper: true, + // showQuickJumper: true, showSizeChanger: true, current: pageInfo.pn, + showTotal: (total) => `共 ${total} 条数据`, total: resultData?.totalRecords, pageSize: pageInfo.length, pageSizeOptions: Array.from( new Set([...[15], ...(dictionary?.pageSizeOptions || [])]) ), onChange: (current, size) => { - setPageInfo({ - ...pageInfo, - ...{ pn: current, length: size } - }); + // 切换每页条数 + if (size != pageInfo.length) { + setPageInfo({ + ...pageInfo, + ...{ pn: 1, length: size } + }); + } else { // 翻页 + setPageInfo({ + ...pageInfo, + ...{ pn: current, length: size } + }); + } } } @@ -255,7 +264,7 @@ const ModalDetail = (props) => { setTableLoading(false) setResultData({ list: res.data, - totalRecords: res.totalRecords + totalRecords: Number(res.totalRecords || 0) }) } }) @@ -279,7 +288,7 @@ const ModalDetail = (props) => { className="yisa-modal detail-modal" title={"弹窗详情"} open={visible} - width={700} + width={1100} onCancel={onCancel} onOk={onOk} > @@ -295,7 +304,7 @@ const ModalDetail = (props) => { dataSource={resultData?.list || []} columns={tableColumns} pagination={false} - scroll={{y: 200}} + scroll={{y: 500}} loading={tableLoading} /> diff --git a/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx index 32c9c69..ed25859 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx @@ -413,7 +413,7 @@ function Fence(props) { imgno={false} /> handleUploaded()} diff --git a/src/pages/InRoadMgm/EquipmentMgm/EquipmentBrand/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/EquipmentBrand/loadable.jsx index 12e5974..c0b7dfc 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/EquipmentBrand/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/EquipmentBrand/loadable.jsx @@ -430,7 +430,10 @@ function Fence(props) { @@ -462,7 +465,11 @@ function Fence(props) { @@ -471,7 +478,11 @@ function Fence(props) { diff --git a/src/pages/InRoadMgm/EquipmentMgm/EquipmentStatus/Device/index.jsx b/src/pages/InRoadMgm/EquipmentMgm/EquipmentStatus/Device/index.jsx index 316cf2c..4ae94aa 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/EquipmentStatus/Device/index.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/EquipmentStatus/Device/index.jsx @@ -27,7 +27,7 @@ function Road(props) { device_name: '', device_code: '', pole_position_code: '', - type_id: "0", //设备类型 + type_id: -1, //设备类型 road_name: '', operator: "0", //所属商户 operate_status: -1, //运营状态 diff --git a/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx index 3aac9e3..b0d3578 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx @@ -85,10 +85,13 @@ function Fence(props) { }) } const getBerthDataByNvr = (nvr) => { - ajax.getBerthByNvr(Object.assign({}, {nvr_id: nvr}, editStatus ? {} :{is_bind_monitor_device: 1})).then((e) => { - if (e.status == 20000) { - setBerthData(e.data.map((item) => ({key: item.value, title: item.label}))) - } + return new Promise((resolved, rejected) => { + ajax.getBerthByNvr(Object.assign({}, {nvr_id: nvr}, editStatus ? {} :{is_bind_monitor_device: 1})).then((e) => { + if (e.status == 20000) { + setBerthData(e.data.map((item) => ({key: item.value, title: item.label}))) + resolved() + } + }) }) } const handleDelToServer = (id) => { @@ -108,8 +111,9 @@ function Fence(props) { ...item }) setEditId(item.id) - getBerthDataByNvr(item.nvr_id) - setBerthSelectData(item.berth_ids ? item.berth_ids.split(',').map((v) => v) : []) + getBerthDataByNvr(item.nvr_id).then(() => { + setBerthSelectData(item.berth_ids ? item.berth_ids.split(',').map((v) => v) : []) + }) setEditModalVisible(true) } const editModalCancel = () => { diff --git a/src/pages/SystemMgm/AreaManage/loadable.jsx b/src/pages/SystemMgm/AreaManage/loadable.jsx index 6b504ba..ffcee74 100644 --- a/src/pages/SystemMgm/AreaManage/loadable.jsx +++ b/src/pages/SystemMgm/AreaManage/loadable.jsx @@ -226,9 +226,11 @@ function AreaManage() { areaTree.length ? ( { + onClick: ({key, domEvent}, _) => { if (key == 'add') { - handleOrgAdd(undefined, { level, pid, isTop: false, id, name }) + handleOrgAdd(domEvent, { level, pid, isTop: false, id, name }) } else if (key == 'edit') { - handleOrgEdit(undefined, { level, pid, isTop: true, id, name }) + handleOrgEdit(domEvent, { level, pid, isTop: true, id, name }) } else if (key == 'del') { - handleOrgDel(undefined, { name, id }) + handleOrgDel(domEvent, { name, id }) } } }} @@ -583,7 +583,8 @@ function OrgnizationMgm() {