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 { ...@@ -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
...@@ -352,6 +373,12 @@ export default { ...@@ -352,6 +373,12 @@ export default {
this.baseDataList = rows this.baseDataList = rows
} }
this.originBaseDataList = JSON.parse(JSON.stringify(this.baseDataList)) 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) { if (!this.showModal) {
this.dataListShow = true 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