Browse Source

街道满意度调查接入

feature
mk 2 years ago
parent
commit
f1fb4e2a7e
  1. 5
      src/views/modules/satisfaction/satisfactionProvince/formList.vue
  2. 53
      src/views/modules/satisfaction/satisfactionProvince/index.vue

5
src/views/modules/satisfaction/satisfactionProvince/formList.vue

@ -194,6 +194,7 @@ export default {
...this.formData, ...this.formData,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
communityId:this.communityId
}; };
let url = '/governance/provinceEvaluationRecord/pageInfo' let url = '/governance/provinceEvaluationRecord/pageInfo'
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -217,6 +218,10 @@ export default {
formObj: { formObj: {
type: Object, type: Object,
default: () => {} default: () => {}
},
communityId:{
type:String,
default:''
} }
}, },
// //

53
src/views/modules/satisfaction/satisfactionProvince/index.vue

@ -83,7 +83,7 @@
<div <div
class="m-table-item" class="m-table-item"
v-if="user.level == 'community'" v-if="user.level != 'street'"
:style="{ height: maxTableHeight + 'px', width: '100%' }" :style="{ height: maxTableHeight + 'px', width: '100%' }"
> >
<div id="myCharts"></div> <div id="myCharts"></div>
@ -96,7 +96,7 @@
alt="Image" alt="Image"
/> />
<div class="left_right"> <div class="left_right">
<!-- <div>{{ synthesisScore }}</div> --> <div>{{ badTotal }}</div>
<div>综合得分</div> <div>综合得分</div>
</div> </div>
</div> </div>
@ -204,7 +204,7 @@
<form-list <form-list
ref="ref_form_list" ref="ref_form_list"
@handleClose="handleClose" @handleClose="handleClose"
:satisfactionCategoryStr="satisfactionCategoryStr" :communityId="communityId"
:formObj="formData" :formObj="formData"
@handelClickDetail="handelClickDetail" @handelClickDetail="handelClickDetail"
@handelClickEdit="handelClickEdit" @handelClickEdit="handelClickEdit"
@ -258,7 +258,7 @@ export default {
satisfactionCategoryName: [], satisfactionCategoryName: [],
satisfactionCategory: [], satisfactionCategory: [],
score: [], badList: [],
showProvinceFollowUpDetail: false, showProvinceFollowUpDetail: false,
option: { option: {
@ -326,6 +326,9 @@ export default {
pageSize: 20, pageSize: 20,
pageNo: 1, pageNo: 1,
user: {}, user: {},
badTotal: 0,
communityId: "",
}; };
}, },
@ -340,17 +343,16 @@ export default {
let date = new Date(); let date = new Date();
this.formData.periodStart = util.formatDate(date, "yyyy-MM"); this.formData.periodStart = util.formatDate(date, "yyyy-MM");
this.user = this.$store.state.user; this.user = this.$store.state.user;
console.log(this.user);
}, },
async mounted() { async mounted() {
this.agencyId = this.user.agencyId; this.agencyId = this.user.agencyId;
if (this.user.level != "street") {
this.initEcharts();
}
await this.getDicts(); await this.getDicts();
await this.getTableData(this.user.level); await this.getTableData(this.user.level);
if (this.user.level == "community") { console.log(this.user.level);
await this.initEcharts();
} else {
}
}, },
methods: { methods: {
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
@ -440,16 +442,14 @@ export default {
}, },
// //
async getTableData(level) { async getTableData(level) {
try { if (level != "street") {
if (level == "community") {
const allowedCategories = this.dicts.satisfaction_category.map( const allowedCategories = this.dicts.satisfaction_category.map(
(item) => item.value (item) => item.value
); );
const { data,code,msg } = await this.$http.post( const { data } = await this.$http.post(
`/governance/provinceEvaluationRecord/staticPeopleNum`, `/governance/provinceEvaluationRecord/staticPeopleNum`,
{ ...this.formData } { ...this.formData }
); );
if(code == 0){
this.option.series[0].data = []; this.option.series[0].data = [];
this.option.xAxis.data = []; this.option.xAxis.data = [];
this.echartsData = data; this.echartsData = data;
@ -461,23 +461,32 @@ export default {
}); });
this.myChart.setOption(this.option); this.myChart.setOption(this.option);
} else { } else {
this.$message.error(msg); const { statistics, code, msg, tableList } = await requestPost(
}
} else {
const { data,code,msg } = await this.$http.post(
`/governance/provinceEvaluationRecord/staticStreetPeopleNum`, `/governance/provinceEvaluationRecord/staticStreetPeopleNum`,
{ ...this.formData } { ...this.formData }
); );
if (code == 0) { if (code == 0) {
console.log(data); statistics.forEach((item) => {
if (item.scopeId != "badTotal") {
this.badList.push({
badNum: item.peopleNum,
satisfactionCategoryName: item.scopeName,
imgUrl: require(`@/assets/img/satisfaction/${item.scopeId}.png`),
});
}
this.tableList = tableList;
this.badTotal =
statistics.map((item) => item.scopeId == "badTotal").peopleNum ||
0;
});
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
} }
} catch (error) { },
console.log(error); handleView(row) {
} this.showFormList = true;
this.communityId = row.communityId;
}, },
async handleExportModule() { async handleExportModule() {
let url = let url =

Loading…
Cancel
Save