fix:【iot 物联网】linter 报错
This commit is contained in:
@@ -51,7 +51,9 @@ export function getAlertConfig(id: number) {
|
||||
|
||||
/** 查询所有告警配置列表 */
|
||||
export function getAlertConfigList() {
|
||||
return requestClient.get<AlertConfigApi.AlertConfig[]>('/iot/alert-config/list');
|
||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||
'/iot/alert-config/list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增告警配置 */
|
||||
@@ -92,4 +94,3 @@ export function getSimpleAlertConfigList() {
|
||||
}
|
||||
|
||||
export { AlertConfigApi };
|
||||
|
||||
|
||||
@@ -82,4 +82,3 @@ export function deleteAlertRecordList(ids: number[]) {
|
||||
}
|
||||
|
||||
export { AlertRecordApi };
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ export namespace IotDeviceApi {
|
||||
/** IoT 设备状态枚举 */
|
||||
export enum DeviceStateEnum {
|
||||
INACTIVE = 0, // 未激活
|
||||
ONLINE = 1, // 在线
|
||||
OFFLINE = 2, // 离线
|
||||
ONLINE = 1, // 在线
|
||||
}
|
||||
|
||||
/** 查询设备分页 */
|
||||
@@ -221,4 +221,3 @@ export type DeviceVO = IotDeviceApi.Device;
|
||||
export type IotDeviceAuthInfoVO = IotDeviceApi.DeviceAuthInfo;
|
||||
export type IotDevicePropertyDetailRespVO = IotDeviceApi.DevicePropertyDetail;
|
||||
export type IotDevicePropertyRespVO = IotDeviceApi.DeviceProperty;
|
||||
|
||||
|
||||
@@ -49,4 +49,3 @@ export function getSimpleDeviceGroupList() {
|
||||
'/iot/device-group/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,4 +98,3 @@ export function resumeOtaTask(id: number) {
|
||||
}
|
||||
|
||||
export { IoTOtaTaskApi };
|
||||
|
||||
|
||||
@@ -101,4 +101,3 @@ export function getOtaTaskRecordStatusStatistics(
|
||||
}
|
||||
|
||||
export { IoTOtaTaskRecordApi };
|
||||
|
||||
|
||||
@@ -55,4 +55,3 @@ export function getSimpleProductCategoryList() {
|
||||
'/iot/product-category/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,15 +30,15 @@ export namespace IotProductApi {
|
||||
/** IOT 产品设备类型枚举类 */
|
||||
export enum DeviceTypeEnum {
|
||||
DEVICE = 0, // 直连设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
GATEWAY = 2, // 网关设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
}
|
||||
|
||||
/** IOT 产品定位类型枚举类 */
|
||||
export enum LocationTypeEnum {
|
||||
IP = 1, // IP 定位
|
||||
MODULE = 2, // 设备定位
|
||||
MANUAL = 3, // 手动定位
|
||||
MODULE = 2, // 设备定位
|
||||
}
|
||||
|
||||
/** IOT 数据格式(编解码器类型)枚举类 */
|
||||
|
||||
@@ -81,4 +81,3 @@ export function updateDataRuleStatus(id: number, status: number) {
|
||||
status,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@ export interface DataSinkVO {
|
||||
/** IoT 数据目的类型枚举 */
|
||||
export enum IotDataSinkTypeEnum {
|
||||
HTTP = 'HTTP',
|
||||
MQTT = 'MQTT',
|
||||
KAFKA = 'KAFKA',
|
||||
MQTT = 'MQTT',
|
||||
RABBITMQ = 'RABBITMQ',
|
||||
ROCKETMQ = 'ROCKETMQ',
|
||||
REDIS_STREAM = 'REDIS_STREAM',
|
||||
ROCKETMQ = 'ROCKETMQ',
|
||||
}
|
||||
|
||||
/** HTTP 配置 */
|
||||
@@ -148,4 +148,3 @@ export function updateDataSinkStatus(id: number, status: number) {
|
||||
}
|
||||
|
||||
export { DataSinkApi };
|
||||
|
||||
|
||||
@@ -156,8 +156,7 @@ export function getSimpleRuleSceneList() {
|
||||
|
||||
// 别名导出(兼容旧代码)
|
||||
export {
|
||||
getSceneRulePage as getRuleScenePage,
|
||||
deleteSceneRule as deleteRuleScene,
|
||||
getSceneRulePage as getRuleScenePage,
|
||||
updateSceneRuleStatus as updateRuleSceneStatus,
|
||||
};
|
||||
|
||||
|
||||
@@ -115,10 +115,10 @@ export interface ThingModelFormRules {
|
||||
|
||||
/** 验证布尔型名称 */
|
||||
export const validateBoolName = (_rule: any, value: any, callback: any) => {
|
||||
if (!value) {
|
||||
callback(new Error('枚举描述不能为空'));
|
||||
} else {
|
||||
if (value) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('枚举描述不能为空'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user