projects/mescc/dy #104

Merged
juzi merged 2 commits from projects/mescc/dy into projects/mescc/develop 2024-07-24 13:07:29 +08:00
Showing only changes of commit 6409d2d348 - Show all commits

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-16 17:47:40
* @LastEditTime: 2024-07-23 17:58:28
* @LastEditors: DY
* @Description:
-->
@ -392,8 +392,8 @@ export default {
// this.factoryListabbr
const factoryNameArray = (this.listQuery.factory.length === 0 || this.listQuery.factory.length === this.factoryListabbr.length) ? [0, 1] : this.listQuery.factory
const seriesArray = []
typeArray.forEach((type, typeIndex) => {
factoryNameArray.forEach((fac, facIndex) => {
typeArray.forEach((type, typeIndex) => {
const series = {
data: Array(xAxisData.length).fill(0),
type: 'bar',
@ -407,27 +407,26 @@ export default {
seriesArray.push(series)
})
})
// seriesdata
const seriesDataArray = []
Object.values(data).forEach((item) => {
let seriesData = []
// item[0].datestr
typeArray.forEach(t => {
const zidr = ['chipYield', 'componentYield', 'bipvProductOutput'][t]
//
const arrayByFacArray = Object.groupBy(dataList, (member) => member.factory)
// const seriesDataArray = []
let n = 0
Object.values(arrayByFacArray).forEach((item) => {
typeArray.forEach(type => {
const typeName = ['chipYield', 'componentYield', 'bipvProductOutput'][type]
let seriesData = Array(xAxisData.length).fill(0)
item.forEach(it => {
seriesData.push(it[zidr])
})
})
seriesDataArray.push(seriesData)
})
for (let y = 0; y < seriesArray.length; y ++) {
const days = []
seriesDataArray.forEach(a => {
days.push(a[y])
})
//
seriesArray[y].data = days
xAxisData.forEach((x, xindex) => {
if (x === it['datestr']) {
seriesData[xindex] = it[typeName]
}
})
})
seriesArray[n].data = seriesData
n ++
})
})
//
const validSeriesArray = []