Commit 6c1046b1 by 袁成

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

parent 2204c266
......@@ -113,16 +113,18 @@ export default {
width: 60,
align: 'center',
},
{
title: '代码',
key: 'code',
ellipsis: true,
},
{
title: '名称',
key: 'name',
ellipsis: true,
},
// {
// title: '代码',
// key: 'code',
// width: 150,
// ellipsis: true,
// },
// {
// title: '名称',
// key: 'name',
// width: 150,
// ellipsis: true,
// },
],
treeDataMap: {},
originBaseDataList: [],
......@@ -160,6 +162,25 @@ export default {
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 () {
......@@ -171,9 +192,9 @@ export default {
},
methods: {
getLable(val) {
if (this.showtype === 'CODE') {
if (this.showtype === 'CODE' || this.showtype === '0') {
return val.code
} else if (this.showtype === 'NAME') {
} else if (this.showtype === 'NAME' || this.showtype === '1') {
return val.name
} else {
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