Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes
| | |
| | | VITE_NAME='开发环境' |
| | | |
| | | VITE_BASE_CONTEXT='' |
| | | VITE_BASE_PATH='' |
| | | VITE_BASE_URL='http://192.168.0.35:10021/' |
| | | VITE_BASE_PATH='/api' |
| | | VITE_BASE_PATH='http://192.168.0.35:10021/' |
| | |
| | | <meta charset="UTF-8"> |
| | | <link rel="icon" href="/favicon.ico"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Vite App</title> |
| | | <title>DM云工厂</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
| | |
| | | enterprise.setDepartId(data.tempCom.id) |
| | | }) |
| | | .catch(err => {}) |
| | | const week = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日',] |
| | | const week = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'] |
| | | setInterval(() => { |
| | | let date = new Date() |
| | | data.tempDate = { |
| | |
| | | import processView from '../views/process.vue' |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(import.meta.env.BASE_URL), |
| | | |
| | | history: createWebHistory(import.meta.env.VITE_BASE_CONTEXT), |
| | | routes: [ |
| | | { |
| | | path: '/', |
| | |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const axiosInstance = axios.create({ |
| | | baseURL: '/api', |
| | | baseURL: import.meta.env.VITE_BASE_PATH, |
| | | headers: {'Content-Type': 'application/json'}, |
| | | timeout: 60000 |
| | | }); |
| | |
| | | <div class="content_left_item1_content_row_line"> |
| | | <el-progress |
| | | :show-text="false" |
| | | :percentage="item.doneNum"> |
| | | :percentage="item.doneNum / baseNum"> |
| | | </el-progress> |
| | | </div> |
| | | <div class="content_left_item1_content_row_num">{{ item.doneNum }}</div> |
| | |
| | | patrolInspection: [], |
| | | dayDistribution: [], |
| | | typeDistribution: [], |
| | | num: 0 |
| | | num: 0, |
| | | baseNum: 0 |
| | | }) |
| | | |
| | | let { baseNum } = toRefs(data) |
| | | |
| | | let timer = ref(null) |
| | | let timer1 = ref(null) |
| | |
| | | getTop(companyId.value, departId.value) |
| | | .then(res => { |
| | | if (res.length > 0) { |
| | | res.forEach((item, index) => { |
| | | if (index > 1) { |
| | | item.doneNum1 = res[0].doneNum / item.doneNum |
| | | } |
| | | }) |
| | | data.baseNum = res[0].doneNum |
| | | data.production = res |
| | | } |
| | | }) |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 13px; |
| | | } |
| | | } |
| | | } |
| | |
| | | // https://vitejs.dev/config/ |
| | | export default defineConfig(({mode, command}) => { |
| | | let env = loadEnv(mode, process.cwd(), '') |
| | | console.log(env.NODE_ENV); |
| | | // console.log(env.NODE_ENV); |
| | | return { |
| | | base:env.VITE_BASE_CONTEXT, |
| | | plugins: [ |
| | | vue(), |
| | | vueJsx(), |
| | |
| | | open: true, // 在服务器启动时自动在浏览器中打开应用程序 |
| | | //反向代理配置,注意rewrite写法,开始没看文档在这里踩了坑 |
| | | proxy: { // 本地开发环境通过代理实现跨域,生产环境使用 nginx 转发 |
| | | '/api': { |
| | | [env.VITE_BASE_PATH] : { |
| | | target: env.VITE_BASE_URL, // 通过代理接口访问实际地址。这里是实际访问的地址。vue会通过代理服务器来代理请求 |
| | | changeOrigin: true, |
| | | ws: false, // 允许websocket代理 |
| | | rewrite: (path) => path.replace(/^\/api/, '') // 将api替换为空 |
| | | rewrite: (path) => path.replace(/^\[env.VITE_BASE_PATH]/, '') // 将api替换为空 |
| | | } |
| | | } |
| | | } |