Compare commits

...

3 Commits

Author SHA1 Message Date
ChenYi
8cbd9cc530 修改代码 2025-07-14 17:14:34 +08:00
ChenYi
253caadce8 修改代码 2025-07-14 16:04:42 +08:00
ChenYi
a532440685 修复bug 2025-07-14 15:28:20 +08:00
4 changed files with 41 additions and 22 deletions

View File

@ -3148,6 +3148,7 @@ export const postTreeModelDeviceDataInfoPage = <
ThrowOnError ThrowOnError
>({ >({
...options, ...options,
...formDataBodySerializer,
url: '/TreeModel/DeviceDataInfoPage', url: '/TreeModel/DeviceDataInfoPage',
}); });
}; };
@ -3180,6 +3181,7 @@ export const postOneNETLogInfoPage = <ThrowOnError extends boolean = false>(
ThrowOnError ThrowOnError
>({ >({
...options, ...options,
...formDataBodySerializer,
url: '/TableModel/OneNETLogInfo', url: '/TableModel/OneNETLogInfo',
}); });
}; };
@ -3196,6 +3198,7 @@ export const postCTWingLogInfoPage = <ThrowOnError extends boolean = false>(
ThrowOnError ThrowOnError
>({ >({
...options, ...options,
...formDataBodySerializer,
url: '/TableModel/CTWingLogInfo', url: '/TableModel/CTWingLogInfo',
}); });
}; };

View File

@ -38,14 +38,26 @@ const gridOptions: VxeGridProps<any> = {
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues) => { query: async ({ page }, formValues) => {
const { data } = await postCTWingLogInfoPage({ //
const queryParams: any = {
pageIndex: page.currentPage, pageIndex: page.currentPage,
pageSize: page.pageSize, pageSize: page.pageSize,
DeviceType, };
DeviceId,
FocusAddress, //
...formValues, if (formValues) {
Object.assign(queryParams, formValues);
}
//
if (DeviceType) queryParams.DeviceType = DeviceType;
if (DeviceId) queryParams.DeviceId = DeviceId;
if (FocusAddress) queryParams.FocusAddress = FocusAddress;
const { data } = await postCTWingLogInfoPage({
body: queryParams,
}); });
// totalCount // totalCount
const result = { const result = {
items: data.items || [], items: data.items || [],

View File

@ -172,28 +172,20 @@ const gridOptions: VxeGridProps<any> = {
// DeviceId(10)使focusId // DeviceId(10)使focusId
let finalDeviceId = formValues.DeviceId || DeviceId; let finalDeviceId = formValues.DeviceId || DeviceId;
let finalFocusAddress = formValues.FocusAddress;
if (formValues.DeviceId) { if (formValues.DeviceId) {
const deviceInfo = getDeviceInfoById(formValues.DeviceId); const deviceInfo = getDeviceInfoById(formValues.DeviceId);
if (deviceInfo) { if (deviceInfo) {
finalFocusAddress = deviceInfo.focusAddress;
if (deviceTypeNumber === 10) { if (deviceTypeNumber === 10) {
// 使focusId // 使focusId
if (deviceInfo.focusId) { if (deviceInfo.focusId) {
finalDeviceId = deviceInfo.focusId; finalDeviceId = deviceInfo.focusId;
console.log('设备类型为集中器使用focusId:', {
originalDeviceId: formValues.DeviceId,
focusId: deviceInfo.focusId,
deviceInfo: deviceInfo,
});
} }
} else { } else {
// 使meterId // 使meterId
if (deviceInfo.meterId) { if (deviceInfo.meterId) {
finalDeviceId = deviceInfo.meterId; finalDeviceId = deviceInfo.meterId;
console.log('设备类型为非集中器使用meterId:', {
originalDeviceId: formValues.DeviceId,
meterId: deviceInfo.meterId,
deviceInfo: deviceInfo,
});
} }
} }
} }
@ -205,8 +197,8 @@ const gridOptions: VxeGridProps<any> = {
pageSize: page.pageSize, pageSize: page.pageSize,
// 使使 // 使使
DeviceType: deviceTypeNumber, DeviceType: deviceTypeNumber,
DeviceId: finalDeviceId, DeviceId: finalDeviceId.toString(),
FocusAddress: formValues.FocusAddress || FocusAddress, FocusAddress: finalFocusAddress || FocusAddress,
// //
SystemName: formValues.SystemName || SystemName, SystemName: formValues.SystemName || SystemName,
IoTDataType: ioTDataTypeValue, IoTDataType: ioTDataTypeValue,

View File

@ -38,14 +38,26 @@ const gridOptions: VxeGridProps<any> = {
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues) => { query: async ({ page }, formValues) => {
const { data } = await postOneNETLogInfoPage({ //
const queryParams: any = {
pageIndex: page.currentPage, pageIndex: page.currentPage,
pageSize: page.pageSize, pageSize: page.pageSize,
DeviceType, };
DeviceId,
FocusAddress, //
...formValues, if (formValues) {
Object.assign(queryParams, formValues);
}
//
if (DeviceType) queryParams.DeviceType = DeviceType;
if (DeviceId) queryParams.DeviceId = DeviceId;
if (FocusAddress) queryParams.FocusAddress = FocusAddress;
const { data } = await postOneNETLogInfoPage({
body: queryParams,
}); });
// totalCount // totalCount
const result = { const result = {
items: data.items || [], items: data.items || [],