Explorar o código

perf(components): 优化设备工况参数查询接口

1. 只查询非过程参数
wangcong hai 2 semanas
pai
achega
e3f477ac43
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      src/api/index.ts
  2. 1 1
      src/views/device-work-status/DeviceWorkParams.vue

+ 2 - 1
src/api/index.ts

@@ -472,11 +472,12 @@ export const getDeviceListSimple = async (deviceId: number) => {
   return data;
 };
 
-export const getDeviceParams = async (deviceId: number) => {
+export const getDeviceParams = async (deviceId: number, isProcessonData?: boolean) => {
   const data = await request<DeviceParamGroup[]>(apiBiz('/device/protocolParamVerify'), {
     method: 'POST',
     body: JSON.stringify({
       deviceId,
+      isProcessonData,
     }),
   });
 

+ 1 - 1
src/views/device-work-status/DeviceWorkParams.vue

@@ -48,7 +48,7 @@ watch(visible, () => {
 
 const getAllParamGroups = () => {
   handleRequest(async () => {
-    const data = await getDeviceParams(props.devId);
+    const data = await getDeviceParams(props.devId, false);
     allParamGroups.value = data;
 
     if (data.length) {