import { defineConfig } from '@umijs/max'; export default defineConfig({ hash: true, antd: {}, access: {}, model: {}, initialState: {}, request: {}, dva: {}, layout: false, // publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/', 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' }, { name: 'transparent', content: 'true' }, { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' }, ], proxy: { '/api': { // target: 'http://47.96.12.136:8888/', target: 'http://47.96.12.136:8788/', // target: 'https://work.greentech.com.cn/', changeOrigin: true, }, }, routes: [ { path: '/', redirect: '/home/92', }, { name: '首页', path: '/home/:projectId', component: './Home', }, { name: '菜单栏', path: '/menu/:projectId', component: './Menu', }, { name: '水量监测', path: '/home/water-amt-mng/:projectId', component: './Home/WaterAmtMng', }, { name: '水质监测', path: '/home/water-quality-mng/:projectId', component: './Home/QualityMng', }, { name: '能耗监测', path: '/home/energy/:projectId', component: './Home/EnergyCostComparison', }, { name: '药耗监测', path: '/home/chem-cost/:projectId', component: './Home/ChemCostComparison', }, { name: '工况管理', path: '/smart/work/:projectId', component: './Smart', }, { name: '工况评估', path: '/smart/condition-detection/:projectId', component: './Smart/ConditionDetection', }, { name: '优化任务', path: '/smart/optimization-tasks/:projectId', component: './Smart/OptimizationTasks', }, { name: '模拟仿真', path: '/smart/simulate/:projectId', component: './Smart/Simulate', }, { name: '智能管控', path: '/controller/:projectId', component: './Controller', }, { name: '感知监控', path: '/controller/hardware/:projectId', component: './Controller/Hardware', }, { name: '设备定位', path: '/controller/device/:projectId', component: './Controller/Device', }, // { // name: '空调监控', // path: '/hardware-controller/air-conditioner/:projectId', // component: './Controller/AirConditioner', // }, // { // name: '灯光监控', // path: '/hardware-controller/light/:projectId', // component: './Controller/Light', // }, { name: '系统自检', path: '/self-inspection/:projectId', component: './EqSelfInspection', }, { name: '自检列表', path: '/self-inspection/list/:projectId', component: './EqSelfInspection/List', }, { name: '自检报告', path: '/self-inspection/detail/:projectId/:routeId', component: './EqSelfInspection/ReportDetail', }, { name: '自检统计', path: '/self-inspection/statistics/:projectId', component: './EqSelfInspection/Statistics', }, { name: '任务管理', path: '/task-manage/:projectID', component: './TaskManage', }, { name: '任务列表', path: '/task-manage/list', component: './TaskManage/Detail/TaskList/TaskList', }, { name: '任务详情', path: '/task-manage/list/detail', component: './TaskManage/Detail/TaskDetail/TaskDetail', }, { name: '任务关联工单详情', path: '/task-manage/list/order-detail', component: './TaskManage/Detail/TaskOrder/TaskOrder', }, { name: '消息中心', path: '/message/:projectId', component: './MessageCenter', }, { name: '设备管理', path: '/device/:projectId', component: './DeviceManager', }, { name: '出入库管理详情', path: '/device/detail/:projectId/:type', component: './DeviceManager/detail', }, { name: '备品管理总览', path: '/device/storage/:projectId', component: './DeviceManager/storage', }, { name: '安全管理', path: '/safety/:projectId', ///safety management component: './SafetyManagement', }, { name: '门禁日志', path: '/safety/detail/:projectId', ///safety management component: './SafetyManagement/doorDetail', }, // { // name: '权限演示', // path: '/access', // component: './Access', // }, // { // name: ' CRUD 示例', // path: '/table', // component: './Table', // }, ], npmClient: 'yarn', });