From f1fb4e2a7ed484383ae3d9e3c2d9d39e7a3fa73c Mon Sep 17 00:00:00 2001
From: mk <2403457699@qq.com>
Date: Sat, 4 Nov 2023 14:05:04 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=97=E9=81=93=E6=BB=A1=E6=84=8F=E5=BA=A6?=
=?UTF-8?q?=E8=B0=83=E6=9F=A5=E6=8E=A5=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../satisfactionProvince/formList.vue | 5 +
.../satisfactionProvince/index.vue | 93 ++++++++++---------
2 files changed, 56 insertions(+), 42 deletions(-)
diff --git a/src/views/modules/satisfaction/satisfactionProvince/formList.vue b/src/views/modules/satisfaction/satisfactionProvince/formList.vue
index a15dc566d..95c794b2e 100644
--- a/src/views/modules/satisfaction/satisfactionProvince/formList.vue
+++ b/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:''
}
},
//监听
diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue
index 0f8a7ea81..19bbd1f2b 100644
--- a/src/views/modules/satisfaction/satisfactionProvince/index.vue
+++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue
@@ -83,7 +83,7 @@
@@ -96,7 +96,7 @@
alt="Image"
/>
@@ -204,7 +204,7 @@
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";