diff --git a/src/views/dataBoard/sida/cpts/fwqd.vue b/src/views/dataBoard/sida/cpts/fwqd.vue index f814ec3e9..f7a2078c9 100644 --- a/src/views/dataBoard/sida/cpts/fwqd.vue +++ b/src/views/dataBoard/sida/cpts/fwqd.vue @@ -67,8 +67,10 @@ export default { this.getInfo(); }, async init() { - await this.getInfo(); - this.getPie(); + if (this.orgId) { + await this.getInfo(); + this.getPie(); + } }, handleClickItem(item) { // const { type, name } = item; diff --git a/src/views/dataBoard/sida/cpts/sqpj.vue b/src/views/dataBoard/sida/cpts/sqpj.vue index 21b1ea951..6bc0a9cb9 100644 --- a/src/views/dataBoard/sida/cpts/sqpj.vue +++ b/src/views/dataBoard/sida/cpts/sqpj.vue @@ -35,7 +35,7 @@ export default { type: String, default: '' }, - searchDate:Array + searchDate: Array }, data() { return { @@ -95,14 +95,17 @@ export default { this.init(); }, searchDate() { - this.init(); } }, methods: { async init() { - // this.getResiCategoryData(); + // if (this.orgId) { + // await this.getResiCategoryData(); + // this.getPie(); + // } }, + handleClickItem(item) { // const { type, name } = item; // this.$router.push({ @@ -115,7 +118,7 @@ export default { // } // }); }, - + async getResiCategoryData() { let url = ''; if (this.currentTab == '满意度') { diff --git a/src/views/dataBoard/sida/cpts/wtqd.vue b/src/views/dataBoard/sida/cpts/wtqd.vue index b81649896..9245ff987 100644 --- a/src/views/dataBoard/sida/cpts/wtqd.vue +++ b/src/views/dataBoard/sida/cpts/wtqd.vue @@ -28,7 +28,7 @@ export default { type: String, default: '' }, - searchDate:Array + searchDate: Array }, data() { return { @@ -59,7 +59,6 @@ export default { this.init(); }, searchDate() { - this.init(); } }, @@ -69,19 +68,19 @@ export default { this.getInfo(); }, async init() { - await this.getInfo(); - this.getPie(); + if (this.orgId) { + await this.getInfo(); + this.getPie(); + } }, handleClickItem(item) { - - let path="" - if(this.currentTab=="治理事件") - { - path="eventList" - }else if(this.currentTab=="安全隐患"){ - path="hiddenDangerList" - }else{ - path="specialCategoryList" + let path = ''; + if (this.currentTab == '治理事件') { + path = 'eventList'; + } else if (this.currentTab == '安全隐患') { + path = 'hiddenDangerList'; + } else { + path = 'specialCategoryList'; } this.getInfo(); this.$router.push({ @@ -111,7 +110,9 @@ export default { url, { queryParam: { - org_id: this.orgId + org_id: this.orgId, + start_date: this.searchDate[0], + end_date: this.searchDate[1] } }, { @@ -120,7 +121,6 @@ export default { ); this.$refs.pieChart.hideLoading(); if (code === 0) { - console.log("data",data) if (data && Array.isArray(data) && data.length > 0) { let info = data[0]; this.info = { diff --git a/src/views/dataBoard/sida/cpts/xqqd.vue b/src/views/dataBoard/sida/cpts/xqqd.vue index fe46e8d78..d4231522f 100644 --- a/src/views/dataBoard/sida/cpts/xqqd.vue +++ b/src/views/dataBoard/sida/cpts/xqqd.vue @@ -63,8 +63,10 @@ export default { this.getInfo(); }, async init() { - await this.getInfo(); - this.getPie(); + if (this.orgId) { + await this.getInfo(); + this.getPie(); + } }, handleClickItem(item) { this.getInfo(); diff --git a/src/views/dataBoard/sida/cpts/zyqd.vue b/src/views/dataBoard/sida/cpts/zyqd.vue index d16a162cf..91af9f188 100644 --- a/src/views/dataBoard/sida/cpts/zyqd.vue +++ b/src/views/dataBoard/sida/cpts/zyqd.vue @@ -27,7 +27,7 @@ export default { type: String, default: '' }, - searchDate:Array + searchDate: Array }, data() { return { @@ -58,7 +58,6 @@ export default { this.init(); }, searchDate() { - this.init(); } }, @@ -68,8 +67,10 @@ export default { this.getInfo(); }, async init() { - await this.getInfo(); - this.getPie(); + if (this.orgId) { + await this.getInfo(); + this.getPie(); + } }, handleClickItem(item) { // const { type, name } = item; @@ -85,6 +86,7 @@ export default { }, // 获取房屋总数等 async getInfo() { + console.log('this.orgId', this.orgId); let url = ''; if (this.currentTab == '人资源') { url = 'people_res_view'; @@ -123,7 +125,7 @@ export default { this.$message.error(msg); } }, - + pieInitOk() { this.pieInitState = true; }, diff --git a/src/views/dataBoard/sida/index.vue b/src/views/dataBoard/sida/index.vue index 140e93ab7..f2df59cf9 100644 --- a/src/views/dataBoard/sida/index.vue +++ b/src/views/dataBoard/sida/index.vue @@ -177,14 +177,14 @@ export default { // this.toBread(item); }, clickAgencyItem(item) { - // console.log(item); - // this.toBread({ - // orgId: item.id, - // orgLevel: item.level, - // meta: { - // title: item.name - // } - // }); + console.log(item); + this.toBread({ + orgId: item.id, + orgLevel: item.level, + meta: { + title: item.name + } + }); }, // toBread(item) { // const { orgId } = item;