Commit 1a098da4162f96b5928ca16796306cd66e402b16
1 parent
a6ede4b9
fix/perf: :修复规则链相关bug,优化视频控制云台添加控制速度滑块
Showing
8 changed files
with
92 additions
and
62 deletions
... | ... | @@ -9,7 +9,7 @@ export default { |
9 | 9 | ROUND: '小数', |
10 | 10 | USE_CACHE: '使用缓存获取最新值', |
11 | 11 | TELL_FAILURE_IF_DELTA_IS_NEGATIVE: '如果delta为负数,则告知Failure【失败】', |
12 | - ADD_PERIOD_BETWEEN_MSGS: '在消息之间添加时间差值{单位:毫秒}', | |
12 | + ADD_PERIOD_BETWEEN_MSGS: '在消息之间添加时间差值(单位:毫秒)', | |
13 | 13 | PERIOD_VALUE_KEY: '期间值键', |
14 | 14 | }, |
15 | 15 | CustomerAttributesFieldsNameEnum: { | ... | ... |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | ZoomInOutlined, |
19 | 19 | ZoomOutOutlined, |
20 | 20 | } from '@ant-design/icons-vue'; |
21 | - import { Button } from 'ant-design-vue'; | |
21 | + import { Button, Slider } from 'ant-design-vue'; | |
22 | 22 | import { nextTick } from 'vue'; |
23 | 23 | import { controlling } from '/@/api/camera/cameraManager'; |
24 | 24 | import { setVideoControl } from '/@/api/device/videoChannel'; |
... | ... | @@ -88,6 +88,9 @@ |
88 | 88 | return { width, height } as CSSProperties; |
89 | 89 | }); |
90 | 90 | |
91 | + // 控制云台控制速度 | |
92 | + const sliderValue = ref<number>(123); | |
93 | + | |
91 | 94 | const init = () => { |
92 | 95 | if (unref(videoPlayInstance)) unref(videoPlayInstance)?.dispose(); |
93 | 96 | videoPlayInstance.value = videoJs(unref(videoPlayEl)!, unref(getOptions), () => { |
... | ... | @@ -151,7 +154,7 @@ |
151 | 154 | //长按开始 |
152 | 155 | const moveStart = (action) => { |
153 | 156 | if (unref(getGBT)) { |
154 | - handleGBTControl(action, '30'); | |
157 | + handleGBTControl(action, unref(sliderValue)); | |
155 | 158 | return; |
156 | 159 | } |
157 | 160 | handleControl(0, action); |
... | ... | @@ -160,7 +163,7 @@ |
160 | 163 | // 长按结束 |
161 | 164 | const moveStop = (action) => { |
162 | 165 | if (unref(getGBT)) { |
163 | - handleGBTControl('STOP', '30'); | |
166 | + handleGBTControl('STOP', unref(sliderValue)); | |
164 | 167 | return; |
165 | 168 | } |
166 | 169 | handleControl(1, action); |
... | ... | @@ -245,12 +248,15 @@ |
245 | 248 | <Button class="circle" @click="handleClick" /> |
246 | 249 | </div> |
247 | 250 | </div> |
251 | + <div class="mt-5" v-if="getGBT"> | |
252 | + <Slider v-model:value="sliderValue" :min="0" :max="255" style="width: 130px" /> | |
253 | + </div> | |
248 | 254 | <div class="flex justify-center mt-8"> |
249 | 255 | <Button |
250 | 256 | class="button-icon" |
251 | 257 | @mousedown="moveStart('ZOOM_IN')" |
252 | 258 | @mouseup="moveStop('ZOOM_IN')" |
253 | - style="border-radius: :50%;" | |
259 | + style="border-radius: 50%" | |
254 | 260 | > |
255 | 261 | <ZoomInOutlined style="color: #315a9c; font-size: 1.5rem" /> |
256 | 262 | </Button> |
... | ... | @@ -258,7 +264,7 @@ |
258 | 264 | class="ml-10 button-icon" |
259 | 265 | @mousedown="moveStart('ZOOM_OUT')" |
260 | 266 | @mouseup="moveStop('ZOOM_OUT')" |
261 | - style="border-radius: :50%;" | |
267 | + style="border-radius: 50%" | |
262 | 268 | > |
263 | 269 | <ZoomOutOutlined style="color: #315a9c; font-size: 1.5rem" /> |
264 | 270 | </Button> |
... | ... | @@ -380,4 +386,8 @@ |
380 | 386 | border-radius: 0 0 5rem 0; |
381 | 387 | background-color: #e2dede; |
382 | 388 | } |
389 | + | |
390 | + :deep(.ant-slider-track) { | |
391 | + background: #5586d4; | |
392 | + } | |
383 | 393 | </style> | ... | ... |
... | ... | @@ -12,6 +12,7 @@ export const formSchemas: FormSchema[] = [ |
12 | 12 | field: ClearAlarmFieldsEnum.ALARM_DETAILS_BUILD_JS, |
13 | 13 | component: 'JavascriptEditorWithTestModal', |
14 | 14 | label: t(ClearAlarmFieldsNameEnum.ALARM_DETAILS_BUILD_JS), |
15 | + changeEvent: 'update:value', | |
15 | 16 | componentProps: { |
16 | 17 | javaScriptEditorProps: { |
17 | 18 | functionName: 'Details', | ... | ... |
1 | -import { PerimeterTypeEnum, RangeUtilEnum, RangeUtilNameEnum } from '../../../enum/form'; | |
1 | +import { | |
2 | + PerimeterTypeEnum, | |
3 | + RangeUtilEnum, | |
4 | + RangeUtilNameEnum, | |
5 | + TimeIntervalUnitEnum, | |
6 | + TimeIntervalUnitNameEnum, | |
7 | +} from '../../../enum/form'; | |
2 | 8 | import { |
3 | 9 | GpsGeofencingEventsFieldsEnum, |
4 | 10 | GpsGeofencingEventsFieldsNameEnum, |
... | ... | @@ -183,8 +189,8 @@ export const formSchemas: FormSchema[] = [ |
183 | 189 | }, |
184 | 190 | ], |
185 | 191 | componentProps: { |
186 | - options: Object.keys(RangeUtilEnum).map((value) => ({ | |
187 | - label: RangeUtilNameEnum[value], | |
192 | + options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | |
193 | + label: TimeIntervalUnitNameEnum[value], | |
188 | 194 | value, |
189 | 195 | })), |
190 | 196 | getPopupContainer: () => document.body, |
... | ... | @@ -220,8 +226,8 @@ export const formSchemas: FormSchema[] = [ |
220 | 226 | }, |
221 | 227 | ], |
222 | 228 | componentProps: { |
223 | - options: Object.keys(RangeUtilEnum).map((value) => ({ | |
224 | - label: RangeUtilNameEnum[value], | |
229 | + options: Object.keys(TimeIntervalUnitEnum).map((value) => ({ | |
230 | + label: TimeIntervalUnitNameEnum[value], | |
225 | 231 | value, |
226 | 232 | })), |
227 | 233 | getPopupContainer: () => document.body, | ... | ... |
... | ... | @@ -13,7 +13,13 @@ export const formSchemas: FormSchema[] = [ |
13 | 13 | field: CustomerDetailsFieldsEnum.DETAILS_LIST, |
14 | 14 | component: 'Select', |
15 | 15 | label: t(CustomerDetailsFieldsNameEnum.DETAILS_LIST), |
16 | - rules: [{ required: true, message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}` }], | |
16 | + rules: [ | |
17 | + { | |
18 | + required: true, | |
19 | + message: `请选择${t(CustomerDetailsFieldsNameEnum.DETAILS_LIST)}`, | |
20 | + type: 'array', | |
21 | + }, | |
22 | + ], | |
17 | 23 | componentProps: { |
18 | 24 | mode: 'multiple', |
19 | 25 | options: Object.keys(DetailsListEnum).map((item) => ({ | ... | ... |
... | ... | @@ -8,59 +8,59 @@ import { useI18n } from '/@/hooks/web/useI18n'; |
8 | 8 | const { t } = useI18n(); |
9 | 9 | |
10 | 10 | export const formSchemas: FormSchema[] = [ |
11 | - // { | |
12 | - // field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, | |
13 | - // component: 'Checkbox', | |
14 | - // label: t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT), | |
15 | - // renderComponentContent: () => ({ | |
16 | - // default: () => | |
17 | - // 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', | |
18 | - // }), | |
19 | - // }, | |
20 | - // { | |
21 | - // field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, | |
22 | - // component: 'Select', | |
23 | - // label: t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES), | |
24 | - // helpMessage: [ | |
25 | - // `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
26 | - // ], | |
27 | - // componentProps: { | |
28 | - // mode: 'tags', | |
29 | - // open: false, | |
30 | - // placeholder: `请输入${t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)}`, | |
31 | - // }, | |
32 | - // }, | |
33 | - // { | |
34 | - // field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, | |
35 | - // component: 'Select', | |
36 | - // label: t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES), | |
37 | - // helpMessage: [ | |
38 | - // `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
39 | - // ], | |
40 | - // componentProps: { | |
41 | - // mode: 'tags', | |
42 | - // open: false, | |
43 | - // placeholder: `请输入${t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)}`, | |
44 | - // }, | |
45 | - // }, | |
46 | - // { | |
47 | - // field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, | |
48 | - // component: 'Select', | |
49 | - // label: t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES), | |
50 | - // helpMessage: [ | |
51 | - // `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
52 | - // ], | |
53 | - // componentProps: { | |
54 | - // mode: 'tags', | |
55 | - // open: false, | |
56 | - // placeholder: `请输入${t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)}`, | |
57 | - // }, | |
58 | - // }, | |
11 | + { | |
12 | + field: OriginatorAttributesEnum.TELL_FAILURE_IF_ABSENT, | |
13 | + component: 'Checkbox', | |
14 | + label: t(OriginatorAttributesNameEnum.TELL_FAILURE_IF_ABSENT), | |
15 | + renderComponentContent: () => ({ | |
16 | + default: () => | |
17 | + 'If at least one selected key doesn\'t exist the outbound message will report "Failure".', | |
18 | + }), | |
19 | + }, | |
20 | + { | |
21 | + field: OriginatorAttributesEnum.CLIENT_ATTRIBUTE_NAMES, | |
22 | + component: 'Select', | |
23 | + label: t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES), | |
24 | + helpMessage: [ | |
25 | + `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
26 | + ], | |
27 | + componentProps: { | |
28 | + mode: 'tags', | |
29 | + open: false, | |
30 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.CLIENT_ATTRIBUTE_NAMES)}`, | |
31 | + }, | |
32 | + }, | |
33 | + { | |
34 | + field: OriginatorAttributesEnum.SHARED_ATTRIBUTE_NAMES, | |
35 | + component: 'Select', | |
36 | + label: t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES), | |
37 | + helpMessage: [ | |
38 | + `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
39 | + ], | |
40 | + componentProps: { | |
41 | + mode: 'tags', | |
42 | + open: false, | |
43 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SHARED_ATTRIBUTE_NAMES)}`, | |
44 | + }, | |
45 | + }, | |
46 | + { | |
47 | + field: OriginatorAttributesEnum.SERVER_ATTRIBUTE_NAMES, | |
48 | + component: 'Select', | |
49 | + label: t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES), | |
50 | + helpMessage: [ | |
51 | + `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, | |
52 | + ], | |
53 | + componentProps: { | |
54 | + mode: 'tags', | |
55 | + open: false, | |
56 | + placeholder: `请输入${t(OriginatorAttributesNameEnum.SERVER_ATTRIBUTE_NAMES)}`, | |
57 | + }, | |
58 | + }, | |
59 | 59 | { |
60 | 60 | field: OriginatorAttributesEnum.LATEST_TS_KEY_NAMES, |
61 | 61 | component: 'Select', |
62 | 62 | label: t(OriginatorAttributesNameEnum.LATEST_TS_KEY_NAMES), |
63 | - required: true, | |
63 | + // required: true, | |
64 | 64 | helpMessage: [ |
65 | 65 | `Hint: use \${metadataKey} for value from metadata, $[messageKey] for value from message body`, |
66 | 66 | ], | ... | ... |
... | ... | @@ -13,7 +13,13 @@ export const formSchemas: FormSchema[] = [ |
13 | 13 | field: TenantDetailsFieldsEnum.DETAILS_LIST, |
14 | 14 | component: 'Select', |
15 | 15 | label: t(TenantDetailsFieldsNameEnum.DETAILS_LIST), |
16 | - rules: [{ required: true, message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}` }], | |
16 | + rules: [ | |
17 | + { | |
18 | + required: true, | |
19 | + message: `请选择${t(TenantDetailsFieldsNameEnum.DETAILS_LIST)}`, | |
20 | + type: 'array', | |
21 | + }, | |
22 | + ], | |
17 | 23 | componentProps: { |
18 | 24 | mode: 'multiple', |
19 | 25 | options: Object.keys(DetailsListEnum).map((value) => ({ | ... | ... |