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,8 +517,11 @@ export default { ...@@ -517,8 +517,11 @@ 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)
console.log(Number(this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].checkTime.slice(8, 10)))
if(i == Number(this.secRowInfos.COMMUNITY_MANAGER_MATH.data[i-1].checkTime.slice(8, 10)) ){
let color= 'rgb(226,235,245)' let color= 'rgb(226,235,245)'
if (info) { if (info) {
if (info <0.9 ) { if (info <0.9 ) {
...@@ -530,6 +533,7 @@ export default { ...@@ -530,6 +533,7 @@ export default {
} }
} }
}
// console.log( info,'-------',color) // console.log( info,'-------',color)
tab+= '<td onclick=clickDate('+ i +') style="border-radius:20%;text-align:center;border:4px solid #fff; cursor: pointer; background:'+color+'">'+i+'</td>' tab+= '<td onclick=clickDate('+ i +') style="border-radius:20%;text-align:center;border:4px solid #fff; cursor: pointer; background:'+color+'">'+i+'</td>'
...@@ -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) => {
this.FB_month.forEach((item, index) => {
if(ele.years_month == item.time){
if (ele.rato == 1 ) { // 完成率100 绿色 if (ele.rato == 1 ) { // 完成率100 绿色
this.FB_month[i].backgroundColor = '#6EB629' this.FB_month[index].backgroundColor = '#6EB629'
this.FB_month[i].color = '#fff' this.FB_month[index].color = '#fff'
}else if(ele.rato <.9){ // 完成率90以下 红色 }else if(ele.rato <.9){ // 完成率90以下 红色
this.FB_month[i].backgroundColor = '#CC4D4D' this.FB_month[index].backgroundColor = '#CC4D4D'
this.FB_month[i].color = '#fff' this.FB_month[index].color = '#fff'
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
this.FB_month[i].backgroundColor = '#FFD400' this.FB_month[index].backgroundColor = '#FFD400'
this.FB_month[i].color = '#fff' this.FB_month[index].color = '#fff'
}else{ // 无数据状态 }else{ // 无数据状态
this.FB_month[i].backgroundColor = 'rgb(226,235,245)' this.FB_month[index].backgroundColor = 'rgb(226,235,245)'
this.FB_month[i].color = '#2B87FE' this.FB_month[index].color = '#2B87FE'
} }
}
})
}) })
// 处理物企双周查月份颜色 // 处理物企双周查月份颜色
this.secRowInfos.PROPERTY_BIWEEKLY.data.forEach((ele, i) => { this.secRowInfos.PROPERTY_BIWEEKLY.data.forEach((ele, i) => {
this.WQ_month.forEach((item, index) => {
if(ele.years_month == item.time){
if (ele.rato == 1) { // 完成率100 绿色 if (ele.rato == 1) { // 完成率100 绿色
this.WQ_month[i].backgroundColor = '#6EB629' this.WQ_month[index].backgroundColor = '#6EB629'
this.WQ_month[i].color = '#fff' this.WQ_month[index].color = '#fff'
}else if(ele.rato <.9){ // 完成率90以下 红色 }else if(ele.rato <.9){ // 完成率90以下 红色
this.WQ_month[i].backgroundColor = '#CC4D4D' this.WQ_month[index].backgroundColor = '#CC4D4D'
this.WQ_month[i].color = '#fff' this.WQ_month[index].color = '#fff'
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
this.WQ_month[i].backgroundColor = '#FFD400' this.WQ_month[index].backgroundColor = '#FFD400'
this.WQ_month[i].color = '#fff' this.WQ_month[index].color = '#fff'
}else{ // 无数据状态 }else{ // 无数据状态
this.WQ_month[i].backgroundColor = 'rgb(226,235,245)' this.WQ_month[index].backgroundColor = 'rgb(226,235,245)'
this.WQ_month[i].color = '#2B87FE' this.WQ_month[index].color = '#2B87FE'
} }
}
})
}) })
// 处理小区经理自查月份颜色 // 处理小区经理自查月份颜色
this.secRowInfos.COMMUNITY_MANAGER_YEAR.data.forEach((ele, i) => { this.secRowInfos.COMMUNITY_MANAGER_YEAR.data.forEach((ele, i) => {
this.manager_month.forEach((item, index) => {
if(ele.years_month == item.time){
if (ele.rato == 1 ) { // 完成率100 绿色 if (ele.rato == 1 ) { // 完成率100 绿色
this.manager_month[i].backgroundColor = '#6EB629' this.manager_month[index].backgroundColor = '#6EB629'
this.manager_month[i].color = '#fff' this.manager_month[index].color = '#fff'
}else if(ele.rato <.9){ // 完成率90以下 红色 }else if(ele.rato <.9){ // 完成率90以下 红色
this.manager_month[i].backgroundColor = '#CC4D4D' this.manager_month[index].backgroundColor = '#CC4D4D'
this.manager_month[i].color = '#fff' this.manager_month[index].color = '#fff'
} else if(ele.rato>0.9){ // 完成率90到100之间 黄色 } else if(ele.rato>0.9){ // 完成率90到100之间 黄色
this.manager_month[i].backgroundColor = '#FFD400' this.manager_month[index].backgroundColor = '#FFD400'
this.manager_month[i].color = '#fff' this.manager_month[index].color = '#fff'
}else{ // 无数据状态 }else{ // 无数据状态
this.manager_month[i].backgroundColor = 'rgb(226,235,245)' this.manager_month[index].backgroundColor = 'rgb(226,235,245)'
this.manager_month[i].color = '#2B87FE' 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