【修改】收入分类统计修改对齐

This commit is contained in:
fengachen
2022-09-07 17:38:27 +08:00
parent 5b68691d22
commit cd5dcc0f4f
+14 -4
View File
@@ -15,7 +15,7 @@
bordered bordered
rowKey="projectId" rowKey="projectId"
:columns="columns" :columns="columns"
:scroll="{x: 900}" :scroll="{x: 500}"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="false" :pagination="false"
:loading="loading" :loading="loading"
@@ -67,7 +67,7 @@ const columns = [
{ {
title: '', title: '',
align: 'center', align: 'center',
width: 150, width: 70,
dataIndex: 'indexName', dataIndex: 'indexName',
scopedSlots: {customRender: 'text'} scopedSlots: {customRender: 'text'}
}, },
@@ -96,6 +96,7 @@ export default {
}else { }else {
this.activeIndex = key this.activeIndex = key
this.loadData() this.loadData()
this.$forceUpdate()
} }
}, },
loadData() { loadData() {
@@ -150,7 +151,7 @@ export default {
}, },
legend: { legend: {
bottom:'2%', bottom:'2%',
left: 'center' left: '10%'
}, },
labelLine:{ labelLine:{
lineStyle:{ lineStyle:{
@@ -196,11 +197,20 @@ export default {
* 处理表头 * 处理表头
* */ * */
initColumns(data) { initColumns(data) {
this.columns = [
{
title: '',
align: 'center',
width: 70,
dataIndex: 'indexName',
scopedSlots: {customRender: 'text'}
},
]
data.map((item, index) => { data.map((item, index) => {
this.columns.push({ this.columns.push({
title: item.name_dictText, title: item.name_dictText,
align: 'center', align: 'center',
width: 120, width: 70,
dataIndex: 'key' + index, dataIndex: 'key' + index,
scopedSlots: {customRender: 'allMoney'} scopedSlots: {customRender: 'allMoney'}
},) },)