From cd5dcc0f4f70ffcf39ea10c6933144ecfe422310 Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Wed, 7 Sep 2022 17:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=94=B6?= =?UTF-8?q?=E5=85=A5=E5=88=86=E7=B1=BB=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/IncomeSortEcharts.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/dashboard/IncomeSortEcharts.vue b/src/views/dashboard/IncomeSortEcharts.vue index 6da3873..765920b 100644 --- a/src/views/dashboard/IncomeSortEcharts.vue +++ b/src/views/dashboard/IncomeSortEcharts.vue @@ -15,7 +15,7 @@ bordered rowKey="projectId" :columns="columns" - :scroll="{x: 900}" + :scroll="{x: 500}" :dataSource="dataSource" :pagination="false" :loading="loading" @@ -67,7 +67,7 @@ const columns = [ { title: '', align: 'center', - width: 150, + width: 70, dataIndex: 'indexName', scopedSlots: {customRender: 'text'} }, @@ -96,6 +96,7 @@ export default { }else { this.activeIndex = key this.loadData() + this.$forceUpdate() } }, loadData() { @@ -150,7 +151,7 @@ export default { }, legend: { bottom:'2%', - left: 'center' + left: '10%' }, labelLine:{ lineStyle:{ @@ -196,11 +197,20 @@ export default { * 处理表头 * */ initColumns(data) { + this.columns = [ + { + title: '', + align: 'center', + width: 70, + dataIndex: 'indexName', + scopedSlots: {customRender: 'text'} + }, + ] data.map((item, index) => { this.columns.push({ title: item.name_dictText, align: 'center', - width: 120, + width: 70, dataIndex: 'key' + index, scopedSlots: {customRender: 'allMoney'} },)