|
@@ -40,10 +40,11 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
bordered>
|
|
|
<!-- 产品图片 -->
|
|
|
- <template slot="productPic" slot-scope="text, record">
|
|
|
- <img :src="record.productPic" width="30" height="30" class="productPic" @click="lookPic(record.productPic)" />
|
|
|
+ <template slot="imageUrl" slot-scope="text, record">
|
|
|
+ <img :src="record.imageUrl" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -87,6 +88,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
sortCharList: dataList.sortCharList,
|
|
|
+ tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
brandName: '', // 品牌名称
|
|
|
brandType: undefined,
|
|
@@ -96,7 +98,7 @@ export default {
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
|
- { title: '品牌图片', scopedSlots: { customRender: 'productPic' }, width: 140, align: 'center' },
|
|
|
+ { title: '品牌图片', scopedSlots: { customRender: 'imageUrl' }, width: 140, align: 'center' },
|
|
|
{ title: '品牌名称', dataIndex: 'brandName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '品牌分类', dataIndex: 'brandType', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '排序字母', dataIndex: 'sortChar', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -105,6 +107,9 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
+ if (this.tableHeight == 0) {
|
|
|
+ this.tableHeight = window.innerHeight - 380
|
|
|
+ }
|
|
|
return productBrandList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
const data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -145,6 +150,7 @@ export default {
|
|
|
// 查看图片
|
|
|
lookPic (url) {
|
|
|
this.nowPic = url
|
|
|
+ this.openPicModal = true
|
|
|
},
|
|
|
// 关闭弹框
|
|
|
closeModal () {
|