Browse Source

街道满意度调查接入

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

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

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

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

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

Loading…
Cancel
Save