|
@@ -43,12 +43,14 @@ export default {
|
|
|
prjList: {
|
|
|
handler(val, o) {
|
|
|
if (!this.prjInfo) return
|
|
|
- let data = null
|
|
|
+ let data = [],
|
|
|
+ result = []
|
|
|
let all = false
|
|
|
val.forEach((item) => {
|
|
|
+ data = []
|
|
|
if (item.name == '建管项目') {
|
|
|
if (item.status) {
|
|
|
- data = this.prjInfo
|
|
|
+ data = this.prjInfo.filter((item) => item.type !== '未移交')
|
|
|
all = true
|
|
|
} else {
|
|
|
data = []
|
|
@@ -57,33 +59,33 @@ export default {
|
|
|
}
|
|
|
if (item.name == 'EPC项目') {
|
|
|
if (item.status) {
|
|
|
- if (!all) data = this.prjInfo.filter((item) => item.type === '建管/EPC')
|
|
|
+ if (!all) data = [...data, ...this.prjInfo.filter((item) => item.type === '建管/EPC')]
|
|
|
} else {
|
|
|
- if (all) data = this.prjInfo
|
|
|
- else data = []
|
|
|
+ if (!all) data = []
|
|
|
}
|
|
|
}
|
|
|
if (item.name == '暂停项目') {
|
|
|
if (item.status) {
|
|
|
- let zt = this.prjInfo.filter((item) => item.stage === '暂停阶段')
|
|
|
- zt.forEach((c) => {
|
|
|
- if (data.findIndex((item) => item.prjName == c.prjName) == -1) {
|
|
|
- data.push(c)
|
|
|
- }
|
|
|
- })
|
|
|
+ if (!all) {
|
|
|
+ let zt = this.prjInfo.filter((item) => item.stage === '暂停阶段')
|
|
|
+ zt.forEach((c) => {
|
|
|
+ if (data.findIndex((item) => item.prjName == c.prjName) == -1) {
|
|
|
+ data.push(c)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
- data = data.filter((item) => item.stage !== '暂停阶段')
|
|
|
+ if (!all) data = []
|
|
|
}
|
|
|
}
|
|
|
if (item.name == '未移交项目') {
|
|
|
if (item.status) {
|
|
|
- if (!all) data = this.prjInfo.filter((item) => item.type === '未移交')
|
|
|
- } else {
|
|
|
- data = this.prjInfo.filter((item) => item.type !== '未移交')
|
|
|
+ data = [...data, ...this.prjInfo.filter((item) => item.type === '未移交')]
|
|
|
}
|
|
|
}
|
|
|
+ result = [...result, ...data]
|
|
|
})
|
|
|
- this.$store.state.bigScreen.groupProject = data
|
|
|
+ this.$store.state.bigScreen.groupProject = result
|
|
|
},
|
|
|
deep: true
|
|
|
},
|
|
@@ -124,9 +126,9 @@ export default {
|
|
|
if (this.groupName === '三峡分公司') this.prjInfo = this.prjInfo.filter((item) => item.branch == this.groupName)
|
|
|
this.prjList = [
|
|
|
{ name: '建管项目', num: this.prjInfo.filter((item) => item.type !== '未移交').length, status: true },
|
|
|
- { name: 'EPC项目', num: this.prjInfo.filter((item) => item.type === '建管/EPC').length, status: true },
|
|
|
- { name: '暂停项目', num: this.prjInfo.filter((item) => item.stage === '暂停阶段').length, status: true },
|
|
|
- { name: '未移交项目', num: this.prjInfo.filter((item) => item.type === '未移交').length, status: true }
|
|
|
+ { name: 'EPC项目', num: this.prjInfo.filter((item) => item.type === '建管/EPC').length, status: false },
|
|
|
+ { name: '暂停项目', num: this.prjInfo.filter((item) => item.stage === '暂停阶段').length, status: false },
|
|
|
+ { name: '未移交项目', num: this.prjInfo.filter((item) => item.type === '未移交').length, status: false }
|
|
|
]
|
|
|
this.$store.state.bigScreen.groupProject = this.prjInfo
|
|
|
})
|