【功能完善】IOT: 产品物模型-属性
This commit is contained in:
@ -10,6 +10,7 @@ export interface ThingModelData {
|
||||
description?: string // 功能描述
|
||||
productId?: number // 产品编号
|
||||
productKey?: string // 产品标识
|
||||
dataType: string // 数据类型,与 dataSpecs 的 dataType 保持一致
|
||||
type: ProductFunctionTypeEnum // 功能类型
|
||||
property: ThingModelProperty // 属性
|
||||
event?: ThingModelEvent // 事件
|
||||
@ -53,34 +54,35 @@ export enum ProductFunctionAccessModeEnum {
|
||||
// IoT 产品物模型 API
|
||||
export const ThinkModelFunctionApi = {
|
||||
// 查询产品物模型分页
|
||||
getThinkModelFunctionPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/think-model-function/page`, params })
|
||||
getProductThingModelPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/product-thing-model/page`, params })
|
||||
},
|
||||
|
||||
// 获得产品物模型
|
||||
getThinkModelFunctionListByProductId: async (params: any) => {
|
||||
getProductThingModelListByProductId: async (params: any) => {
|
||||
return await request.get({
|
||||
url: `/iot/think-model-function/list-by-product-id`,
|
||||
url: `/iot/product-thing-model/list-by-product-id`,
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
// 查询产品物模型详情
|
||||
getThinkModelFunction: async (id: number) => {
|
||||
return await request.get({ url: `/iot/think-model-function/get?id=` + id })
|
||||
getProductThingModel: async (id: number) => {
|
||||
return await request.get({ url: `/iot/product-thing-model/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品物模型
|
||||
createThinkModelFunction: async (data: ThingModelData) => {
|
||||
return await request.post({ url: `/iot/think-model-function/create`, data })
|
||||
createProductThingModel: async (data: ThingModelData) => {
|
||||
return await request.post({ url: `/iot/product-thing-model/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品物模型
|
||||
updateThinkModelFunction: async (data: ThingModelData) => {
|
||||
return await request.put({ url: `/iot/think-model-function/update`, data })
|
||||
updateProductThingModel: async (data: ThingModelData) => {
|
||||
return await request.put({ url: `/iot/product-thing-model/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品物模型
|
||||
deleteThinkModelFunction: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/think-model-function/delete?id=` + id })
|
||||
deleteProductThingModel: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/product-thing-model/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user