nayota-show-sdk 1.3.41 → 1.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/devices.js +2 -0
- package/api/tag.js +21 -19
- package/package.json +1 -1
package/api/devices.js
CHANGED
|
@@ -47,6 +47,7 @@ import { requestShow } from '../utils'
|
|
|
47
47
|
* @property {number} direction - 旋转角度
|
|
48
48
|
* @property {string} pointShape - 点形状
|
|
49
49
|
* @property {array} multiPositions - 多点位
|
|
50
|
+
* @property {array} tags - 标签数组
|
|
50
51
|
* @example
|
|
51
52
|
* {
|
|
52
53
|
'hash': [],
|
|
@@ -116,6 +117,7 @@ import { requestShow } from '../utils'
|
|
|
116
117
|
'creator': '6678e31ff340dfdecd9e1a28',
|
|
117
118
|
'attribute': [],
|
|
118
119
|
'props': [],
|
|
120
|
+
'tags': [],
|
|
119
121
|
'__v': 0,
|
|
120
122
|
'createdAt': '2024-06-27T09:20:58.138Z',
|
|
121
123
|
'updatedAt': '2024-06-27T09:20:58.138Z'
|
package/api/tag.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { requestShow } from '../utils'
|
|
2
2
|
/**
|
|
3
|
-
* @file
|
|
4
|
-
* @module
|
|
3
|
+
* @file 标签api
|
|
4
|
+
* @module 标签接口
|
|
5
5
|
* @category 系统设置
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @typedef {Object} tag -
|
|
10
|
-
* @property {string} _id -
|
|
11
|
-
* @property {string}
|
|
9
|
+
* @typedef {Object} tag - 标签
|
|
10
|
+
* @property {string} _id - 标签id
|
|
11
|
+
* @property {string} type - 类型
|
|
12
|
+
* @property {string} name - 标签名称
|
|
12
13
|
* @property {string} sort - 排序字段
|
|
13
14
|
* @property {boolean} status - 启用状态
|
|
14
15
|
* @example
|
|
15
16
|
* {
|
|
16
17
|
* "_id": "6670fd7aa2c0df0007664763",
|
|
17
18
|
* "name": "A栋",
|
|
19
|
+
* "type": "楼层",
|
|
18
20
|
* "sort": 1,
|
|
19
21
|
* "status": true
|
|
20
22
|
* }
|
|
21
23
|
*/
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* 获取标签列表
|
|
25
27
|
* @param {Object} query - 请求对象
|
|
26
28
|
* @param {number} query.page - 页码
|
|
27
29
|
* @param {number} query.limit - 每页数量
|
|
28
30
|
* @returns {number} code - 返回码,0表示成功
|
|
29
|
-
* @returns {number} total -
|
|
30
|
-
* @returns {Array} rows -
|
|
31
|
+
* @returns {number} total - 标签总数
|
|
32
|
+
* @returns {Array} rows - 标签数组 见表结构tag定义
|
|
31
33
|
*/
|
|
32
34
|
export function list(query) {
|
|
33
35
|
return requestShow({
|
|
@@ -38,8 +40,8 @@ export function list(query) {
|
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @param {Object} data -
|
|
43
|
+
* 新增标签
|
|
44
|
+
* @param {Object} data - 包含标签的请求体 属性见表结构tag定义。
|
|
43
45
|
* @returns {number} code - 返回码,0表示成功
|
|
44
46
|
* @returns {string} data - 新增成功的数据 见表结构tag定义
|
|
45
47
|
*/
|
|
@@ -52,10 +54,10 @@ export function create(data) {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
55
|
-
* 获取
|
|
56
|
-
* @param {string} id -
|
|
57
|
+
* 获取 标签详情
|
|
58
|
+
* @param {string} id - 标签id
|
|
57
59
|
* @returns {number} code - 返回码,0表示成功。
|
|
58
|
-
* @returns {Object} data -
|
|
60
|
+
* @returns {Object} data - 标签对象 见表结构tag定义
|
|
59
61
|
*/
|
|
60
62
|
export function getOne(id) {
|
|
61
63
|
return requestShow({
|
|
@@ -65,8 +67,8 @@ export function getOne(id) {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
|
-
*
|
|
69
|
-
* @param {Object} data -
|
|
70
|
+
* 修改标签
|
|
71
|
+
* @param {Object} data - 包含标签的请求体 属性见表结构tag定义。
|
|
70
72
|
* @returns {number} code - 返回码,0表示成功
|
|
71
73
|
* @returns {string} data - 修改成功的数据 见表结构tag定义
|
|
72
74
|
*/
|
|
@@ -78,8 +80,8 @@ export function updateOne(data) {
|
|
|
78
80
|
})
|
|
79
81
|
}
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
82
|
-
* @param {string} id -
|
|
83
|
+
* 删除标签
|
|
84
|
+
* @param {string} id - 删除的标签id。
|
|
83
85
|
* @returns {number} code - 返回码,0表示成功
|
|
84
86
|
* @returns {string} data - 删除成功的数据 见表结构tag定义
|
|
85
87
|
*/
|
|
@@ -91,8 +93,8 @@ export function deleteOne(id) {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
/**
|
|
94
|
-
*
|
|
95
|
-
* @param {Array} ids -
|
|
96
|
+
* 批量删除标签
|
|
97
|
+
* @param {Array} ids - 删除的标签ids。
|
|
96
98
|
* @returns {number} code - 返回码,0表示成功
|
|
97
99
|
*/
|
|
98
100
|
export function deleteMany(ids) {
|