feat(iot):【设备定位:60%】调整 DeviceStateEnum 枚举的位置
parent
3620278360
commit
eb381fcd93
|
|
@ -48,14 +48,6 @@ export interface IotDevicePropertyRespVO {
|
||||||
updateTime: Date // 更新时间
|
updateTime: Date // 更新时间
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @AI:调整到 constants
|
|
||||||
// IoT 设备状态枚举
|
|
||||||
export enum DeviceStateEnum {
|
|
||||||
INACTIVE = 0, // 未激活
|
|
||||||
ONLINE = 1, // 在线
|
|
||||||
OFFLINE = 2 // 离线
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设备认证参数 VO
|
// 设备认证参数 VO
|
||||||
export interface IotDeviceAuthInfoVO {
|
export interface IotDeviceAuthInfoVO {
|
||||||
clientId: string // 客户端 ID
|
clientId: string // 客户端 ID
|
||||||
|
|
|
||||||
|
|
@ -244,10 +244,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ProductVO } from '@/api/iot/product/product'
|
import { ProductVO } from '@/api/iot/product/product'
|
||||||
import { ThingModelData } from '@/api/iot/thingmodel'
|
import { ThingModelData } from '@/api/iot/thingmodel'
|
||||||
import { DeviceApi, DeviceStateEnum, DeviceVO } from '@/api/iot/device/device'
|
import { DeviceApi, DeviceVO } from '@/api/iot/device/device'
|
||||||
import DeviceDetailsMessage from './DeviceDetailsMessage.vue'
|
import DeviceDetailsMessage from './DeviceDetailsMessage.vue'
|
||||||
import { DataDefinition } from '@/views/iot/thingmodel/components'
|
import { DataDefinition } from '@/views/iot/thingmodel/components'
|
||||||
import { IotDeviceMessageMethodEnum, IoTThingModelTypeEnum } from '@/views/iot/utils/constants'
|
import {
|
||||||
|
DeviceStateEnum,
|
||||||
|
IotDeviceMessageMethodEnum,
|
||||||
|
IoTThingModelTypeEnum
|
||||||
|
} from '@/views/iot/utils/constants'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
product: ProductVO
|
product: ProductVO
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DICT_TYPE, getIntDictOptions, getDictLabel } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions, getDictLabel } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import { DeviceApi, DeviceVO, DeviceStateEnum } from '@/api/iot/device/device'
|
import { DeviceApi, DeviceVO } from '@/api/iot/device/device'
|
||||||
|
import { DeviceStateEnum } from '@/views/iot/utils/constants'
|
||||||
import DeviceForm from './DeviceForm.vue'
|
import DeviceForm from './DeviceForm.vue'
|
||||||
import { ProductApi, ProductVO } from '@/api/iot/product/product'
|
import { ProductApi, ProductVO } from '@/api/iot/product/product'
|
||||||
import { DeviceGroupApi, DeviceGroupVO } from '@/api/iot/device/group'
|
import { DeviceGroupApi, DeviceGroupVO } from '@/api/iot/device/group'
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,13 @@ export const IOT_PROVIDE_KEY = {
|
||||||
PRODUCT: 'IOT_PRODUCT'
|
PRODUCT: 'IOT_PRODUCT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** IoT 设备状态枚举 */
|
||||||
|
export enum DeviceStateEnum {
|
||||||
|
INACTIVE = 0, // 未激活
|
||||||
|
ONLINE = 1, // 在线
|
||||||
|
OFFLINE = 2 // 离线
|
||||||
|
}
|
||||||
|
|
||||||
/** IoT 产品物模型类型枚举类 */
|
/** IoT 产品物模型类型枚举类 */
|
||||||
export const IoTThingModelTypeEnum = {
|
export const IoTThingModelTypeEnum = {
|
||||||
PROPERTY: 1, // 属性
|
PROPERTY: 1, // 属性
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue