fix:【iot 物联网】linter 报错

This commit is contained in:
YunaiV
2025-10-10 20:26:17 +08:00
parent b6fee5c05b
commit f740461c2a
107 changed files with 7161 additions and 5905 deletions

View File

@@ -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 };

View File

@@ -82,4 +82,3 @@ export function deleteAlertRecordList(ids: number[]) {
}
export { AlertRecordApi };

View File

@@ -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;

View File

@@ -49,4 +49,3 @@ export function getSimpleDeviceGroupList() {
'/iot/device-group/simple-list',
);
}

View File

@@ -98,4 +98,3 @@ export function resumeOtaTask(id: number) {
}
export { IoTOtaTaskApi };

View File

@@ -101,4 +101,3 @@ export function getOtaTaskRecordStatusStatistics(
}
export { IoTOtaTaskRecordApi };

View File

@@ -55,4 +55,3 @@ export function getSimpleProductCategoryList() {
'/iot/product-category/simple-list',
);
}

View File

@@ -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 数据格式(编解码器类型)枚举类 */

View File

@@ -81,4 +81,3 @@ export function updateDataRuleStatus(id: number, status: number) {
status,
});
}

View File

@@ -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 };

View File

@@ -156,8 +156,7 @@ export function getSimpleRuleSceneList() {
// 别名导出(兼容旧代码)
export {
getSceneRulePage as getRuleScenePage,
deleteSceneRule as deleteRuleScene,
getSceneRulePage as getRuleScenePage,
updateSceneRuleStatus as updateRuleSceneStatus,
};

View File

@@ -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('枚举描述不能为空'));
}
};