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:""}}
+
@@ -221,6 +222,7 @@ export default {
rectifyMeasure: null,
status: null,
rectifyTime: null,
+ targetTime: null,
principalName: null,
rectifyImg: null,
regulatoryDept: null,
@@ -434,10 +436,11 @@ export default {
}
return '';
},
- openDialog(deptId) {
+ openDialog(deptId, targetTime) {
console.log(deptId);
+ this.queryParams.targetTime = targetTime;
this.queryParams.areaId = deptId;
- this.queryParams.currMonth = 1;
+ this.queryParams.currMonth = 0;
this.getList();
this.open = true;
},