|
|
@ -33,6 +33,14 @@ |
|
|
|
<div>{{ synthesisScore }}</div> |
|
|
|
<div>综合得分</div> |
|
|
|
</div> |
|
|
|
<div class="right_box"> |
|
|
|
<div :class="synthesisState?'up':'down'"> |
|
|
|
<img src="@/assets/images/index/up.png" alt="" v-if="synthesisState && synthesisScoreBtLastMonth!=0" > |
|
|
|
<img src="@/assets/images/index/down.png" alt="" v-if="!synthesisState && synthesisScoreBtLastMonth!=0" > |
|
|
|
<span >{{synthesisScoreBtLastMonth}}</span> |
|
|
|
</div> |
|
|
|
<div style="color: #999;">较上月</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="box" v-for="(item, index) in score" :key="index"> |
|
|
@ -42,6 +50,14 @@ |
|
|
|
<div>{{ item.score }}</div> |
|
|
|
<div>{{ item.satisfactionCategoryName }}</div> |
|
|
|
</div> |
|
|
|
<div class="right_box"> |
|
|
|
<div> |
|
|
|
<img src="@/assets/images/index/up.png" alt="" v-if="item.state && item.scoreDiffBtLastMonth!=0" > |
|
|
|
<img src="@/assets/images/index/down.png" alt="" v-if="!item.state && item.scoreDiffBtLastMonth!=0" > |
|
|
|
<span :class="item.state?'up':'down'">{{item.scoreDiffBtLastMonth}}</span> |
|
|
|
</div> |
|
|
|
<div style="color: #999;">较上月</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -214,7 +230,10 @@ export default { |
|
|
|
|
|
|
|
inspResultId:"", |
|
|
|
|
|
|
|
btnFlag:true |
|
|
|
btnFlag:true, |
|
|
|
|
|
|
|
synthesisState:false, |
|
|
|
synthesisScoreBtLastMonth:null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -319,41 +338,59 @@ export default { |
|
|
|
handleSearch(val) { |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取列表 |
|
|
|
async getTableData() { |
|
|
|
|
|
|
|
try{ |
|
|
|
const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; |
|
|
|
const { formData } = this; |
|
|
|
const { data, msg } = await requestGet(url, { ...formData }); |
|
|
|
this.total = data.total || 0; |
|
|
|
this.score = [] |
|
|
|
this.option.series[0].data = [] |
|
|
|
this.option.series[1].data = [] |
|
|
|
this.option.series[2].data = [] |
|
|
|
this.option.xAxis.data = [] |
|
|
|
this.tableData = data.categoryDatas || []; |
|
|
|
this.satisfactionCategory = [] |
|
|
|
this.inspRecordId = data.inspRecordId; |
|
|
|
this.synthesisScore = data.synthesisScore; |
|
|
|
this.personQty = data.personQty |
|
|
|
const allowedCategories = this.dicts.satisfaction_category.map(item => item.value) |
|
|
|
this.tableData.forEach(item => { |
|
|
|
if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
|
this.option.series[0].data.push(item.veryGoodQty) |
|
|
|
this.option.series[1].data.push(item.goodQty) |
|
|
|
this.option.series[2].data.push(item.badQty) |
|
|
|
this.option.xAxis.data.push(item.satisfactionCategoryName) |
|
|
|
this.satisfactionCategory.push(item.satisfactionCategory) |
|
|
|
this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`@/assets/img/satisfaction/${item.satisfactionCategory}.png`) }); |
|
|
|
} |
|
|
|
try { |
|
|
|
// const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis/superior"; |
|
|
|
// const { formData } = this; |
|
|
|
// let agencyId = this.$store.state.user.agencyId; |
|
|
|
// const { data, msg } = await requestGet(url, { ...formData,agencyId }); |
|
|
|
const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; |
|
|
|
const { formData } = this; |
|
|
|
const { data, msg } = await requestGet(url, { ...formData }); |
|
|
|
|
|
|
|
// 清空数组和属性值 |
|
|
|
this.total = data.total || 0; |
|
|
|
this.score = []; |
|
|
|
this.option.series.forEach(series => series.data = []); |
|
|
|
this.option.xAxis.data = []; |
|
|
|
this.tableData = data.categoryDatas || []; |
|
|
|
this.satisfactionCategory = []; |
|
|
|
this.inspRecordId = data.inspRecordId; |
|
|
|
this.synthesisScore = data.synthesisScore; |
|
|
|
this.synthesisScoreBtLastMonth = data.synthesisScoreBtLastMonth; |
|
|
|
this.synthesisState = this.synthesisScoreBtLastMonth >= 0; |
|
|
|
if (this.synthesisScoreBtLastMonth < 0) { |
|
|
|
this.synthesisScoreBtLastMonth = Math.abs(this.synthesisScoreBtLastMonth); |
|
|
|
} |
|
|
|
this.personQty = data.personQty; |
|
|
|
|
|
|
|
const allowedCategories = this.dicts.satisfaction_category.map(item => item.value); |
|
|
|
for (const item of this.tableData) { |
|
|
|
if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
|
this.option.series[0].data.push(item.veryGoodQty); |
|
|
|
this.option.series[1].data.push(item.goodQty); |
|
|
|
this.option.series[2].data.push(item.badQty); |
|
|
|
this.option.xAxis.data.push(item.satisfactionCategoryName); |
|
|
|
this.satisfactionCategory.push(item.satisfactionCategory); |
|
|
|
this.score.push({ |
|
|
|
score: item.score, |
|
|
|
satisfactionCategoryName: item.satisfactionCategoryName, |
|
|
|
imgUrl: require(`@/assets/img/satisfaction/${item.satisfactionCategory}.png`), |
|
|
|
scoreDiffBtLastMonth: item.scoreDiffBtLastMonth, |
|
|
|
state: item.scoreDiffBtLastMonth >= 0 |
|
|
|
}); |
|
|
|
this.myChart.setOption(this.option); |
|
|
|
}catch(error){ |
|
|
|
console.log(error); |
|
|
|
if (item.scoreDiffBtLastMonth < 0) { |
|
|
|
item.scoreDiffBtLastMonth = Math.abs(item.scoreDiffBtLastMonth); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
this.myChart.setOption(this.option); |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重置 |
|
|
|
resetSearch() { |
|
|
@ -392,7 +429,8 @@ export default { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
border-radius: 5px; |
|
|
|
|
|
|
|
padding: 10px; |
|
|
|
box-sizing: border-box; |
|
|
|
img { |
|
|
|
margin-right: 8px; |
|
|
|
} |
|
|
@ -408,7 +446,7 @@ export default { |
|
|
|
.right_right { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
flex: 1; |
|
|
|
:nth-child(1) { |
|
|
|
font-size: 18px; |
|
|
|
font-family: PingFang SC; |
|
|
@ -419,11 +457,24 @@ export default { |
|
|
|
:nth-child(2) { |
|
|
|
font-size: 14px; |
|
|
|
font-family: PingFang SC; |
|
|
|
color: #333333; |
|
|
|
opacity: 0.6; |
|
|
|
color: #666666; |
|
|
|
} |
|
|
|
} |
|
|
|
.right_box{ |
|
|
|
img{ |
|
|
|
margin: 0; |
|
|
|
width:10px; |
|
|
|
height:14px; |
|
|
|
|
|
|
|
} |
|
|
|
.down{ |
|
|
|
color:#FF7135 ; |
|
|
|
} |
|
|
|
.up{ |
|
|
|
color:#00BB72 ; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
.right { |
|
|
|
flex: 1; |
|
|
|
display: grid; |
|
|
|