Commit 6ccdfc00 by 周志凯

add multiply progress

1 parent 977ac7c4
Showing 1 changed file with 18 additions and 11 deletions
......@@ -1534,7 +1534,7 @@
: 0;
}
});
console.log('list',_this[processKey])
// console.log('list',_this[processKey])
};
_this.webSocketObj[wsUrl].onerror = function(event) {
console.log("设备WebSocket:发生错误 ");
......@@ -2034,7 +2034,8 @@
})
},
dealMessage(msg) {
const { dates, mallIds, mallNames, status, stepCount, counter } = msg
// scheduleType
const { dates, mallIds, mallNames, status, stepCount, scheduleType, counter } = msg
var self = this
var resObj = {}
resObj.dates = dates
......@@ -2046,6 +2047,7 @@
resObj.totalPage = 0
resObj.current = 0
resObj.curPageSize = 0
resObj.scheduleType = scheduleType
if (counter) {
// dataNum dateMallNum step totalData totalDate totalMall totalMallDateProduct
resObj.totalNum = counter.dateMallNum
......@@ -2054,15 +2056,20 @@
resObj.curPageSize = counter.dataNum
}
if (self.results.length) {
self.results.forEach(item => {
item.progress = self.floatToPercent(stepCount)
if (counter) {
item.totalNum = counter.dateMallNum
item.totalPage = counter.totalMallDateProduct
item.current = counter.dataNum
item.curPageSize = counter.totalData
}
})
const isSameScheduleType = self.results.some(item => item.scheduleType === scheduleType)
isSameScheduleType
? self.results.forEach(item => {
//
item.progress = self.floatToPercent(stepCount)
if (counter) {
// item.totalNum = counter.dateMallNum
// item.totalPage = counter.totalMallDateProduct
item.current = counter.dataNum
item.curPageSize = counter.totalData
}
})
: self.results.push(resObj)
resObj = {}
} else {
self.results.push(resObj)
resObj = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!