数据统计分析,点击图标后可查看隐患信息bug修复

main
15036302109 4 months ago
parent 9313619cf6
commit 1e55445caa

@ -267,7 +267,7 @@ export default {
console.error(err); console.error(err);
}); });
}, },
// //
getChartData(targetTime) { getChartData(targetTime) {
this.leftCenterinit(targetTime); // this.leftCenterinit(targetTime); //
this.rightBominit(targetTime); // this.rightBominit(targetTime); //
@ -283,7 +283,8 @@ export default {
}, },
showHD(row) { showHD(row) {
console.log(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) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
@ -416,11 +417,12 @@ export default {
option && this.myChart2.setOption(option); option && this.myChart2.setOption(option);
// myChart.resize(); // myChart.resize();
this.myChart2.off('click');
this.myChart2.on('click', (params) => { this.myChart2.on('click', (params) => {
const a = res.data.find((e) => { const a = res.data.find((e) => {
return params.name == e.name; return params.name == e.name;
}) })
this.$refs.indexDangerRef.openDialog1(a.status); this.$refs.indexDangerRef.openDialog1(a.status, targetTime);
}); });
}, },
async hylyinit(targetTime) { async hylyinit(targetTime) {
@ -466,12 +468,12 @@ export default {
], ],
}; };
option && this.myChart3.setOption(option); option && this.myChart3.setOption(option);
// myChart.resize(); this.myChart3.off('click');
this.myChart3.on('click', (params) => { this.myChart3.on('click', (params) => {
const a = res.data.find((e)=>{ const a = res.data.find((e)=>{
return params.name == e.name; return params.name == e.name;
}) })
this.$refs.indexDangerRef.openDialog4(a.enterpriseType); this.$refs.indexDangerRef.openDialog4(a.enterpriseType, targetTime);
}); });
}, },
async jjClassInit(targetTime) { async jjClassInit(targetTime) {
@ -517,12 +519,12 @@ export default {
], ],
}; };
option && this.myChart4.setOption(option); option && this.myChart4.setOption(option);
// myChart.resize(); this.myChart4.off('click');
this.myChart4.on('click', (params) => { this.myChart4.on('click', (params) => {
const a = res.data.find((e) => { const a = res.data.find((e) => {
return params.name == e.name; return params.name == e.name;
}); });
this.$refs.indexDangerRef.openDialog3(a.economicType); this.$refs.indexDangerRef.openDialog3(a.economicType, targetTime);
}); });
}, },
async scaleInit(targetTime) { async scaleInit(targetTime) {
@ -568,14 +570,13 @@ export default {
], ],
}; };
option && this.myChart5.setOption(option); option && this.myChart5.setOption(option);
// window.onresize = function() { this.myChart5.off('click');
// this.myChart5.resize();
// };
this.myChart5.on('click', (params) => { this.myChart5.on('click', (params) => {
const a = res.data.find((e) => { const a = res.data.find((e) => {
return params.name == e.name; 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(); let targetTime = this.queryParams.targetTime || this.getDefaultTargetTime();
this.getChartData(targetTime); this.getChartData(targetTime);
}, },
watch: { /* watch: {
"$store.state.app.sidebar.opened"(value) { "$store.state.app.sidebar.opened"(value) {
console.log(value); console.log(value);
setTimeout(() => { setTimeout(() => {
@ -600,7 +601,7 @@ export default {
this.myChart5 && this.myChart5.resize(); this.myChart5 && this.myChart5.resize();
}, 100); }, 100);
}, },
}, }, */
computed: {}, computed: {},
}; };
</script> </script>

@ -175,6 +175,7 @@ export default {
address:null, address:null,
enterpriseScale:null, enterpriseScale:null,
economicType:null, economicType:null,
targetTime:null,
}, },
alertState: [{ alertState: [{
@ -382,26 +383,30 @@ export default {
} }
return ''; return '';
}, },
openDialog1(status) { openDialog1(status, targetTime) {
//this.queryParams.currMonth = 1; //this.queryParams.currMonth = 1;
this.queryParams.targetTime = targetTime;
this.queryParams.status = status; this.queryParams.status = status;
this.getList(); this.getList();
this.open = true; this.open = true;
}, },
openDialog2(enterpriseScale) { openDialog2(enterpriseScale, targetTime) {
//this.queryParams.currMonth = 1; //this.queryParams.currMonth = 1;
this.queryParams.targetTime = targetTime;
this.queryParams.enterpriseScale = enterpriseScale; this.queryParams.enterpriseScale = enterpriseScale;
this.getList(); this.getList();
this.open = true; this.open = true;
}, },
openDialog3(economicType) { openDialog3(economicType, targetTime) {
//this.queryParams.currMonth = 1; //this.queryParams.currMonth = 1;
this.queryParams.targetTime = targetTime;
this.queryParams.economicType = economicType; this.queryParams.economicType = economicType;
this.getList(); this.getList();
this.open = true; this.open = true;
}, },
openDialog4(enterpriseType) { openDialog4(enterpriseType, targetTime) {
//this.queryParams.currMonth = 1; //this.queryParams.currMonth = 1;
this.queryParams.targetTime = targetTime;
this.queryParams.enterpriseType = enterpriseType; this.queryParams.enterpriseType = enterpriseType;
this.getList(); this.getList();
this.open = true; this.open = true;

@ -53,6 +53,7 @@
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span> <span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="隐患数量" align="center" prop="hdCount" />
<el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" /> <el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" />
<el-table-column label="排查时间" align="center" prop="checkTime" width="180"> <el-table-column label="排查时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -221,6 +222,7 @@ export default {
rectifyMeasure: null, rectifyMeasure: null,
status: null, status: null,
rectifyTime: null, rectifyTime: null,
targetTime: null,
principalName: null, principalName: null,
rectifyImg: null, rectifyImg: null,
regulatoryDept: null, regulatoryDept: null,
@ -434,10 +436,11 @@ export default {
} }
return ''; return '';
}, },
openDialog(deptId) { openDialog(deptId, targetTime) {
console.log(deptId); console.log(deptId);
this.queryParams.targetTime = targetTime;
this.queryParams.areaId = deptId; this.queryParams.areaId = deptId;
this.queryParams.currMonth = 1; this.queryParams.currMonth = 0;
this.getList(); this.getList();
this.open = true; this.open = true;
}, },

Loading…
Cancel
Save