Commit 37f376f7 by 乔延琦

Merge branch 'develop-yuancheng' into 'develop'

Develop yuancheng

See merge request GFP/RBC/rbc-frontend!131
parents 8a0808b8 6c1046b1
......@@ -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
......@@ -352,6 +373,12 @@ export default {
this.baseDataList = rows
}
this.originBaseDataList = JSON.parse(JSON.stringify(this.baseDataList))
if (this.selectValue) {
this.baseDataList = this.originBaseDataList.filter((item) => {
return (item.code.indexOf(this.selectValue) !== -1 || item.name.indexOf(this.selectValue) !== -1)
})
}
if (!this.showModal) {
this.dataListShow = true
}
......
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