Explorar o código

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

wangshun hai 1 semana
pai
achega
4cdc380c9d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 {