|
@@ -67,7 +67,31 @@ export default {
|
|
|
showTableHead: true, // 显示表头
|
|
|
chooseDataList: [],
|
|
|
selectedRowKeys: [],
|
|
|
- checkboxOption: {
|
|
|
+ queryParam: {
|
|
|
+ productBrandSn: undefined,
|
|
|
+ productTypeSn1: undefined, // 产品一级分类
|
|
|
+ productTypeSn2: undefined, // 产品二级分类
|
|
|
+ productTypeSn3: undefined // 产品三级分类
|
|
|
+ },
|
|
|
+ productType: [],
|
|
|
+ simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
|
+ dataSource: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '', field: '', key: 'acheck', width: 60, type: 'checkbox', align: 'center' },
|
|
|
+ { title: '品牌', field: 'productBrandName', key: 'a', align: 'center', width: 160, operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
+ { title: '一级分类', field: 'productTypeName1', key: 'b', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
+ { title: '二级分类', field: 'productTypeName2', key: 'c', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
+ { title: '三级分类', field: 'productTypeName3', key: 'd', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } }
|
|
|
+ ]
|
|
|
+ return arr
|
|
|
+ },
|
|
|
+ checkboxOption () {
|
|
|
+ return {
|
|
|
+ selectedRowKeys: this.selectedRowKeys,
|
|
|
// 行选择改变事件
|
|
|
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
|
|
|
const selectedRowKeysInfo = selectedRowKeys.map(item => {
|
|
@@ -90,28 +114,7 @@ export default {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.chooseDataList = selectedRowKeysInfo
|
|
|
}
|
|
|
- },
|
|
|
- queryParam: {
|
|
|
- productBrandSn: undefined,
|
|
|
- productTypeSn1: undefined, // 产品一级分类
|
|
|
- productTypeSn2: undefined, // 产品二级分类
|
|
|
- productTypeSn3: undefined // 产品三级分类
|
|
|
- },
|
|
|
- productType: [],
|
|
|
- simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
|
- dataSource: []
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- columns () {
|
|
|
- const arr = [
|
|
|
- { title: '', field: '', key: 'acheck', width: 60, type: 'checkbox', align: 'center' },
|
|
|
- { title: '品牌', field: 'productBrandName', key: 'a', align: 'center', width: 160, operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
- { title: '一级分类', field: 'productTypeName1', key: 'b', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
- { title: '二级分类', field: 'productTypeName2', key: 'c', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
- { title: '三级分类', field: 'productTypeName3', key: 'd', width: 160, align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } }
|
|
|
- ]
|
|
|
- return arr
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -145,6 +148,7 @@ export default {
|
|
|
}
|
|
|
this.productType = []
|
|
|
this.getTableData()
|
|
|
+ this.clearSelectTable()
|
|
|
},
|
|
|
changeProductType (val, opt) {
|
|
|
this.queryParam.productTypeSn1 = val[0] ? val[0] : undefined
|
|
@@ -154,6 +158,7 @@ export default {
|
|
|
// 清空选项
|
|
|
clearSelectTable () {
|
|
|
this.selectedRowKeys = []
|
|
|
+ this.chooseDataList = []
|
|
|
}
|
|
|
}
|
|
|
|