Commit 968d7ba7b55e750b522074e5da27351f3bb5c98c

Authored by loveumiko
1 parent 75a57760

perf: 修改传入的参数

@@ -127,9 +127,10 @@ const SingleToHexBatch = (t) => { @@ -127,9 +127,10 @@ const SingleToHexBatch = (t) => {
127 return r.join('\r\n'); 127 return r.join('\r\n');
128 }; 128 };
129 129
130 -const formSchemasConfig = (schemas): FormSchema[] => { 130 +const formSchemasConfig = (schemas, actionType): FormSchema[] => {
131 const { identifier, functionName } = schemas; 131 const { identifier, functionName } = schemas;
132 - if (identifier == '06') { 132 + console.log(identifier, 'identifier', actionType, 'actionType');
  133 + if (actionType == '06') {
133 return [ 134 return [
134 { 135 {
135 field: identifier, 136 field: identifier,
@@ -142,7 +143,7 @@ const formSchemasConfig = (schemas): FormSchema[] => { @@ -142,7 +143,7 @@ const formSchemasConfig = (schemas): FormSchema[] => {
142 }, 143 },
143 }, 144 },
144 ]; 145 ];
145 - } else if (identifier == '05') { 146 + } else if (actionType == '05') {
146 return [ 147 return [
147 { 148 {
148 field: identifier, 149 field: identifier,
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 registerNumber: 1, 55 registerNumber: 1,
56 registerValues: [], 56 registerValues: [],
57 }; 57 };
58 - setProps({ schemas: formSchemasConfig(schemas[0]) }); 58 + setProps({ schemas: formSchemasConfig(schemas[0], actionType) });
59 } else { 59 } else {
60 isShowModBUS.value = false; 60 isShowModBUS.value = false;
61 const formSchemas = genForm(schemas); 61 const formSchemas = genForm(schemas);