topic.tsx
3.61 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import { BasicColumn } from '/@/components/Table/src/types/table';
export const topicTableColumn: BasicColumn[] = [
{
title: '设备类型',
dataIndex: 'deviceType',
width: 40,
customRender: ({ text, index }: { text: any; index: number }) => {
const obj: any = {
children: text,
attrs: {},
};
if (index === 0) {
obj.attrs.rowSpan = 6;
}
if (index > 0 && index < 6) {
obj.attrs.rowSpan = 0;
}
if (index > 6) {
obj.attrs.rowSpan = 0;
}
if (index === 6) {
obj.attrs.rowSpan = 4;
}
return obj;
},
},
{
title: '功能',
dataIndex: 'function',
width: 80,
slots: { customRender: 'function' },
},
{
title: '发布主题',
dataIndex: 'release',
width: 80,
slots: { customRender: 'release' },
},
{
title: '订阅主题',
dataIndex: 'subscribe',
width: 80,
slots: { customRender: 'subscribe' },
},
{
title: '平台',
dataIndex: 'platform',
width: 50,
slots: { customRender: 'platform' },
},
{
title: '设备',
dataIndex: 'device',
width: 50,
slots: { customRender: 'device' },
},
];
export const list = [
{
deviceType: '网关/直连设备',
function: '网关/直连设备遥测',
release: 'v1/devices/me/telemetry',
subscribe: 'v1/devices/me/telemetry',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关/直连设备',
function: '服务端命令下发到设备端',
release: 'v1/devices/me/rpc/request/$request_id',
subscribe: 'v1/devices/me/rpc/request/+',
platform: '发布',
device: '订阅',
},
{
deviceType: '网关/直连设备',
function: '设备端响应命令到服务端',
release: 'v1/devices/me/rpc/response/$request_id',
subscribe: 'v1/devices/me/rpc/response/+',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关/直连设备',
function: '直连设备属性上报',
release: 'v1/devices/me/attributes',
subscribe: 'v1/devices/me/attributes',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关/直连设备',
function: '设备端请求服务端共享属性及客户端属性',
release: 'v1/devices/me/attributes/response/$request_id',
subscribe: 'v1/devices/me/attributes/response/+',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关/直连设备',
function: '服务端响应共享属性集客户端属性给设备端',
release: 'v1/devices/me/attributes/response/$request_id',
subscribe: 'v1/devices/me/attributes/response/+',
platform: '发布',
device: '订阅',
},
{
deviceType: '网关子设备',
function: '设备端请求服务端子设备共享属性及客户端属性',
release: 'v1/gateway/attributes/request',
subscribe: 'v1/gateway/attributes/request',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关子设备',
function: '服务端响应子设备共享属性及客户端属性给设备端',
release: 'v1/gateway/attributes/response',
subscribe: 'v1/gateway/attributes/response',
platform: '发布',
device: '订阅',
},
{
deviceType: '网关子设备',
function: '设备端上报子设备客户端属性',
release: 'v1/gateway/attributes',
subscribe: 'v1/gateway/attributes',
platform: '订阅',
device: '发布',
},
{
deviceType: '网关子设备',
function: '网关子设备遥测',
release: 'v1/gateway/telemetry',
subscribe: 'v1/gateway/telemetry',
platform: '订阅',
device: '发布',
},
];