Commit 8e29b503fe78d4acc11aa45f7a4683d07875cbdd

Authored by fengwotao
1 parent e17515bb

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

@@ -234,7 +234,9 @@ @@ -234,7 +234,9 @@
234 } 234 }
235 } 235 }
236 }; 236 };
  237 + const isEdit = ref(false);
237 const setStepTwoFieldsValueFunc = (v, v1, v2) => { 238 const setStepTwoFieldsValueFunc = (v, v1, v2) => {
  239 + isEdit.value = true;
238 setFieldsValue(v); 240 setFieldsValue(v);
239 setFieldsValue({ 241 setFieldsValue({
240 name: v1, 242 name: v1,
@@ -346,8 +348,11 @@ @@ -346,8 +348,11 @@
346 } 348 }
347 if (sonValues.configuration.clientId?.length > 0) { 349 if (sonValues.configuration.clientId?.length > 0) {
348 //则是自己输入 350 //则是自己输入
349 - } else { 351 + } else if (!sonValues.configuration.clientId) {
350 //clientId 从uuid里切片8位 352 //clientId 从uuid里切片8位
  353 + } else {
  354 + }
  355 + if (!isEdit.value && !sonValues.configuration.clientId) {
351 sonValues.configuration.clientId = buildUUID().slice(0, 8); 356 sonValues.configuration.clientId = buildUUID().slice(0, 8);
352 } 357 }
353 Object.assign(sonValues.configuration, credentialsV); 358 Object.assign(sonValues.configuration, credentialsV);