Compare commits
No commits in common. "8cbd9cc530beebe6bd12fe919e53af8da5dd27a5" and "a5781829e97003b802af05c7fa96c77a084d9edf" have entirely different histories.
8cbd9cc530
...
a5781829e9
@ -3148,7 +3148,6 @@ export const postTreeModelDeviceDataInfoPage = <
|
||||
ThrowOnError
|
||||
>({
|
||||
...options,
|
||||
...formDataBodySerializer,
|
||||
url: '/TreeModel/DeviceDataInfoPage',
|
||||
});
|
||||
};
|
||||
@ -3181,7 +3180,6 @@ export const postOneNETLogInfoPage = <ThrowOnError extends boolean = false>(
|
||||
ThrowOnError
|
||||
>({
|
||||
...options,
|
||||
...formDataBodySerializer,
|
||||
url: '/TableModel/OneNETLogInfo',
|
||||
});
|
||||
};
|
||||
@ -3198,7 +3196,6 @@ export const postCTWingLogInfoPage = <ThrowOnError extends boolean = false>(
|
||||
ThrowOnError
|
||||
>({
|
||||
...options,
|
||||
...formDataBodySerializer,
|
||||
url: '/TableModel/CTWingLogInfo',
|
||||
});
|
||||
};
|
||||
|
||||
@ -38,26 +38,14 @@ const gridOptions: VxeGridProps<any> = {
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues) => {
|
||||
// 构建查询参数
|
||||
const queryParams: any = {
|
||||
const { data } = await postCTWingLogInfoPage({
|
||||
pageIndex: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
};
|
||||
|
||||
// 如果有表单值,添加到查询参数中
|
||||
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,
|
||||
DeviceType,
|
||||
DeviceId,
|
||||
FocusAddress,
|
||||
...formValues,
|
||||
});
|
||||
|
||||
// 确保返回的数据包含totalCount字段
|
||||
const result = {
|
||||
items: data.items || [],
|
||||
|
||||
@ -172,20 +172,28 @@ const gridOptions: VxeGridProps<any> = {
|
||||
|
||||
// 处理DeviceId,当设备类型为集中器(10)时,使用focusId
|
||||
let finalDeviceId = formValues.DeviceId || DeviceId;
|
||||
let finalFocusAddress = formValues.FocusAddress;
|
||||
if (formValues.DeviceId) {
|
||||
const deviceInfo = getDeviceInfoById(formValues.DeviceId);
|
||||
if (deviceInfo) {
|
||||
finalFocusAddress = deviceInfo.focusAddress;
|
||||
if (deviceTypeNumber === 10) {
|
||||
// 集中器类型使用focusId
|
||||
if (deviceInfo.focusId) {
|
||||
finalDeviceId = deviceInfo.focusId;
|
||||
console.log('设备类型为集中器,使用focusId:', {
|
||||
originalDeviceId: formValues.DeviceId,
|
||||
focusId: deviceInfo.focusId,
|
||||
deviceInfo: deviceInfo,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 其他设备类型使用meterId
|
||||
if (deviceInfo.meterId) {
|
||||
finalDeviceId = deviceInfo.meterId;
|
||||
console.log('设备类型为非集中器,使用meterId:', {
|
||||
originalDeviceId: formValues.DeviceId,
|
||||
meterId: deviceInfo.meterId,
|
||||
deviceInfo: deviceInfo,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,8 +205,8 @@ const gridOptions: VxeGridProps<any> = {
|
||||
pageSize: page.pageSize,
|
||||
// 优先使用表单中的值,如果没有则使用路由参数
|
||||
DeviceType: deviceTypeNumber,
|
||||
DeviceId: finalDeviceId.toString(),
|
||||
FocusAddress: finalFocusAddress || FocusAddress,
|
||||
DeviceId: finalDeviceId,
|
||||
FocusAddress: formValues.FocusAddress || FocusAddress,
|
||||
// 添加其他表单参数
|
||||
SystemName: formValues.SystemName || SystemName,
|
||||
IoTDataType: ioTDataTypeValue,
|
||||
|
||||
@ -38,26 +38,14 @@ const gridOptions: VxeGridProps<any> = {
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues) => {
|
||||
// 构建查询参数
|
||||
const queryParams: any = {
|
||||
const { data } = await postOneNETLogInfoPage({
|
||||
pageIndex: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
};
|
||||
|
||||
// 如果有表单值,添加到查询参数中
|
||||
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,
|
||||
DeviceType,
|
||||
DeviceId,
|
||||
FocusAddress,
|
||||
...formValues,
|
||||
});
|
||||
|
||||
// 确保返回的数据包含totalCount字段
|
||||
const result = {
|
||||
items: data.items || [],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user