Bläddra i källkod

perf(views): 修复"设备详情"编辑功能导致列表查询异常问题

wangshun 1 vecka sedan
förälder
incheckning
4cdc380c9d
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/views/equipment-details/EquipmentDetails.vue

+ 2 - 2
src/views/equipment-details/EquipmentDetails.vue

@@ -386,8 +386,6 @@ const obtainDeviceDetails = (value: boolean) => {
   }
 
   handleRequest(async () => {
-    gatewayData.value = [];
-    gatewayRemoteData.value = [];
     const { deviceQueryVo, gatewayInfoVos, protocolParamDeviceInfoVos, protocolParamCustomDevVos } =
       await equipmentDetails(deviceId);
     const {
@@ -521,6 +519,8 @@ const obtainDeviceDetails = (value: boolean) => {
       id,
     });
     if (value) {
+      gatewayData.value = [];
+      gatewayRemoteData.value = [];
       if (gatewayInfoVos.length) {
         gatewayList.value = gatewayInfoVos;
       } else {