Commit b6e23bb57bb0fa075476794a9c910d93950d7cc0

Authored by 温伟
2 parents f771b01e 6bb9543d

Merge branch 'perf/edge-manage/07-23' into 'main_dev'

perf: 云端环境中,边缘设备中,去掉红框布局

See merge request yunteng/thingskit-front!1419
... ... @@ -9,7 +9,6 @@
9 9 import { useMessage } from '/@/hooks/web/useMessage';
10 10 import { useRoute } from 'vue-router';
11 11 import { useGo } from '/@/hooks/web/usePage';
12   - import { PageWrapper } from '/@/components/Page';
13 12
14 13 defineEmits(['register']);
15 14
... ... @@ -45,7 +44,6 @@
45 44 const [registerTable, { reload }] = useTable({
46 45 title: '边缘设备',
47 46 columns,
48   - tableLayout: 'auto',
49 47 api: async ({ page, pageSize, textSearch }) => {
50 48 const res = await edgeDevicePage(
51 49 {
... ... @@ -80,44 +78,38 @@
80 78
81 79 const handleEventIsSuccess = () => reload();
82 80
83   - function goBack() {
84   - go('/edge/edge_detail/' + edgeId.value);
85   - }
86   -
87 81 function handleGoDeviceDetail(record: Recordable) {
88 82 go(`/edge/edge_device/edge_device_detail/${record?.id?.id}/${edgeId.value}`);
89 83 }
90 84 </script>
91 85
92 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 113 </template>
122 114
123 115 <style lang="less" scoped></style>
... ...