|
@@ -48,6 +48,7 @@ const ChildTableComp = {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
|
columns: [
|
|
|
{ title: '序号', field: 'no', key: 'a', width: 40, align: 'center', operationColumn: false },
|
|
|
{ title: '品牌', field: 'productBrandName', key: 'b', width: 100, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
|
|
@@ -234,24 +235,30 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- return ret
|
|
|
+ return ret.filter(item => item.childData.length > 0)
|
|
|
},
|
|
|
searchTable (queryParam) {
|
|
|
- this.dataSource = []
|
|
|
- this.list = []
|
|
|
- this.disabled = true
|
|
|
- this.spinning = true
|
|
|
- // 品类列表
|
|
|
- dealerUpsList(queryParam).then(res => {
|
|
|
- this.$emit('loaded', res.data || [])
|
|
|
- this.dataSource = res.data || []
|
|
|
- // 处理数据
|
|
|
+ if (this.dataSource.length) {
|
|
|
+ this.$emit('loaded', this.dataSource)
|
|
|
this.list = this.formatData(this.dataSource, queryParam)
|
|
|
this.showEmpty = this.list.length <= 0
|
|
|
- this.tableHeight = (this.showEmpty ? 0 : this.maxHeight) + 'px'
|
|
|
- this.spinning = false
|
|
|
- this.disabled = false
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ this.dataSource = []
|
|
|
+ this.list = []
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ // 品类列表
|
|
|
+ dealerUpsList(queryParam).then(res => {
|
|
|
+ this.$emit('loaded', res.data || [])
|
|
|
+ this.dataSource = res.data || []
|
|
|
+ // 处理数据
|
|
|
+ this.list = this.formatData(this.dataSource, queryParam)
|
|
|
+ this.showEmpty = this.list.length <= 0
|
|
|
+ this.tableHeight = (this.showEmpty ? 0 : this.maxHeight) + 'px'
|
|
|
+ this.spinning = false
|
|
|
+ this.disabled = false
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
handleEdit (record, e) {
|
|
|
console.log(e)
|