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 | 14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] |
| 15 | 15 | # 线上测试环境 |
| 16 | 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 | 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 | 21 | # 实时数据的ws地址 |
| 22 | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | ... | ... |
| ... | ... | @@ -91,7 +91,9 @@ |
| 91 | 91 | gutter: 10, |
| 92 | 92 | }, |
| 93 | 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 | 97 | submitButtonOptions: { |
| 96 | 98 | loading: loading as unknown as boolean, |
| 97 | 99 | }, |
| ... | ... | @@ -100,7 +102,6 @@ |
| 100 | 102 | await method.validate(); |
| 101 | 103 | const value = method.getFieldsValue(); |
| 102 | 104 | const searchParams = getSearchParams(value); |
| 103 | - | |
| 104 | 105 | if (!hasDeviceAttr()) return; |
| 105 | 106 | // 发送请求 |
| 106 | 107 | loading.value = true; | ... | ... |
| 1 | +import moment from 'moment'; | |
| 1 | 2 | import { Moment } from 'moment'; |
| 2 | 3 | import { getDeviceAttributes } from '/@/api/dataBoard'; |
| 3 | 4 | import { FormSchema } from '/@/components/Form'; |
| ... | ... | @@ -107,7 +108,9 @@ export const formSchema: FormSchema[] = [ |
| 107 | 108 | const { setFieldsValue } = formActionType; |
| 108 | 109 | let dates: Moment[] = []; |
| 109 | 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 | 114 | onCalendarChange(value: Moment[]) { |
| 112 | 115 | dates = value; |
| 113 | 116 | }, | ... | ... |