Commit e7cb18668ad5af4e402b4f4efdeec02dd46dfce9
Merge branch 'main_dev' into 'main'
feat: 视频配置萤石云配置新增通道编号 See merge request yunteng/thingskit-front!1171
Showing
2 changed files
with
54 additions
and
11 deletions
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | :title="getTitle" |
7 | 7 | width="30%" |
8 | 8 | @ok="handleSubmit" |
9 | + wrapClassName="camera-configration-drawer" | |
9 | 10 | > |
10 | 11 | <BasicForm @register="registerForm"> |
11 | 12 | <template #videoPlatformIdSlot="{ model, field }"> |
... | ... | @@ -125,7 +126,11 @@ |
125 | 126 | }); |
126 | 127 | } |
127 | 128 | |
128 | - setFieldsValue({ ...record, videoType: record.videoPlatformDTO?.type }); | |
129 | + setFieldsValue({ | |
130 | + ...record, | |
131 | + videoType: record.videoPlatformDTO?.type, | |
132 | + ...(record?.params || {}), | |
133 | + }); | |
129 | 134 | } else { |
130 | 135 | editId.value = ''; |
131 | 136 | } |
... | ... | @@ -157,6 +162,7 @@ |
157 | 162 | ) { |
158 | 163 | values.streamType = values.articulation; |
159 | 164 | values.playProtocol = values.videoFormat; |
165 | + values.params = values.channelNo ? { channelNo: values.channelNo } : null; | |
160 | 166 | } |
161 | 167 | |
162 | 168 | await createOrEditCameraManage(values); |
... | ... | @@ -190,3 +196,11 @@ |
190 | 196 | }, |
191 | 197 | }); |
192 | 198 | </script> |
199 | + | |
200 | +<style lang="less"> | |
201 | + .camera-configration-drawer { | |
202 | + .ant-input-number { | |
203 | + width: 100% !important; | |
204 | + } | |
205 | + } | |
206 | +</style> | ... | ... |
... | ... | @@ -250,16 +250,27 @@ export const formSchema: QFormSchema[] = [ |
250 | 250 | required: true, |
251 | 251 | defaultValue: VideoPlatformEnum.SCI, |
252 | 252 | ifShow: ({ values }) => values.accessMode === AccessMode.Streaming, |
253 | - componentProps: { | |
254 | - api: async (params) => { | |
255 | - const values = await findDictItemByCode(params); | |
256 | - return values.map((item) => ({ label: item.itemText, value: Number(item.itemValue) })); | |
257 | - }, | |
258 | - params: { | |
259 | - dictCode: DictEnum.STREAMING_MEDIA_TYPE, | |
260 | - }, | |
261 | - getPopupContainer: () => document.body, | |
262 | - placeholder: `请选择平台类型`, | |
253 | + componentProps: ({ formActionType }) => { | |
254 | + return { | |
255 | + api: async (params) => { | |
256 | + const values = await findDictItemByCode(params); | |
257 | + return values.map((item) => ({ label: item.itemText, value: Number(item.itemValue) })); | |
258 | + }, | |
259 | + params: { | |
260 | + dictCode: DictEnum.STREAMING_MEDIA_TYPE, | |
261 | + }, | |
262 | + getPopupContainer: () => document.body, | |
263 | + placeholder: `请选择平台类型`, | |
264 | + onChange() { | |
265 | + const { setFieldsValue } = formActionType; | |
266 | + setFieldsValue({ | |
267 | + articulation: ArticulationEnumType.HIGH_DEFINITION, | |
268 | + playProtocol: PlayProtocol.HTTP, | |
269 | + sn: null, | |
270 | + channelNo: null, | |
271 | + }); | |
272 | + }, | |
273 | + }; | |
263 | 274 | }, |
264 | 275 | }, |
265 | 276 | { |
... | ... | @@ -384,4 +395,22 @@ export const formSchema: QFormSchema[] = [ |
384 | 395 | placeholder: '请输入监控点编号', |
385 | 396 | }, |
386 | 397 | }, |
398 | + { | |
399 | + field: 'channelNo', | |
400 | + label: '通道号', | |
401 | + component: 'InputNumber', | |
402 | + ifShow({ values }) { | |
403 | + return ( | |
404 | + values.accessMode === AccessMode.Streaming && | |
405 | + values.videoType === VideoPlatformEnum.FLUORITE | |
406 | + ); | |
407 | + }, | |
408 | + componentProps: { | |
409 | + min: 1, | |
410 | + max: 10000, | |
411 | + step: 1, | |
412 | + placeholder: '请输入通道号', | |
413 | + precision: 0, | |
414 | + }, | |
415 | + }, | |
387 | 416 | ]; | ... | ... |