diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index a3db2e175..88f1dac24 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/src/views/dataBoard/renfang/index.vue @@ -104,7 +104,7 @@ -
+
+   + + +
+ +   + + +
+ +   + + +
+ +   + + +
+ +   + + + +
+
+ + +
{ + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } } if (type == "dibao") { if (query.lowIncomeType) { @@ -531,6 +666,18 @@ export default { }; }, 200); } + if (query.serv_type) { + setTimeout(() => { + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } } if (type == "shiye") { if (query.olds) { @@ -585,6 +732,18 @@ export default { this.oldValsss = null; }, 200); } + if (query.serv_type) { + setTimeout(() => { + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } } if (type == "dangyuan") { if (query.olds) { @@ -607,6 +766,32 @@ export default { this.oldValsss = null; }, 200); } + if (query.serv_type) { + setTimeout(() => { + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } + } + if (type == "special") { + if (query.serv_type) { + setTimeout(() => { + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } } if (type == "zhiyuanzhe") { if (query.olds) { @@ -632,6 +817,18 @@ export default { }; }, 200); } + if (query.serv_type) { + setTimeout(() => { + const olds = this.serviceList.filter( + (item) => query.serv_type == item.label + )[0]; + + this.oldValsss = null; + this.searchParams = { + serviceType: olds.value, + }; + }, 200); + } } if ( type == "fuwu" || diff --git a/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue b/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue index 8ed932df3..d82174a95 100644 --- a/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue +++ b/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue @@ -1,18 +1,24 @@ @@ -48,6 +54,7 @@ export default { return { dyLeft: [], dyRight: [], + resiService: [], }; }, created() { @@ -77,6 +84,17 @@ export default { this.initRightCharts(); }) .catch(() => {}); + + this.$http + .get("/actual/base/peopleRoomOverview/findPeoplePie/PARTY_FLAG") + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.resiService = dataFormatter(res.data); + this.initResiServiceCharts(); + }) + .catch(() => {}); }, initLeftCharts() { let div = document.getElementById("dyLeftChart"); @@ -311,6 +329,124 @@ export default { this.myChart2.setOption(option); window.addEventListener("resize", () => this.myChart2.resize()); }, + + initResiServiceCharts() { + let div = document.getElementById("resiServiceChart"); + this.myChart3 = echarts.init(div); + const option = { + color: [ + "#15a7ed", + "#22b998", + "#5f6ff4", + "#a66eeb", + "#faa834", + "#fd6200", + "#fb3905", + ], + legend: { + orient: "vertical", + top: 20, + left: 10, + icon: "rect", + itemHeight: 14, + itemWidth: 14, + textStyle: { + color: "#ffffff", + rich: { + name: { + width: 90, + fontSize: 12, + color: "#dddee7", + }, + value: { + width: 30, + align: "right", + fontSize: 18, + }, + }, + }, + data: this.resiService, + formatter: (name) => { + if (this.resiService.length) { + const item = this.resiService.filter((item) => item.name === name)[0]; + return `{name|${name}}{value| ${item.value}}`; + } + }, + }, + toolbox: { + show: false, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + restore: { show: true }, + saveAsImage: { show: true }, + }, + }, + title: { + show: !this.resiService || this.resiService.length == 0, // 是否要展示“暂无数据”矢量图 + text: " {a|}", // 写入占位符a,以便后续填充内容 + x: "center", + y: "center", + subtext: "暂无数据", // 子标题 + itemGap: -10, // 设置主副标题间隔 + textStyle: { + rich: { + a: { + height: 128, // 设置图片高度 + width: 268, // 设置图片宽度 + backgroundColor: { + // 引入图片,作为背景图,填写相对路径 + image: require("@/assets/images/overview/zanwu.png"), + }, + }, + }, + }, + subtextStyle: { + // 配置副标题的文字样式 + fontSize: 12, + color: "#ffffff", + }, + }, + series: [ + { + type: "pie", + radius: + this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0], + center: ["50%", "50%"], + roseType: "area", + itemStyle: { + borderRadius: 0, + }, + top: 20, + left: -40, + label: { + position: "inside", + formatter: "{d}%", + textStyle: { + color: "#ffffff", + fontSize: 12, + }, + }, + data: this.resiService, + }, + ], + }; + this.myChart3.setOption(option); + this.myChart3.on("click", (e) => { + this.$router.push({ + path: "/dataBoard/renfang/resi-class-new", + query: { + org_id: this.org_id, + type_id: "aged", + type_name: "党员", + pageType: "normal", + type: "dangyuan", + serv_type: e.data.name, + }, + }); + }); + window.addEventListener("resize", () => this.myChart3.resize()); + }, }, }; diff --git a/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue b/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue index 8e14787db..963f90ede 100644 --- a/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue +++ b/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue @@ -1,18 +1,24 @@ @@ -71,6 +77,7 @@ export default { syryData3: [], syryData4: [], syryData5: [], + resiService: [], }; }, created() { @@ -129,6 +136,17 @@ export default { this.syryDataCharts5(); }) .catch(() => {}); + + this.$http + .get("/actual/base/peopleRoomOverview/findPeoplePie/UNEMPLOYED_FLAG") + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.resiService = dataFormatter(res.data); + this.initResiServiceCharts(); + }) + .catch(() => {}); }, syryDataCharts1() { let div = document.getElementById("syryChart1"); @@ -782,6 +800,123 @@ export default { }); window.addEventListener("resize", () => this.myChart5.resize()); }, + initResiServiceCharts() { + let div = document.getElementById("resiServiceChart"); + this.resiChart = echarts.init(div); + const option = { + color: [ + "#15a7ed", + "#22b998", + "#5f6ff4", + "#a66eeb", + "#faa834", + "#fd6200", + "#fb3905", + ], + legend: { + orient: "vertical", + top: 20, + left: 10, + icon: "rect", + itemHeight: 14, + itemWidth: 14, + textStyle: { + color: "#ffffff", + rich: { + name: { + width: 90, + fontSize: 12, + color: "#dddee7", + }, + value: { + width: 30, + align: "right", + fontSize: 18, + }, + }, + }, + data: this.resiService, + formatter: (name) => { + if (this.resiService.length) { + const item = this.resiService.filter((item) => item.name === name)[0]; + return `{name|${name}}{value| ${item.value}}`; + } + }, + }, + toolbox: { + show: false, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + restore: { show: true }, + saveAsImage: { show: true }, + }, + }, + title: { + show: !this.resiService || this.resiService.length == 0, // 是否要展示“暂无数据”矢量图 + text: " {a|}", // 写入占位符a,以便后续填充内容 + x: "center", + y: "center", + subtext: "暂无数据", // 子标题 + itemGap: -10, // 设置主副标题间隔 + textStyle: { + rich: { + a: { + height: 128, // 设置图片高度 + width: 268, // 设置图片宽度 + backgroundColor: { + // 引入图片,作为背景图,填写相对路径 + image: require("@/assets/images/overview/zanwu.png"), + }, + }, + }, + }, + subtextStyle: { + // 配置副标题的文字样式 + fontSize: 12, + color: "#ffffff", + }, + }, + series: [ + { + type: "pie", + radius: + this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0], + center: ["50%", "50%"], + roseType: "area", + itemStyle: { + borderRadius: 0, + }, + top: 20, + left: -40, + label: { + position: "inside", + formatter: "{d}%", + textStyle: { + color: "#ffffff", + fontSize: 12, + }, + }, + data: this.resiService, + }, + ], + }; + this.resiChart.setOption(option); + this.resiChart.on("click", (e) => { + this.$router.push({ + path: "/dataBoard/renfang/resi-class-new", + query: { + org_id: this.org_id, + type_id: "aged", + type_name: "失业人员", + pageType: "normal", + type: "shiye", + serv_type: e.data.name, + }, + }); + }); + window.addEventListener("resize", () => this.resiChart.resize()); + }, }, }; diff --git a/src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue b/src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue new file mode 100644 index 000000000..9e4a5c0b4 --- /dev/null +++ b/src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue @@ -0,0 +1,195 @@ + + + + + + diff --git a/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue b/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue index 57b8de1fb..80a724467 100644 --- a/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue +++ b/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue @@ -1,18 +1,24 @@ @@ -48,6 +54,7 @@ export default { return { zyzLeft: [], zyzRight: [], + resiService: [], }; }, created() { @@ -77,6 +84,17 @@ export default { this.initRightCharts(); }) .catch(() => {}); + + this.$http + .get("/actual/base/peopleRoomOverview/findPeoplePie/VOLUNTEER_FLAG") + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.resiService = dataFormatter(res.data); + this.initResiServiceCharts(); + }) + .catch(() => {}); }, initLeftCharts() { let div = document.getElementById("zyzLeftChart"); @@ -314,6 +332,124 @@ export default { this.myChart2.setOption(option); window.addEventListener("resize", () => this.myChart2.resize()); }, + + initResiServiceCharts() { + let div = document.getElementById("resiServiceChart"); + this.resiChart = echarts.init(div); + const option = { + color: [ + "#15a7ed", + "#22b998", + "#5f6ff4", + "#a66eeb", + "#faa834", + "#fd6200", + "#fb3905", + ], + legend: { + orient: "vertical", + top: 20, + left: 10, + icon: "rect", + itemHeight: 14, + itemWidth: 14, + textStyle: { + color: "#ffffff", + rich: { + name: { + width: 90, + fontSize: 12, + color: "#dddee7", + }, + value: { + width: 30, + align: "right", + fontSize: 18, + }, + }, + }, + data: this.resiService, + formatter: (name) => { + if (this.resiService.length) { + const item = this.resiService.filter((item) => item.name === name)[0]; + return `{name|${name}}{value| ${item.value}}`; + } + }, + }, + toolbox: { + show: false, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + restore: { show: true }, + saveAsImage: { show: true }, + }, + }, + title: { + show: !this.resiService || this.resiService.length == 0, // 是否要展示“暂无数据”矢量图 + text: " {a|}", // 写入占位符a,以便后续填充内容 + x: "center", + y: "center", + subtext: "暂无数据", // 子标题 + itemGap: -10, // 设置主副标题间隔 + textStyle: { + rich: { + a: { + height: 128, // 设置图片高度 + width: 268, // 设置图片宽度 + backgroundColor: { + // 引入图片,作为背景图,填写相对路径 + image: require("@/assets/images/overview/zanwu.png"), + }, + }, + }, + }, + subtextStyle: { + // 配置副标题的文字样式 + fontSize: 12, + color: "#ffffff", + }, + }, + series: [ + { + type: "pie", + radius: + this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0], + center: ["50%", "50%"], + roseType: "area", + itemStyle: { + borderRadius: 0, + }, + top: 20, + left: -40, + label: { + position: "inside", + formatter: "{d}%", + textStyle: { + color: "#ffffff", + fontSize: 12, + }, + }, + data: this.resiService, + }, + ], + }; + this.resiChart.setOption(option); + this.resiChart.on("click", (e) => { + this.$router.push({ + path: "/dataBoard/renfang/resi-class-new", + query: { + org_id: this.org_id, + type_id: "aged", + type_name: "志愿者", + pageType: "normal", + type: "zhiyuanzhe", + serv_type: e.data.name, + }, + }); + }); + window.addEventListener("resize", () => this.resiChart.resize()); + }, }, }; diff --git a/src/views/dataBoard/renfang/visualizing/index.vue b/src/views/dataBoard/renfang/visualizing/index.vue index c38753359..73e07e966 100644 --- a/src/views/dataBoard/renfang/visualizing/index.vue +++ b/src/views/dataBoard/renfang/visualizing/index.vue @@ -10,6 +10,7 @@ +
@@ -20,6 +21,7 @@ import dibaorenyuan from "./components/dibaorenyuan.vue"; import zhiyuanzhe from "./components/zhiyuanzhe.vue"; import dangyuan from "./components/dangyuan.vue"; import shiyerenyuan from "./components/shiyerenyuan.vue"; +import teshurenqun from "./components/teshurenqun.vue"; export default { name: "visualizing", props: { @@ -35,6 +37,7 @@ export default { zhiyuanzhe, dangyuan, shiyerenyuan, + teshurenqun, }, data() { return {