Commit 2d4d93a57491fbb60c4f9b6cd747de8fec2716a2

Authored by loveumiko
1 parent ab2a7546

fix: 修改数据流转的问题

... ... @@ -52,6 +52,7 @@ export const modeMqttForm: FormSchema[] = [
52 52 label: '主机',
53 53 colProps: { span: 12 },
54 54 component: 'Input',
  55 + required: true,
55 56 componentProps: {
56 57 maxLength: 255,
57 58 placeholder: '请输入Host',
... ...
... ... @@ -98,7 +98,26 @@
98 98 getDataFlowParams?.clientProperties
99 99 );
100 100 const data = getValue(description, name, getDataFlowMethod, getDataFlowParams);
101   - const rest = await postAddConvertApi({ ...restData.data, ...data });
  101 + const { caCertFileName, certFileName, privateKeyFileName } = getDataFlowParams.credentials;
  102 + const configuration = {
  103 + topicPattern: getDataFlowParams.topicPattern,
  104 + host: getDataFlowParams.host,
  105 + port: getDataFlowParams.port,
  106 + connectTimeoutSec: getDataFlowParams.connectTimeoutSec,
  107 + clientId: getDataFlowParams.clientId ? getDataFlowParams.clientId : null,
  108 + cleanSession: getDataFlowParams.cleanSession,
  109 + ssl: getDataFlowParams.ssl,
  110 + appendClientIdSuffix: getDataFlowParams.appendClientIdSuffix,
  111 + credentials: {
  112 + type: getDataFlowParams.type,
  113 + caCertFileName: caCertFileName ? caCertFileName : undefined,
  114 + certFileName: certFileName ? certFileName : undefined,
  115 + privateKeyFileName: privateKeyFileName ? privateKeyFileName : undefined,
  116 + username: getDataFlowParams.username ? getDataFlowParams.username : undefined,
  117 + password: getDataFlowParams.password ? getDataFlowParams.password : undefined,
  118 + },
  119 + };
  120 + const rest = await postAddConvertApi({ ...restData.data, ...data, configuration });
102 121 if (rest) {
103 122 closeModalAfterSuccess && createMessage.success(`${businessText.value}成功`);
104 123 closeModalAfterSuccess && closeModal();
... ...