Commit 2a0425df4aab62d120d01e04156416a43c15138c

Authored by xp.Huang
2 parents 74c987bf 5063b5d3

Merge branch 'ww' into 'main'

fix: RangePicker format is not correct

See merge request huang/yun-teng-iot-front!283
@@ -145,6 +145,7 @@ @@ -145,6 +145,7 @@
145 startTs: Date.now() - 1 * 24 * 60 * 60 * 1000, 145 startTs: Date.now() - 1 * 24 * 60 * 60 * 1000,
146 endTs: Date.now(), 146 endTs: Date.now(),
147 agg: AggregateDataEnum.NONE, 147 agg: AggregateDataEnum.NONE,
  148 + limit: 7,
148 }); 149 });
149 150
150 // 判断对象是否为空 151 // 判断对象是否为空
@@ -10,7 +10,9 @@ @@ -10,7 +10,9 @@
10 baseColProps: { 10 baseColProps: {
11 span: 5, 11 span: 5,
12 }, 12 },
13 - fieldMapToTime: [[SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS]]], 13 + fieldMapToTime: [
  14 + [SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS], 'YYYY-MM-DD HH:mm:ss'],
  15 + ],
14 }); 16 });
15 onMounted(() => { 17 onMounted(() => {
16 emit('register', method); 18 emit('register', method);
1 -import { Moment } from 'moment'; 1 +import moment, { Moment } from 'moment';
2 import { getPacketIntervalByRange, getPacketIntervalByValue, intervalOption } from './helper'; 2 import { getPacketIntervalByRange, getPacketIntervalByValue, intervalOption } from './helper';
3 import { FormSchema } from '/@/components/Form'; 3 import { FormSchema } from '/@/components/Form';
4 import { ColEx } from '/@/components/Form/src/types'; 4 import { ColEx } from '/@/components/Form/src/types';
@@ -86,7 +86,9 @@ export const defaultSchemas: FormSchema[] = [ @@ -86,7 +86,9 @@ export const defaultSchemas: FormSchema[] = [
86 const { setFieldsValue } = formActionType; 86 const { setFieldsValue } = formActionType;
87 let dates: Moment[] = []; 87 let dates: Moment[] = [];
88 return { 88 return {
89 - showTime: true, 89 + showTime: {
  90 + defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')],
  91 + },
90 onCalendarChange(value: Moment[]) { 92 onCalendarChange(value: Moment[]) {
91 dates = value; 93 dates = value;
92 }, 94 },