提交 46b05b82 编写于 作者: M mindspore-ci-bot 提交者: Gitee

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

!237 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。
Merge pull request !237 from 秦君艳/master
...@@ -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.$nextTick(() => {
this.initChart(); 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() {
if (
document.getElementById('data-echart') &&
document.getElementById('data-echart').style.display !== 'none' &&
this.parallelEchart
) {
this.parallelEchart.resize(); 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.$nextTick(() => {
this.resizeChart();
this.initChart(); 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.
先完成此消息的编辑!
想要评论请 注册