|
@@ -329,8 +329,14 @@ export default {
|
|
},
|
|
},
|
|
tableData: [],
|
|
tableData: [],
|
|
rankData: [],
|
|
rankData: [],
|
|
|
|
+ myChart: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ const currentYear = new Date().getFullYear().toString()
|
|
|
|
+ this.formInline.start_time = new Date(`${currentYear}-01-01 00:00:00`)
|
|
|
|
+ this.formInline.end_time = new Date()
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
boxWrapperHeight() {
|
|
boxWrapperHeight() {
|
|
return this.$route.path === '/embedIndex-home' ? '815px' : '885px'
|
|
return this.$route.path === '/embedIndex-home' ? '815px' : '885px'
|
|
@@ -339,6 +345,11 @@ export default {
|
|
return this.$route.path === '/embedIndex-home' ? this.menus2 : this.menus
|
|
return this.$route.path === '/embedIndex-home' ? this.menus2 : this.menus
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ activated() {
|
|
|
|
+ if (this.myChart) {
|
|
|
|
+ this.myChart.resize();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 菜单筛选
|
|
// 菜单筛选
|
|
filterNode(value, data) {
|
|
filterNode(value, data) {
|
|
@@ -394,7 +405,6 @@ export default {
|
|
end_time: end_time ? dateFormat(end_time, 'YYYYMMDD') : ''
|
|
end_time: end_time ? dateFormat(end_time, 'YYYYMMDD') : ''
|
|
};
|
|
};
|
|
this.$axios2.post('/dep_statistics', params).then(res => {
|
|
this.$axios2.post('/dep_statistics', params).then(res => {
|
|
- console.log(res.data.data);
|
|
|
|
if (Array.isArray(res.data.data)) {
|
|
if (Array.isArray(res.data.data)) {
|
|
this.rankData = res.data.data;
|
|
this.rankData = res.data.data;
|
|
} else {
|
|
} else {
|
|
@@ -419,6 +429,7 @@ export default {
|
|
echarts.init(document.getElementById('myChart1')).dispose();
|
|
echarts.init(document.getElementById('myChart1')).dispose();
|
|
// 构建新实例
|
|
// 构建新实例
|
|
let myChart = echarts.init(document.getElementById('myChart1'));
|
|
let myChart = echarts.init(document.getElementById('myChart1'));
|
|
|
|
+ this.myChart = myChart
|
|
window.addEventListener('resize', function () {
|
|
window.addEventListener('resize', function () {
|
|
myChart.resize();
|
|
myChart.resize();
|
|
});
|
|
});
|
|
@@ -497,7 +508,7 @@ export default {
|
|
},
|
|
},
|
|
// 跳转列表页
|
|
// 跳转列表页
|
|
toPage(row, status) {
|
|
toPage(row, status) {
|
|
- const { time } = this.formInline;
|
|
+ const { start_time, end_time } = this.formInline;
|
|
let path
|
|
let path
|
|
if (this.$route.path === '/embedIndex-home') {
|
|
if (this.$route.path === '/embedIndex-home') {
|
|
path = 'embedIndex-caseIndexAnalysisList'
|
|
path = 'embedIndex-caseIndexAnalysisList'
|
|
@@ -505,7 +516,7 @@ export default {
|
|
path = '/caseIndexAnalysisList'
|
|
path = '/caseIndexAnalysisList'
|
|
}
|
|
}
|
|
|
|
|
|
- this.$router.push({ path, query: { ruleId: this.ruleId, ruleName: this.ruleName, start: time[0], end: time[1], dep_name: row.dep_name, status } });
|
|
+ this.$router.push({ path, query: { ruleId: this.ruleId, ruleName: this.ruleName, start: start_time ? dateFormat(start_time, 'YYYYMMDD') : '', end: end_time ? dateFormat(end_time, 'YYYYMMDD') : '', dep_name: row.dep_name, status } });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|