Commit 6c1046b1 by 袁成

fix: 增加基础数据列选的配置

parent 2204c266
...@@ -113,16 +113,18 @@ export default { ...@@ -113,16 +113,18 @@ export default {
width: 60, width: 60,
align: 'center', align: 'center',
}, },
{ // {
title: '代码', // title: '代码',
key: 'code', // key: 'code',
ellipsis: true, // width: 150,
}, // ellipsis: true,
{ // },
title: '名称', // {
key: 'name', // title: '名称',
ellipsis: true, // key: 'name',
}, // width: 150,
// ellipsis: true,
// },
], ],
treeDataMap: {}, treeDataMap: {},
originBaseDataList: [], originBaseDataList: [],
...@@ -160,6 +162,25 @@ export default { ...@@ -160,6 +162,25 @@ export default {
this.dataListShow = false this.dataListShow = false
}) })
} }
},
'groupTableName.define.showFields': {
handler(nv) {
console.log({nv})
let column = nv.filter(item => item.isQueryColumn)
let width = 0
if (column.length > 3) {
width = 150
} else {
width = undefined
}
column = column.map(item => {
item.key = item.name
item.ellipsis = true
item.width = width
return item
})
this.tableColumns = this.tableColumns.concat(column)
}
} }
}, },
mounted () { mounted () {
...@@ -171,9 +192,9 @@ export default { ...@@ -171,9 +192,9 @@ export default {
}, },
methods: { methods: {
getLable(val) { getLable(val) {
if (this.showtype === 'CODE') { if (this.showtype === 'CODE' || this.showtype === '0') {
return val.code return val.code
} else if (this.showtype === 'NAME') { } else if (this.showtype === 'NAME' || this.showtype === '1') {
return val.name return val.name
} else { } else {
return val.code + '' + val.name return val.code + '' + val.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment