Commit 2399c92a415f4cd76424547a3291f0be7fe8a18d

Authored by ww
1 parent 084d89fc

perf: DEFECT-803 adjust table more action column

... ... @@ -59,6 +59,8 @@
59 59 icon: 'clarity:note-edit-line',
60 60 onClick: handleCreateOrEdit.bind(null, record),
61 61 },
  62 + ]"
  63 + :drop-down-actions="[
62 64 {
63 65 label: '删除',
64 66 auth: 'api:yt:video:delete',
... ...
... ... @@ -103,6 +103,21 @@
103 103 <template #action="{ record }">
104 104 <TableAction
105 105 :actions="[
  106 + {
  107 + label: '详情',
  108 + icon: 'ant-design:eye-outlined',
  109 + auth: 'api:yt:device:get',
  110 + onClick: handleDetail.bind(null, record),
  111 + },
  112 + {
  113 + label: '编辑',
  114 + auth: 'api:yt:device:update',
  115 + icon: 'clarity:note-edit-line',
  116 + ifShow: authBtn(role) && record.customerId === undefined,
  117 + onClick: handleEdit.bind(null, record),
  118 + },
  119 + ]"
  120 + :dropDownActions="[
106 121 record.customerId
107 122 ? {
108 123 label: '取消分配',
... ... @@ -119,20 +134,6 @@
119 134 ifShow: authBtn(role),
120 135 onClick: handleDispatchCustomer.bind(null, record),
121 136 },
122   -
123   - {
124   - label: '详情',
125   - icon: 'ant-design:eye-outlined',
126   - auth: 'api:yt:device:get',
127   - onClick: handleDetail.bind(null, record),
128   - },
129   - {
130   - label: '编辑',
131   - auth: 'api:yt:device:update',
132   - icon: 'clarity:note-edit-line',
133   - ifShow: authBtn(role) && record.customerId === undefined,
134   - onClick: handleEdit.bind(null, record),
135   - },
136 137 {
137 138 label: '删除',
138 139 auth: 'api:yt:device:delete',
... ... @@ -235,7 +236,7 @@
235 236 searchInfo: searchInfo,
236 237 clickToRowSelect: false,
237 238 actionColumn: {
238   - width: 300,
  239 + width: 200,
239 240 title: '操作',
240 241 slots: { customRender: 'action' },
241 242 fixed: 'right',
... ...
... ... @@ -42,14 +42,6 @@
42 42 <TableAction
43 43 :actions="[
44 44 {
45   - label: '默认',
46   - icon: 'ant-design:profile-outlined',
47   - onClick: handleSetDefault.bind(null, record),
48   - ifShow: () => {
49   - return record.default === false;
50   - },
51   - },
52   - {
53 45 label: '详情',
54 46 auth: 'api:yt:deviceProfile:get',
55 47 icon: 'ant-design:eye-outlined',
... ... @@ -64,6 +56,16 @@
64 56 return record.name !== 'default' ? true : false;
65 57 },
66 58 },
  59 + ]"
  60 + :drop-down-actions="[
  61 + {
  62 + label: '默认',
  63 + icon: 'ant-design:profile-outlined',
  64 + onClick: handleSetDefault.bind(null, record),
  65 + ifShow: () => {
  66 + return record.default === false;
  67 + },
  68 + },
67 69 {
68 70 label: '导出',
69 71 auth: 'api:yt:deviceProfile:export',
... ... @@ -139,7 +141,7 @@
139 141 bordered: true,
140 142 showIndexColumn: false,
141 143 actionColumn: {
142   - width: 240,
  144 + width: 200,
143 145 title: '操作',
144 146 dataIndex: 'action',
145 147 slots: { customRender: 'action' },
... ...
... ... @@ -32,6 +32,8 @@
32 32 onClick: handleEdit.bind(null, record),
33 33 ifShow: record.creator === userId && record.status !== 1,
34 34 },
  35 + ]"
  36 + :drop-down-actions="[
35 37 {
36 38 label: '删除',
37 39 auth: 'api:yt:sceneLinkage:delete',
... ...
... ... @@ -61,6 +61,8 @@
61 61 onClick: handleEdit.bind(null, record),
62 62 ifShow: record.level != 0,
63 63 },
  64 + ]"
  65 + :drop-down-actions="[
64 66 {
65 67 label: '删除',
66 68 auth: 'api:yt:user:delete',
... ...