|
@@ -92,13 +92,29 @@ export default {
|
|
|
arrx.push(element.date)
|
|
|
element.datas.forEach((res) => {
|
|
|
if (res.level === 'A') {
|
|
|
- arr.push(res.count)
|
|
|
+ if (res.dayqty) {
|
|
|
+ arr.push(res.count / res.dayqty)
|
|
|
+ } else {
|
|
|
+ arr.push(res.count / 1)
|
|
|
+ }
|
|
|
} else if (res.level == 'B') {
|
|
|
- Low.push(res.count)
|
|
|
+ if (res.dayqty) {
|
|
|
+ Low.push(res.count / res.dayqty)
|
|
|
+ } else {
|
|
|
+ Low.push(res.count / 1)
|
|
|
+ }
|
|
|
} else if (res.level == 'C') {
|
|
|
- firs.push(res.count)
|
|
|
+ if (res.dayqty) {
|
|
|
+ firs.push(res.count / res.dayqty)
|
|
|
+ } else {
|
|
|
+ firs.push(res.count / 1)
|
|
|
+ }
|
|
|
} else if (res.level == 'D') {
|
|
|
- pt.push(res.count)
|
|
|
+ if (res.dayqty) {
|
|
|
+ pt.push(res.count / res.dayqty)
|
|
|
+ } else {
|
|
|
+ pt.push(res.count / 1)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
// console.log(arr);
|
|
@@ -119,21 +135,22 @@ export default {
|
|
|
arrx.push(element.date)
|
|
|
element.datas.forEach((res) => {
|
|
|
if (res.level === 'A') {
|
|
|
- arr.push(res.count)
|
|
|
+ arr.push((res.count / 24).toFixed(2))
|
|
|
} else if (res.level == 'B') {
|
|
|
- Low.push(res.count)
|
|
|
+ Low.push((res.count / 24).toFixed(2))
|
|
|
} else if (res.level == 'C') {
|
|
|
- firs.push(res.count)
|
|
|
+ firs.push((res.count / 24).toFixed(2))
|
|
|
} else if (res.level == 'D') {
|
|
|
- pt.push(res.count)
|
|
|
+ pt.push((res.count / 24).toFixed(2))
|
|
|
}
|
|
|
})
|
|
|
// console.log(arr);
|
|
|
})
|
|
|
let datas = []
|
|
|
for (let i = 0; i <= arr.length; i++) {
|
|
|
- datas[i] = arr[i] + Low[i] + firs[i] + pt[i]
|
|
|
+ datas[i] = Number(arr[i]) + Number(Low[i]) + Number(firs[i]) + Number(pt[i])
|
|
|
}
|
|
|
+ console.log(datas)
|
|
|
this.inits(arr, arrx, Low, firs, pt, datas)
|
|
|
}
|
|
|
// console.log(result)
|