Commit 5edb36ca authored by zhangrui123's avatar zhangrui123

首页三个月份的数据匹配

parent 04e9b95f
...@@ -354,46 +354,46 @@ export default { ...@@ -354,46 +354,46 @@ export default {
checkStreet: 0, checkStreet: 0,
totStreet: 0, totStreet: 0,
FB_month: [ FB_month: [
{name: '1月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '1月', check: false, time: this.$moment(new Date()).format('YYYY')+'01', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '2月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '2月', check: false, time: this.$moment(new Date()).format('YYYY')+'02', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '3月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '3月', check: false, time: this.$moment(new Date()).format('YYYY')+'03', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '4月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '4月', check: false, time: this.$moment(new Date()).format('YYYY')+'04', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '5月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '5月', check: false, time: this.$moment(new Date()).format('YYYY')+'05', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '6月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '6月', check: false, time: this.$moment(new Date()).format('YYYY')+'06', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '7月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '7月', check: false, time: this.$moment(new Date()).format('YYYY')+'07', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '8月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '8月', check: false, time: this.$moment(new Date()).format('YYYY')+'08', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '9月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '9月', check: false, time: this.$moment(new Date()).format('YYYY')+'09', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '10月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '10月', check: false, time: this.$moment(new Date()).format('YYYY')+'10', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '11月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '11月', check: false, time: this.$moment(new Date()).format('YYYY')+'11', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '12月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '12月', check: false, time: this.$moment(new Date()).format('YYYY')+'12', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
], ],
WQ_month: [ WQ_month: [
{name: '1月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '1月', check: false, time: this.$moment(new Date()).format('YYYY')+'01', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '2月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '2月', check: false, time: this.$moment(new Date()).format('YYYY')+'02', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '3月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '3月', check: false, time: this.$moment(new Date()).format('YYYY')+'03', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '4月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '4月', check: false, time: this.$moment(new Date()).format('YYYY')+'04', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '5月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '5月', check: false, time: this.$moment(new Date()).format('YYYY')+'05', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '6月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '6月', check: false, time: this.$moment(new Date()).format('YYYY')+'06', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '7月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '7月', check: false, time: this.$moment(new Date()).format('YYYY')+'07', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '8月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '8月', check: false, time: this.$moment(new Date()).format('YYYY')+'08', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '9月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '9月', check: false, time: this.$moment(new Date()).format('YYYY')+'09', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '10月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '10月', check: false, time: this.$moment(new Date()).format('YYYY')+'10', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '11月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '11月', check: false, time: this.$moment(new Date()).format('YYYY')+'11', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '12月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '12月', check: false, time: this.$moment(new Date()).format('YYYY')+'12', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
], ],
manager_month: [ manager_month: [
{name: '1月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '1月', check: false, time: this.$moment(new Date()).format('YYYY')+'01', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '2月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '2月', check: false, time: this.$moment(new Date()).format('YYYY')+'02', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '3月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '3月', check: false, time: this.$moment(new Date()).format('YYYY')+'03', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '4月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '4月', check: false, time: this.$moment(new Date()).format('YYYY')+'04', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '5月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '5月', check: false, time: this.$moment(new Date()).format('YYYY')+'05', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '6月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '6月', check: false, time: this.$moment(new Date()).format('YYYY')+'06', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '7月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '7月', check: false, time: this.$moment(new Date()).format('YYYY')+'07', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '8月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '8月', check: false, time: this.$moment(new Date()).format('YYYY')+'08', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '9月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'}, {name: '9月', check: false, time: this.$moment(new Date()).format('YYYY')+'09', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);'},
{name: '10月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '10月', check: false, time: this.$moment(new Date()).format('YYYY')+'10', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '11月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '11月', check: false, time: this.$moment(new Date()).format('YYYY')+'11', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
{name: '12月', check: false, hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' }, {name: '12月', check: false, time: this.$moment(new Date()).format('YYYY')+'12', hover: false, totStreet: 0, checkStreet: 0, class: '', backgroundColor: 'rgb(226,235,245);' },
], ],
expired: 0, expired: 0,
secRowInfos: { secRowInfos: {
...@@ -517,18 +517,22 @@ export default { ...@@ -517,18 +517,22 @@ export default {
} }
spaceOnce = false spaceOnce = false
} }
console.log(i)
let info = this.secRowInfos.COMMUNITY_MANAGER_MATH && this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1] ? this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].rato : 0 let info = this.secRowInfos.COMMUNITY_MANAGER_MATH && this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1] ? this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].rato : 0
console.log(this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].checkTime)
let color= 'rgb(226,235,245)' console.log(Number(this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].checkTime.slice(8, 10)))
if (info) { if(i == Number(this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].checkTime.slice(8, 10)) ){
if (info <0.9 ) { let color= 'rgb(226,235,245)'
color= '#CC4D4D' if (info) {
} else if(info== 1) { if (info <0.9 ) {
color= '#6EB629' color= '#CC4D4D'
} else { } else if(info== 1) {
color= '#FFD400' color= '#6EB629'
} else {
color= '#FFD400'
}
} }
} }
// console.log( info,'-------',color) // console.log( info,'-------',color)
...@@ -627,60 +631,72 @@ export default { ...@@ -627,60 +631,72 @@ export default {
if (res.code === '200') { if (res.code === '200') {
this.secRowInfos = this.$com.confirm(res, 'data.content', {}) this.secRowInfos = this.$com.confirm(res, 'data.content', {})
if (this.secRowInfos.HOUSING_OFFICE) { if (this.secRowInfos.HOUSING_OFFICE) {
this.FBPresent = String(this.secRowInfos.HOUSING_OFFICE.rato.value*100).split('.')[0] this.FBPresent = String(this.secRowInfos.HOUSING_OFFICE.rato*100).split('.')[0]
} }
if (this.secRowInfos.PROPERTY_BIWEEKLY) { if (this.secRowInfos.PROPERTY_BIWEEKLY) {
this.WYPresent = String(this.secRowInfos.PROPERTY_BIWEEKLY.rato.value*100).split('.')[0] this.WYPresent = String(this.secRowInfos.PROPERTY_BIWEEKLY.rato*100).split('.')[0]
} }
// 处理房办的月份颜色 // 处理房办的月份颜色
this.secRowInfos.HOUSING_OFFICE.data.forEach((ele, i) => { this.secRowInfos.HOUSING_OFFICE.data.forEach((ele, i) => {
if (ele.rato == 1 ) { // 完成率100 绿色 this.FB_month.forEach((item, index) => {
this.FB_month[i].backgroundColor = '#6EB629' if(ele.years_month == item.time){
this.FB_month[i].color = '#fff' if (ele.rato == 1 ) { // 完成率100 绿色
}else if(ele.rato <.9){ // 完成率90以下 红色 this.FB_month[index].backgroundColor = '#6EB629'
this.FB_month[i].backgroundColor = '#CC4D4D' this.FB_month[index].color = '#fff'
this.FB_month[i].color = '#fff' }else if(ele.rato <.9){ // 完成率90以下 红色
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 this.FB_month[index].backgroundColor = '#CC4D4D'
this.FB_month[i].backgroundColor = '#FFD400' this.FB_month[index].color = '#fff'
this.FB_month[i].color = '#fff' } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
}else{ // 无数据状态 this.FB_month[index].backgroundColor = '#FFD400'
this.FB_month[i].backgroundColor = 'rgb(226,235,245)' this.FB_month[index].color = '#fff'
this.FB_month[i].color = '#2B87FE' }else{ // 无数据状态
} this.FB_month[index].backgroundColor = 'rgb(226,235,245)'
this.FB_month[index].color = '#2B87FE'
}
}
})
}) })
// 处理物企双周查月份颜色 // 处理物企双周查月份颜色
this.secRowInfos.PROPERTY_BIWEEKLY.data.forEach((ele, i) => { this.secRowInfos.PROPERTY_BIWEEKLY.data.forEach((ele, i) => {
if (ele.rato == 1) { // 完成率100 绿色 this.WQ_month.forEach((item, index) => {
this.WQ_month[i].backgroundColor = '#6EB629' if(ele.years_month == item.time){
this.WQ_month[i].color = '#fff' if (ele.rato == 1) { // 完成率100 绿色
}else if(ele.rato <.9){ // 完成率90以下 红色 this.WQ_month[index].backgroundColor = '#6EB629'
this.WQ_month[i].backgroundColor = '#CC4D4D' this.WQ_month[index].color = '#fff'
this.WQ_month[i].color = '#fff' }else if(ele.rato <.9){ // 完成率90以下 红色
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 this.WQ_month[index].backgroundColor = '#CC4D4D'
this.WQ_month[i].backgroundColor = '#FFD400' this.WQ_month[index].color = '#fff'
this.WQ_month[i].color = '#fff' } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
}else{ // 无数据状态 this.WQ_month[index].backgroundColor = '#FFD400'
this.WQ_month[i].backgroundColor = 'rgb(226,235,245)' this.WQ_month[index].color = '#fff'
this.WQ_month[i].color = '#2B87FE' }else{ // 无数据状态
} this.WQ_month[index].backgroundColor = 'rgb(226,235,245)'
this.WQ_month[index].color = '#2B87FE'
}
}
})
}) })
// 处理小区经理自查月份颜色 // 处理小区经理自查月份颜色
this.secRowInfos.COMMUNITY_MANAGER_YEAR.data.forEach((ele, i) => { this.secRowInfos.COMMUNITY_MANAGER_YEAR.data.forEach((ele, i) => {
if (ele.rato == 1 ) { // 完成率100 绿色 this.manager_month.forEach((item, index) => {
this.manager_month[i].backgroundColor = '#6EB629' if(ele.years_month == item.time){
this.manager_month[i].color = '#fff' if (ele.rato == 1 ) { // 完成率100 绿色
}else if(ele.rato <.9){ // 完成率90以下 红色 this.manager_month[index].backgroundColor = '#6EB629'
this.manager_month[i].backgroundColor = '#CC4D4D' this.manager_month[index].color = '#fff'
this.manager_month[i].color = '#fff' }else if(ele.rato <.9){ // 完成率90以下 红色
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 this.manager_month[index].backgroundColor = '#CC4D4D'
this.manager_month[i].backgroundColor = '#FFD400' this.manager_month[index].color = '#fff'
this.manager_month[i].color = '#fff' } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
}else{ // 无数据状态 this.manager_month[index].backgroundColor = '#FFD400'
this.manager_month[i].backgroundColor = 'rgb(226,235,245)' this.manager_month[index].color = '#fff'
this.manager_month[i].color = '#2B87FE' }else{ // 无数据状态
} this.manager_month[index].backgroundColor = 'rgb(226,235,245)'
this.manager_month[index].color = '#2B87FE'
}
}
})
}) })
} }
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
validateTrigger: 'change', rules: [ { required: true, message: '请选择机构类型!' } ] validateTrigger: 'change', rules: [ { required: true, message: '请选择机构类型!' } ]
}]"> }]">
<a-select-option value="2">房办</a-select-option> <a-select-option value="2">房办</a-select-option>
<a-select-option value="0">区级</a-select-option> <a-select-option value="4">区级</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
}, },
changeType(val){ changeType(val){
console.log(val) console.log(val)
if(val == 0){ if(val == 4){
this.show = false this.show = false
}else{ }else{
this.show = true this.show = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment