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