diff --git a/src/api/iot/thinkmodelfunction/index.ts b/src/api/iot/thinkmodelfunction/index.ts
new file mode 100644
index 00000000..29f06a78
--- /dev/null
+++ b/src/api/iot/thinkmodelfunction/index.ts
@@ -0,0 +1,55 @@
+import request from '@/config/axios'
+
+// IoT 产品物模型 VO
+export interface ThinkModelFunctionVO {
+ id: number // 物模型功能编号
+ identifier: string // 功能标识
+ name: string // 功能名称
+ description: string // 功能描述
+ productId: number // 产品ID(关联 IotProductDO 的 id)
+ productKey: string // 产品Key(关联 IotProductDO 的 productKey)
+ type: number // 功能类型(1 - 属性,2 - 服务,3 - 事件)
+ property: string // 属性(存储 ThingModelProperty 的 JSON 数据)
+ event: string // 事件(存储 ThingModelEvent 的 JSON 数据)
+ service: string // 服务(存储服务的 JSON 数据)
+}
+
+// IoT 产品物模型 API
+export const ThinkModelFunctionApi = {
+ // 查询IoT 产品物模型分页
+ getThinkModelFunctionPage: async (params: any) => {
+ return await request.get({ url: `/iot/think-model-function/page`, params })
+ },
+ // 获得IoT 产品物模型
+ getThinkModelFunctionListByProductId: async (params: any) => {
+ return await request.get({
+ url: `/iot/think-model-function/list-by-product-id`,
+ params
+ })
+ },
+
+ // 查询IoT 产品物模型详情
+ getThinkModelFunction: async (id: number) => {
+ return await request.get({ url: `/iot/think-model-function/get?id=` + id })
+ },
+
+ // 新增IoT 产品物模型
+ createThinkModelFunction: async (data: ThinkModelFunctionVO) => {
+ return await request.post({ url: `/iot/think-model-function/create`, data })
+ },
+
+ // 修改IoT 产品物模型
+ updateThinkModelFunction: async (data: ThinkModelFunctionVO) => {
+ return await request.put({ url: `/iot/think-model-function/update`, data })
+ },
+
+ // 删除IoT 产品物模型
+ deleteThinkModelFunction: async (id: number) => {
+ return await request.delete({ url: `/iot/think-model-function/delete?id=` + id })
+ },
+
+ // 导出IoT 产品物模型 Excel
+ exportThinkModelFunction: async (params) => {
+ return await request.download({ url: `/iot/think-model-function/export-excel`, params })
+ }
+}
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index 82f9218f..e8deb60a 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -235,5 +235,9 @@ export enum DICT_TYPE {
IOT_PRODUCT_DEVICE_TYPE = 'iot_product_device_type', // IOT 产品设备类型
IOT_DATA_FORMAT = 'iot_data_format', // IOT 数据格式
IOT_PROTOCOL_TYPE = 'iot_protocol_type', // IOT 接入网关协议
- IOT_DEVICE_STATUS = 'iot_device_status' // IOT 设备状态
+ IOT_DEVICE_STATUS = 'iot_device_status', // IOT 设备状态
+ IOT_PRODUCT_FUNCTION_TYPE = 'iot_product_function_type', // IOT 产品功能类型
+ IOT_DATA_TYPE = 'iot_data_type', // IOT 数据类型
+ IOT_UNIT_TYPE = 'iot_unit_type', // IOT 单位类型
+ IOT_RW_TYPE = 'iot_rw_type' // IOT 读写类型
}
diff --git a/src/views/iot/product/detail/ThinkModelFunction.vue b/src/views/iot/product/detail/ThinkModelFunction.vue
new file mode 100644
index 00000000..95089c62
--- /dev/null
+++ b/src/views/iot/product/detail/ThinkModelFunction.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 添加功能
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/product/detail/ThinkModelFunctionForm.vue b/src/views/iot/product/detail/ThinkModelFunctionForm.vue
new file mode 100644
index 00000000..976ca717
--- /dev/null
+++ b/src/views/iot/product/detail/ThinkModelFunctionForm.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
diff --git a/src/views/iot/product/detail/index.vue b/src/views/iot/product/detail/index.vue
index 6ff97bb8..f57fc4d6 100644
--- a/src/views/iot/product/detail/index.vue
+++ b/src/views/iot/product/detail/index.vue
@@ -1,18 +1,18 @@
getProductData(id)" />
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -22,6 +22,7 @@ import { DeviceApi } from '@/api/iot/device'
import ProductDetailsHeader from '@/views/iot/product/detail/ProductDetailsHeader.vue'
import ProductDetailsInfo from '@/views/iot/product/detail/ProductDetailsInfo.vue'
import ProductTopic from '@/views/iot/product/detail/ProductTopic.vue'
+import ThinkModelFunction from '@/views/iot/product/detail/ThinkModelFunction.vue'
defineOptions({ name: 'IoTProductDetail' })
@@ -30,6 +31,7 @@ const message = useMessage()
const id = Number(route.params.id) // 编号
const loading = ref(true) // 加载中
const product = ref({} as ProductVO) // 详情
+const activeTab = ref('info') // 默认激活的标签页
/** 获取详情 */
const getProductData = async (id: number) => {