From ed0c916d2394c3249f585a89652c1ca5a78c72d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=8B=A5=E6=99=A8?= <974220104@qq.com> Date: Wed, 8 Nov 2023 09:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E5=B8=A6=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/renfang/resi/classNew.vue | 273 +++++++++++++----- .../visualizing/components/dangyuan.vue | 8 +- .../visualizing/components/dibaorenyuan.vue | 4 +- .../visualizing/components/laonianren.vue | 9 +- .../visualizing/components/shiyerenyuan.vue | 18 +- .../visualizing/components/zhiyuanzhe.vue | 8 +- 6 files changed, 219 insertions(+), 101 deletions(-) diff --git a/src/views/dataBoard/renfang/resi/classNew.vue b/src/views/dataBoard/renfang/resi/classNew.vue index eb9fbc076..b18cb00fc 100644 --- a/src/views/dataBoard/renfang/resi/classNew.vue +++ b/src/views/dataBoard/renfang/resi/classNew.vue @@ -14,8 +14,10 @@
@@ -44,6 +47,7 @@ @@ -58,6 +62,7 @@ @@ -71,12 +76,14 @@
@@ -99,12 +107,14 @@
@@ -127,13 +138,14 @@
@@ -157,6 +170,7 @@ @@ -180,6 +194,7 @@ @@ -266,7 +281,7 @@ export default { value: ["80", "89"], }, { - label: "90岁以上", + label: "90岁及以上", value: ["90", "139"], }, ], @@ -312,10 +327,32 @@ export default { value: ["80", "89"], }, { - label: "90岁以上", + label: "90岁及以上", value: ["90", "139"], }, ], + oldAllList1: [ + { + label: "49岁及以下", + value: ["0", "49"], + }, + { + label: "50-59岁", + value: ["50", "59"], + }, + { + label: "60-69岁", + value: ["60", "69"], + }, + { + label: "70-79岁", + value: ["70", "79"], + }, + { + label: "80岁及以上", + value: ["80", "139"], + }, + ], colList: [ { align: "left", @@ -413,7 +450,7 @@ export default { url: "/actual/base/peopleRoomOverview/postPageList", }, ], - oldVal: ["60", "69"], + oldValsss: ["60", "69"], jzVal: "", searchParams: {}, unemploymentArr: [], @@ -424,9 +461,9 @@ export default { lowIncomeTypeArr: [], }; }, - activated() { const query = this.$route.query; + this.query = this.$route.query; this.org_id = query.org_id; this.type = query.type; this.type_id = query.type_id; @@ -445,33 +482,98 @@ export default { this.tableTitle = type_name + "居民列表"; this.pageNo = 1; const type = this.type; + if (type == "old") { + if (query.olds) { + const olds = this.oldList.filter((item) => query.olds == item.label)[0]; + this.changeOld(olds.value); + setTimeout(() => { + this.oldValsss = olds.value; + }, 200); + this.searchParams = { + resideSituation: null, + }; + } + if (query.qingk) { + this.searchParams = { + resideSituation: query.qingk, + }; + this.oldValsss = undefined; + } + } if (type == "dibao") { - this.searchParams = { - lowIncomeType: null, // 低保类型 - lowIncomeReason: null, // 低保原因 - }; + if (query.lowIncomeType) { + this.searchParams = { + lowIncomeType: query.lowIncomeType, // 低保类型 + lowIncomeReason: null, // 低保原因 + }; + } + if (query.lowIncomeReason) { + this.searchParams = { + lowIncomeType: null, // 低保类型 + lowIncomeReason: query.lowIncomeReason, // 低保原因 + }; + } } if (type == "shiye") { - this.searchParams = { - employmentWish: null, // 就业愿望 - unemploymentReason: null, // 失业原因 - startAge: null, - endAge: null, - }; + if (query.olds) { + const olds = this.oldAllList1.filter((item) => query.olds == item.label)[0]; + this.changeOld(olds.value); + setTimeout(() => { + this.oldValsss = olds.value; + }, 200); + this.searchParams = { + employmentWish: null, // 就业愿望 + unemploymentReason: null, // 失业原因 + }; + } + if (query.employmentWish) { + this.searchParams = { + employmentWish: query.employmentWish, // 就业愿望 + unemploymentReason: null, // 失业原因 + startAge: null, + endAge: null, + }; + } + if (query.unemploymentReason) { + this.searchParams = { + employmentWish: null, // 就业愿望 + unemploymentReason: query.unemploymentReason, // 失业原因 + startAge: null, + endAge: null, + }; + } } if (type == "dangyuan") { - this.searchParams = { - cultureLevel: null, // 学历 - startAge: null, - endAge: null, - }; + if (query.olds) { + const olds = this.oldAllList1.filter( + (item) => query.olds == item.label + )[0]; + this.changeOld(olds.value); + setTimeout(() => { + this.oldValsss = olds.value; + }, 200); + } + if (query.cultureLevel) { + this.searchParams = { + cultureLevel: query.cultureLevel, // 志愿者类型 + }; + } } - if (type == "zhiyuan") { - this.searchParams = { - gategoryCode: null, // 志愿者类型 - startAge: null, - endAge: null, - }; + if (type == "zhiyuanzhe") { + if (query.olds) { + const olds = this.oldAllList1.filter( + (item) => query.olds == item.label + )[0]; + this.changeOld(olds.value); + setTimeout(() => { + this.oldValsss = olds.value; + }, 200); + } + if (query.gategoryCode) { + this.searchParams = { + gategoryCode: query.gategoryCode, // 志愿者类型 + }; + } } if ( type == "fuwu" || @@ -483,7 +585,9 @@ export default { serviceOrgName: null, // 服务方名称 }; } - this.getList(); + if (!query.olds) { + this.getList(); + } if (this.pageType != "normal") { this.colList = [ { @@ -544,25 +648,39 @@ export default { this.pageNo = 1; }, watch: { - // $route(to, from) { - // this.$router.go(0); + // oldValsss: { + // handler(newVal) { + // // this.pageNo = 1; + // // const searchParams = { + // // startAge: newVal[0], + // // endAge: newVal[1], + // // }; + // // this.getList(searchParams); + // }, // }, - oldVal: { - handler(newVal, oldVal) { - this.pageNo = 1; - const searchParams = { - startAge: newVal[0], - endAge: newVal[1], - }; - this.getList(searchParams); - }, - }, - searchParams(newVal, oldVal) { + searchParams(newVal) { + this.pageNo = 1; this.getList(); }, }, - methods: { + changeOld(e) { + if (!e) { + this.oldValsss = undefined; + const searchParams = { + startAge: null, + endAge: null, + }; + this.getList(searchParams); + return; + } + const searchParams = { + startAge: e[0], + endAge: e[1], + }; + this.oldValsss = e; + this.getList(searchParams); + }, handleClickBreadItem({ item }) { this.$router.push({ path: item.path, @@ -613,17 +731,33 @@ export default { this.getList(); }, async getList(item) { - const { url } = this.typeList.filter((item) => item.type == this.type)[0]; + const { url } = this.typeList.filter((d) => d.type == this.type)[0]; const sourceType = ["公共服务", "共性需求", "政策找人", "服务找人"]; this.loading = true; + let params = {}; + if (this.oldValsss && this.oldValsss != "" && this.oldValsss.length != 0) { + params = { + startAge: this.oldValsss[0], + endAge: this.oldValsss[1], + }; + } else { + params = { + startAge: null, + endAge: null, + }; + } let queryParam = { pageNo: this.pageNo, pageSize: this.pageSize, ...this.searchParams, - ...item, + ...params, }; for (let key in queryParam) { - if (queryParam[key] == "ALL") { + if ( + queryParam[key] == "ALL" || + queryParam[key] == "" || + queryParam[key] == null + ) { queryParam[key] = undefined; } } @@ -641,8 +775,8 @@ export default { item.name ? item.name : "--", item.gridName ? item.gridName : "--", item.fullName ? item.fullName : "--", - item.mobile ? $sensitive(item.mobile, 3, 7) : "--", - item.idNum ? $sensitive(item.idNum, 0, 14) : "--", + item.mobile ? this.$sensitive(item.mobile, 3, 7) : "--", + item.idNum ? this.$sensitive(item.idNum, 0, 14) : "--", item.gender ? gender[item.gender] : "--", item.birthday ? item.birthday : "--", { type: "operate", list: ["查看"] }, @@ -680,9 +814,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取居住情况字典"); - } + } catch (error) {} }, // async getPostNation() { // try { @@ -691,7 +823,6 @@ export default { // }); // this.PostDictonArr = data.data; // } catch (error) { - // console.log(error, "获取学历字典"); // } // }, async getUnemployment() { @@ -706,9 +837,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取失业原因字典"); - } + } catch (error) {} }, async getCareer() { try { @@ -722,9 +851,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取就业愿望字典"); - } + } catch (error) {} }, async getVolunteer() { try { @@ -738,9 +865,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取志愿者类别字典"); - } + } catch (error) {} }, async getLowIncomeReason() { try { @@ -754,9 +879,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取低保原因字典"); - } + } catch (error) {} }, async getLowIncomeType() { try { @@ -770,9 +893,7 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取低保类型字典"); - } + } catch (error) {} }, async getPostNation() { try { @@ -786,14 +907,10 @@ export default { }, ...data.data, ]; - } catch (error) { - console.log(error, "获取学历字典"); - } + } catch (error) {} }, }, - destroyed() { - console.log("我已经离开了!"); - }, + destroyed() {}, }; diff --git a/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue b/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue index 5a130baf5..8ed932df3 100644 --- a/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue +++ b/src/views/dataBoard/renfang/visualizing/components/dangyuan.vue @@ -157,7 +157,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.dyLeft && this.dyLeft.length > 0 ? [30, 130] : [0, 0], center: ["50%", "50%"], @@ -180,7 +179,7 @@ export default { ], }; this.myChart1.setOption(option); - this.myChart1.on("click", (a, b) => { + this.myChart1.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -189,6 +188,7 @@ export default { type_name: "党员", pageType: "normal", type: "dangyuan", + olds: e.data.name, }, }); }); @@ -273,7 +273,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.dyRight && this.dyRight.length > 0 ? [30, 130] : [0, 0], @@ -296,7 +295,7 @@ export default { }, ], }; - this.myChart2.on("click", (a, b) => { + this.myChart2.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -305,6 +304,7 @@ export default { type_name: "党员", pageType: "normal", type: "dangyuan", + cultureLevel: e.data.name, }, }); }); diff --git a/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue b/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue index d3fe20e6c..8e14787db 100644 --- a/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue +++ b/src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue @@ -226,7 +226,7 @@ export default { ], }; this.myChart1.setOption(option); - this.myChart1.on("click", (a, b) => { + this.myChart1.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -235,6 +235,7 @@ export default { type_name: "低保人员", pageType: "normal", type: "dibao", + lowIncomeType: e.node.name, }, }); }); @@ -363,6 +364,7 @@ export default { type_name: "低保人员", pageType: "normal", type: "dibao", + lowIncomeReason: e.node.name, }, }); }); diff --git a/src/views/dataBoard/renfang/visualizing/components/laonianren.vue b/src/views/dataBoard/renfang/visualizing/components/laonianren.vue index 400ffcca9..98902ac35 100644 --- a/src/views/dataBoard/renfang/visualizing/components/laonianren.vue +++ b/src/views/dataBoard/renfang/visualizing/components/laonianren.vue @@ -157,7 +157,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.lnrLeft && this.lnrLeft.length > 0 ? [30, 130] : [0, 0], @@ -181,7 +180,7 @@ export default { ], }; this.myChart1.setOption(option); - this.myChart1.on("click", (a, b) => { + this.myChart1.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -190,6 +189,7 @@ export default { type_name: "老年人", pageType: "normal", type: "old", + olds: e.data.name, }, }); }); @@ -276,7 +276,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.lnrRight && this.lnrRight.length > 0 ? [30, 130] : [0, 0], @@ -299,7 +298,8 @@ export default { }, ], }; - this.myChart2.on("click", (a, b) => { + this.myChart2.on("click", (e) => { + console.log('a, b::', e); this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -308,6 +308,7 @@ export default { type_name: "老年人", pageType: "normal", type: "old", + qingk: e.data.name, }, }); }); diff --git a/src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue b/src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue index 94d72f9ae..d6633a692 100644 --- a/src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue +++ b/src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue @@ -222,7 +222,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.syryData1 && this.syryData1.length > 0 ? [30, 130] : [0, 0], @@ -246,7 +245,7 @@ export default { ], }; this.myChart1.setOption(option); - this.myChart1.on("click", (a, b) => { + this.myChart1.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -255,6 +254,7 @@ export default { type_name: "失业人员", pageType: "normal", type: "shiye", + unemploymentReason: e.name, }, }); }); @@ -352,7 +352,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.syryData2 && this.syryData2.length > 0 ? [30, 130] : [0, 0], @@ -376,7 +375,7 @@ export default { ], }; this.myChart2.setOption(option); - this.myChart2.on("click", (a, b) => { + this.myChart2.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -385,6 +384,7 @@ export default { type_name: "失业人员", pageType: "normal", type: "shiye", + employmentWish: e.name, }, }); }); @@ -484,7 +484,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.syryData3 && this.syryData3.length > 0 ? [30, 130] : [0, 0], @@ -508,7 +507,7 @@ export default { ], }; this.myChart3.setOption(option); - this.myChart3.on("click", (a, b) => { + this.myChart3.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -517,6 +516,7 @@ export default { type_name: "失业人员", pageType: "normal", type: "shiye", + olds: e.name, }, }); }); @@ -615,7 +615,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.syryData4 && this.syryData4.length > 0 ? [30, 130] : [0, 0], @@ -639,7 +638,7 @@ export default { ], }; this.myChart4.setOption(option); - this.myChart4.on("click", (a, b) => { + this.myChart4.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -746,7 +745,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.syryData5 && this.syryData5.length > 0 ? [30, 130] : [0, 0], @@ -770,7 +768,7 @@ export default { ], }; this.myChart5.setOption(option); - this.myChart5.on("click", (a, b) => { + this.myChart5.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { diff --git a/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue b/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue index 72ed67feb..57b8de1fb 100644 --- a/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue +++ b/src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue @@ -157,7 +157,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.zyzLeft && this.zyzLeft.length > 0 ? [30, 130] : [0, 0], @@ -181,7 +180,7 @@ export default { ], }; this.myChart1.setOption(option); - this.myChart1.on("click", (a, b) => { + this.myChart1.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -190,6 +189,7 @@ export default { type_name: "志愿者", pageType: "normal", type: "zhiyuanzhe", + olds: e.data.name, }, }); }); @@ -276,7 +276,6 @@ export default { }, series: [ { - name: "Nightingale Chart", type: "pie", radius: this.zyzRight && this.zyzRight.length > 0 ? [30, 130] : [0, 0], @@ -299,7 +298,7 @@ export default { }, ], }; - this.myChart2.on("click", (a, b) => { + this.myChart2.on("click", (e) => { this.$router.push({ path: "/dataBoard/renfang/resi-class-new", query: { @@ -308,6 +307,7 @@ export default { type_name: "志愿者", pageType: "normal", type: "zhiyuanzhe", + gategoryCode: e.data.name, }, }); });