Commit a8c00b3cae701d4bbbc6a17d25726de6ffe01fe0

Authored by ww
1 parent 8728b6b9

fix: DEFECT-754 history data switch search way send startTs with endTs are same

... ... @@ -42,8 +42,8 @@ export const defaultSchemas: FormSchema[] = [
42 42 { label: '最后', value: QueryWay.LATEST },
43 43 { label: '时间段', value: QueryWay.TIME_PERIOD },
44 44 ],
45   - onChange(value) {
46   - value === QueryWay.LATEST
  45 + onChange(event: ChangeEvent) {
  46 + (event.target as HTMLInputElement).value === QueryWay.LATEST
47 47 ? setFieldsValue({
48 48 [SchemaFiled.DATE_RANGE]: [],
49 49 [SchemaFiled.START_TS]: null,
... ... @@ -129,6 +129,7 @@ export const defaultSchemas: FormSchema[] = [
129 129 field: SchemaFiled.INTERVAL,
130 130 label: '分组间隔',
131 131 component: 'Select',
  132 + rules: [{ required: true, message: '分组间隔为必填项', type: 'number' }],
132 133 ifShow({ values }) {
133 134 return values[SchemaFiled.AGG] !== AggregateDataEnum.NONE;
134 135 },
... ...
... ... @@ -64,8 +64,8 @@ export const formSchema: FormSchema[] = [
64 64 { label: '最后', value: QueryWay.LATEST },
65 65 { label: '时间段', value: QueryWay.TIME_PERIOD },
66 66 ],
67   - onChange(value) {
68   - value === QueryWay.LATEST
  67 + onChange(event: ChangeEvent) {
  68 + (event.target as HTMLInputElement).value === QueryWay.LATEST
69 69 ? setFieldsValue({
70 70 [SchemaFiled.DATE_RANGE]: [],
71 71 [SchemaFiled.START_TS]: null,
... ... @@ -151,6 +151,7 @@ export const formSchema: FormSchema[] = [
151 151 field: SchemaFiled.INTERVAL,
152 152 label: '分组间隔',
153 153 component: 'Select',
  154 + rules: [{ required: true, message: '分组间隔为必填项', type: 'number' }],
154 155 ifShow({ values }) {
155 156 return values[SchemaFiled.AGG] !== AggregateDataEnum.NONE;
156 157 },
... ...