Commit 0044234c0698732414bc3455e41c8a80e8b959c7
1 parent
24712623
fix: set date picker range default time range
Showing
3 changed files
with
9 additions
and
5 deletions
@@ -14,9 +14,9 @@ VITE_PUBLIC_PATH = / | @@ -14,9 +14,9 @@ VITE_PUBLIC_PATH = / | ||
14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] | 14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] |
15 | # 线上测试环境 | 15 | # 线上测试环境 |
16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
17 | -# VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] | 17 | +VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] |
18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
19 | -VITE_PROXY = [["/api","http://192.168.10.111:8080/api"],["/thingskit-drawio","http://192.168.10.106:8080/api"]] | 19 | +# VITE_PROXY = [["/api","http://192.168.10.111:8080/api"],["/thingskit-drawio","http://192.168.10.106:8080/api"]] |
20 | 20 | ||
21 | # 实时数据的ws地址 | 21 | # 实时数据的ws地址 |
22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= |
@@ -91,7 +91,9 @@ | @@ -91,7 +91,9 @@ | ||
91 | gutter: 10, | 91 | gutter: 10, |
92 | }, | 92 | }, |
93 | labelWidth: 120, | 93 | labelWidth: 120, |
94 | - fieldMapToTime: [[SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS]]], | 94 | + fieldMapToTime: [ |
95 | + [SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS], 'YYYY-MM-DD HH:ss'], | ||
96 | + ], | ||
95 | submitButtonOptions: { | 97 | submitButtonOptions: { |
96 | loading: loading as unknown as boolean, | 98 | loading: loading as unknown as boolean, |
97 | }, | 99 | }, |
@@ -100,7 +102,6 @@ | @@ -100,7 +102,6 @@ | ||
100 | await method.validate(); | 102 | await method.validate(); |
101 | const value = method.getFieldsValue(); | 103 | const value = method.getFieldsValue(); |
102 | const searchParams = getSearchParams(value); | 104 | const searchParams = getSearchParams(value); |
103 | - | ||
104 | if (!hasDeviceAttr()) return; | 105 | if (!hasDeviceAttr()) return; |
105 | // 发送请求 | 106 | // 发送请求 |
106 | loading.value = true; | 107 | loading.value = true; |
1 | +import moment from 'moment'; | ||
1 | import { Moment } from 'moment'; | 2 | import { Moment } from 'moment'; |
2 | import { getDeviceAttributes } from '/@/api/dataBoard'; | 3 | import { getDeviceAttributes } from '/@/api/dataBoard'; |
3 | import { FormSchema } from '/@/components/Form'; | 4 | import { FormSchema } from '/@/components/Form'; |
@@ -107,7 +108,9 @@ export const formSchema: FormSchema[] = [ | @@ -107,7 +108,9 @@ export const formSchema: FormSchema[] = [ | ||
107 | const { setFieldsValue } = formActionType; | 108 | const { setFieldsValue } = formActionType; |
108 | let dates: Moment[] = []; | 109 | let dates: Moment[] = []; |
109 | return { | 110 | return { |
110 | - showTime: true, | 111 | + showTime: { |
112 | + defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')], | ||
113 | + }, | ||
111 | onCalendarChange(value: Moment[]) { | 114 | onCalendarChange(value: Moment[]) { |
112 | dates = value; | 115 | dates = value; |
113 | }, | 116 | }, |