From ed70fc853a65cf88039f7df630b7b55b1be18b3f Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 12 Sep 2023 13:48:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communitySelfInsp/followUpDetail.vue | 79 ++++++++-- .../communitySelfInsp/formList.vue | 144 +++++++++++------- .../satisfaction/communitySelfInsp/index.vue | 21 +-- 3 files changed, 169 insertions(+), 75 deletions(-) diff --git a/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue b/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue index 5c9e813a4..d2c36eb3f 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue @@ -1,28 +1,51 @@ diff --git a/src/views/modules/satisfaction/communitySelfInsp/formList.vue b/src/views/modules/satisfaction/communitySelfInsp/formList.vue index e705fc626..7f81d5109 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/formList.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/formList.vue @@ -17,42 +17,67 @@ + 查询 - 查看 - 回访记录 - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -86,23 +111,29 @@ export default { }; }, //创建前 - created() {}, + created() { }, async mounted() { - await this.getDicts() - await this.getTableData() if (this.satisfactionCategoryStr) { this.formData.satisfactionCategory = this.satisfactionCategoryStr this.formData.inspRecordId = this.inspRecordId - console.log(this.formData.satisfactionCategory); + this.formData.satisfactionLevel = this.seriesName } + await this.getDicts() + await this.getTableData() }, //方法 methods: { - xinzneg(){ - this.$emit('handelDetail',true) + handleDetail(row) { + this.$emit('handelDetail', row.id) + }, + handelFollowUpList() { + this.$emit('handelFollowUpList', true) }, - bianji(){ - this.$emit('handelFollowUpList',true) + satisfactionCategory(row, name) { + if (row[name]) { + let text = this.dicts.satisfaction_level.find(item => item.value === row[name]).label + return text + } }, async getDicts() { try { @@ -138,22 +169,23 @@ export default { this.pageNo = val; this.getTableData(); }, + handleSearch(){ + this.getTableData() + }, async getTableData() { - console.log(this.formData); - var params = { - ...this.formData, - pageNo: this.pageNo, - pageSize: this.pageSize, - }; - console.log(params); - let url = '/governance/satisfaction/communitySelfInsp/inspResult/list' - const { data, code, msg } = await requestGet(url, params) - if (code == 0) { - this.tableData = data.data; - this.total = data.total; - } else { - console.log(err); - } + let params = { + ...this.formData, + pageNo: this.pageNo, + pageSize: this.pageSize, + }; + let url = '/governance/satisfaction/communitySelfInsp/inspResult/list' + const { data, code, msg } = await requestGet(url, params) + if (code == 0) { + this.tableData = data.list; + this.total = data.total; + } else { + this.$message.error(msg) + } }, }, //子组件注册 @@ -165,7 +197,15 @@ export default { type: String, default: '' }, - period:{ + period: { + type: String, + default: '' + }, + inspRecordId: { + type: String, + default: '' + }, + seriesName: { type: String, default: '' } diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index bdec7deb8..9d473d5bf 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -57,10 +57,10 @@ :close-on-press-escape="false" title="社区自查" :modal-append-to-body="false" width="820px" top="5vh" class="dialog-h" @closed="showFormList = false"> + @handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period" :seriesName="seriesName" :inspRecordId="formData.inspRecordId"> - + @@ -210,7 +210,9 @@ export default { qrCodeImgUrl: '',//生成二维码图片链接 questionnaireUrl: '', synthesisScore: '', - personQty: '' + personQty: '', + + inspResultId:"" }; }, @@ -263,8 +265,9 @@ export default { } }, // ------------------------------------事件------------------------------------------ - handelDetail() { + handelDetail(id) { this.showFollowUpDetail = true; + this.inspResultId = id }, handelFollowUpList() { this.showFollowUpList = true; @@ -287,10 +290,7 @@ export default { this.myChart.setOption(this.option); let than = this; this.myChart.on("click", function (params) { - // console.log(params.name); // 柱子对应的类目名 - // console.log(params.data); // 柱子的数据 - // console.log(params.seriesName); // 对应的系列名称 - than.handelClickChart(params.name); + than.handelClickChart(params.name,params.seriesName); }); window.addEventListener("resize", this.handleWindowResize); }, @@ -299,15 +299,16 @@ export default { this.myChart.resize(); } }, - handelClickChart(name) { + handelClickChart(name,seriesName) { this.showFormList = true; this.satisfactionCategoryStr = this.dicts.satisfaction_category.filter( (item) => item.label == name )[0].value; - console.log(this.satisfactionCategoryStr); + this.seriesName = seriesName == '满意'?'veryGood':seriesName == '基本满意'?'good':'bad'; }, handleClose() { this.showFormList = false; + this.showFollowUpDetail = false }, // 搜索事件 handleSearch(val) {