diff --git a/src/views/modules/heart/actbanner-add-or-update.vue b/src/views/modules/heart/actbanner-add-or-update.vue
index 9679082..42b5293 100644
--- a/src/views/modules/heart/actbanner-add-or-update.vue
+++ b/src/views/modules/heart/actbanner-add-or-update.vue
@@ -23,6 +23,16 @@
class="el-upload__tip">只能上传jpg/png文件,且不超过500kb
+
+
+
+
+
+
@@ -62,6 +72,7 @@ export default {
updatedTime: '',
sort: 0
},
+ optionBannerType: [],
// 图片
loading: false,
uploadUrl: ''
@@ -76,6 +87,9 @@ export default {
bannerImg: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
+ bannerType: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
sort: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
@@ -83,6 +97,7 @@ export default {
}
},
created () {
+ this.getListBannerTypeByHeartImgType()
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
this.dataForm.bannerImg = ''
},
@@ -96,6 +111,15 @@ export default {
}
})
},
+ // 获取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(() => {})
+ },
// 获取信息
getInfo () {
this.$http.get(`/heart/actbanner/${this.dataForm.id}`).then(({ data: res }) => {
diff --git a/src/views/modules/heart/actbanner.vue b/src/views/modules/heart/actbanner.vue
index 3a59bc0..52e551d 100644
--- a/src/views/modules/heart/actbanner.vue
+++ b/src/views/modules/heart/actbanner.vue
@@ -18,6 +18,7 @@
+
{
+ 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) {
this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.status) }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),