Showing
1 changed file
with
26 additions
and
34 deletions
@@ -9,7 +9,6 @@ | @@ -9,7 +9,6 @@ | ||
9 | import { useMessage } from '/@/hooks/web/useMessage'; | 9 | import { useMessage } from '/@/hooks/web/useMessage'; |
10 | import { useRoute } from 'vue-router'; | 10 | import { useRoute } from 'vue-router'; |
11 | import { useGo } from '/@/hooks/web/usePage'; | 11 | import { useGo } from '/@/hooks/web/usePage'; |
12 | - import { PageWrapper } from '/@/components/Page'; | ||
13 | 12 | ||
14 | defineEmits(['register']); | 13 | defineEmits(['register']); |
15 | 14 | ||
@@ -45,7 +44,6 @@ | @@ -45,7 +44,6 @@ | ||
45 | const [registerTable, { reload }] = useTable({ | 44 | const [registerTable, { reload }] = useTable({ |
46 | title: '边缘设备', | 45 | title: '边缘设备', |
47 | columns, | 46 | columns, |
48 | - tableLayout: 'auto', | ||
49 | api: async ({ page, pageSize, textSearch }) => { | 47 | api: async ({ page, pageSize, textSearch }) => { |
50 | const res = await edgeDevicePage( | 48 | const res = await edgeDevicePage( |
51 | { | 49 | { |
@@ -80,44 +78,38 @@ | @@ -80,44 +78,38 @@ | ||
80 | 78 | ||
81 | const handleEventIsSuccess = () => reload(); | 79 | const handleEventIsSuccess = () => reload(); |
82 | 80 | ||
83 | - function goBack() { | ||
84 | - go('/edge/edge_detail/' + edgeId.value); | ||
85 | - } | ||
86 | - | ||
87 | function handleGoDeviceDetail(record: Recordable) { | 81 | function handleGoDeviceDetail(record: Recordable) { |
88 | go(`/edge/edge_device/edge_device_detail/${record?.id?.id}/${edgeId.value}`); | 82 | go(`/edge/edge_device/edge_device_detail/${record?.id?.id}/${edgeId.value}`); |
89 | } | 83 | } |
90 | </script> | 84 | </script> |
91 | 85 | ||
92 | <template> | 86 | <template> |
93 | - <PageWrapper :title="`边缘设备`" contentBackground @back="goBack"> | ||
94 | - <BasicTable :clickToRowSelect="false" @register="registerTable"> | ||
95 | - <template #toolbar> | ||
96 | - <a-button type="primary" @click="handleEventIsDistribution"> 分配设备 </a-button> | ||
97 | - </template> | ||
98 | - <template #action="{ record }"> | ||
99 | - <TableAction | ||
100 | - :actions="[ | ||
101 | - { | ||
102 | - label: '详情', | ||
103 | - icon: 'ant-design:eye-outlined', | ||
104 | - onClick: handleGoDeviceDetail.bind(null, record), | ||
105 | - }, | ||
106 | - { | ||
107 | - label: '取消分配', | ||
108 | - icon: 'mdi:account-arrow-left', | ||
109 | - onClick: handleEventIsCancelDistribution.bind(null, record), | ||
110 | - }, | ||
111 | - ]" | ||
112 | - /> | ||
113 | - </template> | ||
114 | - </BasicTable> | ||
115 | - <EdgeDeviceDistribution | ||
116 | - @register="registerEdgeDeviceDistributionModal" | ||
117 | - :edgeId="edgeId" | ||
118 | - @success="handleEventIsSuccess" | ||
119 | - /> | ||
120 | - </PageWrapper> | 87 | + <BasicTable :clickToRowSelect="false" @register="registerTable"> |
88 | + <template #toolbar> | ||
89 | + <a-button type="primary" @click="handleEventIsDistribution"> 分配设备 </a-button> | ||
90 | + </template> | ||
91 | + <template #action="{ record }"> | ||
92 | + <TableAction | ||
93 | + :actions="[ | ||
94 | + { | ||
95 | + label: '详情', | ||
96 | + icon: 'ant-design:eye-outlined', | ||
97 | + onClick: handleGoDeviceDetail.bind(null, record), | ||
98 | + }, | ||
99 | + { | ||
100 | + label: '取消分配', | ||
101 | + icon: 'mdi:account-arrow-left', | ||
102 | + onClick: handleEventIsCancelDistribution.bind(null, record), | ||
103 | + }, | ||
104 | + ]" | ||
105 | + /> | ||
106 | + </template> | ||
107 | + </BasicTable> | ||
108 | + <EdgeDeviceDistribution | ||
109 | + @register="registerEdgeDeviceDistributionModal" | ||
110 | + :edgeId="edgeId" | ||
111 | + @success="handleEventIsSuccess" | ||
112 | + /> | ||
121 | </template> | 113 | </template> |
122 | 114 | ||
123 | <style lang="less" scoped></style> | 115 | <style lang="less" scoped></style> |