新增日期查询

This commit is contained in:
ChenYi 2025-07-17 09:21:58 +08:00
parent d55e939e84
commit dafeaf3075
2 changed files with 34 additions and 1 deletions

View File

@ -130,6 +130,8 @@ const formOptions: VbenFormProps = {
'FocusAddress', 'FocusAddress',
'IoTDataType', 'IoTDataType',
'SystemName', 'SystemName',
'StartCreationTime',
'EndCreationTime',
]); ]);
const hasRelevantChange = changedFields.some((field) => const hasRelevantChange = changedFields.some((field) =>
relevantFields.has(field), relevantFields.has(field),
@ -229,6 +231,10 @@ const gridOptions: VxeGridProps<any> = {
const ioTDataTypeValue = currentFormValues.IoTDataType; const ioTDataTypeValue = currentFormValues.IoTDataType;
//
const startCreationTime = currentFormValues.StartCreationTime;
const endCreationTime = currentFormValues.EndCreationTime;
// DeviceId(10)使focusId // DeviceId(10)使focusId
let finalDeviceId = currentFormValues.DeviceId || DeviceId || ''; let finalDeviceId = currentFormValues.DeviceId || DeviceId || '';
let finalFocusAddress = currentFormValues.FocusAddress || ''; let finalFocusAddress = currentFormValues.FocusAddress || '';
@ -261,8 +267,11 @@ const gridOptions: VxeGridProps<any> = {
DeviceId: finalDeviceId ? finalDeviceId.toString() : '', DeviceId: finalDeviceId ? finalDeviceId.toString() : '',
FocusAddress: finalFocusAddress || FocusAddress || '', FocusAddress: finalFocusAddress || FocusAddress || '',
// //
SystemName: currentFormValues.SystemName || SystemName || '', SystemName: currentFormValues.SystemName || SystemName,
IoTDataType: ioTDataTypeValue || undefined, IoTDataType: ioTDataTypeValue || undefined,
//
StartCreationTime: startCreationTime || undefined,
EndCreationTime: endCreationTime || undefined,
}, },
}); });

View File

@ -114,6 +114,30 @@ export const querySchema = computed(() => [
allowClear: true, allowClear: true,
}, },
}, },
// 新增开始时间选择器
{
component: 'DatePicker',
fieldName: 'StartCreationTime',
label: '开始时间',
componentProps: {
placeholder: '开始时间',
format: 'YYYY-MM-DD HH:mm:ss',
showTime: true,
allowClear: true,
},
},
// 新增结束时间选择器
{
component: 'DatePicker',
fieldName: 'EndCreationTime',
label: '结束时间',
componentProps: {
placeholder: '结束时间',
format: 'YYYY-MM-DD HH:mm:ss',
showTime: true,
allowClear: true,
},
},
]); ]);
export const tableSchema: any = computed((): VxeGridProps['columns'] => [ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
{ title: $t('common.seq'), type: 'seq', width: 50 }, { title: $t('common.seq'), type: 'seq', width: 50 },