diff --git a/src/router/index.js b/src/router/index.js index a067edc..0283a14 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -33,7 +33,7 @@ export const constantRoutes = [ {path: '/cs', component: () => import('@/views/cs/index.vue')}, {path: '/cs2', component: () => import('@/views/cs/index2.vue')}, {path: '/cs3', component: () => import('@/views/cs/index3.vue')}, - {path: '/cs4', component: () => import('@/views/cs/index4.vue')}, + {path: '/cs6', component: () => import('@/views/cs/index4.vue')}, {path: '/cs3_1', component: () => import('@/views/cs/index3_1.vue')}, { path: '/redirect', diff --git a/src/utils/request.js b/src/utils/request.js index 2dac191..5e58ce9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -24,7 +24,7 @@ const service = axios.create({ // request拦截器 service.interceptors.request.use(config => { if(localStorage.getItem('USER_POOL_NAME_CURRENT')){ - config.headers['poolName'] = config.header?.PoolName || localStorage.getItem('USER_POOL_NAME_CURRENT'); + config.headers['Poolname'] = config.header?.PoolName || localStorage.getItem('USER_POOL_NAME_CURRENT'); } // 是否需要设置 token const isToken = (config.headers || {}).isToken === false diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue index dc50182..af60d6b 100644 --- a/src/views/cs/index3.vue +++ b/src/views/cs/index3.vue @@ -394,11 +394,11 @@ export default { createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00` createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00` } else if (parseFloat(`${i}.${s}`) < 7.3) { - createTimeStart = `${parseTime(new Date(), '{y}-{m}-')}${parseFloat(parseTime(new Date(), '${d}')) - 1} 19:30:00` + createTimeStart = `${parseTime(new Date(new Date().getTime() + (1000 * 60 *60 *24)), '{y}-{m}-{d}')} 19:30:00` createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00` } else if (parseFloat(`${i}.${s}`) > 19.3) { createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00` - createTimeEnd = `${parseTime(new Date(), '{y}-{m}-')}${parseFloat(parseTime(new Date(), '${d}')) + 1} 07:30:00` + createTimeEnd = `${parseTime(new Date(new Date().getTime() + (1000 * 60 *60 *24)), '{y}-{m}-{d}')} 07:30:00` } else { createTimeStart = `${parseTime(new Date(), '{y}-{m}-{d}')} 07:30:00` createTimeEnd = `${parseTime(new Date(), '{y}-{m}-{d}')} 19:30:00` diff --git a/src/views/cs/index4.vue b/src/views/cs/index4.vue index 563cb43..74df2f9 100644 --- a/src/views/cs/index4.vue +++ b/src/views/cs/index4.vue @@ -51,21 +51,38 @@
{{ type }}机信息
-
-
-
{{ type }}{{ i.equipmentCode.split('').at(-1) }}
-
运行状态:
-
- {{ i.completed_count > 0 ? '运行中' : '已暂停' }} -
-
订单号:
-
{{ i.workorder_code }}
-
产品名称:
-
{{ i.product_name }}
-
完成数量:
-
{{ i.completed_count }}
-
-
+ + + + + + + + + + + + + + + +
+
+
{{ type }}{{ i.equipmentCode }}
+
运行状态:
+
+ + 调试中 + 运行中 +
+
订单号:
+
{{ i.workorder_code }}
+
产品名称:
+
{{ i.product_name }}
+
完成数量:
+
{{ i.completed_count }}
+
+
@@ -82,6 +99,7 @@ export default { data() { return { list: [], + lists: [], type: '成型', bz: '白班', equipmentCode: 'C', @@ -99,7 +117,7 @@ export default { if (e === 1) { return '#77d75b' } - if(e === 0){ + if (e === 0) { return '#ff0000' } }, @@ -108,7 +126,64 @@ export default { shiftId: this.shiftId, equipmentCode: this.equipmentCode }).then((e) => { - this.list = e.data.rightlist + let aa = [ + { + "equipmentCode": "C1", + "workorder_code": "DD2024123000011-1", + "completed_count": 61, + "product_name": "Φ130mm微烟免拆白坯" + }, + { + "equipmentCode": "C2", + "workorder_code": "DD2024123000012-1", + "completed_count": 83, + "product_name": "Φ130mm微烟白坯" + }, + { + "equipmentCode": "C3", + "workorder_code": "DD2024123000012-1", + "completed_count": 78, + "product_name": "Φ130mm微烟白坯" + }, + { + "equipmentCode": "C4", + "workorder_code": "DD2024123000012-2", + "completed_count": 81, + "product_name": "Φ130mm微烟白坯" + }, + { + "equipmentCode": "C5", + "workorder_code": "DD2024123000013-1", + "completed_count": 71, + "product_name": "Φ125mm微烟白坯" + }, + { + "equipmentCode": "C6", + "workorder_code": "DD2024123000013-1", + "completed_count": 72, + "product_name": "Φ125mm微烟白坯" + }, + { + "equipmentCode": "C7", + "workorder_code": "DD2024123000013-2", + "completed_count": 82, + "product_name": "Φ125mm微烟白坯" + }, + { + "equipmentCode": "C8", + "workorder_code": "DD2024123000012-3", + "completed_count": 22, + "product_name": "Φ130mm微烟白坯" + } + ] + // this.list = aa.slice(0, 8).map(v => { + this.list = e.data.rightlist.slice(0, 8).map(v => { + return { + ...v, + equipmentCode: v.equipmentCode.split('').at(-1) + } + }) + this.lists = this.groupByCount(this.list) this.$refs.chart1.setData({ tooltip: { trigger: "axis", diff --git a/vue.config.js b/vue.config.js index d58fe97..74ea008 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,10 +36,13 @@ module.exports = { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // target: `http://192.168.202.20:8080`, - target: `http://localhost:8080`, + // target: `http://localhost:8080`, + // target: `http://172.18.80.215:8080`, // target: `http://192.168.3.93:8080`, // target: `http://192.168.3.158:8080`, - // target: `http://192.168.202.34:30000`, + // target: `http://10.11.176.97:8080`, + target: `http://192.168.202.34:30000/prod-api`, + // target: `http://192.168.202.20:9000/prod-api`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''