Commit 3ed468bae6eb4bb43e87d54ca2efe1ccfb9f93ae
1 parent
37b07bcf
perf: 调整设备通道,由字段gptDeviceDTOS修改为gbtDeviceDTOS
Showing
1 changed file
with
7 additions
and
7 deletions
| ... | ... | @@ -106,11 +106,11 @@ |
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | 108 | //验证视频通道号 |
| 109 | - const validateChannelNos = (gptDeviceDTOS) => { | |
| 110 | - if (isArray(gptDeviceDTOS) && gptDeviceDTOS.length == 0) { | |
| 109 | + const validateChannelNos = (gbtDeviceDTOS) => { | |
| 110 | + if (isArray(gbtDeviceDTOS) && gbtDeviceDTOS.length == 0) { | |
| 111 | 111 | errorMessage('请选择设备通道号'); |
| 112 | 112 | } |
| 113 | - gptDeviceDTOS.some((deviceDTO) => { | |
| 113 | + gbtDeviceDTOS.some((deviceDTO) => { | |
| 114 | 114 | const channelNo = deviceDTO['channelNos']; |
| 115 | 115 | if (!channelNo || (isArray(channelNo) && channelNo.length == 0)) { |
| 116 | 116 | errorMessage('请选择通道号'); |
| ... | ... | @@ -123,15 +123,15 @@ |
| 123 | 123 | setDrawerProps({ confirmLoading: true }); |
| 124 | 124 | const values = await validate(); |
| 125 | 125 | if (!values) return; |
| 126 | - let gptDeviceDTOS: Recordable[] | null = null; | |
| 126 | + let gbtDeviceDTOS: Recordable[] | null = null; | |
| 127 | 127 | if (values.allDevice === GBT28181DeviceSelectMethod.PARTIAL) { |
| 128 | - gptDeviceDTOS = selectDeviceRef.value?.getDeviceChannels() as any as Recordable[]; | |
| 129 | - validateChannelNos(gptDeviceDTOS); | |
| 128 | + gbtDeviceDTOS = selectDeviceRef.value?.getDeviceChannels() as any as Recordable[]; | |
| 129 | + validateChannelNos(gbtDeviceDTOS); | |
| 130 | 130 | } |
| 131 | 131 | const mergeValues = { |
| 132 | 132 | ...values, |
| 133 | 133 | accessMode: 2, |
| 134 | - gptDeviceDTOS, | |
| 134 | + gbtDeviceDTOS, | |
| 135 | 135 | }; |
| 136 | 136 | await createGPTPostApi(mergeValues); |
| 137 | 137 | createMessage.success('批量新增成功'); | ... | ... |