ソースを参照

perf(components): 优化获取标准参数列表接口,按设备类型查询

wangcong 1 週間 前
コミット
c80d2a4c28

+ 1 - 0
src/types/index.ts

@@ -286,6 +286,7 @@ export interface ProtocolStandardParam {
 export interface ProtocolStandardParamQuery extends PageParams {
   platformParamCode?: string;
   platformParamName?: string;
+  templateType?: string;
 }
 
 export interface RegisterGatewayForm extends EquipmentInformation {

+ 1 - 0
src/views/setup-protocol/ProtocolContent.vue

@@ -914,6 +914,7 @@ defineExpose({
     />
     <SelectStandardParams
       ref="selectStandardParams"
+      :device-type="info.deviceType"
       :protocol-id="info.id"
       :param-id="selectedParamId"
       :param-name="selectedParamName"

+ 2 - 0
src/views/setup-protocol/SelectStandardParams.vue

@@ -17,6 +17,7 @@ import type { Key, RowSelectionType } from 'ant-design-vue/es/table/interface';
 import type { FormRules, PageParams, ProtocolParamInfo, ProtocolStandardParam } from '@/types';
 
 interface Props {
+  deviceType?: string;
   protocolId?: number;
   paramId?: number;
   paramName?: string;
@@ -61,6 +62,7 @@ const getStandardParams = () => {
       ...pageParams.value,
       platformParamName: paramNameOrCode.value,
       platformParamCode: paramNameOrCode.value,
+      templateType: props.deviceType,
     });
 
     paramList.value = records;