diff --git a/src/components/rangeConfigApp/RangeList.vue b/src/components/rangeConfigApp/RangeList.vue index 21c34f0..1eaa449 100644 --- a/src/components/rangeConfigApp/RangeList.vue +++ b/src/components/rangeConfigApp/RangeList.vue @@ -52,28 +52,25 @@ watch( const onRequest: QTable['onRequest'] = async (props) => { const { page, rowsPerPage } = props.pagination; loading.value = true; - let resp; try { - resp = await getDeviceAreaList({ + const resp = await getDeviceAreaList({ lineId, current: page, size: rowsPerPage, areaName: searchAreaName.value, }); - } catch (error) { - errorNotify('没有所查区域名称', ''); - resp = await getDeviceAreaList({ - lineId, - current: page, - size: rowsPerPage, + pagination.value.page = resp.current; + pagination.value.rowsNumber = resp.total; + pagination.value.rowsPerPage = resp.size; + rows.value = resp.records; + } catch (err) { + $q.notify({ + type: 'negative', + message: '无法获取范围列表', }); + } finally { + loading.value = false; } - pagination.value.page = resp.current; - pagination.value.rowsNumber = resp.total; - pagination.value.rowsPerPage = resp.size; - - rows.value = resp.records; - loading.value = false; }; const onDialogShow = () => {