|
|
@ -18,6 +18,7 @@ |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column> |
|
|
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column> |
|
|
<el-table-column prop="title" label="标题" header-align="center" align="center"></el-table-column> |
|
|
<el-table-column prop="title" label="标题" header-align="center" align="center"></el-table-column> |
|
|
|
|
|
<el-table-column align="center" label="Banner类型" :show-overflow-tooltip="true" prop="bannerType" :formatter="bannerTypeFormat"></el-table-column> |
|
|
<el-table-column align="center" label="Banner图片" :show-overflow-tooltip="true" prop="bannerImg"> |
|
|
<el-table-column align="center" label="Banner图片" :show-overflow-tooltip="true" prop="bannerImg"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-popover placement="right" |
|
|
<el-popover placement="right" |
|
|
@ -78,12 +79,16 @@ export default { |
|
|
status: '', |
|
|
status: '', |
|
|
startTime: '', |
|
|
startTime: '', |
|
|
endTime: '' |
|
|
endTime: '' |
|
|
} |
|
|
}, |
|
|
|
|
|
optionBannerType: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
AddOrUpdate |
|
|
AddOrUpdate |
|
|
}, |
|
|
}, |
|
|
|
|
|
created () { |
|
|
|
|
|
this.getListBannerTypeByHeartImgType() |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
changeGroundingText (status) { |
|
|
changeGroundingText (status) { |
|
|
let state = status |
|
|
let state = status |
|
|
@ -101,7 +106,22 @@ export default { |
|
|
return '下架' |
|
|
return '下架' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 获取banner下拉类型 |
|
|
|
|
|
getListBannerTypeByHeartImgType () { |
|
|
|
|
|
this.$http.get(`/heart/actbanner/getBannerType/volunteerBannerType`).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.optionBannerType = res.data |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}, |
|
|
|
|
|
bannerTypeFormat (row, column) { |
|
|
|
|
|
for (var property in this.optionBannerType) { |
|
|
|
|
|
if (row.bannerType === this.optionBannerType[property].dictValue) { |
|
|
|
|
|
return this.optionBannerType[property].dictName |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
changeGroundingHandle: debounce(function (row) { |
|
|
changeGroundingHandle: debounce(function (row) { |
|
|
this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.status) }), this.$t('prompt.title'), { |
|
|
this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.status) }), this.$t('prompt.title'), { |
|
|
confirmButtonText: this.$t('confirm'), |
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|