Commit 6c850986092ead5c945d2cd13838f5a69d378b76
Merge branch 'ft_fix_clientid' into 'main_dev'
fix: 修复数据流转mqtt clientId自定义无效问题和编辑会修改问题 See merge request yunteng/thingskit-front!595
Showing
2 changed files
with
6 additions
and
5 deletions
| ... | ... | @@ -587,7 +587,7 @@ export const modeMqttForm: FormSchema[] = [ |
| 587 | 587 | const { updateSchema } = formActionType; |
| 588 | 588 | return { |
| 589 | 589 | onChange(e) { |
| 590 | - if (e == null || e == undefined) { | |
| 590 | + if (!e.data) { | |
| 591 | 591 | updateSchema({ |
| 592 | 592 | field: 'appendClientIdSuffix', |
| 593 | 593 | show: false, |
| ... | ... | @@ -599,7 +599,7 @@ export const modeMqttForm: FormSchema[] = [ |
| 599 | 599 | }); |
| 600 | 600 | } |
| 601 | 601 | }, |
| 602 | - maxLength: 8, | |
| 602 | + maxLength: 255, | |
| 603 | 603 | placeholder: '请输入Client ID', |
| 604 | 604 | }; |
| 605 | 605 | }, | ... | ... |
| ... | ... | @@ -104,7 +104,6 @@ |
| 104 | 104 | import { Alert, Divider, Descriptions, Upload } from 'ant-design-vue'; |
| 105 | 105 | import { uploadApi } from '/@/api/personal/index'; |
| 106 | 106 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 107 | - import { buildUUID } from '/@/utils/uuid'; | |
| 108 | 107 | |
| 109 | 108 | export default defineComponent({ |
| 110 | 109 | components: { |
| ... | ... | @@ -344,8 +343,9 @@ |
| 344 | 343 | credentialsV.credentials.certFileName = certFileName.value; |
| 345 | 344 | credentialsV.credentials.privateKeyFileName = privateKeyFileName.value; |
| 346 | 345 | } |
| 347 | - //clientId 从uuid里切片8位 | |
| 348 | - sonValues.configuration.clientId = buildUUID().slice(0, 8); | |
| 346 | + if (!sonValues.configuration.clientId) { | |
| 347 | + sonValues.configuration.clientId = null; | |
| 348 | + } | |
| 349 | 349 | Object.assign(sonValues.configuration, credentialsV); |
| 350 | 350 | return sonValues; |
| 351 | 351 | }; |
| ... | ... | @@ -376,6 +376,7 @@ |
| 376 | 376 | :deep(.ant-col-24) { |
| 377 | 377 | margin-bottom: 20px !important; |
| 378 | 378 | } |
| 379 | + | |
| 379 | 380 | :deep(.ant-btn-default) { |
| 380 | 381 | color: white; |
| 381 | 382 | background: #377dff; | ... | ... |