Browse Source

社区自查没有带入类型bug

feature
mk 1 year ago
parent
commit
bb82cbb56e
  1. 15
      src/views/modules/satisfaction/communitySelfInsp/index.vue

15
src/views/modules/satisfaction/communitySelfInsp/index.vue

@ -636,6 +636,7 @@
:seriesName="seriesName" :seriesName="seriesName"
:inspRecordId="inspRecordId" :inspRecordId="inspRecordId"
:communityId="communityId" :communityId="communityId"
:satisfactionCategoryStr="satisfactionCategoryStr"
></form-list> ></form-list>
<el-dialog <el-dialog
width="920px" width="920px"
@ -822,6 +823,8 @@ export default {
showCommunitDialog: false, showCommunitDialog: false,
communitDialogTitle: "", communitDialogTitle: "",
communityId: "", communityId: "",
satisfactionCategoryStr:null
}; };
}, },
computed: { computed: {
@ -907,7 +910,8 @@ export default {
this.myChart.setOption(this.option); this.myChart.setOption(this.option);
let than = this; let than = this;
this.myChart.on("click", function (params) { this.myChart.on("click", function (params) {
than.handelClickChart(params.name, params.seriesName); console.log(params);
than.handelClickChart(params.seriesName,params.data.satisfactionCategory);
}); });
this.$nextTick(() => { this.$nextTick(() => {
window.addEventListener("resize", this.handleWindowResize); window.addEventListener("resize", this.handleWindowResize);
@ -918,7 +922,7 @@ export default {
this.myChart.resize(); this.myChart.resize();
} }
}, },
handelClickChart(name, seriesName) { handelClickChart(seriesName,satisfactionCategoryStr) {
this.showFormList = true; this.showFormList = true;
this.seriesName = this.seriesName =
seriesName == "满意" seriesName == "满意"
@ -926,6 +930,7 @@ export default {
: seriesName == "基本满意" : seriesName == "基本满意"
? "good" ? "good"
: "bad"; : "bad";
this.satisfactionCategoryStr = satisfactionCategoryStr;
}, },
handleClose() { handleClose() {
this.showFormList = false; this.showFormList = false;
@ -967,9 +972,9 @@ export default {
); );
for (const item of data.categoryDatas) { for (const item of data.categoryDatas) {
if (allowedCategories.includes(item.satisfactionCategory)) { if (allowedCategories.includes(item.satisfactionCategory)) {
this.option.series[0].data.push(item.veryGoodQty); this.option.series[0].data.push({value:item.veryGoodQty,name:'满意',satisfactionCategory:item.satisfactionCategory});
this.option.series[1].data.push(item.goodQty); this.option.series[1].data.push({value:item.goodQty,name:'基本满意',satisfactionCategory:item.satisfactionCategory});
this.option.series[2].data.push(item.badQty); this.option.series[2].data.push({value:item.badQty,name:'不满意',satisfactionCategory:item.satisfactionCategory});
this.option.xAxis.data.push(item.satisfactionCategoryName); this.option.xAxis.data.push(item.satisfactionCategoryName);
this.satisfactionCategory.push(item.satisfactionCategory); this.satisfactionCategory.push(item.satisfactionCategory);
this.score.push({ this.score.push({

Loading…
Cancel
Save