Commit e17515bbd29cd25c6e6c2cefeda875f308704008

Authored by fengwotao
1 parent 828a7a79

fix: 修复数据流转mqtt clientId自定义无效问题和编辑会修改问题

@@ -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,
@@ -344,8 +344,12 @@ @@ -344,8 +344,12 @@
344 credentialsV.credentials.certFileName = certFileName.value; 344 credentialsV.credentials.certFileName = certFileName.value;
345 credentialsV.credentials.privateKeyFileName = privateKeyFileName.value; 345 credentialsV.credentials.privateKeyFileName = privateKeyFileName.value;
346 } 346 }
347 - //clientId 从uuid里切片8位  
348 - sonValues.configuration.clientId = buildUUID().slice(0, 8); 347 + if (sonValues.configuration.clientId?.length > 0) {
  348 + //则是自己输入
  349 + } else {
  350 + //clientId 从uuid里切片8位
  351 + sonValues.configuration.clientId = buildUUID().slice(0, 8);
  352 + }
349 Object.assign(sonValues.configuration, credentialsV); 353 Object.assign(sonValues.configuration, credentialsV);
350 return sonValues; 354 return sonValues;
351 }; 355 };
@@ -376,6 +380,7 @@ @@ -376,6 +380,7 @@
376 :deep(.ant-col-24) { 380 :deep(.ant-col-24) {
377 margin-bottom: 20px !important; 381 margin-bottom: 20px !important;
378 } 382 }
  383 +
379 :deep(.ant-btn-default) { 384 :deep(.ant-btn-default) {
380 color: white; 385 color: white;
381 background: #377dff; 386 background: #377dff;