Merge pull request 'projects/mescc/dy' (#104) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #104
This commit is contained in:
commit
ec5e47a416
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-07-17 08:55:15
|
* @LastEditTime: 2024-07-23 18:00:55
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -392,8 +392,8 @@ export default {
|
|||||||
// 工厂名称 this.factoryListabbr
|
// 工厂名称 this.factoryListabbr
|
||||||
const factoryNameArray = (this.listQuery.factory.length === 0 || this.listQuery.factory.length === this.factoryListabbr.length) ? [0, 1] : this.listQuery.factory
|
const factoryNameArray = (this.listQuery.factory.length === 0 || this.listQuery.factory.length === this.factoryListabbr.length) ? [0, 1] : this.listQuery.factory
|
||||||
const seriesArray = []
|
const seriesArray = []
|
||||||
typeArray.forEach((type, typeIndex) => {
|
factoryNameArray.forEach((fac, facIndex) => {
|
||||||
factoryNameArray.forEach((fac, facIndex) => {
|
typeArray.forEach((type, typeIndex) => {
|
||||||
const series = {
|
const series = {
|
||||||
data: Array(xAxisData.length).fill(0),
|
data: Array(xAxisData.length).fill(0),
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@ -407,27 +407,26 @@ export default {
|
|||||||
seriesArray.push(series)
|
seriesArray.push(series)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 构造series的data
|
|
||||||
const seriesDataArray = []
|
// 按工厂分
|
||||||
Object.values(data).forEach((item) => {
|
const arrayByFacArray = Object.groupBy(dataList, (member) => member.factory)
|
||||||
let seriesData = []
|
// const seriesDataArray = []
|
||||||
// item[0].datestr 为日期
|
let n = 0
|
||||||
typeArray.forEach(t => {
|
Object.values(arrayByFacArray).forEach((item) => {
|
||||||
const zidr = ['chipYield', 'componentYield', 'bipvProductOutput'][t]
|
typeArray.forEach(type => {
|
||||||
|
const typeName = ['chipYield', 'componentYield', 'bipvProductOutput'][type]
|
||||||
|
let seriesData = Array(xAxisData.length).fill(0)
|
||||||
item.forEach(it => {
|
item.forEach(it => {
|
||||||
seriesData.push(it[zidr])
|
xAxisData.forEach((x, xindex) => {
|
||||||
|
if (x === it['datestr']) {
|
||||||
|
seriesData[xindex] = it[typeName]
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
seriesArray[n].data = seriesData
|
||||||
|
n ++
|
||||||
})
|
})
|
||||||
seriesDataArray.push(seriesData)
|
|
||||||
})
|
})
|
||||||
for (let y = 0; y < seriesArray.length; y ++) {
|
|
||||||
const days = []
|
|
||||||
seriesDataArray.forEach(a => {
|
|
||||||
days.push(a[y])
|
|
||||||
})
|
|
||||||
// 赋值完成
|
|
||||||
seriesArray[y].data = days
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加工厂
|
// 添加工厂
|
||||||
const validSeriesArray = []
|
const validSeriesArray = []
|
||||||
|
Loading…
Reference in New Issue
Block a user