diff --git a/src/api/iot/product/product/index.ts b/src/api/iot/product/product/index.ts
index ba465efdc..2025884b7 100644
--- a/src/api/iot/product/product/index.ts
+++ b/src/api/iot/product/product/index.ts
@@ -16,7 +16,8 @@ export interface ProductVO {
status: number // 产品状态
deviceType: number // 设备类型
netType: number // 联网方式
- codecType: string // 数据格式(编解码器类型)
+ protocolType: string // 协议类型
+ serializeType: string // 序列化类型
deviceCount: number // 设备数量
createTime: Date // 创建时间
}
@@ -27,9 +28,22 @@ export enum DeviceTypeEnum {
GATEWAY_SUB = 1, // 网关子设备
GATEWAY = 2 // 网关设备
}
-// IOT 数据格式(编解码器类型)枚举类
-export enum CodecTypeEnum {
- ALINK = 'Alink' // 阿里云 Alink 协议
+// IoT 协议类型枚举
+export enum ProtocolTypeEnum {
+ TCP = 'tcp',
+ UDP = 'udp',
+ WEBSOCKET = 'websocket',
+ HTTP = 'http',
+ MQTT = 'mqtt',
+ EMQX = 'emqx',
+ COAP = 'coap',
+ MODBUS_TCP = 'modbus_tcp'
+}
+
+// IoT 序列化类型枚举
+export enum SerializeTypeEnum {
+ JSON = 'json',
+ BINARY = 'binary'
}
// IoT 产品 API
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index b4f0c5870..e68f1384d 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -233,7 +233,8 @@ export enum DICT_TYPE {
IOT_NET_TYPE = 'iot_net_type', // IOT 联网方式
IOT_PRODUCT_STATUS = 'iot_product_status', // IOT 产品状态
IOT_PRODUCT_DEVICE_TYPE = 'iot_product_device_type', // IOT 产品设备类型
- IOT_CODEC_TYPE = 'iot_codec_type', // IOT 数据格式(编解码器类型)
+ IOT_PROTOCOL_TYPE = 'iot_protocol_type', // IOT 协议类型
+ IOT_SERIALIZE_TYPE = 'iot_serialize_type', // IOT 序列化类型
IOT_LOCATION_TYPE = 'iot_location_type', // IOT 定位类型
IOT_DEVICE_STATE = 'iot_device_state', // IOT 设备状态
IOT_THING_MODEL_TYPE = 'iot_thing_model_type', // IOT 产品功能类型
diff --git a/src/views/iot/product/product/ProductForm.vue b/src/views/iot/product/product/ProductForm.vue
index 9cb7c5099..7bc3e4903 100644
--- a/src/views/iot/product/product/ProductForm.vue
+++ b/src/views/iot/product/product/ProductForm.vue
@@ -4,7 +4,7 @@
ref="formRef"
:model="formData"
:rules="formRules"
- label-width="110px"
+ label-width="120px"
v-loading="formLoading"
>
@@ -49,11 +49,7 @@
label="联网方式"
prop="netType"
>
-
+
-
-
-
+
+
+
+
+
+
+
- {{ dict.label }}
-
-
+
+ 序列化类型
+
+
+
+
+
+
+
@@ -109,7 +125,13 @@