diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index eea7682d64..8786a854ae 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -55,7 +55,8 @@ export const DEFAULT_SIZE = { liquidOutlineDistance: 8, liquidWaveLength: 128, liquidWaveCount: 3, - liquidShape: 'circle' + liquidShape: 'circle', + tablePageMode: 'page' } export const DEFAULT_LABEL = { show: false, diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 2ff39b4179..0fa0b4a97c 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -6,9 +6,9 @@
-
+
- + {{ $t('chart.total') }} {{ (chart.data && chart.data.tableRow)?chart.data.tableRow.length:0 }} @@ -99,7 +99,8 @@ export default { pageSize: 20, show: 0 }, - tableData: [] + tableData: [], + showPage: false } }, @@ -135,17 +136,19 @@ export default { methods: { initData() { let datas = [] + this.showPage = false if (this.chart.data && this.chart.data.fields) { this.fields = JSON.parse(JSON.stringify(this.chart.data.fields)) const attr = JSON.parse(this.chart.customAttr) this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20) datas = JSON.parse(JSON.stringify(this.chart.data.tableRow)) - if (this.chart.type === 'table-info') { + if (this.chart.type === 'table-info' && attr.size.tablePageMode === 'page' && datas.length > this.currentPage.pageSize) { // 计算分页 this.currentPage.show = datas.length const pageStart = (this.currentPage.page - 1) * this.currentPage.pageSize const pageEnd = pageStart + this.currentPage.pageSize datas = datas.slice(pageStart, pageEnd) + this.showPage = true } } else { this.fields = [] @@ -380,12 +383,18 @@ export default { .table-dom-info{ height:calc(100% - 36px); } +.table-dom-info-pull{ + height:calc(100%); +} .table-dom-normal{ height:100%; } .table-dom-info-drill{ height:calc(100% - 36px - 12px); } +.table-dom-info-drill-pull{ + height:calc(100% - 12px); +} .table-dom-normal-drill{ height:calc(100% - 12px); } @@ -409,4 +418,10 @@ export default { .page-style >>> .el-input__inner{ height: 24px; } +.page-style >>> button{ + background: transparent!important; +} +.page-style >>> li{ + background: transparent!important; +} diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue index 4634eee7bb..d2bded2179 100644 --- a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue @@ -84,7 +84,13 @@ - + + + + + + + - + + + + + + + - + {{ $t('chart.total') }} {{ (chart.data && chart.data.tableRow)?chart.data.tableRow.length:0 }} @@ -118,7 +118,8 @@ export default { page: 1, pageSize: 20, show: 0 - } + }, + showPage: false } }, computed: { @@ -162,17 +163,19 @@ export default { initData() { const that = this let datas = [] + this.showPage = false if (this.chart.data) { this.fields = JSON.parse(JSON.stringify(this.chart.data.fields)) const attr = JSON.parse(this.chart.customAttr) this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20) datas = JSON.parse(JSON.stringify(this.chart.data.tableRow)) - if (this.chart.type === 'table-info') { + if (this.chart.type === 'table-info' && attr.size.tablePageMode === 'page' && datas.length > this.currentPage.pageSize) { // 计算分页 this.currentPage.show = datas.length const pageStart = (this.currentPage.page - 1) * this.currentPage.pageSize const pageEnd = pageStart + this.currentPage.pageSize datas = datas.slice(pageStart, pageEnd) + this.showPage = true } } else { this.fields = [] @@ -191,7 +194,7 @@ export default { this.$nextTick(() => { if (this.$refs.tableContainer) { let pageHeight = 0 - if (this.chart.type === 'table-info') { + if (this.showPage) { pageHeight = 36 } const currentHeight = this.$refs.tableContainer.offsetHeight @@ -378,4 +381,10 @@ export default { .page-style >>> .el-input__inner{ height: 24px; } + .page-style >>> button{ + background: transparent!important; + } + .page-style >>> li{ + background: transparent!important; + }