123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- import { defineConfig } from '@umijs/max';
- const publicPath = process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/';
- import locale from 'antd/es/calendar/locale/zh_CN';
- import moment from 'moment';
- moment.locale('zh-cn');
- export default defineConfig({
- hash: true,
- antd: {},
- dva: {},
- access: {},
- model: {},
- initialState: {},
- request: {},
- layout: {
- title: '金科环境数字化管理平台',
- locale: false,
- },
- locale: {
- antd: true, // 如果项目依赖中包含 `antd`,则默认为 true
- baseNavigator: true,
- baseSeparator: '-',
- default: 'zh-CN',
- title: false,
- useLocalStorage: true,
- },
- title: '金科环境数字化管理平台',
- publicPath,
- metas: [
- // 配置html禁止缓存
- { 'http-equiv': 'pragma', content: 'no-cache' },
- { 'http-equiv': 'cache-control', content: 'no-cache' },
- { 'http-equiv': 'expires', content: '0' },
- { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
- ],
- proxy: {
- '/api': {
- // target: 'http://192.168.20.232:1007/',
- target: 'http://47.96.12.136:8895/',
- // target: 'https://work.greentech.com.cn/',
- changeOrigin: true,
- },
- },
- // chainWebpack(config) {
- // config.module
- // .rule()
- // .test(/\.(pdf|svg|docx|doc)$/)
- // .use('file-loader?name=[path][name].[ext]')
- // .loader('file-loader')
- // .end()
- // },
- routes: [
- {
- path: '/',
- redirect: '/home',
- },
- {
- name: '首页',
- path: '/home',
- component: './Home/index',
- menuRender: false,
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/homeIcon.png',
- },
- {
- name: '审批流管理',
- path: '/flow',
- access: 'isAdmin',
- hideChildrenInMenu: true,
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/flowIcon.png',
- routes: [
- // {
- // path: '/flow',
- // redirect: '/flow/list',
- // },
- {
- name: '审批流管理',
- path: '/flow',
- component: './Flow/index',
- },
- {
- name: '审批流详情',
- path: '/flow/audit',
- component: './Flow/Audit',
- hideInMenu: true,
- },
- ],
- },
- {
- name: 'OA审批',
- path: '/oa',
- hideChildrenInMenu: true,
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/oaIcon.png',
- routes: [
- {
- name: 'OA审批',
- path: '/oa',
- component: './Flow/Oa',
- },
- {
- name: 'OA详情',
- path: '/oa/detail/:oaId',
- component: './Flow/OaDetail',
- },
- ],
- },
- // {
- // name: '权限演示',
- // path: '/access',
- // component: './Access',
- // },
- {
- name: '修改密码',
- path: '/safety',
- component: './UserCenter',
- hideInMenu: true,
- },
- {
- name: '登录',
- path: '/login',
- component: './Login/index',
- layout: false,
- },
- {
- name: '文档管理',
- path: '/fileManagement',
- component: './FileManagement/index',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/fileIcon.png',
- },
- {
- name: '合同管理',
- path: '/contract-manager',
- component: './ContractManager/index',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/contractIcon.png',
- },
- {
- name: '个人中心',
- path: '/profile',
- component: './Profile/index',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
- },
- {
- name: '审批详情',
- path: '/profile/detail',
- component: './Flow/OaAuditDetail',
- hideInMenu: true,
- },
- {
- name: '供应商管理',
- path: '/manufacturer',
- component: './ManufacturerMng/Firm',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- },
- {
- name: 'PSR管理',
- path: '/psrManage',
- component: './PSRManage',
- icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-06-20/25bf2fa5-f340-4f9b-8a13-ad50086aedbb.png',
- },
- {
- name: 'PSR详情',
- path: '/psrManage/detail/:id',
- component: './PSRManage/detail',
- hideInMenu: true,
- },
- {
- name: '工时管理',
- path: '/workload',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- routes: [
- {
- name: '上报工时',
- path: 'work-hours',
- component: './PurchaseList/WorkingHours/index',
- },
- {
- name: '审批工时',
- path: 'work-hours-auth',
- component: './PurchaseList/WorkingHours/Auth',
- },
- // {
- // name: '工时报表',
- // path: '/workload/report',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- // routes: [
- // {
- // name: '项目报表',
- // path: 'project',
- // component: './PurchaseList/Report/ProjectTree',
- // },
- // {
- // name: '部门报表',
- // path: 'department',
- // component: './PurchaseList/Report/Department',
- // },
- // // { name: '财务报表',
- // // path: 'finance', path: '/workload/report/finance' },
- // ],
- // },
- ],
- },
- {
- name: '项目立项',
- path: '/workload/approval',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- routes: [
- {
- name: '项目列表',
- path: 'list',
- component: './PurchaseList/Approval/List',
- },
- {
- name: '审核列表',
- path: 'auth',
- component: './PurchaseList/Approval/Auth',
- },
- ],
- },
- {
- name: '工时报表',
- path: '/workload/report',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- routes: [
- {
- name: '项目报表',
- path: 'project',
- component: './PurchaseList/Report/ProjectTree',
- },
- {
- name: '部门报表',
- path: 'department',
- component: './PurchaseList/Report/Department',
- },
- {
- name: '财务报表',
- path: '/workload/report/finance',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- routes: [
- {
- name: '资源总表',
- path: 'index',
- component: './PurchaseList/Report/Finance',
- },
- {
- name: '资源中心人日使用汇总表',
- path: 'resources',
- component: './PurchaseList/Report/Finance/Resources',
- },
- {
- name: '执行项目人日汇总表',
- path: 'project',
- component: './PurchaseList/Report/Finance/Project',
- },
- ],
- },
- ],
- },
- {
- name: '人日日志',
- path: '/workload/record',
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- routes: [
- {
- name: '项目日志',
- path: 'project',
- component: './PurchaseList/DailyRecord',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- },
- {
- name: '个人日志',
- path: 'report-daily',
- component: './ReportDaily/Index',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- },
- // {
- // name: '工时报表',
- // path: '/workload/report',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- // routes: [
- // {
- // name: '项目报表',
- // path: 'project',
- // component: './PurchaseList/Report/ProjectTree',
- // },
- // {
- // name: '部门报表',
- // path: 'department',
- // component: './PurchaseList/Report/Department',
- // },
- // ],
- // },
- // {
- // name: '财务报表',
- // path: '/workload/finance',
- // icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
- // routes: [
- // {
- // name: '资源总表',
- // path: 'index',
- // component: './PurchaseList/Report/Finance',
- // },
- // {
- // name: '资源中心人日使用汇总表',
- // path: 'resources',
- // component: './PurchaseList/Report/Finance/Resources',
- // },
- // {
- // name: '执行项目人日汇总表',
- // path: 'project',
- // component: './PurchaseList/Report/Finance/Project',
- // },
- // ],
- // },
- ],
- },
- {
- name: 'BOM清单',
- path: '/bom',
- hideChildrenInMenu: true,
- icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/flowIcon.png',
- routes: [
- {
- name: '采购清单',
- path: '/bom/home',
- component: './Flow/index',
- },
- {
- name: '流程管理',
- path: '/bom/flow-list',
- component: './Flow/Audit',
- hideInMenu: true,
- },
- {
- name: '审核列表',
- path: '/bom/auth',
- component: './Flow/Audit',
- hideInMenu: true,
- },
- {
- name: '已提交审批',
- path: '/bom/submit',
- component: './Flow/Audit',
- hideInMenu: true,
- },
- ],
- },
- {
- name: 'CAD实例',
- path: '/cad',
- component: './Cad',
- icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-07-31/3f72fccf-4f9c-4891-a6ec-f04fe4b1d9a2.png',
- },
- {
- name: 'CAD详情',
- path: '/cad/detail',
- component: './Cad/detail',
- hideInMenu: true,
- },
- {
- name: 'Scada功能',
- path: '/scada',
- access: 'scada',
- component: './Scada',
- icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-11-24/27866151-5691-487d-8c58-5b4ae995395e.png',
- },
- {
- name: 'GreenGPT',
- path: '/gpt',
- component: './GreenGPT',
- icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/public/chart-template/icon-gpt.png',
- },
- ],
- npmClient: 'yarn',
- });
|