Procházet zdrojové kódy

perf(views): 优化“选择网关参数”接口参数,返回值更改问题

wangshun před 3 týdny
rodič
revize
f9280ae6c7
1 změnil soubory, kde provedl 6 přidání a 5 odebrání
  1. 6 5
      src/views/create-device/GatewayParameters.vue

+ 6 - 5
src/views/create-device/GatewayParameters.vue

@@ -24,6 +24,7 @@ import type {
   DeviceParamGroupRels,
   DeviceParamGroups,
   EquipmentInformationForm,
+  GatewayDataItem,
   GroupingList,
   ListEquipmentParametersItem,
   PhysicalInterfaceList,
@@ -319,7 +320,7 @@ const fuzzyQuery = (value: string) => {
 
 const postGatewayLinkProtocolList = (linkId: number, id: number, monitorType: string) => {
   handleRequest(async () => {
-    const records = await getAllGatewayLinkProtocol<ListEquipmentParametersItem[]>({
+    const records = await getAllGatewayLinkProtocol<GatewayDataItem[]>({
       linkId,
       monitorType,
       searchContent: monitorType === 'monitor' ? monitorSearchContent.value : controlSearchContent.value,
@@ -329,8 +330,8 @@ const postGatewayLinkProtocolList = (linkId: number, id: number, monitorType: st
         records.forEach((item) => {
           listAllEquipmentParameters.value.push({
             ...item,
-            deviceParamCode: item.gatewayParamCode,
-            deviceParamName: item.gatewayParamName,
+            deviceParamCode: item.platformParamCode,
+            deviceParamName: item.platformParamName,
             groupId: undefined,
             groupSerialNum: 1,
             groupParamSerialNum: undefined,
@@ -353,8 +354,8 @@ const postGatewayLinkProtocolList = (linkId: number, id: number, monitorType: st
         records.forEach((item) => {
           remoteAllListEquipmentParameters.value.push({
             ...item,
-            deviceParamCode: item.gatewayParamCode,
-            deviceParamName: item.gatewayParamName,
+            deviceParamCode: item.platformParamCode,
+            deviceParamName: item.platformParamName,
             groupId: undefined,
             groupSerialNum: 1,
             groupParamSerialNum: undefined,