提交 aebf5291 编写于 作者: Q qin_jun_yan

Modify the operation to change the page size, after clicking the unhide...

Modify the operation to change the page size, after clicking the unhide button, the width and height of the echart diagram are not set correctly
上级 27d7d974
...@@ -811,6 +811,9 @@ export default { ...@@ -811,6 +811,9 @@ export default {
unhideRecords() { unhideRecords() {
this.showEchartPic = true; this.showEchartPic = true;
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
if (this.parallelEchart) {
this.parallelEchart.clear();
}
this.$store.commit('setHidenDirChecked', []); this.$store.commit('setHidenDirChecked', []);
if (this.hidenDirChecked.length) { if (this.hidenDirChecked.length) {
this.checkedSummary = []; this.checkedSummary = [];
...@@ -1421,8 +1424,11 @@ export default { ...@@ -1421,8 +1424,11 @@ export default {
this.echart.showData = this.echart.brushData; this.echart.showData = this.echart.brushData;
this.showEchartPic = true; this.showEchartPic = true;
} }
this.resizeChart();
this.setEchartValue(); this.setEchartValue();
this.initChart(); this.$nextTick(() => {
this.initChart();
});
// Total number of pages in the table // Total number of pages in the table
this.pagination.total = res.data.count; this.pagination.total = res.data.count;
// Data encapsulation of the table // Data encapsulation of the table
...@@ -1469,7 +1475,13 @@ export default { ...@@ -1469,7 +1475,13 @@ export default {
* The window size changes. Resizing Chart * The window size changes. Resizing Chart
*/ */
resizeChart() { resizeChart() {
this.parallelEchart.resize(); if (
document.getElementById('data-echart') &&
document.getElementById('data-echart').style.display !== 'none' &&
this.parallelEchart
) {
this.parallelEchart.resize();
}
}, },
/** /**
......
...@@ -1386,7 +1386,10 @@ export default { ...@@ -1386,7 +1386,10 @@ export default {
this.echart.allData = list; this.echart.allData = list;
this.echart.brushData = list; this.echart.brushData = list;
this.echart.showData = this.echart.brushData; this.echart.showData = this.echart.brushData;
this.initChart(); this.$nextTick(() => {
this.resizeChart();
this.initChart();
});
const showList = list.slice( const showList = list.slice(
(this.pagination.currentPage - 1) * this.pagination.pageSize, (this.pagination.currentPage - 1) * this.pagination.pageSize,
this.pagination.currentPage * this.pagination.pageSize, this.pagination.currentPage * this.pagination.pageSize,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册