diff --git a/src/views/modules/goverhotline/followDetail.vue b/src/views/modules/goverhotline/followDetail.vue new file mode 100644 index 000000000..4b3b9f052 --- /dev/null +++ b/src/views/modules/goverhotline/followDetail.vue @@ -0,0 +1,142 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/modules/goverhotline/formList.vue b/src/views/modules/goverhotline/formList.vue new file mode 100644 index 000000000..c0b918339 --- /dev/null +++ b/src/views/modules/goverhotline/formList.vue @@ -0,0 +1,143 @@ + + + diff --git a/src/views/modules/goverhotline/index.vue b/src/views/modules/goverhotline/index.vue index 8ce81730a..fbc7f33ab 100644 --- a/src/views/modules/goverhotline/index.vue +++ b/src/views/modules/goverhotline/index.vue @@ -71,7 +71,7 @@

科室热线分布情况

-
+
@@ -102,7 +102,7 @@

(一)同地点同类型事件重复投诉

- + @@ -137,6 +137,38 @@ + + + + + + @@ -147,8 +179,13 @@ import { mapGetters } from "vuex"; import axios from "axios"; import * as echarts from "echarts"; +import formList from "./formList"; +import util from "@js/util.js"; +import followDetail from "./followDetail"; +import eventInfo from "../shequzhili/event/cpts/event-info"; + export default { - components: {}, + components: {formList, followDetail,eventInfo}, data() { return { @@ -182,7 +219,17 @@ export default { communityCountShow:false, departCountShow:false, subCategoryCountShow:false, - + + showFormList: false, + showFormDetail: false, + + recId: "", + departId:"", + + eventId: "", + eventDetailData: {}, + pageType: "info", + categoryChartOption: { @@ -205,7 +252,6 @@ export default { }, toolbox: {}, - xAxis: { type: 'category', boundaryGap: true, @@ -522,37 +568,40 @@ export default { this.categoryChart.setOption(this.categoryChartOption); let than = this; this.categoryChart.on("click", function (params) { - than.handelClickChart(params.name); + than.handelClickChart(params); }); this.categoryPie= echarts.init(document.getElementById("categoryPie")); this.categoryPie.setOption(this.categoryPieOption); this.categoryPie.on("click", function (params) { - than.handelClickChart(params.name); + than.handelClickChart(params); }); } if(this.communityCountShow){ this.communityChart= echarts.init(document.getElementById("communityChart")); this.communityChart.setOption(this.communityOption); + let than = this; this.communityChart.on("click", function (params) { - than.handelClickChart(params.name); + than.handelClickChart(params); }); } if(this.departCountShow){ this.departChart= echarts.init(document.getElementById("departChart")); this.departChart.setOption(this.departOption); + let than = this; this.departChart.on("click", function (params) { - than.handelClickChart(params.name); + than.handelClickDepartChart(params); }); } if(this.subCategoryCountShow){ this.hotlineChart= echarts.init(document.getElementById("hotlineChart")); this.hotlineChart.setOption(this.hotlineChartOption); + let than = this; this.hotlineChart.on("click", function (params) { - than.handelClickChart(params.name); + than.handelClickChart(params); }); } @@ -568,15 +617,54 @@ export default { this.categoryPie.resize(); } }, - handelClickChart(name) { + handelClickChart(params) { + this.showFormList = true; + this.departId =''; + this.recId = params.data.id; + }, + handelClickDepartChart(params) { this.showFormList = true; - this.satisfactionCategoryStr = this.dicts.satisfaction_category.filter( - (item) => item.label == name - )[0].value; + this.recId =''; + this.departId = params.data.id; }, handleClose() { this.showFormList = false; }, + + async handelClickDetail(row) { + this.eventId = row.icEventId; + const url = "/governance/icEvent/detail"; + const { data, code, msg } = await requestPost(url, { + icEventId: this.eventId, + }); + if (code != 0) { + this.$message.error(msg); + } else { + this.eventDetailData = { ...data }; + this.pageType = "info"; + this.showFormDetail = true; + } + }, + + handleClose() { + this.showFormDetail = false; + this.pageType = "list"; + this.eventId = ""; + this.getTableData(); + }, + handleOk() { + this.showFormDetail = false; + this.pageType = "list"; + this.eventId = ""; + this.pageNo = 1; + this.getTableData(); + }, + + handleEditSuccess() { + this.handleClose(); + this.getTableData(); + }, + // 搜索事件 async handleSearch(val) { console.log(this.formData); @@ -632,20 +720,28 @@ export default { } this.report = data; - console.log(this.report) this.tableLoading = true; //获取分类 Object.keys(this.report.categoryCount).forEach((key) => { - const value = this.report.categoryCount[key]; + const category = this.report.categoryCount[key]; + + // this.categoryChartOption.series[0].data.push(category.count); + this.categoryChartOption.xAxis.data.push(category.name); + + const recObject = { + id: category.id, + value: category.count + }; + this.categoryChartOption.series[0].data.push(recObject); + - this.categoryChartOption.series[0].data.push(value); - this.categoryChartOption.xAxis.data.push(key); const jsonObject = { - name: key, - value: value + id: category.id, + name: category.name, + value: category.count }; this.categoryPieOption.series[0].data.push(jsonObject); @@ -653,31 +749,46 @@ export default { // 获取社区 Object.keys(this.report.communityCount).forEach((key) => { - const value = this.report.communityCount[key]; + const community = this.report.communityCount[key]; - this.communityOption.xAxis[0].data.push(key); - this.communityOption.series[0].data.push(value/this.report.totalEvent*100); - this.communityOption.series[1].data.push(value); + this.communityOption.xAxis[0].data.push(community.name); + const recObject = { + id: community.id, + value: community.count/this.report.totalEvent*100 + }; + this.communityOption.series[0].data.push(recObject); + + + this.communityOption.series[1].data.push(community.count); }); // 获取科室 Object.keys(this.report.departCount).forEach((key) => { - const value = this.report.departCount[key]; + const depart = this.report.departCount[key]; - this.departOption.xAxis[0].data.push(key); - this.departOption.series[0].data.push(value/this.report.totalEvent*100); - this.departOption.series[1].data.push(value); + this.departOption.xAxis[0].data.push(depart.name); + const recObject = { + id: depart.id, + value: depart.count/this.report.totalEvent*100 + }; + this.departOption.series[0].data.push(recObject); - }); + + this.departOption.series[1].data.push(depart.count); + }); // 获取热点诉求及区域分析 Object.keys(this.report.subCategoryCount).forEach((key) => { - const value = this.report.subCategoryCount[key]; + const subcategory = this.report.subCategoryCount[key]; + this.hotlineChartOption.xAxis.data.push(subcategory.name); - this.hotlineChartOption.xAxis.data.push(key); - this.hotlineChartOption.series[0].data.push(value); + const recObject = { + id: subcategory.id, + value: subcategory.count + }; + this.hotlineChartOption.series[0].data.push(recObject); }); this.addressData = this.report.addressEvent @@ -698,12 +809,11 @@ export default { }) : []; - - if (this.report && this.report. categoryCount && Object.keys(this.report. categoryCount).length > 0) { + if (this.report && this.report.categoryCount && Object.keys(this.report.categoryCount).length > 0) { this.categoryCountShow = true; } - if (this.report && this.report. communityCount && Object.keys(this.report. communityCount).length > 0) { + if (this.report && this.report.communityCount && Object.keys(this.report.communityCount).length > 0) { this.communityCountShow = true; } @@ -715,6 +825,11 @@ export default { this.subCategoryCountShow = true; } }, + + clickAddressData(row, column){ + console.log("============clickAddressData============"); + console.log(row); + } }, props: {},