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 }) => {