diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index ced74c97b..d8861edcb 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -230,9 +230,7 @@ export default { this.agencyId = this.user.agencyId; await this.getDicts(); await this.getTableData(); - this.$nextTick(() => { - this.initEcharts(); - }) + await this.initEcharts(); }, created() { let date = new Date() @@ -318,14 +316,19 @@ export default { // 获取列表 async getTableData() { + + try{ const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; const { formData } = this; - const { data, code, msg } = await requestGet(url, { ...formData }); - this.tableLoading = false; - if (code === 0) { + const { data, msg } = await requestGet(url, { ...formData }); this.total = data.total || 0; 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.synthesisScore = data.synthesisScore; 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`) }); } }); - } else { - this.$message.error(msg); + this.myChart.setOption(this.option); + }catch(error){ + console.log(error); } }, diff --git a/src/views/modules/satisfaction/satisfactionProvince/formList.vue b/src/views/modules/satisfaction/satisfactionProvince/formList.vue index 1e1e641f6..fdc5adb80 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/formList.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/formList.vue @@ -62,7 +62,7 @@ export default { periodStart: '', scopeId: '', }, - pageNo: 1, + pageNo: 0, pageSize: 20, total: 0, tableData: [], diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue index 952b377ab..bb1daa398 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/index.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue @@ -256,6 +256,8 @@ export default { `/governance/provinceEvaluationRecord/staticPeopleNum`, { ...this.formData } ); + this.option.series[0].data = [] + this.option.xAxis.data = [] this.tableData = data this.tableData.forEach(item => { if (allowedCategories.includes(item.scopeId)) { @@ -263,10 +265,10 @@ export default { this.option.xAxis.data.push(item.scopeName) } }); + this.myChart.setOption(this.option) } catch (error) { console.log(error); } - }, async handleExportModule() { let url = "/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate"; @@ -336,7 +338,7 @@ export default { const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append("file", file.file); //添加文件对象 await this.$http - .post("/governance/satisfaction/provinceEvaluationRecord/StaticPeopleNum/2023-09", formData) + .post(`/governance/provinceEvaluationRecord/importDataByExcel`, formData) .then((res) => { console.log("res-up", res); if (res.data.code == 0 && res.data.msg == "success") {