Commit fdae2a704b6317c869d1b5c5d034fa1ce9512e85
Merge branch 'fix_video_params' into 'main_dev'
fix: 修改视频管理,单个新增gbt28181,未传设备名称 See merge request yunteng/thingskit-front!1243
Showing
2 changed files
with
21 additions
and
1 deletions
... | ... | @@ -178,7 +178,9 @@ |
178 | 178 | values.params = { |
179 | 179 | channelNo: values.channelNo, |
180 | 180 | deviceId: values.deviceId, |
181 | + deviceName: values.deviceName, | |
181 | 182 | }; |
183 | + Reflect.deleteProperty(values, 'deviceName'); | |
182 | 184 | } |
183 | 185 | // GBT28181,也需要传sn |
184 | 186 | await createOrEditCameraManage({ | ... | ... |
... | ... | @@ -215,6 +215,16 @@ export const formSchema: QFormSchema[] = [ |
215 | 215 | label: '所属组织', |
216 | 216 | required: true, |
217 | 217 | component: 'OrgTreeSelect', |
218 | + componentProps({ formActionType }) { | |
219 | + return { | |
220 | + onChange() { | |
221 | + formActionType.setFieldsValue({ | |
222 | + deviceId: null, | |
223 | + channelNo: null, | |
224 | + }); | |
225 | + }, | |
226 | + }; | |
227 | + }, | |
218 | 228 | }, |
219 | 229 | { |
220 | 230 | label: '视频流获取方式', |
... | ... | @@ -243,6 +253,12 @@ export const formSchema: QFormSchema[] = [ |
243 | 253 | }, |
244 | 254 | }, |
245 | 255 | { |
256 | + field: 'deviceName', | |
257 | + label: '设备名称', | |
258 | + component: 'Input', | |
259 | + show: false, | |
260 | + }, | |
261 | + { | |
246 | 262 | field: 'deviceId', |
247 | 263 | label: '设备', |
248 | 264 | required: true, |
... | ... | @@ -270,9 +286,11 @@ export const formSchema: QFormSchema[] = [ |
270 | 286 | return []; |
271 | 287 | }, |
272 | 288 | placeholder: '请选择设备', |
273 | - onChange() { | |
289 | + onChange(_, options) { | |
290 | + const { name, alias } = options; | |
274 | 291 | setFieldsValue({ |
275 | 292 | channelNo: [], |
293 | + deviceName: alias || name, | |
276 | 294 | }); |
277 | 295 | }, |
278 | 296 | onFocus() { | ... | ... |