Commit 2399c92a415f4cd76424547a3291f0be7fe8a18d
1 parent
084d89fc
perf: DEFECT-803 adjust table more action column
Showing
5 changed files
with
33 additions
and
24 deletions
@@ -59,6 +59,8 @@ | @@ -59,6 +59,8 @@ | ||
59 | icon: 'clarity:note-edit-line', | 59 | icon: 'clarity:note-edit-line', |
60 | onClick: handleCreateOrEdit.bind(null, record), | 60 | onClick: handleCreateOrEdit.bind(null, record), |
61 | }, | 61 | }, |
62 | + ]" | ||
63 | + :drop-down-actions="[ | ||
62 | { | 64 | { |
63 | label: '删除', | 65 | label: '删除', |
64 | auth: 'api:yt:video:delete', | 66 | auth: 'api:yt:video:delete', |
@@ -103,6 +103,21 @@ | @@ -103,6 +103,21 @@ | ||
103 | <template #action="{ record }"> | 103 | <template #action="{ record }"> |
104 | <TableAction | 104 | <TableAction |
105 | :actions="[ | 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 | record.customerId | 121 | record.customerId |
107 | ? { | 122 | ? { |
108 | label: '取消分配', | 123 | label: '取消分配', |
@@ -119,20 +134,6 @@ | @@ -119,20 +134,6 @@ | ||
119 | ifShow: authBtn(role), | 134 | ifShow: authBtn(role), |
120 | onClick: handleDispatchCustomer.bind(null, record), | 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 | label: '删除', | 138 | label: '删除', |
138 | auth: 'api:yt:device:delete', | 139 | auth: 'api:yt:device:delete', |
@@ -235,7 +236,7 @@ | @@ -235,7 +236,7 @@ | ||
235 | searchInfo: searchInfo, | 236 | searchInfo: searchInfo, |
236 | clickToRowSelect: false, | 237 | clickToRowSelect: false, |
237 | actionColumn: { | 238 | actionColumn: { |
238 | - width: 300, | 239 | + width: 200, |
239 | title: '操作', | 240 | title: '操作', |
240 | slots: { customRender: 'action' }, | 241 | slots: { customRender: 'action' }, |
241 | fixed: 'right', | 242 | fixed: 'right', |
@@ -42,14 +42,6 @@ | @@ -42,14 +42,6 @@ | ||
42 | <TableAction | 42 | <TableAction |
43 | :actions="[ | 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 | label: '详情', | 45 | label: '详情', |
54 | auth: 'api:yt:deviceProfile:get', | 46 | auth: 'api:yt:deviceProfile:get', |
55 | icon: 'ant-design:eye-outlined', | 47 | icon: 'ant-design:eye-outlined', |
@@ -64,6 +56,16 @@ | @@ -64,6 +56,16 @@ | ||
64 | return record.name !== 'default' ? true : false; | 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 | label: '导出', | 70 | label: '导出', |
69 | auth: 'api:yt:deviceProfile:export', | 71 | auth: 'api:yt:deviceProfile:export', |
@@ -139,7 +141,7 @@ | @@ -139,7 +141,7 @@ | ||
139 | bordered: true, | 141 | bordered: true, |
140 | showIndexColumn: false, | 142 | showIndexColumn: false, |
141 | actionColumn: { | 143 | actionColumn: { |
142 | - width: 240, | 144 | + width: 200, |
143 | title: '操作', | 145 | title: '操作', |
144 | dataIndex: 'action', | 146 | dataIndex: 'action', |
145 | slots: { customRender: 'action' }, | 147 | slots: { customRender: 'action' }, |
@@ -32,6 +32,8 @@ | @@ -32,6 +32,8 @@ | ||
32 | onClick: handleEdit.bind(null, record), | 32 | onClick: handleEdit.bind(null, record), |
33 | ifShow: record.creator === userId && record.status !== 1, | 33 | ifShow: record.creator === userId && record.status !== 1, |
34 | }, | 34 | }, |
35 | + ]" | ||
36 | + :drop-down-actions="[ | ||
35 | { | 37 | { |
36 | label: '删除', | 38 | label: '删除', |
37 | auth: 'api:yt:sceneLinkage:delete', | 39 | auth: 'api:yt:sceneLinkage:delete', |
@@ -61,6 +61,8 @@ | @@ -61,6 +61,8 @@ | ||
61 | onClick: handleEdit.bind(null, record), | 61 | onClick: handleEdit.bind(null, record), |
62 | ifShow: record.level != 0, | 62 | ifShow: record.level != 0, |
63 | }, | 63 | }, |
64 | + ]" | ||
65 | + :drop-down-actions="[ | ||
64 | { | 66 | { |
65 | label: '删除', | 67 | label: '删除', |
66 | auth: 'api:yt:user:delete', | 68 | auth: 'api:yt:user:delete', |