Commit e17515bbd29cd25c6e6c2cefeda875f308704008

Authored by fengwotao
1 parent 828a7a79

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

... ... @@ -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,
... ...
... ... @@ -344,8 +344,12 @@
344 344 credentialsV.credentials.certFileName = certFileName.value;
345 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 353 Object.assign(sonValues.configuration, credentialsV);
350 354 return sonValues;
351 355 };
... ... @@ -376,6 +380,7 @@
376 380 :deep(.ant-col-24) {
377 381 margin-bottom: 20px !important;
378 382 }
  383 +
379 384 :deep(.ant-btn-default) {
380 385 color: white;
381 386 background: #377dff;
... ...