diff --git a/src/api/board/getData.js b/src/api/board/getData.js
index cafa65d..94f0e2b 100644
--- a/src/api/board/getData.js
+++ b/src/api/board/getData.js
@@ -33,3 +33,11 @@ export function getFoamingData(query) {
data: query
})
}
+
+export function getCurrentTeamTimeList(query) {
+ return request({
+ url: '/boardReport/getCurrentTeamTimeList',
+ method: 'post',
+ data: query
+ })
+}
diff --git a/src/views/board/foaming/index.vue b/src/views/board/foaming/index.vue
index cdf5fb3..b5c1906 100644
--- a/src/views/board/foaming/index.vue
+++ b/src/views/board/foaming/index.vue
@@ -444,55 +444,55 @@
合计
- 100%
+ {{total.value1}}%
- 1000
+ {{total.value2}}
- 1000
+ {{total.value3}}
- 100%
+ {{total.value4}}%
- 1000
+ {{total.value5}}
- 1000
+ {{total.value6}}
- 1000
+ {{total.value7}}
- 1000
+ {{total.value8}}
- 1000
+ {{total.value9}}
- 1000
+ {{total.value10}}
- 1000
+ {{total.value11}}
- 1000
+ {{total.value12}}
- 1000
+ {{total.value13}}
- 1000
+ {{total.value14}}
- 1000
+ {{total.value15}}
- 1000
+ {{total.value16}}
@@ -503,7 +503,7 @@
import vueSeamlessScroll from "vue-seamless-scroll";
import Chart from "../../../components/board/Chart";
import * as echarts from 'echarts'
-import {getData, getFoamingData} from "@/api/board/getData";
+import {getData, getFoamingData,getCurrentTeamTimeList} from "@/api/board/getData";
import {mixData} from "@/api/board/mixData";
export default {
@@ -523,6 +523,7 @@ export default {
show: true,
planNum: 0,
practicalNum: 0,
+ total:{},
title: [
'生产计划',
'生产统计',
@@ -581,13 +582,6 @@ export default {
this.practicalNum = e[0].Y_VALUE_ONE
}
},
- {
- e: 'fp-1-02',
- i: "1",
- f: (e) => {
- this.hourArr = e.map(val => val.HOUR_TIME)
- }
- },
{
e: 'fp-1-03',
i: "scada_fp_plan_01('CX_01')",
@@ -687,7 +681,7 @@ export default {
getFoamingData({
"PRODUCT_LINE_CODE": "CX_01"
}).then(e => {
- this.scrollTableData1 = e.data?.map(val => {
+ let table = e.data?.map(val => {
return {
value1: val.EQUIPMENT_CODE,
value2: val.FIXTUREBOXTYPE,
@@ -710,7 +704,29 @@ export default {
value19: val.TWELVEHOUR,
}
})
+ this.scrollTableData1 = table
+ 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),
+ }
})
+
+
}
},
{
@@ -1141,13 +1157,6 @@ export default {
this.practicalNum = e[0].Y_VALUE_ONE
}
},
- {
- e: 'fp-2-02',
- i: "1",
- f: (e) => {
- this.hourArr = e.map(val => val.HOUR_TIME)
- }
- },
{
e: 'fp-2-03',
i: "scada_fp_plan_01('CX_02')",
@@ -1694,8 +1703,53 @@ export default {
}
},
mounted() {
+ 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),
+ }
+ }
}, 30 * 1000)
if (this.$route.query.id === '1' || this.id === '1') {
this.RequestDataSet.forEach(val => {