|
@@ -25,11 +25,11 @@ onMounted(() => {
|
|
|
const { protocolType } = props.form;
|
|
|
const fileNameList = data[0].dictTypeDataList.map((item) => item.dictValue);
|
|
|
|
|
|
- if (protocolType.includes(ProtocolType.ModbusRTU)) {
|
|
|
+ if (protocolType?.includes(ProtocolType.ModbusRTU)) {
|
|
|
fileName = fileNameList.find((item) => item.includes(ProtocolType.ModbusRTU));
|
|
|
- } else if (protocolType.includes(ProtocolType.ModbusTCP)) {
|
|
|
+ } else if (protocolType?.includes(ProtocolType.ModbusTCP)) {
|
|
|
fileName = fileNameList.find((item) => item.includes(ProtocolType.ModbusTCP));
|
|
|
- } else if (protocolType.includes(ProtocolType.S7)) {
|
|
|
+ } else if (protocolType?.includes(ProtocolType.S7)) {
|
|
|
fileName = fileNameList.find((item) => item.includes(ProtocolType.S7));
|
|
|
}
|
|
|
}
|