diff --git a/src/api/iot/thinkmodel/index.ts b/src/api/iot/thingmodel/index.ts similarity index 52% rename from src/api/iot/thinkmodel/index.ts rename to src/api/iot/thingmodel/index.ts index e1887048c2d9faacf6a93f28d8a07d9debe9e6b0..8e2b69ade77ff7c6688d086d92c94caa9bcb2e53 100644 --- a/src/api/iot/thinkmodel/index.ts +++ b/src/api/iot/thingmodel/index.ts @@ -3,7 +3,7 @@ import request from '@/config/axios' /** * IoT 产品物模型 */ -export interface ThinkModelData { +export interface ThingModelData { id?: number // 物模型功能编号 identifier?: string // 功能标识 name?: string // 功能名称 @@ -12,29 +12,29 @@ export interface ThinkModelData { productKey?: string // 产品标识 dataType: string // 数据类型,与 dataSpecs 的 dataType 保持一致 type: ProductFunctionTypeEnum // 功能类型 - property: ThinkModelProperty // 属性 - event?: ThinkModelEvent // 事件 - service?: ThinkModelService // 服务 + property: ThingModelProperty // 属性 + event?: ThingModelEvent // 事件 + service?: ThingModelService // 服务 } /** - * ThinkModelProperty 类型 + * ThingModelProperty 类型 */ -export interface ThinkModelProperty { +export interface ThingModelProperty { [key: string]: any } /** - * ThinkModelEvent 类型 + * ThingModelEvent 类型 */ -export interface ThinkModelEvent { +export interface ThingModelEvent { [key: string]: any } /** - * ThinkModelService 类型 + * ThingModelService 类型 */ -export interface ThinkModelService { +export interface ThingModelService { [key: string]: any } @@ -52,38 +52,37 @@ export enum ProductFunctionAccessModeEnum { } // IoT 产品物模型 API -export const ThinkModelApi = { +export const ThingModelApi = { // 查询产品物模型分页 - // TODO @puhui999:product 前缀,是不是去掉哈。 - getThinkModelPage: async (params: any) => { - return await request.get({ url: `/iot/product-think-model/page`, params }) + getThingModelPage: async (params: any) => { + return await request.get({ url: `/iot/product-thing-model/page`, params }) }, // 获得产品物模型 - getThinkModelListByProductId: async (params: any) => { + getThingModelListByProductId: async (params: any) => { return await request.get({ - url: `/iot/product-think-model/list-by-product-id`, + url: `/iot/product-thing-model/list-by-product-id`, params }) }, // 查询产品物模型详情 - getThinkModel: async (id: number) => { - return await request.get({ url: `/iot/product-think-model/get?id=` + id }) + getThingModel: async (id: number) => { + return await request.get({ url: `/iot/product-thing-model/get?id=` + id }) }, // 新增产品物模型 - createThinkModel: async (data: ThinkModelData) => { - return await request.post({ url: `/iot/product-think-model/create`, data }) + createThingModel: async (data: ThingModelData) => { + return await request.post({ url: `/iot/product-thing-model/create`, data }) }, // 修改产品物模型 - updateThinkModel: async (data: ThinkModelData) => { - return await request.put({ url: `/iot/product-think-model/update`, data }) + updateThingModel: async (data: ThingModelData) => { + return await request.put({ url: `/iot/product-thing-model/update`, data }) }, // 删除产品物模型 - deleteThinkModel: async (id: number) => { - return await request.delete({ url: `/iot/product-think-model/delete?id=` + id }) + deleteThingModel: async (id: number) => { + return await request.delete({ url: `/iot/product-thing-model/delete?id=` + id }) } } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 0f57ba4eafa5d0052ce17834fad85b1eaff705ef..eae50a273bb9af54f61f9b9d6742a1d5eebd3cc7 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -236,7 +236,7 @@ export enum DICT_TYPE { IOT_DATA_FORMAT = 'iot_data_format', // IOT 数据格式 IOT_PROTOCOL_TYPE = 'iot_protocol_type', // IOT 接入网关协议 IOT_DEVICE_STATUS = 'iot_device_status', // IOT 设备状态 - IOT_PRODUCT_THINK_MODEL_TYPE = 'iot_product_think_model_type', // IOT 产品功能类型 + IOT_PRODUCT_THING_MODEL_TYPE = 'iot_product_thing_model_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/product/detail/index.vue b/src/views/iot/product/product/detail/index.vue index e35376420c612fe2510c9ffd5e931a756df1adbe..c9fa2f72b21c7926e6b92a4bab9cae974a10e667 100644 --- a/src/views/iot/product/product/detail/index.vue +++ b/src/views/iot/product/product/detail/index.vue @@ -8,8 +8,8 @@ - - + + @@ -22,7 +22,7 @@ import { DeviceApi } from '@/api/iot/device/device' import ProductDetailsHeader from './ProductDetailsHeader.vue' import ProductDetailsInfo from './ProductDetailsInfo.vue' import ProductTopic from './ProductTopic.vue' -import IoTProductThinkModel from '@/views/iot/thinkmodel/index.vue' +import IoTProductThingModel from '@/views/iot/thingmodel/index.vue' import { useTagsViewStore } from '@/store/modules/tagsView' import { useRouter } from 'vue-router' import { IOT_PROVIDE_KEY } from '@/views/iot/utils/constants' diff --git a/src/views/iot/product/product/index.vue b/src/views/iot/product/product/index.vue index e2b6447a5b9d2bcc937f6220f9c5582bbda6034c..1518c161a2aab8a4cf35e03f1fdf7bc44fd9bf04 100644 --- a/src/views/iot/product/product/index.vue +++ b/src/views/iot/product/product/index.vue @@ -97,7 +97,9 @@
产品标识 - {{ item.productKey }} + + {{ item.productKey }} +
@@ -309,7 +311,7 @@ const openObjectModel = (item: ProductVO) => { push({ name: 'IoTProductDetail', params: { id: item.id }, - query: { tab: 'thinkModel' } + query: { tab: 'thingModel' } }) } diff --git a/src/views/iot/thinkmodel/ThinkModelDataSpecs.vue b/src/views/iot/thingmodel/ThingModelDataSpecs.vue similarity index 62% rename from src/views/iot/thinkmodel/ThinkModelDataSpecs.vue rename to src/views/iot/thingmodel/ThingModelDataSpecs.vue index 2683242f0234e2a9d84b8fe16b942f656925ca87..5bced55cfe65c11f58804f9ef2413a418b3b6904 100644 --- a/src/views/iot/thinkmodel/ThinkModelDataSpecs.vue +++ b/src/views/iot/thingmodel/ThingModelDataSpecs.vue @@ -5,8 +5,9 @@ prop="property.dataType" > + - - - +