/*
 * @Author: your name
 * @Date: 2022-01-07 10:04:20
 * @LastEditTime: 2023-10-23 10:49:03
 * @LastEditors: code4eat awesomedema@gmail.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /KC-MiddlePlatform/config/config.ts
 */

import { defineConfig } from 'umi';

import proxy from './proxy';

const { REACT_APP_ENV } = process.env;

export default defineConfig({
  nodeModulesTransform: {
    type: 'none',
  },
  title: false,
  publicPath: '/',
  dva: {
    immer: true,
    hmr: true,
  },
  antd: {
    config: {
      prefixCls: 'kcmp-ant',
      // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
    },
  },
  lessLoader: {
    modifyVars: { '@ant-prefix': 'kcmp-ant', 'root-entry-name': 'default' },
  }, 
 
  theme: {
    '@primary-color': '#3376FE',
    '@primary-color-hover': '#3376FE',
    // '@root-entry-name':'root-entry-name'
  },
  routes: [
    {
      path: '/',
      component: '@/layouts/index.tsx',
      routes: [
        {
          path: '/app1',
          microApp: 'app1',
        },
        // {
        //   path: '/costMana',
        //   microApp: 'costMana',
        // },
        {
          path: '/PFMBackC',
          microApp: 'PFMBackC',
        },
        {
          path: '/reviewMana',
          microApp: 'reviewMana',
        },
        {
          path: '/budgetManaSystem',
          microApp: 'budgetManaSystem',
        },
        {
          path: '/pfmBackMana',
          microApp: 'pfmBackMana',
        },
        {
          path: '/CostAccountingSys',
          microApp: 'CostAccountingSys',
        },
        {
          path: '/channelIndex/channelIndexOne',
          component: '@/pages/channelIndex/channelIndexOne/index.tsx',
        },
        {
          path: '/index',
          title: '欢迎进入医管平台',
          component: '@/pages/index/index.tsx',
        },
        {
          title: '精益管管理中台',
          path: '/platform',
          component: '@/pages/platform/_layout.tsx',
          routes: [
            {
              path: '/platform/sqlEditer',
              component: '@/pages/platform/sqlediter/index.tsx',
            },
            {
              path: '/platform/setting',
              routes: [
                {
                  path: '/platform/setting/userManage',
                  component: '@/pages/platform/setting/userManage/index.tsx',
                },
                {
                  path: '/platform/setting/hospManage',
                  component: '@/pages/platform/setting/hospManage/index.tsx',
                },
                {
                  path: '/platform/setting/menuManage',
                  component: '@/pages/platform/setting/menuManage/index.tsx',
                },
                {
                  path: '/platform/setting/roleManage',
                  component: '@/pages/platform/setting/roleManage/index.tsx',
                },
                // {
                //   path: '/platform/setting/reports',
                //   component: '@/pages/platform/setting/reports/index.tsx',
                // },
                {
                  path: '/platform/setting/departmentMana',
                  component: '@/pages/platform/setting/departmentMana/index.tsx',
                },
                {
                  path: '/platform/setting/pubDicTypeMana',
                  component: '@/pages/platform/setting/pubDicTypeMana/index.tsx',
                },
                {
                  path: '/platform/setting/hospParamsMana',
                  component: '@/pages/platform/setting/hospParamsMana/index.tsx',
                },
                {
                  path: '/platform/setting/pubDicMana/:type',
                  component: '@/pages/platform/setting/pubDicMana/index.tsx',
                },
                {
                  path: '/platform/setting/indicatorMana',
                  component: '@/pages/platform/setting/indicatorMana/index.tsx',
                },
                {
                  path: '/platform/setting/paramsMana',
                  component: '@/pages/platform/setting/paramsMana/index.tsx',
                },
                {
                  path: '/platform/setting/systemNavMana',
                  component: '@/pages/platform/setting/systemNavMana/index.tsx',
                },
                {
                  path: '/platform/setting/notificationTemplate',
                  component: '@/pages/platform/setting/notificationTemplate/index.tsx',
                },
              ]
            },
          ],
        },
        {
          path: '/personalCenter',
          component: '@/pages/personalCenter/index.tsx',
        },
        { path: '/login', layout: false, component: '@/pages/login/index' },
      ],
    },
  ],
 // hash:true,
  proxy: proxy[REACT_APP_ENV || 'dev'],
  manifest: {
    basePath: '/',
  },
  fastRefresh: {},
  layout: {
    layout: 'top',
  },
  // mfsu: {},
  qiankun: {
    master: {
      sandbox: {
        // strictStyleIsolation:true,
        // // experimentalStyleIsolation: true, // 试验性
      },
    },
  },
});
