From 2b37caa7da01cffb6e531ed9b46785b0a4267b79 Mon Sep 17 00:00:00 2001
From: liuchuang <123456>
Date: Wed, 28 Oct 2020 17:45:23 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=80=9A=E7=9F=A5=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=E6=96=B0=E5=A2=9E=E5=8F=AF=E4=BB=A5=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E8=A7=86=E9=A2=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/news/notice-add-or-update.vue | 39 ++++++++++++++-----
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/src/views/modules/news/notice-add-or-update.vue b/src/views/modules/news/notice-add-or-update.vue
index 00a54c7..845d094 100644
--- a/src/views/modules/news/notice-add-or-update.vue
+++ b/src/views/modules/news/notice-add-or-update.vue
@@ -77,6 +77,21 @@
size="small">{{ $t('upload.button') }}
-->
+
+
+
+
+
+
{{ $t('cancel') }}
@@ -107,7 +122,8 @@ export default {
noticeTitle: '',
mobile: '',
noticeContent: '',
- allDeptIdsShow: []
+ allDeptIdsShow: [],
+ videoUrl: ''
},
value: '',
// 富文本
@@ -133,7 +149,8 @@ export default {
communityList: [],
gridList: [],
options: [],
- optionNoticeCategoryCode: []
+ optionNoticeCategoryCode: [],
+ videoLoading: false
}
},
computed: {
@@ -148,9 +165,6 @@ export default {
noticeTitle: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- noticeContent: [
- { required: true, message: this.$t(' ') }
- ],
noticeCategory: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
@@ -261,11 +275,7 @@ export default {
this.dataForm.noticeContent = this.removeHTMLTag(this.dataForm.noticeContent)
if ((this.dataForm.noticeContent).length > 10000) {
return this.$message.error('您输入的的内容已超过字数不能提交')
- } else if (this.dataForm.noticeContent.length === 0) {
- return this.$message.error('通知内容不能空')
}
- } else {
- return this.$message.error('通知内容不能为空')
}
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
@@ -334,11 +344,22 @@ export default {
this.loading = false
this.dataForm.noticeImageUrl = res.data.url
},
+ handleVideoSuccess (res, file) {
+ this.dataForm.videoUrl = res.data.url
+ this.videoLoading = false
+ },
beforeAvatarUpload (file) {
this.loading = true
},
+ beforeVideoUpload (file) {
+ if (file.size > 524288000) {
+ return this.$message.error('文件大小不能超过500M')
+ }
+ this.videoLoading = true
+ },
handelError () {
this.loading = false
+ this.videoLoading = false
},
getListSimpleByDictType () {
this.$http.get(`/news/notice/listSimple/notice_category`).then(({ data: res }) => {