From 1e55445caacfb1aeae8bd6ab768d4973f91a711e Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Fri, 19 Jul 2024 14:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=88=86?= =?UTF-8?q?=E6=9E=90=EF=BC=8C=E7=82=B9=E5=87=BB=E5=9B=BE=E6=A0=87=E5=90=8E?= =?UTF-8?q?=E5=8F=AF=E6=9F=A5=E7=9C=8B=E9=9A=90=E6=82=A3=E4=BF=A1=E6=81=AF?= =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/ehs/ehsExamples/index.vue | 27 ++++++++++--------- .../src/views/ehs/ehsExamples/indexDanger.vue | 13 ++++++--- .../src/views/ehs/ehsExamples/indexHD.vue | 7 +++-- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue index 3a3cd56..13edf91 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue @@ -267,7 +267,7 @@ export default { console.error(err); }); }, - // 获取图标数据 + // 获取图表数据 getChartData(targetTime) { this.leftCenterinit(targetTime); //隐患数据 this.rightBominit(targetTime); //隐患整改进度 @@ -283,7 +283,8 @@ export default { }, showHD(row) { console.log(row); - this.$refs.indexHDRef.openDialog(row.deptId); + let targetTime = this.queryParams.targetTime || this.getDefaultTargetTime(); + this.$refs.indexHDRef.openDialog(row.deptId, targetTime); }, handleClick(tab, event) { console.log(tab, event); @@ -416,11 +417,12 @@ export default { option && this.myChart2.setOption(option); // myChart.resize(); + this.myChart2.off('click'); this.myChart2.on('click', (params) => { const a = res.data.find((e) => { return params.name == e.name; }) - this.$refs.indexDangerRef.openDialog1(a.status); + this.$refs.indexDangerRef.openDialog1(a.status, targetTime); }); }, async hylyinit(targetTime) { @@ -466,12 +468,12 @@ export default { ], }; option && this.myChart3.setOption(option); - // myChart.resize(); + this.myChart3.off('click'); this.myChart3.on('click', (params) => { const a = res.data.find((e)=>{ return params.name == e.name; }) - this.$refs.indexDangerRef.openDialog4(a.enterpriseType); + this.$refs.indexDangerRef.openDialog4(a.enterpriseType, targetTime); }); }, async jjClassInit(targetTime) { @@ -517,12 +519,12 @@ export default { ], }; option && this.myChart4.setOption(option); - // myChart.resize(); + this.myChart4.off('click'); this.myChart4.on('click', (params) => { const a = res.data.find((e) => { return params.name == e.name; }); - this.$refs.indexDangerRef.openDialog3(a.economicType); + this.$refs.indexDangerRef.openDialog3(a.economicType, targetTime); }); }, async scaleInit(targetTime) { @@ -568,14 +570,13 @@ export default { ], }; option && this.myChart5.setOption(option); - // window.onresize = function() { - // this.myChart5.resize(); - // }; + this.myChart5.off('click'); this.myChart5.on('click', (params) => { const a = res.data.find((e) => { + return params.name == e.name; }); - this.$refs.indexDangerRef.openDialog2(a.enterpriseScale); + this.$refs.indexDangerRef.openDialog2(a.enterpriseScale, targetTime); }); }, @@ -588,7 +589,7 @@ export default { let targetTime = this.queryParams.targetTime || this.getDefaultTargetTime(); this.getChartData(targetTime); }, - watch: { + /* watch: { "$store.state.app.sidebar.opened"(value) { console.log(value); setTimeout(() => { @@ -600,7 +601,7 @@ export default { this.myChart5 && this.myChart5.resize(); }, 100); }, - }, + }, */ computed: {}, }; diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/indexDanger.vue b/ruoyi-ui/src/views/ehs/ehsExamples/indexDanger.vue index df6b3c3..ebfbaf0 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/indexDanger.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/indexDanger.vue @@ -175,6 +175,7 @@ export default { address:null, enterpriseScale:null, economicType:null, + targetTime:null, }, alertState: [{ @@ -382,26 +383,30 @@ export default { } return ''; }, - openDialog1(status) { + openDialog1(status, targetTime) { //this.queryParams.currMonth = 1; + this.queryParams.targetTime = targetTime; this.queryParams.status = status; this.getList(); this.open = true; }, - openDialog2(enterpriseScale) { + openDialog2(enterpriseScale, targetTime) { //this.queryParams.currMonth = 1; + this.queryParams.targetTime = targetTime; this.queryParams.enterpriseScale = enterpriseScale; this.getList(); this.open = true; }, - openDialog3(economicType) { + openDialog3(economicType, targetTime) { //this.queryParams.currMonth = 1; + this.queryParams.targetTime = targetTime; this.queryParams.economicType = economicType; this.getList(); this.open = true; }, - openDialog4(enterpriseType) { + openDialog4(enterpriseType, targetTime) { //this.queryParams.currMonth = 1; + this.queryParams.targetTime = targetTime; this.queryParams.enterpriseType = enterpriseType; this.getList(); this.open = true; diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue b/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue index d179544..98df848 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/indexHD.vue @@ -53,6 +53,7 @@ {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}} +