|
@@ -115,6 +115,24 @@ const actionColumn: BasicColumn = reactive({
|
|
|
key: 'action',
|
|
key: 'action',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
render(record) {
|
|
render(record) {
|
|
|
|
|
+ const actions: any[] = [];
|
|
|
|
|
+
|
|
|
|
|
+ if (userStore.checkPermission(PERM_DEVICE.NVR_EDIT)) {
|
|
|
|
|
+ actions.push({
|
|
|
|
|
+ label: '修改',
|
|
|
|
|
+ icon: editIcon,
|
|
|
|
|
+ onClick: handleEdit.bind(null, record.row),
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (userStore.checkPermission(PERM_DEVICE.NVR_DELETE)) {
|
|
|
|
|
+ actions.push({
|
|
|
|
|
+ label: '删除',
|
|
|
|
|
+ icon: deleteIcon,
|
|
|
|
|
+ onClick: handleDelete.bind(null, record.row),
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return h(TableActionIcons as any, {
|
|
return h(TableActionIcons as any, {
|
|
|
space: 20,
|
|
space: 20,
|
|
|
color: '#629bf9',
|
|
color: '#629bf9',
|