Commit 285ccb9cb59e8f327987f4a20b481aa5ab5c007f

Authored by fengwotao
1 parent 8e29b503

fix: 修复数据流转mqtt clientId去掉随机生成,并且限制长度255

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