可以正常发起请求
This commit is contained in:
parent
31c6a15aae
commit
598f0d8399
@ -165,61 +165,17 @@ const gridOptions: VxeGridProps<any> = {
|
||||
? Number(deviceTypeValue)
|
||||
: undefined;
|
||||
|
||||
const ioTDataTypeValue = formValues.IoTDataType;
|
||||
const ioTDataTypeNumber = ioTDataTypeValue
|
||||
? Number(ioTDataTypeValue)
|
||||
: undefined;
|
||||
const ioTDataTypeValue = formValues.IoTDataType;
|
||||
|
||||
console.log('=== API调用开始 ===2', ioTDataTypeValue);
|
||||
|
||||
// 处理DeviceId,当设备类型为集中器(10)时,使用focusId
|
||||
let finalDeviceId = formValues.DeviceId || DeviceId;
|
||||
if (deviceTypeNumber === 10 && formValues.DeviceId) {
|
||||
const deviceInfo = getDeviceInfoById(formValues.DeviceId);
|
||||
if (deviceInfo && deviceInfo.focusId) {
|
||||
finalDeviceId = deviceInfo.focusId;
|
||||
console.log('设备类型为集中器,使用focusId:', {
|
||||
originalDeviceId: formValues.DeviceId,
|
||||
focusId: deviceInfo.focusId,
|
||||
deviceInfo,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
console.log('请求参数:', {
|
||||
page,
|
||||
formValues,
|
||||
routeParams: { DeviceType, DeviceId, FocusAddress },
|
||||
typeConversions: {
|
||||
deviceType: {
|
||||
originalValue: deviceTypeValue,
|
||||
convertedValue: deviceTypeNumber,
|
||||
type: typeof deviceTypeNumber,
|
||||
},
|
||||
ioTDataType: {
|
||||
originalValue: ioTDataTypeValue,
|
||||
convertedValue: ioTDataTypeNumber,
|
||||
type: typeof ioTDataTypeNumber,
|
||||
},
|
||||
deviceId: {
|
||||
originalValue: formValues.DeviceId || DeviceId,
|
||||
finalValue: finalDeviceId,
|
||||
isFocusId:
|
||||
deviceTypeNumber === 10 &&
|
||||
formValues.DeviceId &&
|
||||
getDeviceInfoById(formValues.DeviceId)?.focusId,
|
||||
},
|
||||
},
|
||||
finalParams: {
|
||||
...formValues,
|
||||
pageIndex: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
DeviceType: deviceTypeNumber,
|
||||
DeviceId: finalDeviceId,
|
||||
FocusAddress: formValues.FocusAddress || FocusAddress,
|
||||
SystemName: formValues.SystemName,
|
||||
IoTDataType: ioTDataTypeNumber,
|
||||
},
|
||||
});
|
||||
|
||||
let finalDeviceId = 0;
|
||||
const deviceInfo = getDeviceInfoById(formValues.DeviceId);
|
||||
finalDeviceId =
|
||||
deviceTypeNumber === 10 && deviceInfo
|
||||
? deviceInfo.focusId
|
||||
: deviceInfo.meterId;
|
||||
try {
|
||||
const { data } = await postTreeModelDeviceDataInfoPage({
|
||||
body: {
|
||||
@ -232,7 +188,7 @@ const gridOptions: VxeGridProps<any> = {
|
||||
FocusAddress: formValues.FocusAddress || FocusAddress,
|
||||
// 添加其他表单参数
|
||||
SystemName: formValues.SystemName,
|
||||
IoTDataType: ioTDataTypeNumber,
|
||||
IoTDataType: ioTDataTypeValue,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@ export const querySchema = computed(() => [
|
||||
TypeName: 'MeterTypeEnum',
|
||||
},
|
||||
},
|
||||
labelField: 'secondValue',
|
||||
valueField: 'value',
|
||||
labelField: 'value',
|
||||
valueField: 'key',
|
||||
optionsPropName: 'options',
|
||||
immediate: true,
|
||||
afterFetch: (res: any) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user