suerprisePlus
2024-05-30 d4c810f9803aa13d806724a5f4f71fe85abac38e
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import request from '@/utils/request';
 
// 查询物模型列表
export function listModel(query) {
  return request({
    url: '/iot/model/list',
    method: 'get',
    params: query,
  });
}
 
// 查询物模型详细
export function getModel(modelId) {
  return request({
    url: '/iot/model/' + modelId,
    method: 'get',
  });
}
 
// 查询物模型对应分享设备用户权限列表
export function permListModel(productId) {
  return request({
    url: '/iot/model/permList/' + productId,
    method: 'get',
  });
}
 
// 新增物模型
export function addModel(data) {
  return request({
    url: '/iot/model',
    method: 'post',
    data: data,
  });
}
 
// 导入通用物模型
export function importModel(data) {
  return request({
    url: '/iot/model/import',
    method: 'post',
    data: data,
  });
}
 
// 修改物模型
export function updateModel(data) {
  return request({
    url: '/iot/model',
    method: 'put',
    data: data,
  });
}
 
// 删除物模型
export function delModel(modelId) {
  return request({
    url: '/iot/model/' + modelId,
    method: 'delete',
  });
}
 
// 根据产品ID获取缓存的物模型
export function cacheJsonThingsModel(productId) {
  return request({
    url: '/iot/model/cache/' + productId,
    method: 'get',
  });
}
 
// 同步采集点模板到产品物模型
export function synchron(data) {
  return request({
    url: '/iot/model/synchron',
    method: 'post',
    data: data,
  });
}