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