参数管理
1. 获取参数列表(getParameterListByKey)
typescript
//! 注意,TS版本4^
import type { GetParameterListByKeyReq, GetParameterListByKeyRes } from '@homing/web'
try {
const data: GetParameterListByKeyRes[] = await client.getParameterListByKey({
parameterKeys: 'PARAM_KEY1,PARAM_KEY2',
state: 1
} as GetParameterListByKeyReq);
console.log('调用成功', data);
} catch (error: any) {
console.log(error, '调用失败' + error?.message);
}
参数说明
参数名 | 类型 | 必填 | 说明 | 备注/枚举值 |
---|---|---|---|---|
parameterKeys | string | 是 | 参数键返回当前租户参数(如未配置则返回平台) | 多个编号以英文逗号间隔 |
state | number | 否 | 状态 | 0-禁用,1-启用 |
响应说明
字段名 | 类型 | 说明 |
---|---|---|
parameterId | number | 参数ID |
parameterName | string | 参数名称 |
parameterKey | string | 参数键 |
parameterValue | string | 参数值 |
parameterType | string | 参数类型 |
description | string | 描述 |
category | string | 分组 |
state | number | 状态 |
readonly | number | 内置是否内置 |
scope | string | 配置权限 |
tenantCode | string | 授权范围 |
createdBy | string | 创建人 |
createdTime | string | 创建时间 |
updatedBy | string | 更新人 |
updatedTime | string | 更新时间 |
sortValue | number | 排序 |