/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2022-12-14 14:14:32
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2023-03-29 16:02:56
 * @FilePath: /BudgetManaSystem/.umirc.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from '@umijs/max';

const { REACT_APP_ENV } = process.env;

export default defineConfig({
  // history:{
  //   type:'hash'
  // },
  antd: {
    configProvider: {
      prefixCls: 'bms-ant',
      primaryColor: '#3377FF'
      // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
    }
  },
  qiankun: {
    slave: {},
  },
  lessLoader: {
    modifyVars: { '@ant-prefix': 'bms-ant' }
  }, //对应修改生成的 antd 样式类名
  access: {},
  model: {},

  initialState: {},
  request: {},
  layout: {
    title: '前瞻性绩效管理',
    layout: 'side',
    menuProps: {
      theme: 'light',
    }
  },
  theme: {
    primaryColor: '#3377FF'
  },
  manifest: {
    basePath: '/',
  },
  publicPath: REACT_APP_ENV == 'dev' ? '/' : '/perform/',
  proxy: {

    '/gateway': {
      target: 'http://112.124.59.133:5000/gateway',
      changeOrigin: true,
      // pathRewrite: { '^/gateway': '' },

    }
  },
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      name: '首页',
      path: '/home',
      component: './Home',
    },
    {
      name: '系统设置',
      path: '/setting',
      routes: [
        {
          name: '基础设置',
          path: '/setting/baseSetting',
          routes: [
            {
              name: '业务字典分类管理',
              path: '/setting/baseSetting/dicClassfication',
              component: './setting/baseSetting/dicClassfication',
            },
            {
              name: '业务字典管理',
              path: '/setting/baseSetting/businessDicMana',
              component: './setting/baseSetting/businessDicMana',
            },
            {
              name: '参数管理',
              path: '/setting/baseSetting/paramsMana',
              component: './setting/baseSetting/paramsMana',
            }
          ]
        },
        {
          name: '管理绩效设置',
          path: '/setting/manaPerformanceSet',
          routes: [
            {
              name: '管理指标项目设定',
              path: '/setting/manaPerformanceSet/manaIndicItemSet',
              component: './setting/manaPerformanceSet/manaIndicItemSet',
            },
            {
              name: '职类考核分级设定',
              path: '/setting/manaPerformanceSet/classAssessAndGradeSet',
              component: './setting/manaPerformanceSet/classAssessAndGradeSet',
            },
            {
              name: '指标分组权重设定',
              path: '/setting/manaPerformanceSet/indicGroupWeightSet',
              component: './setting/manaPerformanceSet/indicGroupWeightSet',
            }
          ]
        },

      ]
    },
    {
      name: '绩校管理',
      path: '/budgetMana',
      routes: [
        {
          name: '月度结转',
          path: '/budgetMana/monthlySet',
          component: './budgetMana/monthlySet'
        },
        {
          name: '月度设置信息核对',
          path: '/budgetMana/monthlyInfoCheck',
          component: './budgetMana/monthlyInfoCheck'
        },
        {
          name: '月度绩效数据核对',
          path: '/budgetMana/monthlyDataCheck',
          component: './budgetMana/monthlyDataCheck'
        },
        {
          name: '人事薪酬预算',
          path: '/budgetMana/personnelSalaryBudget',
          component: './budgetMana/personnelSalaryBudget'
        },
        {
          name: '一次分配',
          path: '/budgetMana/oneBatch',
          component: './budgetMana/oneBatch'
        }
      ]
    }
  ],
  npmClient: 'yarn',
});

