Explorar el Código

Merge branch 'all-v4' into 'all-v4-qindao'

# Conflicts:
#   src/views/auth/dept/dept.vue
#   src/views/cameras/nvrlist/NvrList.vue
dao qin hace 1 año
padre
commit
8e2758dc3c
Se han modificado 1 ficheros con 18 adiciones y 0 borrados
  1. 18 0
      src/views/cameras/nvrlist/NvrList.vue

+ 18 - 0
src/views/cameras/nvrlist/NvrList.vue

@@ -115,6 +115,24 @@ const actionColumn: BasicColumn = reactive({
   key: 'action',
   fixed: 'right',
   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, {
       space: 20,
       color: '#629bf9',