mk 2 years ago
parent
commit
e35e43b2b8
  1. 22
      src/views/modules/satisfaction/communitySelfInsp/index.vue
  2. 2
      src/views/modules/satisfaction/satisfactionProvince/formList.vue
  3. 6
      src/views/modules/satisfaction/satisfactionProvince/index.vue

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

@ -230,9 +230,7 @@ export default {
this.agencyId = this.user.agencyId; this.agencyId = this.user.agencyId;
await this.getDicts(); await this.getDicts();
await this.getTableData(); await this.getTableData();
this.$nextTick(() => { await this.initEcharts();
this.initEcharts();
})
}, },
created() { created() {
let date = new Date() let date = new Date()
@ -318,14 +316,19 @@ export default {
// //
async getTableData() { async getTableData() {
try{
const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis";
const { formData } = this; const { formData } = this;
const { data, code, msg } = await requestGet(url, { ...formData }); const { data, msg } = await requestGet(url, { ...formData });
this.tableLoading = false;
if (code === 0) {
this.total = data.total || 0; this.total = data.total || 0;
this.score = [] this.score = []
this.tableData = data.categoryDatas; 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.formData.inspRecordId = data.inspRecordId; this.formData.inspRecordId = data.inspRecordId;
this.synthesisScore = data.synthesisScore; this.synthesisScore = data.synthesisScore;
this.personQty = data.personQty this.personQty = data.personQty
@ -340,8 +343,9 @@ export default {
this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) });
} }
}); });
} else { this.myChart.setOption(this.option);
this.$message.error(msg); }catch(error){
console.log(error);
} }
}, },

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

@ -62,7 +62,7 @@ export default {
periodStart: '', periodStart: '',
scopeId: '', scopeId: '',
}, },
pageNo: 1, pageNo: 0,
pageSize: 20, pageSize: 20,
total: 0, total: 0,
tableData: [], tableData: [],

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

@ -256,6 +256,8 @@ export default {
`/governance/provinceEvaluationRecord/staticPeopleNum`, `/governance/provinceEvaluationRecord/staticPeopleNum`,
{ ...this.formData } { ...this.formData }
); );
this.option.series[0].data = []
this.option.xAxis.data = []
this.tableData = data this.tableData = data
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (allowedCategories.includes(item.scopeId)) { if (allowedCategories.includes(item.scopeId)) {
@ -263,10 +265,10 @@ export default {
this.option.xAxis.data.push(item.scopeName) this.option.xAxis.data.push(item.scopeName)
} }
}); });
this.myChart.setOption(this.option)
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
}, },
async handleExportModule() { async handleExportModule() {
let url = "/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate"; let url = "/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate";
@ -336,7 +338,7 @@ export default {
const formData = new FormData(); //FormDataappend('key', value) const formData = new FormData(); //FormDataappend('key', value)
formData.append("file", file.file); // formData.append("file", file.file); //
await this.$http await this.$http
.post("/governance/satisfaction/provinceEvaluationRecord/StaticPeopleNum/2023-09", formData) .post(`/governance/provinceEvaluationRecord/importDataByExcel`, formData)
.then((res) => { .then((res) => {
console.log("res-up", res); console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") { if (res.data.code == 0 && res.data.msg == "success") {

Loading…
Cancel
Save