Flex
2025-06-07 195d032c025c9264652b55a3e6a894eb95664885
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import request from '@/config/axios'
 
// IoT 产品物模型 VO
export interface ThinkModelFunctionVO {
  id: number // 物模型功能编号
  identifier: string // 功能标识
  name: string // 功能名称
  description: string // 功能描述
  productId: number // 产品编号
  productKey: string // 产品标识
  type: number // 功能类型
  property: string // 属性
  event: string // 事件
  service: string // 服务
}
 
// IoT 产品物模型 API
export const ThinkModelFunctionApi = {
  // 查询产品物模型分页
  getThinkModelFunctionPage: async (params: any) => {
    return await request.get({ url: `/iot/think-model-function/page`, params })
  },
  // 获得产品物模型
  getThinkModelFunctionListByProductId: async (params: any) => {
    return await request.get({
      url: `/iot/think-model-function/list-by-product-id`,
      params
    })
  },
 
  // 查询产品物模型详情
  getThinkModelFunction: async (id: number) => {
    return await request.get({ url: `/iot/think-model-function/get?id=` + id })
  },
 
  // 新增产品物模型
  createThinkModelFunction: async (data: ThinkModelFunctionVO) => {
    return await request.post({ url: `/iot/think-model-function/create`, data })
  },
 
  // 修改产品物模型
  updateThinkModelFunction: async (data: ThinkModelFunctionVO) => {
    return await request.put({ url: `/iot/think-model-function/update`, data })
  },
 
  // 删除产品物模型
  deleteThinkModelFunction: async (id: number) => {
    return await request.delete({ url: `/iot/think-model-function/delete?id=` + id })
  },
 
  // 导出产品物模型 Excel
  exportThinkModelFunction: async (params) => {
    return await request.download({ url: `/iot/think-model-function/export-excel`, params })
  }
}