From 8fbd22bc3148512be93a931e32e3e2edfb3dcd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 5 Jan 2024 18:16:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/caseShell/index2.vue | 94 ++--- src/views/board/foaming/index.vue | 500 +++++++++++++++++++++------ src/views/board/foaming/index2.vue | 160 +++++---- src/views/board/liner/index.vue | 49 ++- 4 files changed, 540 insertions(+), 263 deletions(-) diff --git a/src/views/board/caseShell/index2.vue b/src/views/board/caseShell/index2.vue index c252ce3..b33703c 100644 --- a/src/views/board/caseShell/index2.vue +++ b/src/views/board/caseShell/index2.vue @@ -38,22 +38,22 @@
- {{ item.value1 }} + {{ item.COLUMN_A }}
- {{ item.value2 }} + {{ item.COLUMN_B }}
-
- {{ item.value3 }} +
+ {{ item.COLUMN_C }}
-
- {{ item.value32 }} +
+ {{ item.COLUMN_D }}
- {{ item.value4 }} + {{ item.COLUMN_E }}
- {{ item.value5 }} + {{ item.COLUMN_F }}
@@ -165,14 +165,14 @@ export default { }, { e: 'xkqhb-04', - i: "", + i: "scada_xk_pro_plan_01('')", f: (e) => { this.scrollTableData = e } }, { e: 'xkqhb-05', - i: "", + i: "scada_xk_hour_01('')", f: (e) => { this.$refs.chart1.setData({ tooltip: { @@ -190,7 +190,7 @@ export default { containLabel: true, }, legend: { - data: e.y.map(val => val.name), + data:['前板数量','后板数量'], right: 'center', top: 0, textStyle: { @@ -202,7 +202,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val=>val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -232,7 +232,7 @@ export default { }, series: [ { - name: e.y[0].name, + name: '前板数量', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -262,10 +262,10 @@ export default { ]), }, }, - data: e.y[0].data, + data: e.map(val=>val.Y_VALUE_ONE), }, { - name: e.y[1].name, + name:'后板数量', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -295,7 +295,7 @@ export default { ]), }, }, - data: e.y[1].data, + data: e.map(val=>val.Y_VALUE_TWO), }, ], }) @@ -328,7 +328,7 @@ export default { containLabel: true, }, legend: { - data: e.y.map(val => val.name), + data: ['内胆','箱壳'], right: 'center', top: 0, textStyle: { @@ -340,7 +340,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val=>val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -370,7 +370,7 @@ export default { }, series: [ { - name: e.y[0].name, + name: '内胆', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -400,10 +400,10 @@ export default { ]), }, }, - data: e.y[0].data, + data: e.map(val=>val.Y_VALUE_ONE), }, { - name: e.y[1].name, + name: '箱壳', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -433,7 +433,7 @@ export default { ]), }, }, - data: e.y[1].data, + data: e.map(val=>val.Y_VALUE_TWO), }, ], }) @@ -441,22 +441,18 @@ export default { }, { e: 'xkqhb-08', - i: "", - f: (e) => { - this.linerNum = e - } - }, - { - e: 'xkqhb-09', - i: "", + i: "SCADA_INV_STATS_SUM('')", f: (e) => { - this.caseNum = e + this.linerNum = e[0]?.Y_VALUE_ONE || 0 + this.caseNum = e[0]?.Y_VALUE_TWO || 0 } }, { e: 'xkqhb-10', - i: "", + i: "scada_xk_pro_xh_01('')", f: (e) => { + this.frontNum = e.map(val=>val.Y_VALUE_ONE).reduce((a,b)=>a+b) + this.laterNum = e.map(val=>val.Y_VALUE_TWO).reduce((a,b)=>a+b) this.$refs.chart3.setData({ tooltip: { trigger: "axis", @@ -473,7 +469,7 @@ export default { containLabel: true, }, legend: { - data: e.y.map(val => val.name), + data: ['前板','后板'], right: 'center', top: 0, textStyle: { @@ -485,7 +481,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val=>val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -515,7 +511,7 @@ export default { }, series: [ { - name: e.y[0].name, + name: '前板', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -545,10 +541,10 @@ export default { ]), }, }, - data: e.y[0].data, + data: e.map(val=>val.Y_VALUE_ONE), }, { - name: e.y[1].name, + name: '后板', type: "bar", barWidth: "30%", barMaxWidth: 50, @@ -578,29 +574,15 @@ export default { ]), }, }, - data: e.y[1].data, + data: e.map(val=>val.Y_VALUE_TWO), }, ], }) } }, - { - e: 'xkqhb-11', - i: "", - f: (e) => { - this.frontNum = e - } - }, - { - e: 'xkqhb-12', - i: "", - f: (e) => { - this.laterNum = e - } - }, { e: 'xkqhb-13', - i: "", + i: "scada_xk_fp_01('')", f: (e) => { this.$refs.chart4.setData({ legend: { @@ -630,7 +612,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val=>val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -660,7 +642,7 @@ export default { }, series: [ { - name: e.y.name, + name: '运行中夹具数量', type: "bar", barWidth: '30%', barMaxWidth: 50, @@ -690,7 +672,7 @@ export default { ]), }, }, - data: e.y.data, + data: e.map(val=>val.Y_VALUE), } ] }) diff --git a/src/views/board/foaming/index.vue b/src/views/board/foaming/index.vue index 16f081b..7452032 100644 --- a/src/views/board/foaming/index.vue +++ b/src/views/board/foaming/index.vue @@ -48,13 +48,13 @@
- +
B:
- +
发泡线 - 运行状态:
@@ -131,7 +131,7 @@
-
+
工位 @@ -285,7 +285,7 @@
-
+
工位 @@ -438,6 +438,314 @@
+ +
+
+
+ 工位 +
+
+ 型号 +
+
+ 状态 +
+
+ 目标 +
+
+ 计划 +
+
+ 累计 +
+
+ 达成率 +
+
+ {{ hourArr[0] }} +
+
+ {{ hourArr[1] }} +
+
+ {{ hourArr[2] }} +
+
+ {{ hourArr[3] }} +
+
+ {{ hourArr[4] }} +
+
+ {{ hourArr[5] }} +
+
+ {{ hourArr[6] }} +
+
+ {{ hourArr[7] }} +
+
+ {{ hourArr[8] }} +
+
+ {{ hourArr[9] }} +
+
+ {{ hourArr[10] }} +
+
+ {{ hourArr[11] }} +
+
+ + + + + + +
+
+
+ {{ item.value1 }} +
+
+ {{ item.value2 }} +
+
+ {{ item.value3 }} +
+
+ {{ item.value4 }} +
+
+ {{ item.value5 }} +
+
+ {{ item.value6 }} +
+
+ {{ item.value7 }} +
+
+ {{ item.value8 }} +
+
+ {{ item.value9 }} +
+
+ {{ item.value10 }} +
+
+ {{ item.value11 }} +
+
+ {{ item.value12 }} +
+
+ {{ item.value13 }} +
+
+ {{ item.value14 }} +
+
+ {{ item.value15 }} +
+
+ {{ item.value16 }} +
+
+ {{ item.value17 }} +
+
+ {{ item.value18 }} +
+
+ {{ item.value19 }} +
+
+
+ +
+
+ +
+
+
+ 工位 +
+
+ 型号 +
+
+ 状态 +
+
+ 目标 +
+
+ 计划 +
+
+ 累计 +
+
+ 达成率 +
+
+ {{ hourArr[0] }} +
+
+ {{ hourArr[1] }} +
+
+ {{ hourArr[2] }} +
+
+ {{ hourArr[3] }} +
+
+ {{ hourArr[4] }} +
+
+ {{ hourArr[5] }} +
+
+ {{ hourArr[6] }} +
+
+ {{ hourArr[7] }} +
+
+ {{ hourArr[8] }} +
+
+ {{ hourArr[9] }} +
+
+ {{ hourArr[10] }} +
+
+ {{ hourArr[11] }} +
+
+ + + + + + +
+
+
+ {{ item.value1 }} +
+
+ {{ item.value2 }} +
+
+ {{ item.value3 }} +
+
+ {{ item.value4 }} +
+
+ {{ item.value5 }} +
+
+ {{ item.value6 }} +
+
+ {{ item.value7 }} +
+
+ {{ item.value8 }} +
+
+ {{ item.value9 }} +
+
+ {{ item.value10 }} +
+
+ {{ item.value11 }} +
+
+ {{ item.value12 }} +
+
+ {{ item.value13 }} +
+
+ {{ item.value14 }} +
+
+ {{ item.value15 }} +
+
+ {{ item.value16 }} +
+
+ {{ item.value17 }} +
+
+ {{ item.value18 }} +
+
+ {{ item.value19 }} +
+
+
+ +
+
@@ -446,55 +754,55 @@ 合计
- {{total.value1}}% + {{ total.value1 }}%
- {{total.value2}} + {{ total.value2 }}
- {{total.value3}} + {{ total.value3 }}
- {{total.value4}}% + {{ total.value4 }}%
- {{total.value5}} + {{ total.value5 }}
- {{total.value6}} + {{ total.value6 }}
- {{total.value7}} + {{ total.value7 }}
- {{total.value8}} + {{ total.value8 }}
- {{total.value9}} + {{ total.value9 }}
- {{total.value10}} + {{ total.value10 }}
- {{total.value11}} + {{ total.value11 }}
- {{total.value12}} + {{ total.value12 }}
- {{total.value13}} + {{ total.value13 }}
- {{total.value14}} + {{ total.value14 }}
- {{total.value15}} + {{ total.value15 }}
- {{total.value16}} + {{ total.value16 }}
@@ -505,7 +813,7 @@ import vueSeamlessScroll from "vue-seamless-scroll"; import Chart from "../../../components/board/Chart"; import * as echarts from 'echarts' -import {getData, getFoamingData,getCurrentTeamTimeList} from "@/api/board/getData"; +import {getData, getFoamingData, getCurrentTeamTimeList} from "@/api/board/getData"; import {mixData} from "@/api/board/mixData"; export default { @@ -522,10 +830,10 @@ export default { }, data() { return { - show: true, + show: 0, planNum: 0, practicalNum: 0, - total:{}, + total: {}, title: [ '生产计划', '生产统计', @@ -643,7 +951,7 @@ export default { }, series: [ { - barMaxWidth:40, + barMaxWidth: 40, name: '数量', type: "bar", barWidth: "40%", @@ -707,24 +1015,24 @@ export default { } }) this.scrollTableData1 = table - let totalArr = table.slice(0,6) + let totalArr = table.slice(0, 6) this.total = { - value1:((totalArr.filter(val=>val.value3 === '生产中').length / 6)*100).toFixed(2), - value2:totalArr.map(val=>val.value5).reduce((acc, curr) => acc + curr, 0), - value3:totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0), - value4:((totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0)/totalArr.map(val=>val.value4).reduce((acc, curr) => acc + curr, 0))*100).toFixed(2), - value5:totalArr.map(val=>val.value8).reduce((acc, curr) => acc + curr, 0), - value6:totalArr.map(val=>val.value9).reduce((acc, curr) => acc + curr, 0), - value7:totalArr.map(val=>val.value10).reduce((acc, curr) => acc + curr, 0), - value8:totalArr.map(val=>val.value11).reduce((acc, curr) => acc + curr, 0), - value9:totalArr.map(val=>val.value12).reduce((acc, curr) => acc + curr, 0), - value10:totalArr.map(val=>val.value13).reduce((acc, curr) => acc + curr, 0), - value11:totalArr.map(val=>val.value14).reduce((acc, curr) => acc + curr, 0), - value12:totalArr.map(val=>val.value15).reduce((acc, curr) => acc + curr, 0), - value13:totalArr.map(val=>val.value16).reduce((acc, curr) => acc + curr, 0), - value14:totalArr.map(val=>val.value17).reduce((acc, curr) => acc + curr, 0), - value15:totalArr.map(val=>val.value18).reduce((acc, curr) => acc + curr, 0), - value16:totalArr.map(val=>val.value19).reduce((acc, curr) => acc + curr, 0), + value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2), + value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0), + value3: totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0), + value4: ((totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0) / totalArr.map(val => val.value4).reduce((acc, curr) => acc + curr, 0)) * 100).toFixed(2), + value5: totalArr.map(val => val.value8).reduce((acc, curr) => acc + curr, 0), + value6: totalArr.map(val => val.value9).reduce((acc, curr) => acc + curr, 0), + value7: totalArr.map(val => val.value10).reduce((acc, curr) => acc + curr, 0), + value8: totalArr.map(val => val.value11).reduce((acc, curr) => acc + curr, 0), + value9: totalArr.map(val => val.value12).reduce((acc, curr) => acc + curr, 0), + value10: totalArr.map(val => val.value13).reduce((acc, curr) => acc + curr, 0), + value11: totalArr.map(val => val.value14).reduce((acc, curr) => acc + curr, 0), + value12: totalArr.map(val => val.value15).reduce((acc, curr) => acc + curr, 0), + value13: totalArr.map(val => val.value16).reduce((acc, curr) => acc + curr, 0), + value14: totalArr.map(val => val.value17).reduce((acc, curr) => acc + curr, 0), + value15: totalArr.map(val => val.value18).reduce((acc, curr) => acc + curr, 0), + value16: totalArr.map(val => val.value19).reduce((acc, curr) => acc + curr, 0), } }) @@ -1096,7 +1404,7 @@ export default { }, yAxis: { - interval:0, + interval: 0, type: "value", axisLine: { show: false, @@ -1220,7 +1528,7 @@ export default { name: '数量', type: "bar", barWidth: "40%", - barMaxWidth:40, + barMaxWidth: 40, label: { show: true, position: "top", @@ -1282,24 +1590,24 @@ export default { }) this.scrollTableData1 = table - let totalArr = table.slice(0,6) + let totalArr = table.slice(0, 6) this.total = { - value1:((totalArr.filter(val=>val.value3 === '生产中').length / 6)*100).toFixed(2), - value2:totalArr.map(val=>val.value5).reduce((acc, curr) => acc + curr, 0), - value3:totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0), - value4:((totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0)/totalArr.map(val=>val.value4).reduce((acc, curr) => acc + curr, 0))*100).toFixed(2), - value5:totalArr.map(val=>val.value8).reduce((acc, curr) => acc + curr, 0), - value6:totalArr.map(val=>val.value9).reduce((acc, curr) => acc + curr, 0), - value7:totalArr.map(val=>val.value10).reduce((acc, curr) => acc + curr, 0), - value8:totalArr.map(val=>val.value11).reduce((acc, curr) => acc + curr, 0), - value9:totalArr.map(val=>val.value12).reduce((acc, curr) => acc + curr, 0), - value10:totalArr.map(val=>val.value13).reduce((acc, curr) => acc + curr, 0), - value11:totalArr.map(val=>val.value14).reduce((acc, curr) => acc + curr, 0), - value12:totalArr.map(val=>val.value15).reduce((acc, curr) => acc + curr, 0), - value13:totalArr.map(val=>val.value16).reduce((acc, curr) => acc + curr, 0), - value14:totalArr.map(val=>val.value17).reduce((acc, curr) => acc + curr, 0), - value15:totalArr.map(val=>val.value18).reduce((acc, curr) => acc + curr, 0), - value16:totalArr.map(val=>val.value19).reduce((acc, curr) => acc + curr, 0), + value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2), + value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0), + value3: totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0), + value4: ((totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0) / totalArr.map(val => val.value4).reduce((acc, curr) => acc + curr, 0)) * 100).toFixed(2), + value5: totalArr.map(val => val.value8).reduce((acc, curr) => acc + curr, 0), + value6: totalArr.map(val => val.value9).reduce((acc, curr) => acc + curr, 0), + value7: totalArr.map(val => val.value10).reduce((acc, curr) => acc + curr, 0), + value8: totalArr.map(val => val.value11).reduce((acc, curr) => acc + curr, 0), + value9: totalArr.map(val => val.value12).reduce((acc, curr) => acc + curr, 0), + value10: totalArr.map(val => val.value13).reduce((acc, curr) => acc + curr, 0), + value11: totalArr.map(val => val.value14).reduce((acc, curr) => acc + curr, 0), + value12: totalArr.map(val => val.value15).reduce((acc, curr) => acc + curr, 0), + value13: totalArr.map(val => val.value16).reduce((acc, curr) => acc + curr, 0), + value14: totalArr.map(val => val.value17).reduce((acc, curr) => acc + curr, 0), + value15: totalArr.map(val => val.value18).reduce((acc, curr) => acc + curr, 0), + value16: totalArr.map(val => val.value19).reduce((acc, curr) => acc + curr, 0), } }) } @@ -1670,7 +1978,7 @@ export default { yAxis: { type: "value", - interval:0, + interval: 0, axisLine: { show: false, lineStyle: { @@ -1726,54 +2034,36 @@ export default { } }, mounted() { - getCurrentTeamTimeList({'a':'a'}).then(e=>{ + getCurrentTeamTimeList({'a': 'a'}).then(e => { this.hourArr = e?.data.map(val => val.HOUR_TIME) }) let timeInter = setInterval(() => { - this.show = !this.show - if(this.show===true){ - let totalArr = this.scrollTableData1.slice(0,6) - this.total = { - value1:((totalArr.filter(val=>val.value3 === '生产中').length / 6)*100).toFixed(2), - value2:totalArr.map(val=>val.value5).reduce((acc, curr) => acc + curr, 0), - value3:totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0), - value4:((totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0)/totalArr.map(val=>val.value4).reduce((acc, curr) => acc + curr, 0))*100).toFixed(2), - value5:totalArr.map(val=>val.value8).reduce((acc, curr) => acc + curr, 0), - value6:totalArr.map(val=>val.value9).reduce((acc, curr) => acc + curr, 0), - value7:totalArr.map(val=>val.value10).reduce((acc, curr) => acc + curr, 0), - value8:totalArr.map(val=>val.value11).reduce((acc, curr) => acc + curr, 0), - value9:totalArr.map(val=>val.value12).reduce((acc, curr) => acc + curr, 0), - value10:totalArr.map(val=>val.value13).reduce((acc, curr) => acc + curr, 0), - value11:totalArr.map(val=>val.value14).reduce((acc, curr) => acc + curr, 0), - value12:totalArr.map(val=>val.value15).reduce((acc, curr) => acc + curr, 0), - value13:totalArr.map(val=>val.value16).reduce((acc, curr) => acc + curr, 0), - value14:totalArr.map(val=>val.value17).reduce((acc, curr) => acc + curr, 0), - value15:totalArr.map(val=>val.value18).reduce((acc, curr) => acc + curr, 0), - value16:totalArr.map(val=>val.value19).reduce((acc, curr) => acc + curr, 0), - } - } - if(this.show===false){ - let totalArr = this.scrollTableData1.slice(6,12) - this.total = { - value1:((totalArr.filter(val=>val.value3 === '生产中').length / 6)*100).toFixed(2), - value2:totalArr.map(val=>val.value5).reduce((acc, curr) => acc + curr, 0), - value3:totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0), - value4:((totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0)/totalArr.map(val=>val.value4).reduce((acc, curr) => acc + curr, 0))*100).toFixed(2), - value5:totalArr.map(val=>val.value8).reduce((acc, curr) => acc + curr, 0), - value6:totalArr.map(val=>val.value9).reduce((acc, curr) => acc + curr, 0), - value7:totalArr.map(val=>val.value10).reduce((acc, curr) => acc + curr, 0), - value8:totalArr.map(val=>val.value11).reduce((acc, curr) => acc + curr, 0), - value9:totalArr.map(val=>val.value12).reduce((acc, curr) => acc + curr, 0), - value10:totalArr.map(val=>val.value13).reduce((acc, curr) => acc + curr, 0), - value11:totalArr.map(val=>val.value14).reduce((acc, curr) => acc + curr, 0), - value12:totalArr.map(val=>val.value15).reduce((acc, curr) => acc + curr, 0), - value13:totalArr.map(val=>val.value16).reduce((acc, curr) => acc + curr, 0), - value14:totalArr.map(val=>val.value17).reduce((acc, curr) => acc + curr, 0), - value15:totalArr.map(val=>val.value18).reduce((acc, curr) => acc + curr, 0), - value16:totalArr.map(val=>val.value19).reduce((acc, curr) => acc + curr, 0), - } + let num1 = this.scrollTableData1.length / 6 + let num = this.show + num += 1 + num = num % num1 + this.show = num + + let totalArr = this.scrollTableData1.slice(num * 6, (num + 1) * 6) + this.total = { + value1: ((totalArr.filter(val => val.value3 === '生产中').length / 6) * 100).toFixed(2), + value2: totalArr.map(val => val.value5).reduce((acc, curr) => acc + curr, 0), + value3: totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0), + value4: ((totalArr.map(val => val.value6).reduce((acc, curr) => acc + curr, 0) / totalArr.map(val => val.value4).reduce((acc, curr) => acc + curr, 0)) * 100).toFixed(2), + value5: totalArr.map(val => val.value8).reduce((acc, curr) => acc + curr, 0), + value6: totalArr.map(val => val.value9).reduce((acc, curr) => acc + curr, 0), + value7: totalArr.map(val => val.value10).reduce((acc, curr) => acc + curr, 0), + value8: totalArr.map(val => val.value11).reduce((acc, curr) => acc + curr, 0), + value9: totalArr.map(val => val.value12).reduce((acc, curr) => acc + curr, 0), + value10: totalArr.map(val => val.value13).reduce((acc, curr) => acc + curr, 0), + value11: totalArr.map(val => val.value14).reduce((acc, curr) => acc + curr, 0), + value12: totalArr.map(val => val.value15).reduce((acc, curr) => acc + curr, 0), + value13: totalArr.map(val => val.value16).reduce((acc, curr) => acc + curr, 0), + value14: totalArr.map(val => val.value17).reduce((acc, curr) => acc + curr, 0), + value15: totalArr.map(val => val.value18).reduce((acc, curr) => acc + curr, 0), + value16: totalArr.map(val => val.value19).reduce((acc, curr) => acc + curr, 0), } - }, 30 * 1000) + }, 3 * 1000) if (this.$route.query.id === '1' || this.id === '1') { this.RequestDataSet.forEach(val => { mixData(val) diff --git a/src/views/board/foaming/index2.vue b/src/views/board/foaming/index2.vue index ffc36bf..dbc0eac 100644 --- a/src/views/board/foaming/index2.vue +++ b/src/views/board/foaming/index2.vue @@ -2,14 +2,16 @@
箱、门匹配生产数据监控平台
{{ - planNum.toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('') + (['0', '0', '0', '0']).concat(planNum.toString().split('')).slice(-4).join('') }}
- {{ practicalNum.toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('') }} + {{ + (['0', '0', '0', '0']).concat(practicalNum.toString().split('')).slice(-4).join('') + }}
- {{ (practicalNum - planNum).toString().split('').concat(['0', '0', '0', '0']).slice(0, 4).join('') }} + {{ (['0', '0', '0', '0']).concat((Math.abs(practicalNum - planNum)).toString().split('')).slice(-4).join('') }}
@@ -17,13 +19,14 @@
设备状态:
-
门体发泡线状态:
-
门体发泡机状态:
+
生产状态:
+
生产节拍:
-
线体1圈 1s
-
台车1位 1s
+
线体1圈 {{ meter1 }}s
+
台车1位 {{ meter2 }}s
@@ -57,13 +60,13 @@
- {{ item.value1 }} + {{ item.COLUMN_A }}
- {{ item.value2 }} + {{ item.COLUMN_B }}
- {{ item.value3 }} + {{ item.COLUMN_C }}
@@ -88,10 +91,10 @@
产量
-
{{ i.value1 }}
-
{{ i.value2 }}
-
{{ i.value3 }}-{{ i.value4 }}
+ :style="'margin-bottom:2px;height: calc(9% - 2px);line-height:calc(2.6vh - 2px);color: '+ setColor(i.COLUMN_D,i.COLUMN_E)+';text-align: center;background-color:#053460'"> +
{{ i.COLUMN_A }}
+
{{ i.COLUMN_B }}
+
{{ i.COLUMN_C }}
@@ -101,10 +104,10 @@
产量
-
{{ i.value1 }}
-
{{ i.value2 }}
-
{{ i.value3 }}-{{ i.value4 }}
+ :style="'margin-bottom:2px;height: calc(9% - 2px);line-height:calc(2.6vh - 2px);color:'+ setColor(i.COLUMN_D,i.COLUMN_E)+';text-align: center;background-color:#053460'"> +
{{ i.COLUMN_A }}
+
{{ i.COLUMN_B }}
+
{{ i.COLUMN_C }}
@@ -114,10 +117,10 @@
产量
-
{{ i.value1 }}
-
{{ i.value2 }}
-
{{ i.value3 }}-{{ i.value4 }}
+ :style="'margin-bottom:2px;height: calc(9% - 2px);line-height:calc(2.6vh - 2px);color:'+ setColor(i.COLUMN_D,i.COLUMN_E)+';text-align: center;background-color:#053460'"> +
{{ i.COLUMN_A }}
+
{{ i.COLUMN_B }}
+
{{ i.COLUMN_C }}
@@ -127,10 +130,10 @@
产量
-
{{ i.value1 }}
-
{{ i.value2 }}
-
{{ i.value3 }}-{{ i.value4 }}
+ :style="'margin-bottom:2px;height: calc(9% - 2px);line-height:calc(2.6vh - 2px);color:'+ setColor(i.COLUMN_D,i.COLUMN_E)+';text-align: center;background-color:#053460'"> +
{{ i.COLUMN_A }}
+
{{ i.COLUMN_B }}
+
{{ i.COLUMN_C }}
@@ -159,6 +162,8 @@ export default { '发泡料温度监控', '门体发泡生产统计', ], + meter1: 0, + meter2: 0, titlePosition: [ { top: 11.5, @@ -204,14 +209,14 @@ export default { RequestDataSet: [ { e: 'xm-01', - i: "", + i: "scada_pp_xt_queue_01('')", f: (e) => { this.scrollTableData = e } }, { e: 'xm-02', - i: "", + i: "scada_pp_xt_tj_01('')", f: (e) => { this.$refs.chart2.setData({ tooltip: { @@ -230,7 +235,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val => val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -260,7 +265,7 @@ export default { }, series: [ { - name: e.y.name, + name: '数量', type: "bar", barWidth: "40%", label: { @@ -285,7 +290,7 @@ export default { borderRadius: 3, }, }, - data: e.y.data, + data: e.map(val => val.Y_VALUE), }, ], }) @@ -293,7 +298,7 @@ export default { }, { e: 'xm-03', - i: "", + i: "scada_fp_yl_01('CX_02')", f: (e) => { this.$refs.chart1.setData({ tooltip: { @@ -311,7 +316,7 @@ export default { containLabel: true, }, legend: { - data: e.y.map(val => val.name), + data: ['POL压力', 'ISO压力'], right: 'center', top: 0, textStyle: { @@ -323,7 +328,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val => val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -340,8 +345,8 @@ export default { yAxis: { type: "value", - min:10, - max:14, + min: 10, + max: 14, axisLine: { show: false, lineStyle: { @@ -355,7 +360,7 @@ export default { }, series: [ { - name: e.y[0].name, + name: 'POL压力', type: "bar", barWidth: "30%", label: { @@ -380,10 +385,10 @@ export default { borderRadius: 2, }, }, - data: e.y[0].data, + data: e.map(val => val.Y_VALUE_ONE), }, { - name: e.y[1].name, + name: 'ISO压力', type: "bar", barWidth: "30%", barGap: '40%', @@ -409,7 +414,7 @@ export default { borderRadius: 2, }, }, - data: e.y[1].data, + data: e.map(val => val.Y_VALUE_TWO), }, ], }) @@ -417,11 +422,11 @@ export default { }, { e: 'xm-04', - i: "", + i: "scada_fp_temp_01('CX_02')", f: (e) => { this.$refs.chart3.setData({ legend: { - data: e.y.map(val => val.name), + data: ['POL温度', 'ISO温度'], right: 'center', top: 0, textStyle: { @@ -488,7 +493,7 @@ export default { show: false, }, boundaryGap: false, - data: e.x, + data: e.map(val => val.X_VALUE), }, ], @@ -521,7 +526,7 @@ export default { ], series: [ { - name: e.y[0].name, + name: 'POL温度', type: "line", showAllSymbol: true, symbol: "circle", @@ -564,10 +569,10 @@ export default { shadowBlur: 20, }, }, - data: e.y[0].data, + data: e.map(val => val.Y_VALUE_ONE), }, { - name: e.y[1].name, + name: 'ISO温度', type: "line", // smooth: true, //是否平滑 showAllSymbol: true, @@ -613,7 +618,7 @@ export default { shadowBlur: 20, }, }, - data: e.y[1].data, + data: e.map(val => val.Y_VALUE_TWO), }, ], }) @@ -621,7 +626,7 @@ export default { }, { e: 'xm-05', - i: "", + i: "scada_pp_fp_tj_01('')", f: (e) => { this.$refs.chart4.setData({ tooltip: { @@ -640,7 +645,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val=>val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -669,7 +674,7 @@ export default { }, series: [ { - name: e.y.name, + name: '产量', type: "bar", barWidth: "33%", label: { @@ -694,7 +699,7 @@ export default { borderRadius: 2, }, }, - data: e.y.data, + data: e.map(val=>val.Y_VALUE), }, ], }) @@ -702,33 +707,30 @@ export default { }, { e: 'xm-06', - i: "", + i: "scada_pp_pro_stat_01('')", f: (e) => { this.bottomTableData = e } }, { e: 'xm-07', - i: "SCADA_INV_STATS_01('')", + i: "scada_fp_cy_01('CX_02')", f: (e) => { - this.planNum = e.db - this.practicalNum = e.sj + console.log(e) + this.planNum = e[0]?.X_VALUE || 0 + this.practicalNum = e[0]?.Y_VALUE_ONE || 0 } }, { e: 'xm-08', - i: "SCADA_INV_STATS_SUM('')", + i: "scada_pp_zt_jp_01('')", f: (e) => { - // this.linerNum = e + // console.log(e) + this.status1 = e[0]?.X_VALUE + this.meter1 = e[0]?.Y_VALUE_ONE + this.meter2 = e[0]?.Y_VALUE_TWO } }, - { - e: 'xm-09', - i: "", - f: (e) => { - // this.caseNum = e - } - } ] } }, @@ -742,19 +744,18 @@ export default { }) }, methods: { - setColor: (e) => { - if (e === '0') { - return '#1be409' - } + setColor: (e, i) => { if (e === '1') { + if (i === '1') { + return '#ffb769' + } else if (i === '3') { + return '#ff5959' + } else { + return '#1be409' + } + } else { return '#bed4ce' } - if (e === '2') { - return '#ff5959' - } - if (e === '3') { - return '#ffb769' - } } } }; @@ -871,6 +872,17 @@ export default { height: 28.5%; } +.status1 { + position: absolute; + transform: translate(-50%, -50%); + top: 73%; + left: 45%; + width: 1.5vw; + height: 1.5vw; + background: #00ff00; + border-radius: 50%; +} + .scrollTable1 { position: absolute; top: 66%; diff --git a/src/views/board/liner/index.vue b/src/views/board/liner/index.vue index 0ec4955..92a92d3 100644 --- a/src/views/board/liner/index.vue +++ b/src/views/board/liner/index.vue @@ -47,27 +47,27 @@
- {{ item.value1 }} + {{ item.COLUMN_A }}
- {{ item.value1 }} + {{ item.COLUMN_B }}
- {{ item.value2 }} + {{ item.COLUMN_C }}
- {{ item.value3 }} + {{ item.COLUMN_D }}
- {{ item.value4 }} + {{ item.COLUMN_E }}
- {{ item.value5 }} + {{ item.COLUMN_F }}
@@ -176,14 +176,14 @@ export default { }, { e: 'nd-04', - i: "", + i: "scada_xk_pro_01('')", f: (e) => { this.scrollTableData = e } }, { e: 'nd-05', - i: "", + i: "scada_in_store_01('')", f: (e) => { this.$refs.chart1.setData({ tooltip: { @@ -202,7 +202,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val => val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -232,7 +232,7 @@ export default { }, series: [ { - name: e.y[0].name, + name: '数量', label: { normal: { show: true, @@ -262,7 +262,7 @@ export default { ]), }, }, - data: e.y[0].data, + data: e.map(val => val.Y_VALUE), }, ], }) @@ -279,7 +279,6 @@ export default { e: 'nd-07', i: "SCADA_INV_STATS_01('')", f: (e) => { - console.log(e) this.$refs.chart2.setData({ tooltip: { trigger: "axis", @@ -296,7 +295,7 @@ export default { containLabel: true, }, legend: { - data:['内胆','箱壳'], + data: ['内胆', '箱壳'], right: 'center', top: 0, textStyle: { @@ -308,7 +307,7 @@ export default { }, xAxis: { type: "category", - data: e.map(val=>val.X_VALUE), + data: e.map(val => val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -368,7 +367,7 @@ export default { ]), }, }, - data: e.map(val=>val.Y_VALUE_ONE), + data: e.map(val => val.Y_VALUE_ONE), }, { name: '箱壳', @@ -401,7 +400,7 @@ export default { ]), }, }, - data: e.map(val=>val.Y_VALUE_TWO), + data: e.map(val => val.Y_VALUE_TWO), }, ], }) @@ -411,19 +410,13 @@ export default { e: 'nd-08', i: "SCADA_INV_STATS_SUM('')", f: (e) => { - this.linerNum = e - } - }, - { - e: 'nd-09', - i: "", - f: (e) => { - this.caseNum = e + this.linerNum = e[0]?.Y_VALUE_ONE || 0 + this.caseNum = e[0]?.Y_VALUE_TWO || 0 } }, { e: 'nd-10', - i: "", + i: "scada_inv_stats_02('')", f: (e) => { this.$refs.chart3.setData({ tooltip: { @@ -442,7 +435,7 @@ export default { }, xAxis: { type: "category", - data: e.x, + data: e.map(val => val.X_VALUE), axisLine: { lineStyle: { color: "white", @@ -472,7 +465,7 @@ export default { }, series: [ { - name: e.y.name, + name: '数量', type: "bar", barWidth: "30%", label: { @@ -502,7 +495,7 @@ export default { ]), }, }, - data: e.y.data, + data: e.map(val => val.Y_VALUE), }, ], })