diff --git a/src/components/Export/ExportBtnNew/index.jsx b/src/components/Export/ExportBtnNew/index.jsx index c79774f..7dfe426 100644 --- a/src/components/Export/ExportBtnNew/index.jsx +++ b/src/components/Export/ExportBtnNew/index.jsx @@ -205,7 +205,7 @@ const ExportBtn = forwardRef((props, ref) => { // } else { // } message.info(res.message) - downloadFile(res.data.url || res.data.export_url) + // downloadFile(res.data.url || res.data.export_url) handleCancel() // 成功 res.data.task_url // setInProcess("2"); diff --git a/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx index c6920fa..1cfd31e 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/BarMgm/loadable.jsx @@ -45,6 +45,7 @@ function Fence(props) { pn: 1, length: Number(pageSizeOptions[0]), // 每页条数 } + const [areaChildIds, setAreaChildIds] = useState([]) const [formData, setFormData] = useState(parameter) const [formExportData, setFormExportData] = useState(parameter) const [lastFormData, setLastFormData] = useState(formData) @@ -56,9 +57,33 @@ function Fence(props) { const [importVisible, setImportVisible] = useState(false) const [importTemplateLink, setImportTemplateLink] = useState("") //区域 - const onChangeList = (value) => { + const onChangeList = (value, options) => { + if (!options) { + setFormData({ + ...formData, + region: value + }) + setAreaChildIds([]) + return + } + let last = options[options.length - 1]; + let res = []; + if (last.children) { + addChild(last, res); + } + res.push(last.id); + setAreaChildIds([...res]) setFormData({ ...formData, region: value }) } + const addChild = (child, res) => { + if (child.children) { + child.children.forEach((item) => { + addChild(item, res); + }) + } else { + res.push(child.id); + } + } const getOperatorData = () => { ajax.getOperator().then((e) => { setStoreData([ @@ -182,7 +207,7 @@ function Fence(props) { // 获取列表数据 const getData = (data = formData) => { setAjaxLoading(true) - ajax.getPoleListData(data).then(res => { + ajax.getPoleListData({...data, region: areaChildIds}).then(res => { setAjaxLoading(false) if (res.status === 20000) { utils.tableScrollTop() @@ -354,6 +379,7 @@ function Fence(props) { options={getCanCaDer} onChange={onChangeList} changeOnSelect + expandTrigger="hover" style={{ width: 260, marginLeft: 42 }} />
diff --git a/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx index c5fba66..219c7d0 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx @@ -173,6 +173,13 @@ function Fence(props) { { title: '泊位号', dataIndex: 'berth_codes', + render: (text) => { + return text.length > 30 ? ( + <> +
{text.slice(0, 30) + '...'}
+ + ) : text + } }, { title: '创建日期', @@ -459,7 +466,7 @@ function Fence(props) { diff --git a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx index 87bca96..8be96e3 100644 --- a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx @@ -2695,7 +2695,6 @@ const SearchPart = forwardRef((props, ref) => { search(params); } async function onOk() { - console.log(121); setSelectedRowKeys([]) const res = await confirmModalData.func(confirmModalData.ids, confirmtype);