|
|
@@ -186,7 +186,7 @@ export const ThingModelApi = {
|
|
|
|
|
|
// 新增产品物模型
|
|
|
createThingModel: async (data: ThingModelData) => {
|
|
|
- return await request.post({ url: `/iot/thing-model/create`, data })
|
|
|
+ return await request.post({ url: `/iot/thing-model-common/create`, data })
|
|
|
},
|
|
|
|
|
|
// 修改产品物模型
|
|
|
@@ -299,3 +299,48 @@ export const validateBoolName = (_: any, value: string, callback: any) => {
|
|
|
|
|
|
callback()
|
|
|
}
|
|
|
+
|
|
|
+// 通用物模型
|
|
|
+export const ThingModelCommon = {
|
|
|
+ // 查询产品物模型分页
|
|
|
+ getCommonThingModelPage: async (params: any) => {
|
|
|
+ return await request.get({ url: `/iot/thing-model-common/page`, params })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建通用物模型
|
|
|
+ createCommonThingModel: async (data) => {
|
|
|
+ return await request.post({ url: `/iot/thing-model-common/create`, data })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除通用物模型
|
|
|
+ deleteCommonThingModel: async (id: number) => {
|
|
|
+ return await request.delete({ url: `/iot/thing-model-common/delete?id=` + id })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 编辑通用物模型
|
|
|
+ updateCommonThingModel: async (data) => {
|
|
|
+ return await request.put({ url: `/iot/thing-model-common/update`, data })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 查询通用物模型详情
|
|
|
+ getCommonThingModel: async (id: number) => {
|
|
|
+ return await request.get({ url: `/iot/thing-model-common/get?id=` + id })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 导出
|
|
|
+ exportCommonThingModel: async (params: any) => {
|
|
|
+ return await request.get({ url: `/iot/thing-model-common/export`, params })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/** 通用物模型 */
|
|
|
+export interface CommonThingModelData {
|
|
|
+ id?: number
|
|
|
+ identifier?: string
|
|
|
+ name?: string
|
|
|
+ description?: string
|
|
|
+ type?: number
|
|
|
+ property?: string
|
|
|
+ event?: string
|
|
|
+ service?: string
|
|
|
+}
|