Commit ccbaf072f31a716b5373579af3a54bba46672b51

Authored by fengtao
1 parent 8baa7ad7

pref:优化Topic里的内容

@@ -455,13 +455,31 @@ export const topicTableColumn: BasicColumn[] = [ @@ -455,13 +455,31 @@ export const topicTableColumn: BasicColumn[] = [
455 width: 100, 455 width: 100,
456 }, 456 },
457 { 457 {
458 - title: 'Topic类',  
459 - dataIndex: 'class', 458 + title: '发布主题',
  459 + dataIndex: 'release',
460 width: 100, 460 width: 100,
461 }, 461 },
  462 +
462 { 463 {
463 - title: '描述',  
464 - dataIndex: 'description', 464 + title: '订阅主题',
  465 + dataIndex: 'subscribe',
465 width: 100, 466 width: 100,
466 }, 467 },
  468 + {
  469 + title: '平台',
  470 + dataIndex: 'platform',
  471 + width: 30,
  472 + },
  473 +
  474 + {
  475 + title: '设备',
  476 + dataIndex: 'device',
  477 + width: 30,
  478 + },
  479 +
  480 + // {
  481 + // title: '描述',
  482 + // dataIndex: 'description',
  483 + // width: 100,
  484 + // },
467 ]; 485 ];
1 <script lang="ts" setup> 1 <script lang="ts" setup>
2 import { topicTableColumn } from '../device.profile.data'; 2 import { topicTableColumn } from '../device.profile.data';
3 import { BasicTable, useTable } from '/@/components/Table'; 3 import { BasicTable, useTable } from '/@/components/Table';
4 - import { buildUUID } from '/@/utils/uuid';  
5 4
6 const list = [ 5 const list = [
7 - { function: '遥测主题', class: 'v1/devices/me/telemetry' },  
8 - { function: '属性主题', class: 'v1/devices/me/attributes' },  
9 - { function: '设备上报事件主题', class: 'v1/devices/me/attributes' },  
10 - { function: '服务控制设备(RPC)主题', class: 'v1/devices/me/attributes' }, 6 + {
  7 + function: '网关/直连设备遥测',
  8 + release: 'v1/devices/me/telemetry',
  9 + subscribe: 'v1/devices/me/telemetry',
  10 + platform: '订阅',
  11 + device: '发布',
  12 + },
  13 + {
  14 + function: '服务端命令下发到设备端',
  15 + release: 'v1/devices/me/rpc/request/$request_id',
  16 + subscribe: 'v1/devices/me/rpc/request/+',
  17 + platform: '发布',
  18 + device: '订阅',
  19 + },
  20 + {
  21 + function: '设备端响应命令到服务端',
  22 + release: 'v1/devices/me/rpc/response/$request_id',
  23 + subscribe: 'v1/devices/me/rpc/response/+',
  24 + platform: '订阅',
  25 + device: '发布',
  26 + },
  27 + {
  28 + function: '直连设备属性上报',
  29 + release: 'v1/devices/me/attributes',
  30 + subscribe: 'v1/devices/me/attributes',
  31 + platform: '订阅',
  32 + device: '发布',
  33 + },
  34 +
  35 + {
  36 + function: '设备端请求服务端共享属性及客户端属性',
  37 + release: 'vv1/devices/me/attributes/response/$request_id',
  38 + subscribe: 'v1/devices/me/attributes/response/+',
  39 + platform: '订阅',
  40 + device: '发布',
  41 + },
  42 + {
  43 + function: '服务端响应共享属性集客户端属性给设备端',
  44 + release: 'v1/devices/me/attributes/response/$request_id',
  45 + subscribe: 'v1/devices/me/attributes/response/+',
  46 + platform: '发布',
  47 + device: '订阅',
  48 + },
  49 + {
  50 + function: '设备端请求服务端子设备共享属性及客户端属性',
  51 + release: 'v1/gateway/attributes/request',
  52 + subscribe: 'v1/gateway/attributes/request',
  53 + platform: '订阅',
  54 + device: '发布',
  55 + },
  56 + {
  57 + function: '服务端响应子设备共享属性及客户端属性给设备端',
  58 + release: 'v1/gateway/attributes/response',
  59 + subscribe: 'v1/gateway/attributes/response',
  60 + platform: '发布',
  61 + device: '订阅',
  62 + },
  63 + {
  64 + function: '设备端上报子设备客户端属性',
  65 + release: 'v1/gateway/attributes',
  66 + subscribe: 'v1/gateway/attributes',
  67 + platform: '订阅',
  68 + device: '发布',
  69 + },
  70 + {
  71 + function: '网关子设备遥测',
  72 + release: 'v1/gateway/telemetry',
  73 + subscribe: 'v1/gateway/telemetry',
  74 + platform: '订阅',
  75 + device: '发布',
  76 + },
11 ]; 77 ];
12 78
13 - const dataSource = Array.from({ length: 10 }, (_, index) => {  
14 - const record = list[index % 4];  
15 - return {  
16 - id: buildUUID(),  
17 - ...record,  
18 - description: record.function,  
19 - };  
20 - }); 79 + const dataSource = list;
21 80
22 const [register] = useTable({ 81 const [register] = useTable({
23 title: 'Topic', 82 title: 'Topic',