修改分页失效的问题

This commit is contained in:
ChenYi 2025-07-17 08:48:10 +08:00
parent edc6241d7d
commit d55e939e84

View File

@ -219,20 +219,22 @@ const gridOptions: VxeGridProps<any> = {
if (!page) {
return { items: [], totalCount: 0 };
}
// formValuesAPI
const currentFormValues = formValues || (gridApi?.formApi ? await gridApi.formApi.getValues() : {}) || {};
// DeviceTypeIoTDataType
const deviceTypeValue = formValues.DeviceType || DeviceType;
const deviceTypeValue = currentFormValues.DeviceType || DeviceType;
const deviceTypeNumber = deviceTypeValue
? Number(deviceTypeValue)
: undefined;
const ioTDataTypeValue = formValues.IoTDataType;
const ioTDataTypeValue = currentFormValues.IoTDataType;
// DeviceId(10)使focusId
let finalDeviceId = formValues.DeviceId || DeviceId || '';
let finalFocusAddress = formValues.FocusAddress || '';
let finalDeviceId = currentFormValues.DeviceId || DeviceId || '';
let finalFocusAddress = currentFormValues.FocusAddress || '';
// 使
const deviceInfo = selectedDeviceInfo.value || (formValues.DeviceId && deviceOptions.value.length > 0 ? getDeviceInfoById(formValues.DeviceId) : null);
const deviceInfo = selectedDeviceInfo.value || (currentFormValues.DeviceId && deviceOptions.value.length > 0 ? getDeviceInfoById(currentFormValues.DeviceId) : null);
if (deviceInfo) {
finalFocusAddress = deviceInfo.focusAddress || '';
@ -259,7 +261,7 @@ const gridOptions: VxeGridProps<any> = {
DeviceId: finalDeviceId ? finalDeviceId.toString() : '',
FocusAddress: finalFocusAddress || FocusAddress || '',
//
SystemName: formValues.SystemName || SystemName || '',
SystemName: currentFormValues.SystemName || SystemName || '',
IoTDataType: ioTDataTypeValue || undefined,
},
});