|
@@ -48,6 +48,26 @@ export default {
|
|
|
res.data.records.forEach(item => { item.flg = false })
|
|
|
// this.planList = res.data.records;
|
|
|
this.planList = []
|
|
|
+ res.data.records.forEach((item => {
|
|
|
+ const newProgress = item.progress.split('%')[0]
|
|
|
+ const progressFlag = newProgress ? (newProgress > 0 && newProgress < 100) ? true : false : false
|
|
|
+ if(item.progress) {
|
|
|
+ item.newProgress = newProgress
|
|
|
+ }
|
|
|
+ const { hasAllocation, hasAllAllocation } = item
|
|
|
+ if(hasAllocation && !hasAllAllocation) {
|
|
|
+ item.backgroundClass = 'blues'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(progressFlag) {
|
|
|
+ item.backgroundClass = 'reds'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(hasAllocation && hasAllAllocation) {
|
|
|
+ item.backgroundClass = 'greens'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }))
|
|
|
setTimeout(() => {
|
|
|
this.$set(this, 'planList', res.data.records)
|
|
|
}, 100)
|