瀏覽代碼

perf(views): 优化"基本信息"步骤接口新增参数

wangshun 3 周之前
父節點
當前提交
8d36ac5e1d
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      src/views/register-gateway/BindProtocol.vue

+ 6 - 3
src/views/register-gateway/BindProtocol.vue

@@ -64,6 +64,7 @@ const protocolQuery = ref<ProtocolList>({
   pageIndex: 1,
   pageSize: 10,
   searchContent: '',
+  protocolType: '',
 });
 
 const protocolTotal = ref<number>(0);
@@ -290,6 +291,7 @@ const agreementReset = () => {
     pageIndex: 1,
     pageSize: 10,
     searchContent: '',
+    protocolType: '',
   };
   getProtocolCandidatesList();
 };
@@ -338,6 +340,7 @@ const addEditor = (value: number, index: number, bindState: number, protocolType
   };
   agreementId = value;
   isModbusRtuProtocol.value = protocolType.includes(ProtocolType.ModbusRTU);
+  protocolQuery.value.protocolType = protocolType;
 
   interfaceIndex = index;
   open.value = true;
@@ -407,9 +410,9 @@ const handleOk = () => {
 
 const handleOk1 = () => {
   if (protocolItem) {
-    if (agreementData.value.some((item) => item.protocolId === protocolItem.id)) {
-      return message.warning(t('registerGateway.cannotAddAgain'));
-    }
+    // if (agreementData.value.some((item) => item.protocolId === protocolItem.id)) {
+    //   return message.warning(t('registerGateway.cannotAddAgain'));
+    // }
     const { protocolName, dataSendInterval, highFreqSendInterval, id, protocolType } = protocolItem;
     agreementData.value[agreementIndex] = {
       protocolType,