From 720e4b4bb753181b60cd784add972b7f6b700c0d Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Tue, 2 Jun 2020 15:49:00 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85banner=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=EF=BC=8C=E5=A2=9E=E5=8A=A0banner=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/heart/actbanner-add-or-update.vue | 24 +++++++++++++++++++
src/views/modules/heart/actbanner.vue | 24 +++++++++++++++++--
2 files changed, 46 insertions(+), 2 deletions(-)
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'),