// 权限组数据结构
/* 当前模块需要权限的按钮
  name 写左侧菜单栏的模块名称
  btn 按钮名称或者简单描述，
  code 是权限编码，是按钮唯一标识，是v-permission、hasPermission的入参
    命名规范：以模块名称开头，以 _ 分隔，以按钮功能结尾（如add edit view 等）,增强可读性
*/
export const permissionGroups = [
  {
    name: '项目管理',
    permissions: [
      { btn: '项目列表-新增', code: 'project_list_add_project' },
      { btn: '项目列表-编辑', code: 'project_list_edit_project' },
      { btn: '项目列表-删除', code: 'project_list_delete_project' },
      { btn: '项目详情-项目设置', code: 'project_detail_setting' },
      { btn: '项目详情-阶段设置', code: 'project_detail_phase_setting' },
      { btn: '项目详情-仿真策划', code: 'project_detail_planning' },
      { btn: '项目详情-项目文件', code: 'project_detail_upload_file' },
    ],
  },
  {
    name: '需求管理',
    permissions: [
      { btn: '需求管理-创建需求', code: 'demand_add_demand' },
      { btn: '需求管理-编辑需求', code: 'demand_edit_demand' },
      { btn: '需求管理-删除需求', code: 'demand_delete_demand' },
    ],
  },
  {
    name: '任务管理',
    permissions: [
      { btn: '未分发的-批量分发', code: 'task_confirm_batch_send' },
      { btn: '未分发的-分发', code: 'task_confirm_send' },
      { btn: '已分发的-编辑', code: 'task_send_edit' },
      // { btn: '已分发的-创建报工', code: 'demand_delete' },
      { btn: '已分发的-删除', code: 'task_send_delete' },
      { btn: '我执行的-启动', code: 'task_execute_start' },
      { btn: '我执行的-暂停', code: 'task_execute_pause' },
      { btn: '我执行的-编辑', code: 'task_execute_edit' },
      { btn: '我执行的-完成', code: 'task_execute_complete' },
      { btn: '我执行的-详情', code: 'task_execute_detail' },
      { btn: '我执行的-驳回', code: 'task_execute_reject' },
      { btn: '我执行的-跳转', code: 'task_execute_skip' },
      { btn: '我关注的-详情', code: 'task_attention_detail' },
      { btn: '我关注的-取消关注', code: 'task_attention_cancel_attention' },
      { btn: '所有任务-详情', code: 'task_all_detail' },
      { btn: '所有任务-关注', code: 'task_all_attention' },
      { btn: '所有任务-取消关注', code: 'task_all_cancel_attention' },
      { btn: '所有任务-编辑', code: 'task_all_edit' },
    ],
  },
  {
    name: '数据管理',
    permissions: [],
  },
  {
    name: '流程管理',
    permissions: [
      { btn: '新增流程', code: 'flow_flowLib_add' },
      { btn: '复制流程', code: 'flow_flowLib_copy' },
      { btn: '升版流程', code: 'flow_flowLib_upgrade' },
      { btn: '删除流程', code: 'flow_flowLib_delete' },
    ],
  },
  {
    name: '能力中心',
    permissions: [],
  },
  {
    name: '系统管理',
    permissions: [{ btn: '动态表格-删除', code: 'system_dynamicTable_delete' }],
  },
  {
    name: '通用',
    permissions: [{ btn: '动态表格-设置', code: 'system_dynamicTable_setting' }],
  },
];
