Commit 008da8888843b0b748d2c2de433d9072c2d81b29
Merge branch 'ft' into 'main_dev'
fix: 修复首页饼状图暗黑切换;公共接口管理新增聚合和最大条数 See merge request yunteng/thingskit-front!573
Showing
11 changed files
with
2663 additions
and
35 deletions
@@ -22,9 +22,12 @@ | @@ -22,9 +22,12 @@ | ||
22 | shallowReactive, | 22 | shallowReactive, |
23 | onUnmounted, | 23 | onUnmounted, |
24 | nextTick, | 24 | nextTick, |
25 | + computed, | ||
26 | + watch, | ||
25 | } from 'vue'; | 27 | } from 'vue'; |
26 | import * as echarts from 'echarts'; | 28 | import * as echarts from 'echarts'; |
27 | import { seriesDataT } from './props'; | 29 | import { seriesDataT } from './props'; |
30 | + import { useAppStore } from '/@/store/modules/app'; | ||
28 | 31 | ||
29 | export default defineComponent({ | 32 | export default defineComponent({ |
30 | props: { | 33 | props: { |
@@ -35,10 +38,29 @@ | @@ -35,10 +38,29 @@ | ||
35 | }, | 38 | }, |
36 | 39 | ||
37 | setup(props) { | 40 | setup(props) { |
41 | + const appStore = useAppStore(); | ||
42 | + const skinName = computed(() => { | ||
43 | + return appStore.getDarkMode === 'light' ? '#ffffff' : '#151515'; | ||
44 | + }); | ||
45 | + | ||
38 | const chartsInstance = shallowReactive<{ [key: string]: echarts.ECharts }>({}); | 46 | const chartsInstance = shallowReactive<{ [key: string]: echarts.ECharts }>({}); |
39 | 47 | ||
40 | const { seriesStatusData } = toRefs(props); | 48 | const { seriesStatusData } = toRefs(props); |
41 | 49 | ||
50 | + watch( | ||
51 | + () => appStore.getDarkMode, | ||
52 | + (target) => { | ||
53 | + const backgroundColor = target === 'light' ? '#ffffff' : '#151515'; | ||
54 | + for (const item of seriesStatusData.value) { | ||
55 | + const { key } = item; | ||
56 | + chartsInstance[key!]?.setOption({ backgroundColor }); | ||
57 | + } | ||
58 | + }, | ||
59 | + { | ||
60 | + immediate: true, | ||
61 | + } | ||
62 | + ); | ||
63 | + | ||
42 | const total = seriesStatusData.value | 64 | const total = seriesStatusData.value |
43 | .map((m) => m.value) | 65 | .map((m) => m.value) |
44 | .reduce((prev, cur) => prev! + cur!, 0); | 66 | .reduce((prev, cur) => prev! + cur!, 0); |
@@ -61,8 +83,9 @@ | @@ -61,8 +83,9 @@ | ||
61 | chartsInstance[key!] = echarts.init( | 83 | chartsInstance[key!] = echarts.init( |
62 | document.getElementById(`chartPie${key}`) as HTMLElement | 84 | document.getElementById(`chartPie${key}`) as HTMLElement |
63 | ); | 85 | ); |
86 | + console.log('11', skinName.value); | ||
64 | const option = { | 87 | const option = { |
65 | - backgroundColor: '#ffffff', | 88 | + backgroundColor: skinName.value, |
66 | tooltip: { | 89 | tooltip: { |
67 | trigger: 'item', | 90 | trigger: 'item', |
68 | formatter: `${legendKey}设备${((value! / total!) * 100).toFixed(2)}%`, | 91 | formatter: `${legendKey}设备${((value! / total!) * 100).toFixed(2)}%`, |
@@ -101,6 +124,9 @@ | @@ -101,6 +124,9 @@ | ||
101 | ], | 124 | ], |
102 | }; | 125 | }; |
103 | chartsInstance[key!].setOption(option); | 126 | chartsInstance[key!].setOption(option); |
127 | + // chartsInstance[key!].setOption({ | ||
128 | + // backgroundColor: skinName, | ||
129 | + // }); | ||
104 | } | 130 | } |
105 | }); | 131 | }); |
106 | 132 |
@@ -5,10 +5,11 @@ | @@ -5,10 +5,11 @@ | ||
5 | /></div> | 5 | /></div> |
6 | </template> | 6 | </template> |
7 | <script lang="ts"> | 7 | <script lang="ts"> |
8 | - import { defineComponent, PropType, ref, Ref, onMounted, toRefs } from 'vue'; | 8 | + import { defineComponent, PropType, ref, Ref, onMounted, toRefs, computed, watch } from 'vue'; |
9 | import { useECharts } from '/@/hooks/web/useECharts'; | 9 | import { useECharts } from '/@/hooks/web/useECharts'; |
10 | import { Empty } from 'ant-design-vue'; | 10 | import { Empty } from 'ant-design-vue'; |
11 | import { seriesDataT } from './props'; | 11 | import { seriesDataT } from './props'; |
12 | + import { useAppStore } from '/@/store/modules/app'; | ||
12 | 13 | ||
13 | export default defineComponent({ | 14 | export default defineComponent({ |
14 | components: { Empty }, | 15 | components: { Empty }, |
@@ -35,23 +36,22 @@ | @@ -35,23 +36,22 @@ | ||
35 | }, | 36 | }, |
36 | }, | 37 | }, |
37 | setup(props) { | 38 | setup(props) { |
39 | + const appStore = useAppStore(); | ||
38 | const { legendData, seriesData } = toRefs(props); | 40 | const { legendData, seriesData } = toRefs(props); |
39 | const dataSeries: Ref<seriesDataT[]> = ref([]); | 41 | const dataSeries: Ref<seriesDataT[]> = ref([]); |
40 | const legendDatas: Ref<seriesDataT[]> = ref([]); | 42 | const legendDatas: Ref<seriesDataT[]> = ref([]); |
41 | dataSeries.value = seriesData.value as unknown as seriesDataT[]; | 43 | dataSeries.value = seriesData.value as unknown as seriesDataT[]; |
42 | legendDatas.value = legendData.value as unknown as seriesDataT[]; | 44 | legendDatas.value = legendData.value as unknown as seriesDataT[]; |
43 | - | 45 | + const skinName = computed(() => { |
46 | + return appStore.getDarkMode === 'light' ? '#ffffff' : '#151515'; | ||
47 | + }); | ||
44 | const chartRef = ref<HTMLDivElement | null>(null); | 48 | const chartRef = ref<HTMLDivElement | null>(null); |
49 | + | ||
45 | const { setOptions, resize } = useECharts(chartRef as Ref<HTMLDivElement>); | 50 | const { setOptions, resize } = useECharts(chartRef as Ref<HTMLDivElement>); |
46 | - const labelLine = { | ||
47 | - normal: { | ||
48 | - show: true, | ||
49 | - length2: 1, | ||
50 | - }, | ||
51 | - } as any; | ||
52 | - onMounted(() => { | ||
53 | - setOptions({ | ||
54 | - backgroundColor: '#ffffff', | 51 | + |
52 | + const getOptions: any = () => { | ||
53 | + return { | ||
54 | + backgroundColor: skinName.value, | ||
55 | tooltip: { | 55 | tooltip: { |
56 | trigger: 'item', | 56 | trigger: 'item', |
57 | formatter: '{b} {d}%', | 57 | formatter: '{b} {d}%', |
@@ -72,7 +72,29 @@ | @@ -72,7 +72,29 @@ | ||
72 | labelLine, | 72 | labelLine, |
73 | }, | 73 | }, |
74 | ], | 74 | ], |
75 | - }); | 75 | + }; |
76 | + }; | ||
77 | + | ||
78 | + watch( | ||
79 | + () => appStore.getDarkMode, | ||
80 | + (target) => { | ||
81 | + const backgroundColor = target === 'light' ? '#ffffff' : '#151515'; | ||
82 | + setOptions && | ||
83 | + setOptions({ | ||
84 | + ...getOptions(), | ||
85 | + backgroundColor, | ||
86 | + }); | ||
87 | + } | ||
88 | + ); | ||
89 | + | ||
90 | + const labelLine = { | ||
91 | + normal: { | ||
92 | + show: true, | ||
93 | + length2: 1, | ||
94 | + }, | ||
95 | + } as any; | ||
96 | + onMounted(() => { | ||
97 | + setOptions(getOptions()); | ||
76 | //自适应 | 98 | //自适应 |
77 | window.addEventListener('resize', () => resize()); | 99 | window.addEventListener('resize', () => resize()); |
78 | }); | 100 | }); |
src/views/dataview/publicApi/components/SimpleRequest/components/DateRangeSelect/config.data.ts
0 → 100644
1 | +import type { BasicColumn } from '/@/components/Table'; | ||
2 | +import type { FormSchema } from '/@/components/Table'; | ||
3 | +import { getOrganizationList } from '/@/api/system/system'; | ||
4 | +import { copyTransFun } from '/@/utils/fnUtils'; | ||
5 | +import { getDeviceDataKeys, getDeviceProfile } from '/@/api/alarm/position'; | ||
6 | +import { EChartsOption } from 'echarts'; | ||
7 | + | ||
8 | +export enum AggregateDataEnum { | ||
9 | + MIN = 'MIN', | ||
10 | + MAX = 'MAX', | ||
11 | + AVG = 'AVG', | ||
12 | + SUM = 'SUM', | ||
13 | + COUNT = 'COUNT', | ||
14 | + NONE = 'NONE', | ||
15 | +} | ||
16 | +export const formSchema: FormSchema[] = [ | ||
17 | + { | ||
18 | + field: 'organizationId', | ||
19 | + label: '', | ||
20 | + component: 'ApiTreeSelect', | ||
21 | + componentProps: { | ||
22 | + placeholder: '请选择组织', | ||
23 | + api: async () => { | ||
24 | + const data = await getOrganizationList(); | ||
25 | + copyTransFun(data as any as any[]); | ||
26 | + return data; | ||
27 | + }, | ||
28 | + }, | ||
29 | + }, | ||
30 | + { | ||
31 | + field: 'deviceProfileId', | ||
32 | + label: '', | ||
33 | + component: 'ApiSelect', | ||
34 | + componentProps: { | ||
35 | + api: getDeviceProfile, | ||
36 | + placeholder: '请选择产品', | ||
37 | + labelField: 'name', | ||
38 | + valueField: 'tbProfileId', | ||
39 | + }, | ||
40 | + }, | ||
41 | + { | ||
42 | + field: 'name', | ||
43 | + label: '', | ||
44 | + component: 'Input', | ||
45 | + componentProps: { | ||
46 | + maxLength: 255, | ||
47 | + placeholder: '请输入设备名称', | ||
48 | + }, | ||
49 | + }, | ||
50 | + { | ||
51 | + field: 'deviceState', | ||
52 | + label: '', | ||
53 | + component: 'RadioGroup', | ||
54 | + componentProps: { | ||
55 | + size: 'small', | ||
56 | + options: [ | ||
57 | + { label: '全部', value: null }, | ||
58 | + { label: '待激活', value: 'INACTIVE' }, | ||
59 | + { label: '在线', value: 'ONLINE' }, | ||
60 | + { label: '离线', value: 'OFFLINE' }, | ||
61 | + ], | ||
62 | + }, | ||
63 | + }, | ||
64 | + { | ||
65 | + field: 'alarmStatus', | ||
66 | + label: '是否告警', | ||
67 | + component: 'RadioGroup', | ||
68 | + labelWidth: '85px', | ||
69 | + componentProps: { | ||
70 | + size: 'small', | ||
71 | + options: [ | ||
72 | + { label: '是', value: 1 }, | ||
73 | + { label: '否', value: 0 }, | ||
74 | + ], | ||
75 | + }, | ||
76 | + }, | ||
77 | +]; | ||
78 | + | ||
79 | +export const columns: BasicColumn[] = [ | ||
80 | + { | ||
81 | + title: '名称', | ||
82 | + dataIndex: 'name', | ||
83 | + width: 120, | ||
84 | + format: (_text: string, record: Recordable) => { | ||
85 | + return record?.alias || record?.name; | ||
86 | + }, | ||
87 | + }, | ||
88 | + { | ||
89 | + title: '设备状态', | ||
90 | + dataIndex: 'deviceState', | ||
91 | + width: 80, | ||
92 | + slots: { customRender: 'deviceState' }, | ||
93 | + }, | ||
94 | + { | ||
95 | + title: '位置', | ||
96 | + dataIndex: 'deviceInfo.address', | ||
97 | + width: 120, | ||
98 | + }, | ||
99 | + { | ||
100 | + title: '告警状态', | ||
101 | + dataIndex: 'alarmStatus', | ||
102 | + width: 80, | ||
103 | + slots: { customRender: 'alarmStatus' }, | ||
104 | + }, | ||
105 | +]; | ||
106 | + | ||
107 | +// 动态生成options | ||
108 | +function generateOptions(value: number) { | ||
109 | + if (value === 3600000) { | ||
110 | + return [ | ||
111 | + { | ||
112 | + label: '10秒', | ||
113 | + value: 10000, | ||
114 | + }, | ||
115 | + { | ||
116 | + label: '15秒', | ||
117 | + value: 15000, | ||
118 | + }, | ||
119 | + { | ||
120 | + label: '30秒', | ||
121 | + value: 30000, | ||
122 | + }, | ||
123 | + { | ||
124 | + label: '1分钟', | ||
125 | + value: 60000, | ||
126 | + }, | ||
127 | + { | ||
128 | + label: '2分钟', | ||
129 | + value: 120000, | ||
130 | + }, | ||
131 | + { | ||
132 | + label: '5分钟', | ||
133 | + value: 300000, | ||
134 | + }, | ||
135 | + ]; | ||
136 | + } else if (value === 7200000) { | ||
137 | + return [ | ||
138 | + { | ||
139 | + label: '15秒', | ||
140 | + value: 15000, | ||
141 | + }, | ||
142 | + { | ||
143 | + label: '30秒', | ||
144 | + value: 30000, | ||
145 | + }, | ||
146 | + { | ||
147 | + label: '1分钟', | ||
148 | + value: 60000, | ||
149 | + }, | ||
150 | + { | ||
151 | + label: '2分钟', | ||
152 | + value: 120000, | ||
153 | + }, | ||
154 | + { | ||
155 | + label: '5分钟', | ||
156 | + value: 300000, | ||
157 | + }, | ||
158 | + { | ||
159 | + label: '10分钟', | ||
160 | + value: 600000, | ||
161 | + }, | ||
162 | + { | ||
163 | + label: '15分钟', | ||
164 | + value: 900000, | ||
165 | + }, | ||
166 | + ]; | ||
167 | + } else if (value === 18000000) { | ||
168 | + return [ | ||
169 | + { | ||
170 | + label: '1分钟', | ||
171 | + value: 60000, | ||
172 | + }, | ||
173 | + { | ||
174 | + label: '2分钟', | ||
175 | + value: 120000, | ||
176 | + }, | ||
177 | + { | ||
178 | + label: '5分钟', | ||
179 | + value: 300000, | ||
180 | + }, | ||
181 | + { | ||
182 | + label: '10分钟', | ||
183 | + value: 600000, | ||
184 | + }, | ||
185 | + { | ||
186 | + label: '15分钟', | ||
187 | + value: 900000, | ||
188 | + }, | ||
189 | + { | ||
190 | + label: '30分钟', | ||
191 | + value: 1800000, | ||
192 | + }, | ||
193 | + ]; | ||
194 | + } else if (value === 36000000) { | ||
195 | + return [ | ||
196 | + { | ||
197 | + label: '2分钟', | ||
198 | + value: 120000, | ||
199 | + }, | ||
200 | + { | ||
201 | + label: '5分钟', | ||
202 | + value: 300000, | ||
203 | + }, | ||
204 | + { | ||
205 | + label: '10分钟', | ||
206 | + value: 600000, | ||
207 | + }, | ||
208 | + { | ||
209 | + label: '15分钟', | ||
210 | + value: 900000, | ||
211 | + }, | ||
212 | + { | ||
213 | + label: '30分钟', | ||
214 | + value: 1800000, | ||
215 | + }, | ||
216 | + { | ||
217 | + label: '1小时', | ||
218 | + value: 3600000, | ||
219 | + }, | ||
220 | + ]; | ||
221 | + } else if (value === 43200000) { | ||
222 | + return [ | ||
223 | + { | ||
224 | + label: '2分钟', | ||
225 | + value: 120000, | ||
226 | + }, | ||
227 | + { | ||
228 | + label: '5分钟', | ||
229 | + value: 300000, | ||
230 | + }, | ||
231 | + { | ||
232 | + label: '10分钟', | ||
233 | + value: 600000, | ||
234 | + }, | ||
235 | + { | ||
236 | + label: '15分钟', | ||
237 | + value: 900000, | ||
238 | + }, | ||
239 | + { | ||
240 | + label: '30分钟', | ||
241 | + value: 1800000, | ||
242 | + }, | ||
243 | + { | ||
244 | + label: '1小时', | ||
245 | + value: 3600000, | ||
246 | + }, | ||
247 | + ]; | ||
248 | + } else if (value === 86400000) { | ||
249 | + return [ | ||
250 | + { | ||
251 | + label: '5分钟', | ||
252 | + value: 300000, | ||
253 | + }, | ||
254 | + { | ||
255 | + label: '10分钟', | ||
256 | + value: 600000, | ||
257 | + }, | ||
258 | + { | ||
259 | + label: '15分钟', | ||
260 | + value: 900000, | ||
261 | + }, | ||
262 | + { | ||
263 | + label: '30分钟', | ||
264 | + value: 1800000, | ||
265 | + }, | ||
266 | + { | ||
267 | + label: '1小时', | ||
268 | + value: 3600000, | ||
269 | + }, | ||
270 | + { | ||
271 | + label: '2小时', | ||
272 | + value: 7200000, | ||
273 | + }, | ||
274 | + ]; | ||
275 | + } else if (value === 604800000) { | ||
276 | + return [ | ||
277 | + { | ||
278 | + label: '30分钟', | ||
279 | + value: 1800000, | ||
280 | + }, | ||
281 | + { | ||
282 | + label: '1小时', | ||
283 | + value: 3600000, | ||
284 | + }, | ||
285 | + { | ||
286 | + label: '2小时', | ||
287 | + value: 7200000, | ||
288 | + }, | ||
289 | + { | ||
290 | + label: '5小时', | ||
291 | + value: 18000000, | ||
292 | + }, | ||
293 | + { | ||
294 | + label: '10小时', | ||
295 | + value: 36000000, | ||
296 | + }, | ||
297 | + { | ||
298 | + label: '12小时', | ||
299 | + value: 43200000, | ||
300 | + }, | ||
301 | + { | ||
302 | + label: '1天', | ||
303 | + value: 86400000, | ||
304 | + }, | ||
305 | + ]; | ||
306 | + } else { | ||
307 | + return [ | ||
308 | + { | ||
309 | + label: '2小时', | ||
310 | + value: 7200000, | ||
311 | + }, | ||
312 | + { | ||
313 | + label: '5小时', | ||
314 | + value: 18000000, | ||
315 | + }, | ||
316 | + { | ||
317 | + label: '10小时', | ||
318 | + value: 36000000, | ||
319 | + }, | ||
320 | + { | ||
321 | + label: '12小时', | ||
322 | + value: 43200000, | ||
323 | + }, | ||
324 | + { | ||
325 | + label: '1天', | ||
326 | + value: 86400000, | ||
327 | + }, | ||
328 | + ]; | ||
329 | + } | ||
330 | +} | ||
331 | +export const schemas: FormSchema[] = [ | ||
332 | + { | ||
333 | + field: 'endTs', | ||
334 | + label: '最后数据', | ||
335 | + component: 'Select', | ||
336 | + required: true, | ||
337 | + componentProps({ formModel, formActionType }) { | ||
338 | + return { | ||
339 | + onChange(value) { | ||
340 | + const { updateSchema } = formActionType; | ||
341 | + console.log(value); | ||
342 | + formModel.interval = ''; | ||
343 | + updateSchema({ | ||
344 | + field: 'interval', | ||
345 | + componentProps: { | ||
346 | + placeholder: '请选择分组间隔', | ||
347 | + options: generateOptions(value), | ||
348 | + }, | ||
349 | + }); | ||
350 | + }, | ||
351 | + getPopupContainer: () => document.body, | ||
352 | + options: [ | ||
353 | + { | ||
354 | + label: '最近1小时', | ||
355 | + value: 3600000, | ||
356 | + }, | ||
357 | + { | ||
358 | + label: '最近2小时', | ||
359 | + value: 7200000, | ||
360 | + }, | ||
361 | + { | ||
362 | + label: '最近5小时', | ||
363 | + value: 18000000, | ||
364 | + }, | ||
365 | + { | ||
366 | + label: '最近10小时', | ||
367 | + value: 36000000, | ||
368 | + }, | ||
369 | + { | ||
370 | + label: '最近12小时', | ||
371 | + value: 43200000, | ||
372 | + }, | ||
373 | + { | ||
374 | + label: '最近1天', | ||
375 | + value: 86400000, | ||
376 | + }, | ||
377 | + { | ||
378 | + label: '最近7天', | ||
379 | + value: 604800000, | ||
380 | + }, | ||
381 | + { | ||
382 | + label: '最近30天', | ||
383 | + value: 2592000000, | ||
384 | + }, | ||
385 | + ], | ||
386 | + }; | ||
387 | + }, | ||
388 | + }, | ||
389 | + { | ||
390 | + field: 'interval', | ||
391 | + label: '分组间隔', | ||
392 | + component: 'Select', | ||
393 | + componentProps: { | ||
394 | + placeholder: '请选择分组间隔', | ||
395 | + getPopupContainer: () => document.body, | ||
396 | + options: [ | ||
397 | + { | ||
398 | + label: '5分钟', | ||
399 | + value: 300000, | ||
400 | + }, | ||
401 | + { | ||
402 | + label: '10分钟', | ||
403 | + value: 600000, | ||
404 | + }, | ||
405 | + { | ||
406 | + label: '15分钟', | ||
407 | + value: 900000, | ||
408 | + }, | ||
409 | + { | ||
410 | + label: '30分钟', | ||
411 | + value: 1800000, | ||
412 | + }, | ||
413 | + { | ||
414 | + label: '1小时', | ||
415 | + value: 3600000, | ||
416 | + }, | ||
417 | + { | ||
418 | + label: '2小时', | ||
419 | + value: 7200000, | ||
420 | + }, | ||
421 | + ], | ||
422 | + }, | ||
423 | + }, | ||
424 | + { | ||
425 | + field: 'agg', | ||
426 | + label: '数据聚合功能', | ||
427 | + component: 'Select', | ||
428 | + defaultValue: AggregateDataEnum.NONE, | ||
429 | + componentProps: { | ||
430 | + getPopupContainer: () => document.body, | ||
431 | + options: [ | ||
432 | + { | ||
433 | + label: '最小值', | ||
434 | + value: AggregateDataEnum.MIN, | ||
435 | + }, | ||
436 | + { | ||
437 | + label: '最大值', | ||
438 | + value: AggregateDataEnum.MAX, | ||
439 | + }, | ||
440 | + { | ||
441 | + label: '平均值', | ||
442 | + value: AggregateDataEnum.AVG, | ||
443 | + }, | ||
444 | + { | ||
445 | + label: '求和', | ||
446 | + value: AggregateDataEnum.SUM, | ||
447 | + }, | ||
448 | + { | ||
449 | + label: '计数', | ||
450 | + value: AggregateDataEnum.COUNT, | ||
451 | + }, | ||
452 | + { | ||
453 | + label: '空', | ||
454 | + value: AggregateDataEnum.NONE, | ||
455 | + }, | ||
456 | + ], | ||
457 | + }, | ||
458 | + }, | ||
459 | + { | ||
460 | + field: 'attr', | ||
461 | + label: '设备属性', | ||
462 | + component: 'Select', | ||
463 | + componentProps: { | ||
464 | + api: async (id: string) => { | ||
465 | + try { | ||
466 | + const res = await getDeviceDataKeys(id); | ||
467 | + return res.map((item) => ({ label: item, value: item })); | ||
468 | + } catch (error) {} | ||
469 | + }, | ||
470 | + }, | ||
471 | + }, | ||
472 | +]; | ||
473 | + | ||
474 | +export const selectDeviceAttrSchema: FormSchema[] = [ | ||
475 | + { | ||
476 | + field: 'keys', | ||
477 | + label: '设备属性', | ||
478 | + component: 'Select', | ||
479 | + componentProps: { | ||
480 | + getPopupContainer: () => document.body, | ||
481 | + }, | ||
482 | + }, | ||
483 | +]; | ||
484 | + | ||
485 | +export const eChartOptions = (series: EChartsOption['series'], keys: string[]): EChartsOption => { | ||
486 | + return { | ||
487 | + tooltip: { | ||
488 | + trigger: 'axis', | ||
489 | + }, | ||
490 | + legend: { | ||
491 | + data: keys, | ||
492 | + }, | ||
493 | + grid: { | ||
494 | + left: '3%', | ||
495 | + right: '4%', | ||
496 | + bottom: '3%', | ||
497 | + containLabel: true, | ||
498 | + }, | ||
499 | + dataZoom: [ | ||
500 | + { | ||
501 | + type: 'inside', | ||
502 | + start: 0, | ||
503 | + end: 50, | ||
504 | + }, | ||
505 | + { | ||
506 | + start: 20, | ||
507 | + end: 40, | ||
508 | + }, | ||
509 | + ], | ||
510 | + xAxis: { | ||
511 | + type: 'time', | ||
512 | + boundaryGap: false, | ||
513 | + }, | ||
514 | + yAxis: { | ||
515 | + type: 'value', | ||
516 | + boundaryGap: [0, '100%'], | ||
517 | + }, | ||
518 | + series, | ||
519 | + }; | ||
520 | +}; | ||
521 | + | ||
522 | +//百度地图设置个性化地图配置 | ||
523 | +export const setMapStyleV2 = { | ||
524 | + styleJson: [ | ||
525 | + { | ||
526 | + featureType: 'land', | ||
527 | + elementType: 'geometry', | ||
528 | + stylers: { | ||
529 | + visibility: 'on', | ||
530 | + color: '#091220ff', | ||
531 | + }, | ||
532 | + }, | ||
533 | + { | ||
534 | + featureType: 'water', | ||
535 | + elementType: 'geometry', | ||
536 | + stylers: { | ||
537 | + visibility: 'on', | ||
538 | + color: '#113549ff', | ||
539 | + }, | ||
540 | + }, | ||
541 | + { | ||
542 | + featureType: 'green', | ||
543 | + elementType: 'geometry', | ||
544 | + stylers: { | ||
545 | + visibility: 'on', | ||
546 | + color: '#0e1b30ff', | ||
547 | + }, | ||
548 | + }, | ||
549 | + { | ||
550 | + featureType: 'building', | ||
551 | + elementType: 'geometry', | ||
552 | + stylers: { | ||
553 | + visibility: 'on', | ||
554 | + }, | ||
555 | + }, | ||
556 | + { | ||
557 | + featureType: 'building', | ||
558 | + elementType: 'geometry.topfill', | ||
559 | + stylers: { | ||
560 | + color: '#113549ff', | ||
561 | + }, | ||
562 | + }, | ||
563 | + { | ||
564 | + featureType: 'building', | ||
565 | + elementType: 'geometry.sidefill', | ||
566 | + stylers: { | ||
567 | + color: '#143e56ff', | ||
568 | + }, | ||
569 | + }, | ||
570 | + { | ||
571 | + featureType: 'building', | ||
572 | + elementType: 'geometry.stroke', | ||
573 | + stylers: { | ||
574 | + color: '#dadada00', | ||
575 | + }, | ||
576 | + }, | ||
577 | + { | ||
578 | + featureType: 'subwaystation', | ||
579 | + elementType: 'geometry', | ||
580 | + stylers: { | ||
581 | + visibility: 'on', | ||
582 | + color: '#113549B2', | ||
583 | + }, | ||
584 | + }, | ||
585 | + { | ||
586 | + featureType: 'education', | ||
587 | + elementType: 'geometry', | ||
588 | + stylers: { | ||
589 | + visibility: 'on', | ||
590 | + color: '#12223dff', | ||
591 | + }, | ||
592 | + }, | ||
593 | + { | ||
594 | + featureType: 'medical', | ||
595 | + elementType: 'geometry', | ||
596 | + stylers: { | ||
597 | + visibility: 'on', | ||
598 | + color: '#12223dff', | ||
599 | + }, | ||
600 | + }, | ||
601 | + { | ||
602 | + featureType: 'scenicspots', | ||
603 | + elementType: 'geometry', | ||
604 | + stylers: { | ||
605 | + visibility: 'on', | ||
606 | + color: '#12223dff', | ||
607 | + }, | ||
608 | + }, | ||
609 | + { | ||
610 | + featureType: 'highway', | ||
611 | + elementType: 'geometry', | ||
612 | + stylers: { | ||
613 | + visibility: 'on', | ||
614 | + weight: 4, | ||
615 | + }, | ||
616 | + }, | ||
617 | + { | ||
618 | + featureType: 'highway', | ||
619 | + elementType: 'geometry.fill', | ||
620 | + stylers: { | ||
621 | + color: '#12223dff', | ||
622 | + }, | ||
623 | + }, | ||
624 | + { | ||
625 | + featureType: 'highway', | ||
626 | + elementType: 'geometry.stroke', | ||
627 | + stylers: { | ||
628 | + color: '#fed66900', | ||
629 | + }, | ||
630 | + }, | ||
631 | + { | ||
632 | + featureType: 'highway', | ||
633 | + elementType: 'labels', | ||
634 | + stylers: { | ||
635 | + visibility: 'on', | ||
636 | + }, | ||
637 | + }, | ||
638 | + { | ||
639 | + featureType: 'highway', | ||
640 | + elementType: 'labels.text.fill', | ||
641 | + stylers: { | ||
642 | + color: '#12223dff', | ||
643 | + }, | ||
644 | + }, | ||
645 | + { | ||
646 | + featureType: 'highway', | ||
647 | + elementType: 'labels.text.stroke', | ||
648 | + stylers: { | ||
649 | + color: '#ffffff00', | ||
650 | + }, | ||
651 | + }, | ||
652 | + { | ||
653 | + featureType: 'highway', | ||
654 | + elementType: 'labels.icon', | ||
655 | + stylers: { | ||
656 | + visibility: 'on', | ||
657 | + }, | ||
658 | + }, | ||
659 | + { | ||
660 | + featureType: 'arterial', | ||
661 | + elementType: 'geometry', | ||
662 | + stylers: { | ||
663 | + visibility: 'on', | ||
664 | + weight: 2, | ||
665 | + }, | ||
666 | + }, | ||
667 | + { | ||
668 | + featureType: 'arterial', | ||
669 | + elementType: 'geometry.fill', | ||
670 | + stylers: { | ||
671 | + color: '#12223dff', | ||
672 | + }, | ||
673 | + }, | ||
674 | + { | ||
675 | + featureType: 'arterial', | ||
676 | + elementType: 'geometry.stroke', | ||
677 | + stylers: { | ||
678 | + color: '#ffeebb00', | ||
679 | + }, | ||
680 | + }, | ||
681 | + { | ||
682 | + featureType: 'arterial', | ||
683 | + elementType: 'labels', | ||
684 | + stylers: { | ||
685 | + visibility: 'on', | ||
686 | + }, | ||
687 | + }, | ||
688 | + { | ||
689 | + featureType: 'arterial', | ||
690 | + elementType: 'labels.text.fill', | ||
691 | + stylers: { | ||
692 | + color: '#2dc4bbff', | ||
693 | + }, | ||
694 | + }, | ||
695 | + { | ||
696 | + featureType: 'arterial', | ||
697 | + elementType: 'labels.text.stroke', | ||
698 | + stylers: { | ||
699 | + color: '#ffffff00', | ||
700 | + }, | ||
701 | + }, | ||
702 | + { | ||
703 | + featureType: 'local', | ||
704 | + elementType: 'geometry', | ||
705 | + stylers: { | ||
706 | + visibility: 'on', | ||
707 | + weight: 1, | ||
708 | + }, | ||
709 | + }, | ||
710 | + { | ||
711 | + featureType: 'local', | ||
712 | + elementType: 'geometry.fill', | ||
713 | + stylers: { | ||
714 | + color: '#12223dff', | ||
715 | + }, | ||
716 | + }, | ||
717 | + { | ||
718 | + featureType: 'local', | ||
719 | + elementType: 'geometry.stroke', | ||
720 | + stylers: { | ||
721 | + color: '#ffffff00', | ||
722 | + }, | ||
723 | + }, | ||
724 | + { | ||
725 | + featureType: 'local', | ||
726 | + elementType: 'labels', | ||
727 | + stylers: { | ||
728 | + visibility: 'on', | ||
729 | + }, | ||
730 | + }, | ||
731 | + { | ||
732 | + featureType: 'local', | ||
733 | + elementType: 'labels.text.fill', | ||
734 | + stylers: { | ||
735 | + color: '#979c9aff', | ||
736 | + }, | ||
737 | + }, | ||
738 | + { | ||
739 | + featureType: 'local', | ||
740 | + elementType: 'labels.text.stroke', | ||
741 | + stylers: { | ||
742 | + color: '#ffffffff', | ||
743 | + }, | ||
744 | + }, | ||
745 | + { | ||
746 | + featureType: 'railway', | ||
747 | + elementType: 'geometry', | ||
748 | + stylers: { | ||
749 | + visibility: 'off', | ||
750 | + }, | ||
751 | + }, | ||
752 | + { | ||
753 | + featureType: 'subway', | ||
754 | + elementType: 'geometry', | ||
755 | + stylers: { | ||
756 | + visibility: 'off', | ||
757 | + weight: 1, | ||
758 | + }, | ||
759 | + }, | ||
760 | + { | ||
761 | + featureType: 'subway', | ||
762 | + elementType: 'geometry.fill', | ||
763 | + stylers: { | ||
764 | + color: '#d8d8d8ff', | ||
765 | + }, | ||
766 | + }, | ||
767 | + { | ||
768 | + featureType: 'subway', | ||
769 | + elementType: 'geometry.stroke', | ||
770 | + stylers: { | ||
771 | + color: '#ffffff00', | ||
772 | + }, | ||
773 | + }, | ||
774 | + { | ||
775 | + featureType: 'subway', | ||
776 | + elementType: 'labels', | ||
777 | + stylers: { | ||
778 | + visibility: 'on', | ||
779 | + }, | ||
780 | + }, | ||
781 | + { | ||
782 | + featureType: 'subway', | ||
783 | + elementType: 'labels.text.fill', | ||
784 | + stylers: { | ||
785 | + color: '#979c9aff', | ||
786 | + }, | ||
787 | + }, | ||
788 | + { | ||
789 | + featureType: 'subway', | ||
790 | + elementType: 'labels.text.stroke', | ||
791 | + stylers: { | ||
792 | + color: '#ffffffff', | ||
793 | + }, | ||
794 | + }, | ||
795 | + { | ||
796 | + featureType: 'continent', | ||
797 | + elementType: 'labels', | ||
798 | + stylers: { | ||
799 | + visibility: 'on', | ||
800 | + }, | ||
801 | + }, | ||
802 | + { | ||
803 | + featureType: 'continent', | ||
804 | + elementType: 'labels.icon', | ||
805 | + stylers: { | ||
806 | + visibility: 'on', | ||
807 | + }, | ||
808 | + }, | ||
809 | + { | ||
810 | + featureType: 'continent', | ||
811 | + elementType: 'labels.text.fill', | ||
812 | + stylers: { | ||
813 | + color: '#2dc4bbff', | ||
814 | + }, | ||
815 | + }, | ||
816 | + { | ||
817 | + featureType: 'continent', | ||
818 | + elementType: 'labels.text.stroke', | ||
819 | + stylers: { | ||
820 | + color: '#ffffff00', | ||
821 | + }, | ||
822 | + }, | ||
823 | + { | ||
824 | + featureType: 'city', | ||
825 | + elementType: 'labels.icon', | ||
826 | + stylers: { | ||
827 | + visibility: 'off', | ||
828 | + }, | ||
829 | + }, | ||
830 | + { | ||
831 | + featureType: 'city', | ||
832 | + elementType: 'labels', | ||
833 | + stylers: { | ||
834 | + visibility: 'on', | ||
835 | + }, | ||
836 | + }, | ||
837 | + { | ||
838 | + featureType: 'city', | ||
839 | + elementType: 'labels.text.fill', | ||
840 | + stylers: { | ||
841 | + color: '#2dc4bbff', | ||
842 | + }, | ||
843 | + }, | ||
844 | + { | ||
845 | + featureType: 'city', | ||
846 | + elementType: 'labels.text.stroke', | ||
847 | + stylers: { | ||
848 | + color: '#ffffff00', | ||
849 | + }, | ||
850 | + }, | ||
851 | + { | ||
852 | + featureType: 'town', | ||
853 | + elementType: 'labels.icon', | ||
854 | + stylers: { | ||
855 | + visibility: 'on', | ||
856 | + }, | ||
857 | + }, | ||
858 | + { | ||
859 | + featureType: 'town', | ||
860 | + elementType: 'labels', | ||
861 | + stylers: { | ||
862 | + visibility: 'off', | ||
863 | + }, | ||
864 | + }, | ||
865 | + { | ||
866 | + featureType: 'town', | ||
867 | + elementType: 'labels.text.fill', | ||
868 | + stylers: { | ||
869 | + color: '#454d50ff', | ||
870 | + }, | ||
871 | + }, | ||
872 | + { | ||
873 | + featureType: 'town', | ||
874 | + elementType: 'labels.text.stroke', | ||
875 | + stylers: { | ||
876 | + color: '#ffffffff', | ||
877 | + }, | ||
878 | + }, | ||
879 | + { | ||
880 | + featureType: 'road', | ||
881 | + elementType: 'geometry.fill', | ||
882 | + stylers: { | ||
883 | + color: '#12223dff', | ||
884 | + }, | ||
885 | + }, | ||
886 | + { | ||
887 | + featureType: 'poilabel', | ||
888 | + elementType: 'labels', | ||
889 | + stylers: { | ||
890 | + visibility: 'on', | ||
891 | + }, | ||
892 | + }, | ||
893 | + { | ||
894 | + featureType: 'districtlabel', | ||
895 | + elementType: 'labels', | ||
896 | + stylers: { | ||
897 | + visibility: 'off', | ||
898 | + }, | ||
899 | + }, | ||
900 | + { | ||
901 | + featureType: 'road', | ||
902 | + elementType: 'geometry', | ||
903 | + stylers: { | ||
904 | + visibility: 'on', | ||
905 | + }, | ||
906 | + }, | ||
907 | + { | ||
908 | + featureType: 'road', | ||
909 | + elementType: 'labels', | ||
910 | + stylers: { | ||
911 | + visibility: 'off', | ||
912 | + }, | ||
913 | + }, | ||
914 | + { | ||
915 | + featureType: 'road', | ||
916 | + elementType: 'geometry.stroke', | ||
917 | + stylers: { | ||
918 | + color: '#ffffff00', | ||
919 | + }, | ||
920 | + }, | ||
921 | + { | ||
922 | + featureType: 'district', | ||
923 | + elementType: 'labels', | ||
924 | + stylers: { | ||
925 | + visibility: 'on', | ||
926 | + }, | ||
927 | + }, | ||
928 | + { | ||
929 | + featureType: 'poilabel', | ||
930 | + elementType: 'labels.icon', | ||
931 | + stylers: { | ||
932 | + visibility: 'off', | ||
933 | + }, | ||
934 | + }, | ||
935 | + { | ||
936 | + featureType: 'poilabel', | ||
937 | + elementType: 'labels.text.fill', | ||
938 | + stylers: { | ||
939 | + color: '#2dc4bbff', | ||
940 | + }, | ||
941 | + }, | ||
942 | + { | ||
943 | + featureType: 'poilabel', | ||
944 | + elementType: 'labels.text.stroke', | ||
945 | + stylers: { | ||
946 | + color: '#ffffff00', | ||
947 | + }, | ||
948 | + }, | ||
949 | + { | ||
950 | + featureType: 'manmade', | ||
951 | + elementType: 'geometry', | ||
952 | + stylers: { | ||
953 | + color: '#12223dff', | ||
954 | + }, | ||
955 | + }, | ||
956 | + { | ||
957 | + featureType: 'districtlabel', | ||
958 | + elementType: 'labels.text.stroke', | ||
959 | + stylers: { | ||
960 | + color: '#ffffffff', | ||
961 | + }, | ||
962 | + }, | ||
963 | + { | ||
964 | + featureType: 'entertainment', | ||
965 | + elementType: 'geometry', | ||
966 | + stylers: { | ||
967 | + color: '#12223dff', | ||
968 | + }, | ||
969 | + }, | ||
970 | + { | ||
971 | + featureType: 'shopping', | ||
972 | + elementType: 'geometry', | ||
973 | + stylers: { | ||
974 | + color: '#12223dff', | ||
975 | + }, | ||
976 | + }, | ||
977 | + { | ||
978 | + featureType: 'nationalway', | ||
979 | + stylers: { | ||
980 | + curZoomRegionId: '0', | ||
981 | + curZoomRegion: '6,10', | ||
982 | + level: '6', | ||
983 | + }, | ||
984 | + }, | ||
985 | + { | ||
986 | + featureType: 'nationalway', | ||
987 | + stylers: { | ||
988 | + curZoomRegionId: '0', | ||
989 | + curZoomRegion: '6,10', | ||
990 | + level: '7', | ||
991 | + }, | ||
992 | + }, | ||
993 | + { | ||
994 | + featureType: 'nationalway', | ||
995 | + stylers: { | ||
996 | + curZoomRegionId: '0', | ||
997 | + curZoomRegion: '6,10', | ||
998 | + level: '8', | ||
999 | + }, | ||
1000 | + }, | ||
1001 | + { | ||
1002 | + featureType: 'nationalway', | ||
1003 | + stylers: { | ||
1004 | + curZoomRegionId: '0', | ||
1005 | + curZoomRegion: '6,10', | ||
1006 | + level: '9', | ||
1007 | + }, | ||
1008 | + }, | ||
1009 | + { | ||
1010 | + featureType: 'nationalway', | ||
1011 | + stylers: { | ||
1012 | + curZoomRegionId: '0', | ||
1013 | + curZoomRegion: '6,10', | ||
1014 | + level: '10', | ||
1015 | + }, | ||
1016 | + }, | ||
1017 | + { | ||
1018 | + featureType: 'nationalway', | ||
1019 | + elementType: 'geometry', | ||
1020 | + stylers: { | ||
1021 | + visibility: 'off', | ||
1022 | + curZoomRegionId: '0', | ||
1023 | + curZoomRegion: '6,10', | ||
1024 | + level: '6', | ||
1025 | + }, | ||
1026 | + }, | ||
1027 | + { | ||
1028 | + featureType: 'nationalway', | ||
1029 | + elementType: 'geometry', | ||
1030 | + stylers: { | ||
1031 | + visibility: 'off', | ||
1032 | + curZoomRegionId: '0', | ||
1033 | + curZoomRegion: '6,10', | ||
1034 | + level: '7', | ||
1035 | + }, | ||
1036 | + }, | ||
1037 | + { | ||
1038 | + featureType: 'nationalway', | ||
1039 | + elementType: 'geometry', | ||
1040 | + stylers: { | ||
1041 | + visibility: 'off', | ||
1042 | + curZoomRegionId: '0', | ||
1043 | + curZoomRegion: '6,10', | ||
1044 | + level: '8', | ||
1045 | + }, | ||
1046 | + }, | ||
1047 | + { | ||
1048 | + featureType: 'nationalway', | ||
1049 | + elementType: 'geometry', | ||
1050 | + stylers: { | ||
1051 | + visibility: 'off', | ||
1052 | + curZoomRegionId: '0', | ||
1053 | + curZoomRegion: '6,10', | ||
1054 | + level: '9', | ||
1055 | + }, | ||
1056 | + }, | ||
1057 | + { | ||
1058 | + featureType: 'nationalway', | ||
1059 | + elementType: 'geometry', | ||
1060 | + stylers: { | ||
1061 | + visibility: 'off', | ||
1062 | + curZoomRegionId: '0', | ||
1063 | + curZoomRegion: '6,10', | ||
1064 | + level: '10', | ||
1065 | + }, | ||
1066 | + }, | ||
1067 | + { | ||
1068 | + featureType: 'nationalway', | ||
1069 | + elementType: 'labels', | ||
1070 | + stylers: { | ||
1071 | + visibility: 'off', | ||
1072 | + curZoomRegionId: '0', | ||
1073 | + curZoomRegion: '6,10', | ||
1074 | + level: '6', | ||
1075 | + }, | ||
1076 | + }, | ||
1077 | + { | ||
1078 | + featureType: 'nationalway', | ||
1079 | + elementType: 'labels', | ||
1080 | + stylers: { | ||
1081 | + visibility: 'off', | ||
1082 | + curZoomRegionId: '0', | ||
1083 | + curZoomRegion: '6,10', | ||
1084 | + level: '7', | ||
1085 | + }, | ||
1086 | + }, | ||
1087 | + { | ||
1088 | + featureType: 'nationalway', | ||
1089 | + elementType: 'labels', | ||
1090 | + stylers: { | ||
1091 | + visibility: 'off', | ||
1092 | + curZoomRegionId: '0', | ||
1093 | + curZoomRegion: '6,10', | ||
1094 | + level: '8', | ||
1095 | + }, | ||
1096 | + }, | ||
1097 | + { | ||
1098 | + featureType: 'nationalway', | ||
1099 | + elementType: 'labels', | ||
1100 | + stylers: { | ||
1101 | + visibility: 'off', | ||
1102 | + curZoomRegionId: '0', | ||
1103 | + curZoomRegion: '6,10', | ||
1104 | + level: '9', | ||
1105 | + }, | ||
1106 | + }, | ||
1107 | + { | ||
1108 | + featureType: 'nationalway', | ||
1109 | + elementType: 'labels', | ||
1110 | + stylers: { | ||
1111 | + visibility: 'off', | ||
1112 | + curZoomRegionId: '0', | ||
1113 | + curZoomRegion: '6,10', | ||
1114 | + level: '10', | ||
1115 | + }, | ||
1116 | + }, | ||
1117 | + { | ||
1118 | + featureType: 'cityhighway', | ||
1119 | + stylers: { | ||
1120 | + curZoomRegionId: '0', | ||
1121 | + curZoomRegion: '6,9', | ||
1122 | + level: '6', | ||
1123 | + }, | ||
1124 | + }, | ||
1125 | + { | ||
1126 | + featureType: 'cityhighway', | ||
1127 | + stylers: { | ||
1128 | + curZoomRegionId: '0', | ||
1129 | + curZoomRegion: '6,9', | ||
1130 | + level: '7', | ||
1131 | + }, | ||
1132 | + }, | ||
1133 | + { | ||
1134 | + featureType: 'cityhighway', | ||
1135 | + stylers: { | ||
1136 | + curZoomRegionId: '0', | ||
1137 | + curZoomRegion: '6,9', | ||
1138 | + level: '8', | ||
1139 | + }, | ||
1140 | + }, | ||
1141 | + { | ||
1142 | + featureType: 'cityhighway', | ||
1143 | + stylers: { | ||
1144 | + curZoomRegionId: '0', | ||
1145 | + curZoomRegion: '6,9', | ||
1146 | + level: '9', | ||
1147 | + }, | ||
1148 | + }, | ||
1149 | + { | ||
1150 | + featureType: 'cityhighway', | ||
1151 | + elementType: 'geometry', | ||
1152 | + stylers: { | ||
1153 | + visibility: 'off', | ||
1154 | + curZoomRegionId: '0', | ||
1155 | + curZoomRegion: '6,9', | ||
1156 | + level: '6', | ||
1157 | + }, | ||
1158 | + }, | ||
1159 | + { | ||
1160 | + featureType: 'cityhighway', | ||
1161 | + elementType: 'geometry', | ||
1162 | + stylers: { | ||
1163 | + visibility: 'off', | ||
1164 | + curZoomRegionId: '0', | ||
1165 | + curZoomRegion: '6,9', | ||
1166 | + level: '7', | ||
1167 | + }, | ||
1168 | + }, | ||
1169 | + { | ||
1170 | + featureType: 'cityhighway', | ||
1171 | + elementType: 'geometry', | ||
1172 | + stylers: { | ||
1173 | + visibility: 'off', | ||
1174 | + curZoomRegionId: '0', | ||
1175 | + curZoomRegion: '6,9', | ||
1176 | + level: '8', | ||
1177 | + }, | ||
1178 | + }, | ||
1179 | + { | ||
1180 | + featureType: 'cityhighway', | ||
1181 | + elementType: 'geometry', | ||
1182 | + stylers: { | ||
1183 | + visibility: 'off', | ||
1184 | + curZoomRegionId: '0', | ||
1185 | + curZoomRegion: '6,9', | ||
1186 | + level: '9', | ||
1187 | + }, | ||
1188 | + }, | ||
1189 | + { | ||
1190 | + featureType: 'cityhighway', | ||
1191 | + elementType: 'labels', | ||
1192 | + stylers: { | ||
1193 | + visibility: 'off', | ||
1194 | + curZoomRegionId: '0', | ||
1195 | + curZoomRegion: '6,9', | ||
1196 | + level: '6', | ||
1197 | + }, | ||
1198 | + }, | ||
1199 | + { | ||
1200 | + featureType: 'cityhighway', | ||
1201 | + elementType: 'labels', | ||
1202 | + stylers: { | ||
1203 | + visibility: 'off', | ||
1204 | + curZoomRegionId: '0', | ||
1205 | + curZoomRegion: '6,9', | ||
1206 | + level: '7', | ||
1207 | + }, | ||
1208 | + }, | ||
1209 | + { | ||
1210 | + featureType: 'cityhighway', | ||
1211 | + elementType: 'labels', | ||
1212 | + stylers: { | ||
1213 | + visibility: 'off', | ||
1214 | + curZoomRegionId: '0', | ||
1215 | + curZoomRegion: '6,9', | ||
1216 | + level: '8', | ||
1217 | + }, | ||
1218 | + }, | ||
1219 | + { | ||
1220 | + featureType: 'cityhighway', | ||
1221 | + elementType: 'labels', | ||
1222 | + stylers: { | ||
1223 | + visibility: 'off', | ||
1224 | + curZoomRegionId: '0', | ||
1225 | + curZoomRegion: '6,9', | ||
1226 | + level: '9', | ||
1227 | + }, | ||
1228 | + }, | ||
1229 | + { | ||
1230 | + featureType: 'subwaylabel', | ||
1231 | + elementType: 'labels', | ||
1232 | + stylers: { | ||
1233 | + visibility: 'off', | ||
1234 | + }, | ||
1235 | + }, | ||
1236 | + { | ||
1237 | + featureType: 'subwaylabel', | ||
1238 | + elementType: 'labels.icon', | ||
1239 | + stylers: { | ||
1240 | + visibility: 'off', | ||
1241 | + }, | ||
1242 | + }, | ||
1243 | + { | ||
1244 | + featureType: 'tertiarywaysign', | ||
1245 | + elementType: 'labels', | ||
1246 | + stylers: { | ||
1247 | + visibility: 'off', | ||
1248 | + }, | ||
1249 | + }, | ||
1250 | + { | ||
1251 | + featureType: 'tertiarywaysign', | ||
1252 | + elementType: 'labels.icon', | ||
1253 | + stylers: { | ||
1254 | + visibility: 'off', | ||
1255 | + }, | ||
1256 | + }, | ||
1257 | + { | ||
1258 | + featureType: 'provincialwaysign', | ||
1259 | + elementType: 'labels', | ||
1260 | + stylers: { | ||
1261 | + visibility: 'off', | ||
1262 | + }, | ||
1263 | + }, | ||
1264 | + { | ||
1265 | + featureType: 'provincialwaysign', | ||
1266 | + elementType: 'labels.icon', | ||
1267 | + stylers: { | ||
1268 | + visibility: 'off', | ||
1269 | + }, | ||
1270 | + }, | ||
1271 | + { | ||
1272 | + featureType: 'nationalwaysign', | ||
1273 | + elementType: 'labels', | ||
1274 | + stylers: { | ||
1275 | + visibility: 'off', | ||
1276 | + }, | ||
1277 | + }, | ||
1278 | + { | ||
1279 | + featureType: 'nationalwaysign', | ||
1280 | + elementType: 'labels.icon', | ||
1281 | + stylers: { | ||
1282 | + visibility: 'off', | ||
1283 | + }, | ||
1284 | + }, | ||
1285 | + { | ||
1286 | + featureType: 'highwaysign', | ||
1287 | + elementType: 'labels', | ||
1288 | + stylers: { | ||
1289 | + visibility: 'off', | ||
1290 | + }, | ||
1291 | + }, | ||
1292 | + { | ||
1293 | + featureType: 'highwaysign', | ||
1294 | + elementType: 'labels.icon', | ||
1295 | + stylers: { | ||
1296 | + visibility: 'off', | ||
1297 | + }, | ||
1298 | + }, | ||
1299 | + { | ||
1300 | + featureType: 'village', | ||
1301 | + elementType: 'labels', | ||
1302 | + stylers: { | ||
1303 | + visibility: 'off', | ||
1304 | + }, | ||
1305 | + }, | ||
1306 | + { | ||
1307 | + featureType: 'district', | ||
1308 | + elementType: 'labels.text', | ||
1309 | + stylers: { | ||
1310 | + fontsize: 20, | ||
1311 | + }, | ||
1312 | + }, | ||
1313 | + { | ||
1314 | + featureType: 'district', | ||
1315 | + elementType: 'labels.text.fill', | ||
1316 | + stylers: { | ||
1317 | + color: '#2dc4bbff', | ||
1318 | + }, | ||
1319 | + }, | ||
1320 | + { | ||
1321 | + featureType: 'district', | ||
1322 | + elementType: 'labels.text.stroke', | ||
1323 | + stylers: { | ||
1324 | + color: '#ffffff00', | ||
1325 | + }, | ||
1326 | + }, | ||
1327 | + { | ||
1328 | + featureType: 'country', | ||
1329 | + elementType: 'labels.text.fill', | ||
1330 | + stylers: { | ||
1331 | + color: '#2dc4bbff', | ||
1332 | + }, | ||
1333 | + }, | ||
1334 | + { | ||
1335 | + featureType: 'country', | ||
1336 | + elementType: 'labels.text.stroke', | ||
1337 | + stylers: { | ||
1338 | + color: '#ffffff00', | ||
1339 | + }, | ||
1340 | + }, | ||
1341 | + { | ||
1342 | + featureType: 'water', | ||
1343 | + elementType: 'labels.text.fill', | ||
1344 | + stylers: { | ||
1345 | + color: '#2dc4bbff', | ||
1346 | + }, | ||
1347 | + }, | ||
1348 | + { | ||
1349 | + featureType: 'water', | ||
1350 | + elementType: 'labels.text.stroke', | ||
1351 | + stylers: { | ||
1352 | + color: '#ffffff00', | ||
1353 | + }, | ||
1354 | + }, | ||
1355 | + { | ||
1356 | + featureType: 'cityhighway', | ||
1357 | + elementType: 'geometry.fill', | ||
1358 | + stylers: { | ||
1359 | + color: '#12223dff', | ||
1360 | + }, | ||
1361 | + }, | ||
1362 | + { | ||
1363 | + featureType: 'cityhighway', | ||
1364 | + elementType: 'geometry.stroke', | ||
1365 | + stylers: { | ||
1366 | + color: '#ffffff00', | ||
1367 | + }, | ||
1368 | + }, | ||
1369 | + { | ||
1370 | + featureType: 'tertiaryway', | ||
1371 | + elementType: 'geometry.fill', | ||
1372 | + stylers: { | ||
1373 | + color: '#12223dff', | ||
1374 | + }, | ||
1375 | + }, | ||
1376 | + { | ||
1377 | + featureType: 'tertiaryway', | ||
1378 | + elementType: 'geometry.stroke', | ||
1379 | + stylers: { | ||
1380 | + color: '#ffffff10', | ||
1381 | + }, | ||
1382 | + }, | ||
1383 | + { | ||
1384 | + featureType: 'provincialway', | ||
1385 | + elementType: 'geometry.fill', | ||
1386 | + stylers: { | ||
1387 | + color: '#12223dff', | ||
1388 | + }, | ||
1389 | + }, | ||
1390 | + { | ||
1391 | + featureType: 'provincialway', | ||
1392 | + elementType: 'geometry.stroke', | ||
1393 | + stylers: { | ||
1394 | + color: '#ffffff00', | ||
1395 | + }, | ||
1396 | + }, | ||
1397 | + { | ||
1398 | + featureType: 'nationalway', | ||
1399 | + elementType: 'geometry.fill', | ||
1400 | + stylers: { | ||
1401 | + color: '#12223dff', | ||
1402 | + }, | ||
1403 | + }, | ||
1404 | + { | ||
1405 | + featureType: 'nationalway', | ||
1406 | + elementType: 'geometry.stroke', | ||
1407 | + stylers: { | ||
1408 | + color: '#ffffff00', | ||
1409 | + }, | ||
1410 | + }, | ||
1411 | + { | ||
1412 | + featureType: 'highway', | ||
1413 | + elementType: 'labels.text', | ||
1414 | + stylers: { | ||
1415 | + fontsize: 20, | ||
1416 | + }, | ||
1417 | + }, | ||
1418 | + { | ||
1419 | + featureType: 'nationalway', | ||
1420 | + elementType: 'labels.text.stroke', | ||
1421 | + stylers: { | ||
1422 | + color: '#ffffff00', | ||
1423 | + }, | ||
1424 | + }, | ||
1425 | + { | ||
1426 | + featureType: 'nationalway', | ||
1427 | + elementType: 'labels.text.fill', | ||
1428 | + stylers: { | ||
1429 | + color: '#12223dff', | ||
1430 | + }, | ||
1431 | + }, | ||
1432 | + { | ||
1433 | + featureType: 'nationalway', | ||
1434 | + elementType: 'labels.text', | ||
1435 | + stylers: { | ||
1436 | + fontsize: 20, | ||
1437 | + }, | ||
1438 | + }, | ||
1439 | + { | ||
1440 | + featureType: 'provincialway', | ||
1441 | + elementType: 'labels.text.fill', | ||
1442 | + stylers: { | ||
1443 | + color: '#12223dff', | ||
1444 | + }, | ||
1445 | + }, | ||
1446 | + { | ||
1447 | + featureType: 'provincialway', | ||
1448 | + elementType: 'labels.text.stroke', | ||
1449 | + stylers: { | ||
1450 | + color: '#ffffff00', | ||
1451 | + }, | ||
1452 | + }, | ||
1453 | + { | ||
1454 | + featureType: 'provincialway', | ||
1455 | + elementType: 'labels.text', | ||
1456 | + stylers: { | ||
1457 | + fontsize: 20, | ||
1458 | + }, | ||
1459 | + }, | ||
1460 | + { | ||
1461 | + featureType: 'cityhighway', | ||
1462 | + elementType: 'labels.text.fill', | ||
1463 | + stylers: { | ||
1464 | + color: '#12223dff', | ||
1465 | + }, | ||
1466 | + }, | ||
1467 | + { | ||
1468 | + featureType: 'cityhighway', | ||
1469 | + elementType: 'labels.text', | ||
1470 | + stylers: { | ||
1471 | + fontsize: 20, | ||
1472 | + }, | ||
1473 | + }, | ||
1474 | + { | ||
1475 | + featureType: 'cityhighway', | ||
1476 | + elementType: 'labels.text.stroke', | ||
1477 | + stylers: { | ||
1478 | + color: '#ffffff00', | ||
1479 | + }, | ||
1480 | + }, | ||
1481 | + { | ||
1482 | + featureType: 'estate', | ||
1483 | + elementType: 'geometry', | ||
1484 | + stylers: { | ||
1485 | + color: '#12223dff', | ||
1486 | + }, | ||
1487 | + }, | ||
1488 | + { | ||
1489 | + featureType: 'tertiaryway', | ||
1490 | + elementType: 'labels.text.fill', | ||
1491 | + stylers: { | ||
1492 | + color: '#2dc4bbff', | ||
1493 | + }, | ||
1494 | + }, | ||
1495 | + { | ||
1496 | + featureType: 'tertiaryway', | ||
1497 | + elementType: 'labels.text.stroke', | ||
1498 | + stylers: { | ||
1499 | + color: '#ffffff00', | ||
1500 | + }, | ||
1501 | + }, | ||
1502 | + { | ||
1503 | + featureType: 'fourlevelway', | ||
1504 | + elementType: 'labels.text.fill', | ||
1505 | + stylers: { | ||
1506 | + color: '#2dc4bbff', | ||
1507 | + }, | ||
1508 | + }, | ||
1509 | + { | ||
1510 | + featureType: 'fourlevelway', | ||
1511 | + elementType: 'labels.text.stroke', | ||
1512 | + stylers: { | ||
1513 | + color: '#ffffff00', | ||
1514 | + }, | ||
1515 | + }, | ||
1516 | + { | ||
1517 | + featureType: 'scenicspotsway', | ||
1518 | + elementType: 'geometry.fill', | ||
1519 | + stylers: { | ||
1520 | + color: '#12223dff', | ||
1521 | + }, | ||
1522 | + }, | ||
1523 | + { | ||
1524 | + featureType: 'scenicspotsway', | ||
1525 | + elementType: 'geometry.stroke', | ||
1526 | + stylers: { | ||
1527 | + color: '#ffffff00', | ||
1528 | + }, | ||
1529 | + }, | ||
1530 | + { | ||
1531 | + featureType: 'universityway', | ||
1532 | + elementType: 'geometry.fill', | ||
1533 | + stylers: { | ||
1534 | + color: '#12223dff', | ||
1535 | + }, | ||
1536 | + }, | ||
1537 | + { | ||
1538 | + featureType: 'universityway', | ||
1539 | + elementType: 'geometry.stroke', | ||
1540 | + stylers: { | ||
1541 | + color: '#ffffff00', | ||
1542 | + }, | ||
1543 | + }, | ||
1544 | + { | ||
1545 | + featureType: 'vacationway', | ||
1546 | + elementType: 'geometry.fill', | ||
1547 | + stylers: { | ||
1548 | + color: '#12223dff', | ||
1549 | + }, | ||
1550 | + }, | ||
1551 | + { | ||
1552 | + featureType: 'vacationway', | ||
1553 | + elementType: 'geometry.stroke', | ||
1554 | + stylers: { | ||
1555 | + color: '#ffffff00', | ||
1556 | + }, | ||
1557 | + }, | ||
1558 | + { | ||
1559 | + featureType: 'fourlevelway', | ||
1560 | + elementType: 'geometry', | ||
1561 | + stylers: { | ||
1562 | + visibility: 'on', | ||
1563 | + }, | ||
1564 | + }, | ||
1565 | + { | ||
1566 | + featureType: 'fourlevelway', | ||
1567 | + elementType: 'geometry.fill', | ||
1568 | + stylers: { | ||
1569 | + color: '#12223dff', | ||
1570 | + }, | ||
1571 | + }, | ||
1572 | + { | ||
1573 | + featureType: 'fourlevelway', | ||
1574 | + elementType: 'geometry.stroke', | ||
1575 | + stylers: { | ||
1576 | + color: '#ffffff00', | ||
1577 | + }, | ||
1578 | + }, | ||
1579 | + { | ||
1580 | + featureType: 'transportationlabel', | ||
1581 | + elementType: 'labels', | ||
1582 | + stylers: { | ||
1583 | + visibility: 'on', | ||
1584 | + }, | ||
1585 | + }, | ||
1586 | + { | ||
1587 | + featureType: 'transportationlabel', | ||
1588 | + elementType: 'labels.icon', | ||
1589 | + stylers: { | ||
1590 | + visibility: 'off', | ||
1591 | + }, | ||
1592 | + }, | ||
1593 | + { | ||
1594 | + featureType: 'transportationlabel', | ||
1595 | + elementType: 'labels.text.fill', | ||
1596 | + stylers: { | ||
1597 | + color: '#2dc4bbff', | ||
1598 | + }, | ||
1599 | + }, | ||
1600 | + { | ||
1601 | + featureType: 'transportationlabel', | ||
1602 | + elementType: 'labels.text.stroke', | ||
1603 | + stylers: { | ||
1604 | + color: '#ffffff00', | ||
1605 | + }, | ||
1606 | + }, | ||
1607 | + { | ||
1608 | + featureType: 'educationlabel', | ||
1609 | + elementType: 'labels', | ||
1610 | + stylers: { | ||
1611 | + visibility: 'on', | ||
1612 | + }, | ||
1613 | + }, | ||
1614 | + { | ||
1615 | + featureType: 'educationlabel', | ||
1616 | + elementType: 'labels.icon', | ||
1617 | + stylers: { | ||
1618 | + visibility: 'off', | ||
1619 | + }, | ||
1620 | + }, | ||
1621 | + { | ||
1622 | + featureType: 'educationlabel', | ||
1623 | + elementType: 'labels.text.fill', | ||
1624 | + stylers: { | ||
1625 | + color: '#2dc4bbff', | ||
1626 | + }, | ||
1627 | + }, | ||
1628 | + { | ||
1629 | + featureType: 'educationlabel', | ||
1630 | + elementType: 'labels.text.stroke', | ||
1631 | + stylers: { | ||
1632 | + color: '#ffffff00', | ||
1633 | + }, | ||
1634 | + }, | ||
1635 | + { | ||
1636 | + featureType: 'transportation', | ||
1637 | + elementType: 'geometry', | ||
1638 | + stylers: { | ||
1639 | + color: '#113549ff', | ||
1640 | + }, | ||
1641 | + }, | ||
1642 | + { | ||
1643 | + featureType: 'airportlabel', | ||
1644 | + elementType: 'labels.text.fill', | ||
1645 | + stylers: { | ||
1646 | + color: '#2dc4bbff', | ||
1647 | + }, | ||
1648 | + }, | ||
1649 | + { | ||
1650 | + featureType: 'airportlabel', | ||
1651 | + elementType: 'labels.text.stroke', | ||
1652 | + stylers: { | ||
1653 | + color: '#ffffff00', | ||
1654 | + }, | ||
1655 | + }, | ||
1656 | + { | ||
1657 | + featureType: 'scenicspotslabel', | ||
1658 | + elementType: 'labels.text.fill', | ||
1659 | + stylers: { | ||
1660 | + color: '#2dc4bbff', | ||
1661 | + }, | ||
1662 | + }, | ||
1663 | + { | ||
1664 | + featureType: 'scenicspotslabel', | ||
1665 | + elementType: 'labels.text.stroke', | ||
1666 | + stylers: { | ||
1667 | + color: '#ffffff00', | ||
1668 | + }, | ||
1669 | + }, | ||
1670 | + { | ||
1671 | + featureType: 'medicallabel', | ||
1672 | + elementType: 'labels.text.fill', | ||
1673 | + stylers: { | ||
1674 | + color: '#2dc4bbff', | ||
1675 | + }, | ||
1676 | + }, | ||
1677 | + { | ||
1678 | + featureType: 'medicallabel', | ||
1679 | + elementType: 'labels.text.stroke', | ||
1680 | + stylers: { | ||
1681 | + color: '#ffffff00', | ||
1682 | + }, | ||
1683 | + }, | ||
1684 | + { | ||
1685 | + featureType: 'medicallabel', | ||
1686 | + elementType: 'labels.icon', | ||
1687 | + stylers: { | ||
1688 | + visibility: 'off', | ||
1689 | + }, | ||
1690 | + }, | ||
1691 | + { | ||
1692 | + featureType: 'scenicspotslabel', | ||
1693 | + elementType: 'labels.icon', | ||
1694 | + stylers: { | ||
1695 | + visibility: 'off', | ||
1696 | + }, | ||
1697 | + }, | ||
1698 | + { | ||
1699 | + featureType: 'airportlabel', | ||
1700 | + elementType: 'labels.icon', | ||
1701 | + stylers: { | ||
1702 | + visibility: 'off', | ||
1703 | + }, | ||
1704 | + }, | ||
1705 | + { | ||
1706 | + featureType: 'entertainmentlabel', | ||
1707 | + elementType: 'labels.icon', | ||
1708 | + stylers: { | ||
1709 | + visibility: 'off', | ||
1710 | + }, | ||
1711 | + }, | ||
1712 | + { | ||
1713 | + featureType: 'entertainmentlabel', | ||
1714 | + elementType: 'labels.text.fill', | ||
1715 | + stylers: { | ||
1716 | + color: '#2dc4bbff', | ||
1717 | + }, | ||
1718 | + }, | ||
1719 | + { | ||
1720 | + featureType: 'entertainmentlabel', | ||
1721 | + elementType: 'labels.text.stroke', | ||
1722 | + stylers: { | ||
1723 | + color: '#ffffff00', | ||
1724 | + }, | ||
1725 | + }, | ||
1726 | + { | ||
1727 | + featureType: 'estatelabel', | ||
1728 | + elementType: 'labels.icon', | ||
1729 | + stylers: { | ||
1730 | + visibility: 'off', | ||
1731 | + }, | ||
1732 | + }, | ||
1733 | + { | ||
1734 | + featureType: 'estatelabel', | ||
1735 | + elementType: 'labels.text.fill', | ||
1736 | + stylers: { | ||
1737 | + color: '#2dc4bbff', | ||
1738 | + }, | ||
1739 | + }, | ||
1740 | + { | ||
1741 | + featureType: 'estatelabel', | ||
1742 | + elementType: 'labels.text.stroke', | ||
1743 | + stylers: { | ||
1744 | + color: '#ffffff00', | ||
1745 | + }, | ||
1746 | + }, | ||
1747 | + { | ||
1748 | + featureType: 'businesstowerlabel', | ||
1749 | + elementType: 'labels.text.fill', | ||
1750 | + stylers: { | ||
1751 | + color: '#2dc4bbff', | ||
1752 | + }, | ||
1753 | + }, | ||
1754 | + { | ||
1755 | + featureType: 'businesstowerlabel', | ||
1756 | + elementType: 'labels.text.stroke', | ||
1757 | + stylers: { | ||
1758 | + color: '#ffffff00', | ||
1759 | + }, | ||
1760 | + }, | ||
1761 | + { | ||
1762 | + featureType: 'businesstowerlabel', | ||
1763 | + elementType: 'labels.icon', | ||
1764 | + stylers: { | ||
1765 | + visibility: 'off', | ||
1766 | + }, | ||
1767 | + }, | ||
1768 | + { | ||
1769 | + featureType: 'companylabel', | ||
1770 | + elementType: 'labels.text.fill', | ||
1771 | + stylers: { | ||
1772 | + color: '#2dc4bbff', | ||
1773 | + }, | ||
1774 | + }, | ||
1775 | + { | ||
1776 | + featureType: 'companylabel', | ||
1777 | + elementType: 'labels.text.stroke', | ||
1778 | + stylers: { | ||
1779 | + color: '#ffffff00', | ||
1780 | + }, | ||
1781 | + }, | ||
1782 | + { | ||
1783 | + featureType: 'companylabel', | ||
1784 | + elementType: 'labels.icon', | ||
1785 | + stylers: { | ||
1786 | + visibility: 'off', | ||
1787 | + }, | ||
1788 | + }, | ||
1789 | + { | ||
1790 | + featureType: 'governmentlabel', | ||
1791 | + elementType: 'labels.icon', | ||
1792 | + stylers: { | ||
1793 | + visibility: 'off', | ||
1794 | + }, | ||
1795 | + }, | ||
1796 | + { | ||
1797 | + featureType: 'governmentlabel', | ||
1798 | + elementType: 'labels.text.fill', | ||
1799 | + stylers: { | ||
1800 | + color: '#2dc4bbff', | ||
1801 | + }, | ||
1802 | + }, | ||
1803 | + { | ||
1804 | + featureType: 'governmentlabel', | ||
1805 | + elementType: 'labels.text.stroke', | ||
1806 | + stylers: { | ||
1807 | + color: '#ffffff00', | ||
1808 | + }, | ||
1809 | + }, | ||
1810 | + { | ||
1811 | + featureType: 'restaurantlabel', | ||
1812 | + elementType: 'labels.text.fill', | ||
1813 | + stylers: { | ||
1814 | + color: '#2dc4bbff', | ||
1815 | + }, | ||
1816 | + }, | ||
1817 | + { | ||
1818 | + featureType: 'restaurantlabel', | ||
1819 | + elementType: 'labels.text.stroke', | ||
1820 | + stylers: { | ||
1821 | + color: '#ffffff00', | ||
1822 | + }, | ||
1823 | + }, | ||
1824 | + { | ||
1825 | + featureType: 'restaurantlabel', | ||
1826 | + elementType: 'labels.icon', | ||
1827 | + stylers: { | ||
1828 | + visibility: 'off', | ||
1829 | + }, | ||
1830 | + }, | ||
1831 | + { | ||
1832 | + featureType: 'hotellabel', | ||
1833 | + elementType: 'labels.icon', | ||
1834 | + stylers: { | ||
1835 | + visibility: 'off', | ||
1836 | + }, | ||
1837 | + }, | ||
1838 | + { | ||
1839 | + featureType: 'hotellabel', | ||
1840 | + elementType: 'labels.text.fill', | ||
1841 | + stylers: { | ||
1842 | + color: '#2dc4bbff', | ||
1843 | + }, | ||
1844 | + }, | ||
1845 | + { | ||
1846 | + featureType: 'hotellabel', | ||
1847 | + elementType: 'labels.text.stroke', | ||
1848 | + stylers: { | ||
1849 | + color: '#ffffff00', | ||
1850 | + }, | ||
1851 | + }, | ||
1852 | + { | ||
1853 | + featureType: 'shoppinglabel', | ||
1854 | + elementType: 'labels.text.fill', | ||
1855 | + stylers: { | ||
1856 | + color: '#2dc4bbff', | ||
1857 | + }, | ||
1858 | + }, | ||
1859 | + { | ||
1860 | + featureType: 'shoppinglabel', | ||
1861 | + elementType: 'labels.text.stroke', | ||
1862 | + stylers: { | ||
1863 | + color: '#ffffff00', | ||
1864 | + }, | ||
1865 | + }, | ||
1866 | + { | ||
1867 | + featureType: 'shoppinglabel', | ||
1868 | + elementType: 'labels.icon', | ||
1869 | + stylers: { | ||
1870 | + visibility: 'off', | ||
1871 | + }, | ||
1872 | + }, | ||
1873 | + { | ||
1874 | + featureType: 'lifeservicelabel', | ||
1875 | + elementType: 'labels.text.fill', | ||
1876 | + stylers: { | ||
1877 | + color: '#2dc4bbff', | ||
1878 | + }, | ||
1879 | + }, | ||
1880 | + { | ||
1881 | + featureType: 'lifeservicelabel', | ||
1882 | + elementType: 'labels.text.stroke', | ||
1883 | + stylers: { | ||
1884 | + color: '#ffffff00', | ||
1885 | + }, | ||
1886 | + }, | ||
1887 | + { | ||
1888 | + featureType: 'lifeservicelabel', | ||
1889 | + elementType: 'labels.icon', | ||
1890 | + stylers: { | ||
1891 | + visibility: 'off', | ||
1892 | + }, | ||
1893 | + }, | ||
1894 | + { | ||
1895 | + featureType: 'carservicelabel', | ||
1896 | + elementType: 'labels.text.fill', | ||
1897 | + stylers: { | ||
1898 | + color: '#2dc4bbff', | ||
1899 | + }, | ||
1900 | + }, | ||
1901 | + { | ||
1902 | + featureType: 'carservicelabel', | ||
1903 | + elementType: 'labels.text.stroke', | ||
1904 | + stylers: { | ||
1905 | + color: '#ffffff00', | ||
1906 | + }, | ||
1907 | + }, | ||
1908 | + { | ||
1909 | + featureType: 'carservicelabel', | ||
1910 | + elementType: 'labels.icon', | ||
1911 | + stylers: { | ||
1912 | + visibility: 'off', | ||
1913 | + }, | ||
1914 | + }, | ||
1915 | + { | ||
1916 | + featureType: 'financelabel', | ||
1917 | + elementType: 'labels.text.fill', | ||
1918 | + stylers: { | ||
1919 | + color: '#2dc4bbff', | ||
1920 | + }, | ||
1921 | + }, | ||
1922 | + { | ||
1923 | + featureType: 'financelabel', | ||
1924 | + elementType: 'labels.text.stroke', | ||
1925 | + stylers: { | ||
1926 | + color: '#ffffff00', | ||
1927 | + }, | ||
1928 | + }, | ||
1929 | + { | ||
1930 | + featureType: 'financelabel', | ||
1931 | + elementType: 'labels.icon', | ||
1932 | + stylers: { | ||
1933 | + visibility: 'off', | ||
1934 | + }, | ||
1935 | + }, | ||
1936 | + { | ||
1937 | + featureType: 'otherlabel', | ||
1938 | + elementType: 'labels.text.fill', | ||
1939 | + stylers: { | ||
1940 | + color: '#2dc4bbff', | ||
1941 | + }, | ||
1942 | + }, | ||
1943 | + { | ||
1944 | + featureType: 'otherlabel', | ||
1945 | + elementType: 'labels.text.stroke', | ||
1946 | + stylers: { | ||
1947 | + color: '#ffffff00', | ||
1948 | + }, | ||
1949 | + }, | ||
1950 | + { | ||
1951 | + featureType: 'otherlabel', | ||
1952 | + elementType: 'labels.icon', | ||
1953 | + stylers: { | ||
1954 | + visibility: 'off', | ||
1955 | + }, | ||
1956 | + }, | ||
1957 | + { | ||
1958 | + featureType: 'manmade', | ||
1959 | + elementType: 'labels.text.fill', | ||
1960 | + stylers: { | ||
1961 | + color: '#2dc4bbff', | ||
1962 | + }, | ||
1963 | + }, | ||
1964 | + { | ||
1965 | + featureType: 'manmade', | ||
1966 | + elementType: 'labels.text.stroke', | ||
1967 | + stylers: { | ||
1968 | + color: '#ffffff00', | ||
1969 | + }, | ||
1970 | + }, | ||
1971 | + { | ||
1972 | + featureType: 'transportation', | ||
1973 | + elementType: 'labels.text.fill', | ||
1974 | + stylers: { | ||
1975 | + color: '#2dc4bbff', | ||
1976 | + }, | ||
1977 | + }, | ||
1978 | + { | ||
1979 | + featureType: 'transportation', | ||
1980 | + elementType: 'labels.text.stroke', | ||
1981 | + stylers: { | ||
1982 | + color: '#ffffff00', | ||
1983 | + }, | ||
1984 | + }, | ||
1985 | + { | ||
1986 | + featureType: 'education', | ||
1987 | + elementType: 'labels.text.fill', | ||
1988 | + stylers: { | ||
1989 | + color: '#2dc4bbff', | ||
1990 | + }, | ||
1991 | + }, | ||
1992 | + { | ||
1993 | + featureType: 'education', | ||
1994 | + elementType: 'labels.text.stroke', | ||
1995 | + stylers: { | ||
1996 | + color: '#ffffff00', | ||
1997 | + }, | ||
1998 | + }, | ||
1999 | + { | ||
2000 | + featureType: 'medical', | ||
2001 | + elementType: 'labels.text.fill', | ||
2002 | + stylers: { | ||
2003 | + color: '#2dc4bbff', | ||
2004 | + }, | ||
2005 | + }, | ||
2006 | + { | ||
2007 | + featureType: 'medical', | ||
2008 | + elementType: 'labels.text.stroke', | ||
2009 | + stylers: { | ||
2010 | + color: '#ffffff00', | ||
2011 | + }, | ||
2012 | + }, | ||
2013 | + { | ||
2014 | + featureType: 'scenicspots', | ||
2015 | + elementType: 'labels.text.fill', | ||
2016 | + stylers: { | ||
2017 | + color: '#2dc4bbff', | ||
2018 | + }, | ||
2019 | + }, | ||
2020 | + { | ||
2021 | + featureType: 'scenicspots', | ||
2022 | + elementType: 'labels.text.stroke', | ||
2023 | + stylers: { | ||
2024 | + color: '#ffffff00', | ||
2025 | + }, | ||
2026 | + }, | ||
2027 | + ], | ||
2028 | +}; |
src/views/dataview/publicApi/components/SimpleRequest/components/DateRangeSelect/config.ts
0 → 100644
1 | +import { FormSchema } from '/@/components/Form'; | ||
2 | + | ||
3 | +export const scheme: FormSchema[] = [ | ||
4 | + // { | ||
5 | + // field: 'effectScope', | ||
6 | + // label: '时间周期', | ||
7 | + // colProps: { span: 24 }, | ||
8 | + // component: 'Input', | ||
9 | + // defaultValue: 'effectScope', | ||
10 | + // componentProps: { | ||
11 | + // disabled: true, | ||
12 | + // }, | ||
13 | + // }, | ||
14 | + { | ||
15 | + field: 'agg', | ||
16 | + label: '聚合方式', | ||
17 | + defaultValue: 'agg', | ||
18 | + colProps: { span: 24 }, | ||
19 | + component: 'Input', | ||
20 | + componentProps: { | ||
21 | + disabled: true, | ||
22 | + }, | ||
23 | + }, | ||
24 | + { | ||
25 | + field: 'interval', | ||
26 | + label: '间隔时间', | ||
27 | + defaultValue: 'interval', | ||
28 | + colProps: { span: 24 }, | ||
29 | + component: 'Input', | ||
30 | + componentProps: { | ||
31 | + disabled: true, | ||
32 | + }, | ||
33 | + }, | ||
34 | +]; |
src/views/dataview/publicApi/components/SimpleRequest/components/DateRangeSelect/helper.ts
0 → 100644
1 | +import { Moment } from 'moment'; | ||
2 | + | ||
3 | +enum TimeUnit { | ||
4 | + SECOND = 'second', | ||
5 | + MINUTE = 'MINUTE', | ||
6 | + HOUR = 'HOUR', | ||
7 | + DAY = 'DAY', | ||
8 | +} | ||
9 | + | ||
10 | +const unitMapping = { | ||
11 | + [TimeUnit.SECOND]: '秒', | ||
12 | + [TimeUnit.MINUTE]: '分', | ||
13 | + [TimeUnit.HOUR]: '小时', | ||
14 | + [TimeUnit.DAY]: '天', | ||
15 | +}; | ||
16 | + | ||
17 | +const unitConversion = { | ||
18 | + [TimeUnit.SECOND]: 1 * 1000, | ||
19 | + [TimeUnit.MINUTE]: 1 * 60 * 1000, | ||
20 | + [TimeUnit.HOUR]: 1 * 60 * 60 * 1000, | ||
21 | + [TimeUnit.DAY]: 1 * 60 * 60 * 24 * 1000, | ||
22 | +}; | ||
23 | + | ||
24 | +export const intervalOption = [ | ||
25 | + { | ||
26 | + id: 1, | ||
27 | + unit: TimeUnit.SECOND, | ||
28 | + linkage: [{ id: 1, unit: TimeUnit.SECOND }], | ||
29 | + }, | ||
30 | + { | ||
31 | + id: 5, | ||
32 | + unit: TimeUnit.SECOND, | ||
33 | + linkage: [{ id: 1, unit: TimeUnit.SECOND }], | ||
34 | + }, | ||
35 | + { | ||
36 | + id: 10, | ||
37 | + unit: TimeUnit.SECOND, | ||
38 | + linkage: [{ id: 1, unit: TimeUnit.SECOND }], | ||
39 | + }, | ||
40 | + { | ||
41 | + id: 15, | ||
42 | + unit: TimeUnit.SECOND, | ||
43 | + linkage: [{ id: 1, unit: TimeUnit.SECOND }], | ||
44 | + }, | ||
45 | + { | ||
46 | + id: 30, | ||
47 | + unit: TimeUnit.SECOND, | ||
48 | + linkage: [{ id: 1, unit: TimeUnit.SECOND }], | ||
49 | + }, | ||
50 | + { | ||
51 | + id: 1, | ||
52 | + unit: TimeUnit.MINUTE, | ||
53 | + linkage: [ | ||
54 | + { id: 1, unit: TimeUnit.SECOND }, | ||
55 | + { id: 5, unit: TimeUnit.SECOND }, | ||
56 | + ], | ||
57 | + }, | ||
58 | + { | ||
59 | + id: 2, | ||
60 | + unit: TimeUnit.MINUTE, | ||
61 | + linkage: [ | ||
62 | + { id: 1, unit: TimeUnit.SECOND }, | ||
63 | + { id: 5, unit: TimeUnit.SECOND }, | ||
64 | + { id: 10, unit: TimeUnit.SECOND }, | ||
65 | + { id: 15, unit: TimeUnit.SECOND }, | ||
66 | + ], | ||
67 | + }, | ||
68 | + { | ||
69 | + id: 5, | ||
70 | + unit: TimeUnit.MINUTE, | ||
71 | + linkage: [ | ||
72 | + { id: 1, unit: TimeUnit.SECOND }, | ||
73 | + { id: 5, unit: TimeUnit.SECOND }, | ||
74 | + { id: 10, unit: TimeUnit.SECOND }, | ||
75 | + { id: 15, unit: TimeUnit.SECOND }, | ||
76 | + { id: 30, unit: TimeUnit.SECOND }, | ||
77 | + ], | ||
78 | + }, | ||
79 | + { | ||
80 | + id: 10, | ||
81 | + unit: TimeUnit.MINUTE, | ||
82 | + linkage: [ | ||
83 | + { id: 5, unit: TimeUnit.SECOND }, | ||
84 | + { id: 10, unit: TimeUnit.SECOND }, | ||
85 | + { id: 15, unit: TimeUnit.SECOND }, | ||
86 | + { id: 30, unit: TimeUnit.SECOND }, | ||
87 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
88 | + ], | ||
89 | + }, | ||
90 | + { | ||
91 | + id: 15, | ||
92 | + unit: TimeUnit.MINUTE, | ||
93 | + linkage: [ | ||
94 | + { id: 5, unit: TimeUnit.SECOND }, | ||
95 | + { id: 10, unit: TimeUnit.SECOND }, | ||
96 | + { id: 15, unit: TimeUnit.SECOND }, | ||
97 | + { id: 30, unit: TimeUnit.SECOND }, | ||
98 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
99 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
100 | + ], | ||
101 | + }, | ||
102 | + { | ||
103 | + id: 30, | ||
104 | + unit: TimeUnit.MINUTE, | ||
105 | + linkage: [ | ||
106 | + { id: 5, unit: TimeUnit.SECOND }, | ||
107 | + { id: 10, unit: TimeUnit.SECOND }, | ||
108 | + { id: 15, unit: TimeUnit.SECOND }, | ||
109 | + { id: 30, unit: TimeUnit.SECOND }, | ||
110 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
111 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
112 | + ], | ||
113 | + }, | ||
114 | + { | ||
115 | + id: 1, | ||
116 | + unit: TimeUnit.HOUR, | ||
117 | + linkage: [ | ||
118 | + { id: 10, unit: TimeUnit.SECOND }, | ||
119 | + { id: 15, unit: TimeUnit.SECOND }, | ||
120 | + { id: 30, unit: TimeUnit.SECOND }, | ||
121 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
122 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
123 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
124 | + ], | ||
125 | + }, | ||
126 | + { | ||
127 | + id: 2, | ||
128 | + unit: TimeUnit.HOUR, | ||
129 | + linkage: [ | ||
130 | + { id: 15, unit: TimeUnit.SECOND }, | ||
131 | + { id: 30, unit: TimeUnit.SECOND }, | ||
132 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
133 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
134 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
135 | + { id: 10, unit: TimeUnit.MINUTE }, | ||
136 | + { id: 15, unit: TimeUnit.MINUTE }, | ||
137 | + ], | ||
138 | + }, | ||
139 | + { | ||
140 | + id: 5, | ||
141 | + unit: TimeUnit.HOUR, | ||
142 | + linkage: [ | ||
143 | + { id: 1, unit: TimeUnit.MINUTE }, | ||
144 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
145 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
146 | + { id: 10, unit: TimeUnit.MINUTE }, | ||
147 | + { id: 15, unit: TimeUnit.MINUTE }, | ||
148 | + { id: 30, unit: TimeUnit.MINUTE }, | ||
149 | + ], | ||
150 | + }, | ||
151 | + { | ||
152 | + id: 10, | ||
153 | + unit: TimeUnit.HOUR, | ||
154 | + linkage: [ | ||
155 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
156 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
157 | + { id: 10, unit: TimeUnit.MINUTE }, | ||
158 | + { id: 15, unit: TimeUnit.MINUTE }, | ||
159 | + { id: 30, unit: TimeUnit.MINUTE }, | ||
160 | + { id: 1, unit: TimeUnit.HOUR }, | ||
161 | + ], | ||
162 | + }, | ||
163 | + { | ||
164 | + id: 12, | ||
165 | + unit: TimeUnit.HOUR, | ||
166 | + linkage: [ | ||
167 | + { id: 2, unit: TimeUnit.MINUTE }, | ||
168 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
169 | + { id: 10, unit: TimeUnit.MINUTE }, | ||
170 | + { id: 15, unit: TimeUnit.MINUTE }, | ||
171 | + { id: 30, unit: TimeUnit.MINUTE }, | ||
172 | + { id: 1, unit: TimeUnit.HOUR }, | ||
173 | + ], | ||
174 | + }, | ||
175 | + { | ||
176 | + id: 1, | ||
177 | + unit: TimeUnit.DAY, | ||
178 | + linkage: [ | ||
179 | + { id: 5, unit: TimeUnit.MINUTE }, | ||
180 | + { id: 10, unit: TimeUnit.MINUTE }, | ||
181 | + { id: 15, unit: TimeUnit.MINUTE }, | ||
182 | + { id: 30, unit: TimeUnit.MINUTE }, | ||
183 | + { id: 1, unit: TimeUnit.HOUR }, | ||
184 | + { id: 2, unit: TimeUnit.HOUR }, | ||
185 | + ], | ||
186 | + }, | ||
187 | + { | ||
188 | + id: 7, | ||
189 | + unit: TimeUnit.DAY, | ||
190 | + linkage: [ | ||
191 | + { id: 30, unit: TimeUnit.MINUTE }, | ||
192 | + { id: 1, unit: TimeUnit.HOUR }, | ||
193 | + { id: 2, unit: TimeUnit.HOUR }, | ||
194 | + { id: 5, unit: TimeUnit.HOUR }, | ||
195 | + { id: 10, unit: TimeUnit.HOUR }, | ||
196 | + { id: 12, unit: TimeUnit.HOUR }, | ||
197 | + { id: 1, unit: TimeUnit.DAY }, | ||
198 | + ], | ||
199 | + }, | ||
200 | + { | ||
201 | + id: 30, | ||
202 | + unit: TimeUnit.DAY, | ||
203 | + linkage: [ | ||
204 | + { id: 2, unit: TimeUnit.HOUR }, | ||
205 | + { id: 5, unit: TimeUnit.HOUR }, | ||
206 | + { id: 10, unit: TimeUnit.HOUR }, | ||
207 | + { id: 12, unit: TimeUnit.HOUR }, | ||
208 | + { id: 1, unit: TimeUnit.DAY }, | ||
209 | + ], | ||
210 | + }, | ||
211 | +].map((item) => { | ||
212 | + return { | ||
213 | + value: item.id * unitConversion[item.unit], | ||
214 | + label: item.id + unitMapping[item.unit], | ||
215 | + linkage: item.linkage.map((item) => { | ||
216 | + return { | ||
217 | + value: item.id * unitConversion[item.unit], | ||
218 | + label: item.id + unitMapping[item.unit], | ||
219 | + }; | ||
220 | + }), | ||
221 | + }; | ||
222 | +}); | ||
223 | + | ||
224 | +const rangeIntervalOption = [ | ||
225 | + { | ||
226 | + id: 90, | ||
227 | + unit: TimeUnit.DAY, | ||
228 | + linkage: [ | ||
229 | + { id: 5, unit: TimeUnit.HOUR }, | ||
230 | + { id: 10, unit: TimeUnit.HOUR }, | ||
231 | + { id: 12, unit: TimeUnit.HOUR }, | ||
232 | + { id: 1, unit: TimeUnit.DAY }, | ||
233 | + { id: 7, unit: TimeUnit.DAY }, | ||
234 | + ], | ||
235 | + }, | ||
236 | + { | ||
237 | + id: 180, | ||
238 | + unit: TimeUnit.DAY, | ||
239 | + linkage: [ | ||
240 | + { id: 10, unit: TimeUnit.HOUR }, | ||
241 | + { id: 12, unit: TimeUnit.HOUR }, | ||
242 | + { id: 1, unit: TimeUnit.DAY }, | ||
243 | + { id: 7, unit: TimeUnit.DAY }, | ||
244 | + ], | ||
245 | + }, | ||
246 | + { | ||
247 | + id: 360, | ||
248 | + unit: TimeUnit.DAY, | ||
249 | + linkage: [ | ||
250 | + { id: 1, unit: TimeUnit.DAY }, | ||
251 | + { id: 7, unit: TimeUnit.DAY }, | ||
252 | + { id: 30, unit: TimeUnit.DAY }, | ||
253 | + ], | ||
254 | + }, | ||
255 | +].map((item) => { | ||
256 | + return { | ||
257 | + value: item.id * unitConversion[item.unit], | ||
258 | + label: item.id + unitMapping[item.unit], | ||
259 | + linkage: item.linkage.map((item) => { | ||
260 | + return { | ||
261 | + value: item.id * unitConversion[item.unit], | ||
262 | + label: item.id + unitMapping[item.unit], | ||
263 | + }; | ||
264 | + }), | ||
265 | + }; | ||
266 | +}); | ||
267 | + | ||
268 | +/** | ||
269 | + * @description | ||
270 | + * @param {number} value | ||
271 | + * @returns | ||
272 | + */ | ||
273 | +export function getPacketIntervalByValue(value: number) { | ||
274 | + return intervalOption.find((item) => item.value === value)?.linkage || []; | ||
275 | +} | ||
276 | + | ||
277 | +export function getPacketIntervalByRange( | ||
278 | + [start, end] = [null, null] as [Nullable<Moment>, Nullable<Moment>] | ||
279 | +) { | ||
280 | + if (start && end) { | ||
281 | + const value = end.diff(start, 'ms'); | ||
282 | + let options: { value: number; label: string }[] = []; | ||
283 | + for (const item of [...intervalOption, ...rangeIntervalOption]) { | ||
284 | + if (item.value <= value) continue; | ||
285 | + if (item.value >= value) { | ||
286 | + options = item.linkage; | ||
287 | + break; | ||
288 | + } | ||
289 | + } | ||
290 | + return options; | ||
291 | + } | ||
292 | + return []; | ||
293 | +} |
src/views/dataview/publicApi/components/SimpleRequest/components/DateRangeSelect/index.vue
0 → 100644
1 | +<script setup lang="ts"> | ||
2 | + import { BasicForm, useForm } from '/@/components/Form'; | ||
3 | + import { scheme } from './config'; | ||
4 | + | ||
5 | + defineEmits(['register']); | ||
6 | + | ||
7 | + const [registerForm, { getFieldsValue, setFieldsValue, resetFields }] = useForm({ | ||
8 | + schemas: scheme, | ||
9 | + showActionButtonGroup: false, | ||
10 | + }); | ||
11 | + | ||
12 | + const getValue = () => { | ||
13 | + return getFieldsValue(); | ||
14 | + }; | ||
15 | + | ||
16 | + const setValue = (objs) => setFieldsValue(objs); | ||
17 | + | ||
18 | + const resetValue = () => resetFields(); | ||
19 | + | ||
20 | + defineExpose({ | ||
21 | + getValue, | ||
22 | + setValue, | ||
23 | + resetValue, | ||
24 | + }); | ||
25 | +</script> | ||
26 | + | ||
27 | +<template> | ||
28 | + <BasicForm @register="registerForm" /> | ||
29 | +</template> |
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | </td> | 14 | </td> |
15 | <td style="width: 12vw"> | 15 | <td style="width: 12vw"> |
16 | <Select | 16 | <Select |
17 | + :disabled="item.key === 'agg,interval' ? true : false" | ||
17 | v-model:value="item.key" | 18 | v-model:value="item.key" |
18 | placeholder="请选择" | 19 | placeholder="请选择" |
19 | :options="selectOptions" | 20 | :options="selectOptions" |
@@ -24,9 +25,15 @@ | @@ -24,9 +25,15 @@ | ||
24 | </td> | 25 | </td> |
25 | <td style="width: 12vw"> | 26 | <td style="width: 12vw"> |
26 | <div v-if="item.key === 'date_range'"> | 27 | <div v-if="item.key === 'date_range'"> |
27 | - <a-input style="width: 6vw" placeholder="请输入" v-model:value="item.date1" /> | ||
28 | - <span>~</span> | ||
29 | - <a-input style="width: 6vw" placeholder="请输入" v-model:value="item.date2" /> | 28 | + <div> |
29 | + <a-input style="width: 6vw" placeholder="请输入" v-model:value="item.date1" /> | ||
30 | + <span>~</span> | ||
31 | + <a-input style="width: 6vw" placeholder="请输入" v-model:value="item.date2" /> | ||
32 | + </div> | ||
33 | + <div class="flex mt-2"> | ||
34 | + <a-checkbox @change="onHandleCheck" v-model:checked="mores">更多选项</a-checkbox> | ||
35 | + <span v-if="mores">{{ `聚合方式:agg` }}</span> | ||
36 | + </div> | ||
30 | </div> | 37 | </div> |
31 | <div v-else> | 38 | <div v-else> |
32 | <a-input | 39 | <a-input |
@@ -53,6 +60,18 @@ | @@ -53,6 +60,18 @@ | ||
53 | </tbody> | 60 | </tbody> |
54 | </table> | 61 | </table> |
55 | </div> | 62 | </div> |
63 | + <BasicModal | ||
64 | + @register="registerModal" | ||
65 | + title="" | ||
66 | + width="40%" | ||
67 | + :minHeight="90" | ||
68 | + wrap-class-name="history-trend-model" | ||
69 | + :canFullscreen="false" | ||
70 | + @cancel="handleCancelModal" | ||
71 | + @ok="onHandleModal" | ||
72 | + > | ||
73 | + <DateRangeSelect ref="dateRangeSelectRef" /> | ||
74 | + </BasicModal> | ||
56 | </template> | 75 | </template> |
57 | <script lang="ts" setup name="editCellTable"> | 76 | <script lang="ts" setup name="editCellTable"> |
58 | import { reactive, ref, onMounted, nextTick } from 'vue'; | 77 | import { reactive, ref, onMounted, nextTick } from 'vue'; |
@@ -61,6 +80,8 @@ | @@ -61,6 +80,8 @@ | ||
61 | import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue'; | 80 | import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue'; |
62 | import { editCellTableTHeadConfig } from '../../../config'; | 81 | import { editCellTableTHeadConfig } from '../../../config'; |
63 | import { selectType, tableItems } from '../../../types'; | 82 | import { selectType, tableItems } from '../../../types'; |
83 | + import { useModal, BasicModal } from '/@/components/Modal'; | ||
84 | + import DateRangeSelect from './DateRangeSelect/index.vue'; | ||
64 | 85 | ||
65 | defineProps({ | 86 | defineProps({ |
66 | method: { | 87 | method: { |
@@ -70,6 +91,33 @@ | @@ -70,6 +91,33 @@ | ||
70 | 91 | ||
71 | const selectOptions = ref<selectType[]>([]); | 92 | const selectOptions = ref<selectType[]>([]); |
72 | 93 | ||
94 | + const dateRangeSelectRef = ref<InstanceType<typeof DateRangeSelect>>(); | ||
95 | + | ||
96 | + const [registerModal, { closeModal }] = useModal(); | ||
97 | + | ||
98 | + const mores = ref(false); | ||
99 | + | ||
100 | + const onHandleCheck = ({ target }) => { | ||
101 | + mores.value = target?.checked; | ||
102 | + if (mores.value) { | ||
103 | + // openModal(true); | ||
104 | + } | ||
105 | + }; | ||
106 | + | ||
107 | + const handleCancelModal = () => { | ||
108 | + closeModal(); | ||
109 | + dateRangeSelectRef.value?.resetValue(); | ||
110 | + mores.value = false; | ||
111 | + }; | ||
112 | + | ||
113 | + const getDateRangeValue = ref<any>({}); | ||
114 | + | ||
115 | + const onHandleModal = () => { | ||
116 | + const values = dateRangeSelectRef.value?.getValue(); | ||
117 | + getDateRangeValue.value = values; | ||
118 | + closeModal(); | ||
119 | + }; | ||
120 | + | ||
73 | onMounted(() => { | 121 | onMounted(() => { |
74 | getSelectOptions(); | 122 | getSelectOptions(); |
75 | }); | 123 | }); |
@@ -146,21 +194,33 @@ | @@ -146,21 +194,33 @@ | ||
146 | 194 | ||
147 | //获取数据 | 195 | //获取数据 |
148 | const getValue = () => { | 196 | const getValue = () => { |
149 | - const assemblyData = tableArray.content.map((it) => { | 197 | + let assemblyData: any = tableArray.content.map((it) => { |
150 | return { | 198 | return { |
151 | key: it.key, | 199 | key: it.key, |
152 | value: it.key === 'date_range' ? `${it.date1},${it.date2}` : it.value, | 200 | value: it.key === 'date_range' ? `${it.date1},${it.date2}` : it.value, |
201 | + mores: it.key === 'date_range' ? mores.value : null, | ||
153 | editDisabled: it.editDisabled, | 202 | editDisabled: it.editDisabled, |
154 | required: it.required, | 203 | required: it.required, |
155 | }; | 204 | }; |
156 | }); | 205 | }); |
206 | + // assemblyData = assemblyData.filter((item) => item.key !== 'agg,interval'); | ||
207 | + // if (getDateRangeValue.value) { | ||
208 | + // const joinStr = Object.keys(getDateRangeValue.value)?.join(','); | ||
209 | + // if (mores.value) { | ||
210 | + // assemblyData.push({ | ||
211 | + // key: joinStr, | ||
212 | + // value: '', | ||
213 | + // mores: mores.value, | ||
214 | + // }); | ||
215 | + // } | ||
216 | + // } | ||
157 | return assemblyData; | 217 | return assemblyData; |
158 | }; | 218 | }; |
159 | 219 | ||
160 | //设置数据 | 220 | //设置数据 |
161 | const setValue = async (data) => { | 221 | const setValue = async (data) => { |
162 | await nextTick(); | 222 | await nextTick(); |
163 | - const assemblyData = data.map((it) => { | 223 | + let assemblyData = data.map((it) => { |
164 | return { | 224 | return { |
165 | key: it.key, | 225 | key: it.key, |
166 | value: it.value, | 226 | value: it.value, |
@@ -170,6 +230,16 @@ | @@ -170,6 +230,16 @@ | ||
170 | date2: it.key === 'date_range' ? it.value?.split(',')?.at(-1) : '', | 230 | date2: it.key === 'date_range' ? it.value?.split(',')?.at(-1) : '', |
171 | }; | 231 | }; |
172 | }); | 232 | }); |
233 | + const findIsDateRange = data.find((it) => it?.mores === true); | ||
234 | + if (findIsDateRange?.mores) { | ||
235 | + mores.value = findIsDateRange?.mores; | ||
236 | + getDateRangeValue.value = { | ||
237 | + agg: 'agg', | ||
238 | + interval: 'interval', | ||
239 | + }; | ||
240 | + } else { | ||
241 | + assemblyData = assemblyData.filter((item) => item?.mores == false || !item?.mores); | ||
242 | + } | ||
173 | tableArray.content = assemblyData; | 243 | tableArray.content = assemblyData; |
174 | tableArray.content.forEach(() => { | 244 | tableArray.content.forEach(() => { |
175 | handleChange(); | 245 | handleChange(); |
@@ -178,6 +248,7 @@ | @@ -178,6 +248,7 @@ | ||
178 | 248 | ||
179 | //重置数据 | 249 | //重置数据 |
180 | const resetValue = () => { | 250 | const resetValue = () => { |
251 | + mores.value = false; | ||
181 | tableArray.content = []; | 252 | tableArray.content = []; |
182 | tableArray.content.push({ | 253 | tableArray.content.push({ |
183 | key: undefined, | 254 | key: undefined, |
@@ -145,9 +145,18 @@ | @@ -145,9 +145,18 @@ | ||
145 | await nextTick(() => { | 145 | await nextTick(() => { |
146 | //拆分"xx,xx,xx"多个 | 146 | //拆分"xx,xx,xx"多个 |
147 | const getSingleKey = props.data?.list; | 147 | const getSingleKey = props.data?.list; |
148 | + let getMuteDateRangeKeys: any = null; | ||
149 | + const findDateRange = getSingleKey.find( | ||
150 | + (item) => item?.key == 'date_range' && item?.mores === true | ||
151 | + ); | ||
152 | + if (findDateRange) { | ||
153 | + getMuteDateRangeKeys = getMultipleKeys([{ key: 'agg', value: '' }]); | ||
154 | + } else { | ||
155 | + getMuteDateRangeKeys = []; | ||
156 | + } | ||
148 | const getMuteKey = props.data?.list?.filter((it: any) => it.key?.split(',').length > 1); | 157 | const getMuteKey = props.data?.list?.filter((it: any) => it.key?.split(',').length > 1); |
149 | const getMuteKeys = getMultipleKeys(getMuteKey); | 158 | const getMuteKeys = getMultipleKeys(getMuteKey); |
150 | - const mergeKeys = [...getSingleKey, ...getMuteKeys]?.filter( | 159 | + let mergeKeys = [...getSingleKey, ...getMuteKeys, ...getMuteDateRangeKeys]?.filter( |
151 | (it: any) => it.key?.split(',').length === 1 | 160 | (it: any) => it.key?.split(',').length === 1 |
152 | ); | 161 | ); |
153 | testEditCellTableRef.value?.setTableArray(mergeKeys); | 162 | testEditCellTableRef.value?.setTableArray(mergeKeys); |
@@ -159,6 +168,7 @@ | @@ -159,6 +168,7 @@ | ||
159 | const getTestTableKeyValue = () => { | 168 | const getTestTableKeyValue = () => { |
160 | //把日期拆分成多个 | 169 | //把日期拆分成多个 |
161 | const keyValueList: any = []; | 170 | const keyValueList: any = []; |
171 | + console.log(testEditCellTableRef.value?.getValue()); | ||
162 | testEditCellTableRef.value?.getValue()?.forEach((item: any) => { | 172 | testEditCellTableRef.value?.getValue()?.forEach((item: any) => { |
163 | const splitDateKey = item?.key === 'date_range' ? item?.value?.split(',') : []; | 173 | const splitDateKey = item?.key === 'date_range' ? item?.value?.split(',') : []; |
164 | const splitDateValue = item?.key === 'date_range' ? item?.dateValue : []; | 174 | const splitDateValue = item?.key === 'date_range' ? item?.dateValue : []; |
@@ -182,9 +192,12 @@ | @@ -182,9 +192,12 @@ | ||
182 | ? moment(it?.fixed_date_value).valueOf() | 192 | ? moment(it?.fixed_date_value).valueOf() |
183 | : it?.value; | 193 | : it?.value; |
184 | const key = it?.key === 'scope' || it?.key === 'fixed_date' ? it?.value : it?.key; | 194 | const key = it?.key === 'scope' || it?.key === 'fixed_date' ? it?.value : it?.key; |
195 | + const limit = it?.limit; | ||
196 | + console.log(limit); | ||
185 | return { | 197 | return { |
186 | key, | 198 | key, |
187 | value, | 199 | value, |
200 | + limit, | ||
188 | required: it.required, | 201 | required: it.required, |
189 | }; | 202 | }; |
190 | }); | 203 | }); |
@@ -199,10 +212,19 @@ | @@ -199,10 +212,19 @@ | ||
199 | throw new Error('参数不能为空'); | 212 | throw new Error('参数不能为空'); |
200 | } | 213 | } |
201 | const params: any = {}; | 214 | const params: any = {}; |
202 | - getTable?.map((it) => (params[it.key!] = it.value!)); | 215 | + getTable?.map((it) => { |
216 | + console.log(it); | ||
217 | + params[it.key!] = it.value!; | ||
218 | + if (it.key === 'agg') { | ||
219 | + params.limit = it.limit; | ||
220 | + } | ||
221 | + }); | ||
203 | if (params['keys']) { | 222 | if (params['keys']) { |
204 | Reflect.set(params, 'keys', params['keys'].join(',')); | 223 | Reflect.set(params, 'keys', params['keys'].join(',')); |
205 | } | 224 | } |
225 | + if (params['agg'] !== 'NONE') { | ||
226 | + Reflect.set(params, 'limit', null); | ||
227 | + } | ||
206 | excuteData.value = { | 228 | excuteData.value = { |
207 | params, | 229 | params, |
208 | token: getToken.value, | 230 | token: getToken.value, |
1 | <!-- eslint-disable vue/valid-v-model --> | 1 | <!-- eslint-disable vue/valid-v-model --> |
2 | <template> | 2 | <template> |
3 | + <!-- {{ tableTestArray.content }} --> | ||
3 | <div class="table-content"> | 4 | <div class="table-content"> |
4 | <!-- TODO: 待优化测试表格 --> | 5 | <!-- TODO: 待优化测试表格 --> |
5 | <table align="center"> | 6 | <table align="center"> |
@@ -74,6 +75,9 @@ | @@ -74,6 +75,9 @@ | ||
74 | mode="multiple" | 75 | mode="multiple" |
75 | allowClear | 76 | allowClear |
76 | /> | 77 | /> |
78 | + <!-- <div v-else-if="item.value === 'NONE'"> | ||
79 | + <a-input-number id="inputNumber" v-model:value="item.value" :min="7" :max="5000000" /> | ||
80 | + </div> --> | ||
77 | <div v-else-if="item.key === 'date_range'"> | 81 | <div v-else-if="item.key === 'date_range'"> |
78 | <a-button disabled type="primary">{{ item.value?.split(',').at(-2) }}</a-button> | 82 | <a-button disabled type="primary">{{ item.value?.split(',').at(-2) }}</a-button> |
79 | <span>~</span> | 83 | <span>~</span> |
@@ -88,6 +92,33 @@ | @@ -88,6 +92,33 @@ | ||
88 | return triggerNode.parentNode; | 92 | return triggerNode.parentNode; |
89 | } | 93 | } |
90 | " | 94 | " |
95 | + v-else-if="item.key === 'agg'" | ||
96 | + v-model:value="item.value" | ||
97 | + @change="onHandleAgg" | ||
98 | + placeholder="请选择" | ||
99 | + notFoundContent="请选择" | ||
100 | + :options="aggOptions" | ||
101 | + allowClear | ||
102 | + /> | ||
103 | + <Select | ||
104 | + :getPopupContainer=" | ||
105 | + (triggerNode) => { | ||
106 | + return triggerNode.parentNode; | ||
107 | + } | ||
108 | + " | ||
109 | + v-else-if="item.key === 'interval' && item.value !== 'NONE'" | ||
110 | + v-model:value="item.value" | ||
111 | + placeholder="请选择" | ||
112 | + notFoundContent="请选择" | ||
113 | + :options="intervalOptions" | ||
114 | + allowClear | ||
115 | + /> | ||
116 | + <Select | ||
117 | + :getPopupContainer=" | ||
118 | + (triggerNode) => { | ||
119 | + return triggerNode.parentNode; | ||
120 | + } | ||
121 | + " | ||
91 | v-else | 122 | v-else |
92 | v-model:value="item.value" | 123 | v-model:value="item.value" |
93 | placeholder="请选择" | 124 | placeholder="请选择" |
@@ -113,17 +144,27 @@ | @@ -113,17 +144,27 @@ | ||
113 | /> | 144 | /> |
114 | <a-range-picker | 145 | <a-range-picker |
115 | v-else-if="item.key == 'date_range'" | 146 | v-else-if="item.key == 'date_range'" |
116 | - style="width: 6.5vw" | 147 | + style="width: 10vw" |
117 | v-model:value="item.dateValue" | 148 | v-model:value="item.dateValue" |
118 | - :show-time="{ format: 'HH:mm' }" | ||
119 | - format="YYYY-MM-DD HH:mm" | 149 | + :disabled-date="disabledDate" |
150 | + :show-time="{ format: 'HH:mm:ss' }" | ||
151 | + @calendarChange="calendarPriceRangeChange" | ||
152 | + @change="changePriceRangeDate" | ||
153 | + format="YYYY-MM-DD HH:mm:ss" | ||
120 | :placeholder="['开始', '结束']" | 154 | :placeholder="['开始', '结束']" |
121 | /> | 155 | /> |
156 | + <a-input-number | ||
157 | + v-else-if="item.value == 'NONE'" | ||
158 | + v-model:value="item.limit" | ||
159 | + :min="7" | ||
160 | + :max="50000" | ||
161 | + /> | ||
122 | <a-input v-else disabled placeholder="请输入" v-model:value="item.keyValue" /> | 162 | <a-input v-else disabled placeholder="请输入" v-model:value="item.keyValue" /> |
123 | </td> | 163 | </td> |
124 | </tr> | 164 | </tr> |
125 | </tbody> | 165 | </tbody> |
126 | </table> | 166 | </table> |
167 | + <!-- {{ tableTestArray.content }} --> | ||
127 | </div> | 168 | </div> |
128 | </template> | 169 | </template> |
129 | <script lang="ts" setup name="editCellTable"> | 170 | <script lang="ts" setup name="editCellTable"> |
@@ -136,6 +177,10 @@ | @@ -136,6 +177,10 @@ | ||
136 | import { tableItems, selectType } from '../../../types'; | 177 | import { tableItems, selectType } from '../../../types'; |
137 | import { editTestCellTableTHeadConfig } from '../../../config'; | 178 | import { editTestCellTableTHeadConfig } from '../../../config'; |
138 | import { QuestionCircleOutlined } from '@ant-design/icons-vue'; | 179 | import { QuestionCircleOutlined } from '@ant-design/icons-vue'; |
180 | + import moment from 'moment'; | ||
181 | + import { AggregateDataEnum } from '/@/views/report/config/timeConfig'; | ||
182 | + import { getPacketIntervalByRange } from '/@/views/device/localtion/cpns/TimePeriodForm/helper'; | ||
183 | + import { uniqBy } from 'lodash'; | ||
139 | 184 | ||
140 | const props = defineProps({ | 185 | const props = defineProps({ |
141 | method: { | 186 | method: { |
@@ -147,6 +192,14 @@ | @@ -147,6 +192,14 @@ | ||
147 | }); | 192 | }); |
148 | 193 | ||
149 | onMounted(async () => { | 194 | onMounted(async () => { |
195 | + aggOptions.value = [ | ||
196 | + { label: '最小值', value: AggregateDataEnum.MIN }, | ||
197 | + { label: '最大值', value: AggregateDataEnum.MAX }, | ||
198 | + { label: '平均值', value: AggregateDataEnum.AVG }, | ||
199 | + { label: '求和', value: AggregateDataEnum.SUM }, | ||
200 | + { label: '计数', value: AggregateDataEnum.COUNT }, | ||
201 | + { label: '空', value: AggregateDataEnum.NONE }, | ||
202 | + ]; | ||
150 | const res = await findDictItemByCode({ dictCode: 'dataview_builtin_params' }); | 203 | const res = await findDictItemByCode({ dictCode: 'dataview_builtin_params' }); |
151 | selectOptions.value = res.map((m) => ({ label: m.itemText, value: m.itemValue })); | 204 | selectOptions.value = res.map((m) => ({ label: m.itemText, value: m.itemValue })); |
152 | selectOptions.value.push({ | 205 | selectOptions.value.push({ |
@@ -167,6 +220,10 @@ | @@ -167,6 +220,10 @@ | ||
167 | 220 | ||
168 | const attributeOptions = ref<selectType[]>([]); | 221 | const attributeOptions = ref<selectType[]>([]); |
169 | 222 | ||
223 | + const aggOptions = ref<selectType[]>([]); | ||
224 | + | ||
225 | + const intervalOptions = ref<selectType[]>([]); | ||
226 | + | ||
170 | const treeData = ref([]); | 227 | const treeData = ref([]); |
171 | 228 | ||
172 | const tableTestArray = reactive<{ | 229 | const tableTestArray = reactive<{ |
@@ -177,12 +234,50 @@ | @@ -177,12 +234,50 @@ | ||
177 | key: undefined, | 234 | key: undefined, |
178 | value: undefined, | 235 | value: undefined, |
179 | keyValue: null, | 236 | keyValue: null, |
237 | + limit: 7, | ||
180 | editDisabled: false, | 238 | editDisabled: false, |
181 | dateValue: null, | 239 | dateValue: null, |
182 | }, | 240 | }, |
183 | ], | 241 | ], |
184 | }); | 242 | }); |
185 | 243 | ||
244 | + const onHandleAgg = (e) => { | ||
245 | + if (e === 'NONE') { | ||
246 | + tableTestArray.content = tableTestArray.content.filter((item) => item.key !== 'interval'); | ||
247 | + } else { | ||
248 | + tableTestArray.content.push({ | ||
249 | + key: 'interval', | ||
250 | + value: '', | ||
251 | + }); | ||
252 | + tableTestArray.content = uniqBy(tableTestArray.content, 'key'); | ||
253 | + } | ||
254 | + }; | ||
255 | + | ||
256 | + const selectPriceDate = ref(''); | ||
257 | + | ||
258 | + const offsetDays = 86400000 * 365; | ||
259 | + | ||
260 | + const calendarPriceRangeChange = (date) => { | ||
261 | + selectPriceDate.value = date[0]; | ||
262 | + intervalOptions.value = getPacketIntervalByRange(date) as any; | ||
263 | + }; | ||
264 | + | ||
265 | + const changePriceRangeDate = () => { | ||
266 | + selectPriceDate.value = ''; | ||
267 | + }; | ||
268 | + | ||
269 | + const disabledDate = (current) => { | ||
270 | + if (selectPriceDate.value) { | ||
271 | + let selectV = moment(selectPriceDate.value, 'YYYY-MM-DD').valueOf(); | ||
272 | + return ( | ||
273 | + current > moment(new Date(selectV + offsetDays), 'YYYY-MM-DD') || | ||
274 | + current < moment(new Date(selectV - offsetDays), 'YYYY-MM-DD') | ||
275 | + ); | ||
276 | + } else { | ||
277 | + return false; | ||
278 | + } | ||
279 | + }; | ||
280 | + | ||
186 | //设置数据 | 281 | //设置数据 |
187 | const setTableArray = (data) => { | 282 | const setTableArray = (data) => { |
188 | const list = cloneDeep(data); | 283 | const list = cloneDeep(data); |
@@ -14,6 +14,9 @@ export type tableItems = { | @@ -14,6 +14,9 @@ export type tableItems = { | ||
14 | fixed_date_value?: string; | 14 | fixed_date_value?: string; |
15 | editDisabled?: boolean; | 15 | editDisabled?: boolean; |
16 | required?: boolean; | 16 | required?: boolean; |
17 | + data_range_select?: boolean; | ||
18 | + limit?: number; | ||
19 | + isDateRange?: boolean; | ||
17 | date1?: string; | 20 | date1?: string; |
18 | date2?: string; | 21 | date2?: string; |
19 | keyValue?: null | string; | 22 | keyValue?: null | string; |
@@ -37,11 +37,7 @@ | @@ -37,11 +37,7 @@ | ||
37 | <a-col :span="4"> | 37 | <a-col :span="4"> |
38 | <a-range-picker | 38 | <a-range-picker |
39 | style="width: 400px" | 39 | style="width: 400px" |
40 | - v-model:value="searchInfo.sendTime" | ||
41 | - :show-time="{ | ||
42 | - hideDisabledOptions: true, | ||
43 | - defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('11:59:59', 'HH:mm:ss')], | ||
44 | - }" | 40 | + v-model:value="sendTime" |
45 | format="YYYY-MM-DD HH:mm:ss" | 41 | format="YYYY-MM-DD HH:mm:ss" |
46 | /> | 42 | /> |
47 | </a-col> | 43 | </a-col> |
@@ -126,17 +122,18 @@ | @@ -126,17 +122,18 @@ | ||
126 | current: 1, | 122 | current: 1, |
127 | pageSize: 10, | 123 | pageSize: 10, |
128 | }); | 124 | }); |
125 | + const sendTime = ref([]); | ||
126 | + | ||
129 | const searchInfo: any = reactive({ | 127 | const searchInfo: any = reactive({ |
130 | jobName: '', | 128 | jobName: '', |
131 | jobGroup: null, | 129 | jobGroup: null, |
132 | status: null, | 130 | status: null, |
133 | - sendTime: [], | ||
134 | }); | 131 | }); |
135 | const handleClearData = async () => { | 132 | const handleClearData = async () => { |
136 | searchInfo.jobName = ''; | 133 | searchInfo.jobName = ''; |
137 | searchInfo.jobGroup = null; | 134 | searchInfo.jobGroup = null; |
138 | searchInfo.status = null; | 135 | searchInfo.status = null; |
139 | - searchInfo.sendTime = []; | 136 | + sendTime.value = []; |
140 | setProps({ | 137 | setProps({ |
141 | loading: true, | 138 | loading: true, |
142 | }); | 139 | }); |
@@ -234,7 +231,7 @@ | @@ -234,7 +231,7 @@ | ||
234 | searchInfo.jobName = ''; | 231 | searchInfo.jobName = ''; |
235 | searchInfo.jobGroup = null; | 232 | searchInfo.jobGroup = null; |
236 | searchInfo.status = null; | 233 | searchInfo.status = null; |
237 | - searchInfo.sendTime = []; | 234 | + sendTime.value = []; |
238 | }); | 235 | }); |
239 | }); | 236 | }); |
240 | const onChange = async (page) => { | 237 | const onChange = async (page) => { |
@@ -266,16 +263,24 @@ | @@ -266,16 +263,24 @@ | ||
266 | setProps({ | 263 | setProps({ |
267 | loading: true, | 264 | loading: true, |
268 | }); | 265 | }); |
269 | - const res: any = await schedueLogPage({ | 266 | + console.log(sendTime.value); |
267 | + let startTime = null; | ||
268 | + let endTime = null; | ||
269 | + if (sendTime.value.length > 0) { | ||
270 | + startTime = moment(sendTime.value.at(-2)).valueOf(); | ||
271 | + endTime = moment(sendTime.value.at(-1)).valueOf(); | ||
272 | + } | ||
273 | + const data = { | ||
270 | jobId: getJobId.value, | 274 | jobId: getJobId.value, |
271 | jobName: searchInfo.jobName, | 275 | jobName: searchInfo.jobName, |
272 | jobGroup: searchInfo.jobGroup, | 276 | jobGroup: searchInfo.jobGroup, |
273 | status: searchInfo.status, | 277 | status: searchInfo.status, |
274 | page: pagination.current, | 278 | page: pagination.current, |
275 | pageSize: pagination.pageSize, | 279 | pageSize: pagination.pageSize, |
276 | - startTime: moment(searchInfo.sendTime.at(-2)).valueOf(), | ||
277 | - endTime: moment(searchInfo.sendTime.at(-1)).valueOf(), | ||
278 | - }); | 280 | + startTime, |
281 | + endTime, | ||
282 | + }; | ||
283 | + const res: any = await schedueLogPage(data); | ||
279 | setTableData(res.items); | 284 | setTableData(res.items); |
280 | pagination.total = res.total; | 285 | pagination.total = res.total; |
281 | setProps({ | 286 | setProps({ |