|
@@ -358,10 +358,8 @@ export default {
|
|
|
updated () {
|
|
|
if (this.lineData.length > 0 && this.equipmentData.length > 0) {
|
|
|
this.$nextTick(function () {
|
|
|
- console.log(1111)
|
|
|
this.getPieCharts('container-pie', this.equipmentData)
|
|
|
this.getLineCharts('container-line', this.lineData)
|
|
|
- console.log(1111)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -369,14 +367,14 @@ export default {
|
|
|
getDict () {
|
|
|
this.typeDict = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.WORKPLACE_BACKLOG_TYPE)
|
|
|
this.typeDetailDict = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE)
|
|
|
- getWorkplaceBacklogTopData(this.role).then(res => {
|
|
|
- this.topData = res.data
|
|
|
- console.log(this.topData)
|
|
|
- })
|
|
|
},
|
|
|
getInfo () {
|
|
|
- getWorkplaceBacklogWeekData(this.role).then(res => {
|
|
|
- const data = res.data.inStoreDetailVOS.reduce((pre, item) => {
|
|
|
+ Promise.all([
|
|
|
+ getWorkplaceBacklogWeekData(this.role),
|
|
|
+ getWorkplaceBacklogPie(this.role),
|
|
|
+ getWorkplaceBacklogTopData(this.role)
|
|
|
+ ]).then(res => {
|
|
|
+ const data = res[0].data.inStoreDetailVOS.reduce((pre, item) => {
|
|
|
pre.push({
|
|
|
week: item.weekDayName,
|
|
|
value: item.num,
|
|
@@ -385,7 +383,7 @@ export default {
|
|
|
return pre
|
|
|
}, [])
|
|
|
data.push(
|
|
|
- ...res.data.outStoreDetailVOS.reduce((pre, item) => {
|
|
|
+ ...res[0].data.outStoreDetailVOS.reduce((pre, item) => {
|
|
|
pre.push({
|
|
|
week: item.weekDayName,
|
|
|
value: item.num,
|
|
@@ -396,9 +394,7 @@ export default {
|
|
|
}, [])
|
|
|
)
|
|
|
this.lineData = data
|
|
|
- })
|
|
|
- getWorkplaceBacklogPie(this.role).then(res => {
|
|
|
- const data = res.data.reduce((pre, item) => {
|
|
|
+ const data2 = res[1].data.reduce((pre, item) => {
|
|
|
pre.push({
|
|
|
item: item.name,
|
|
|
count: item.currentStock,
|
|
@@ -406,7 +402,8 @@ export default {
|
|
|
})
|
|
|
return pre
|
|
|
}, [])
|
|
|
- this.equipmentData = data
|
|
|
+ this.equipmentData = data2
|
|
|
+ this.topData = res[2].data
|
|
|
})
|
|
|
},
|
|
|
getPieCharts (id, data) {
|