/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2022-12-14 14:14:32
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2025-07-08 16:53:14
 * @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({
  antd: {
    configProvider: {
      prefixCls: 'pfm-ant',
    },
  },
  qiankun: {
    slave: {},
  },
  mfsu: false,
  lessLoader: {
    modifyVars: {
      '@ant-prefix': 'pfm-ant',
      '@primary-color': '#3377FF',
      '@border-color-base': '#dae2f2',
    },
    javascriptEnabled: true,
  }, //对应修改生成的 antd 样式类名

  access: {},
  model: {},

  initialState: {},
  request: {},
  layout: {
    title: '追踪方法学后台管理',
    layout: 'side',
    menuProps: {
      theme: 'light',
    },
  },
  manifest: {
    basePath: '/',
  },
  publicPath: REACT_APP_ENV == 'dev' ? '/' : '/pfmManager/',
  proxy: {
    '/gateway': {
      target: 'http://120.27.235.181:5000/gateway', //开发
      //target:'http://47.96.149.190:5000/gateway', //演示
      changeOrigin: true,
      // pathRewrite: { '^/gateway': '' },
    },
  },
  routes: [
    {
      path: '/',
      redirect: '/setting/fenyeTemplate',
    },
    {
      name: '首页',
      path: '/home',
      component: './Home',
    },
    {
      name: '基础信息管理',
      path: '/baseInfoMana',
      routes: [
        {
          name: '人员管理',
          path: '/baseInfoMana/empMana',
          component: './baseInfoMana/empMana',
        },
        {
          name: '单位管理',
          path: '/baseInfoMana/unitMana',
          component: './baseInfoMana/unitMana',
        },
        {
          name: '查核组管理',
          path: '/baseInfoMana/checkGroupMana',
          component: './baseInfoMana/checkGroupMana',
        },
      ],
    },
    {
      name: '查核条件管理',
      path: '/checkConditionMana',
      component: './checkConditionMana',
    },
    {
      name: '查核单位管理',
      path: '/checkUnitMana',
      component: './checkUnitMana',
    },
    {
      name: '查核要点管理',
      path: '/checkPointMana',
      component: './checkPointMana',
    },
    {
      name: '查核项管理',
      path: '/checkItemMana',
      component: './checkItemMana',
    },
    {
      name: '通用设置',
      path: '/setting',
      routes: [
        {
          name: '定性选项管理',
          path: '/setting/qualitativeOptionsMana',
          component: './setting/qualitativeOptionsMana',
        },
        {
          name: '分页模板管理',
          path: '/setting/fenyeTemplate',
          component: './setting/fenyeTemplate',
        },
      ],
    },
  ],
  npmClient: 'yarn',
});
