范围列表修改

This commit is contained in:
joylink_zhaoerwei 2023-09-19 16:23:10 +08:00
parent e54ba3ba51
commit 421fa1e545

View File

@ -52,28 +52,25 @@ watch(
const onRequest: QTable['onRequest'] = async (props) => { const onRequest: QTable['onRequest'] = async (props) => {
const { page, rowsPerPage } = props.pagination; const { page, rowsPerPage } = props.pagination;
loading.value = true; loading.value = true;
let resp;
try { try {
resp = await getDeviceAreaList({ const resp = await getDeviceAreaList({
lineId, lineId,
current: page, current: page,
size: rowsPerPage, size: rowsPerPage,
areaName: searchAreaName.value, areaName: searchAreaName.value,
}); });
} catch (error) { pagination.value.page = resp.current;
errorNotify('没有所查区域名称', ''); pagination.value.rowsNumber = resp.total;
resp = await getDeviceAreaList({ pagination.value.rowsPerPage = resp.size;
lineId, rows.value = resp.records;
current: page, } catch (err) {
size: rowsPerPage, $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 = () => { const onDialogShow = () => {