diff --git a/src/views/modules/news/allnews.vue b/src/views/modules/news/allnews.vue index d136a05..26b85d7 100644 --- a/src/views/modules/news/allnews.vue +++ b/src/views/modules/news/allnews.vue @@ -4,60 +4,13 @@
+ @keyup.enter.native="getDataListSearch()"> - -
- 提交时间   - -     - + - +
+ + + + + + + + - {{ $t('query') }} + {{ $t('query') }} {{ $t('add') }} @@ -105,49 +82,50 @@ + align="center"> + width="180" + align="center"> - + min-width="200" + show-overflow-tooltip + align="center"> + @@ -211,7 +189,23 @@ export default { onLine: { id: '', onLineState: '' - } + }, + pickerBeginDateBefore: { + disabledDate: (time) => { + let beginDateVal = this.dataForm.endTime + if (beginDateVal) { + return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime() + } + } + }, + pickerBeginDateAfter: { + disabledDate: (time) => { + let EndDateVal = this.dataForm.startTime + if (EndDateVal) { + return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime() + } + } + }, } }, created () { @@ -389,7 +383,11 @@ export default { }).catch(() => { this.dataListLoading = false }) - } + }, + btKeyUpkeyword(e){ + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.keyword = e.target.value + }, }, components: { AddOrUpdate diff --git a/src/views/modules/news/allnotice.vue b/src/views/modules/news/allnotice.vue index c49dbb9..74e3a73 100644 --- a/src/views/modules/news/allnotice.vue +++ b/src/views/modules/news/allnotice.vue @@ -4,20 +4,22 @@
+ @keyup.enter.native="getDataListSearch()"> - + - - + + + + - {{ $t('query') }} + {{ $t('query') }} + prop="bannerType" label-width="100px"> + prop="position" label-width="100px"> + prop="imgUrl" label-width="100px"> @@ -133,6 +130,7 @@ export default { position: '0', allDeptIdsShow: [] }, + isAble:false, bannerOptions: [], streetList: [], communityList: [], @@ -171,7 +169,7 @@ export default { } }, created () { - // 1169154711480528897 为榆山区部门ID + // 1169154711480528897 为市北区部门ID this.$http .get(`/sys/user/deptOptions/getAllByLoginUser`) .then(({ data: res }) => { @@ -189,6 +187,7 @@ export default { init () { this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` this.visible = true + this.isAble = false this.$nextTick(() => { this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null this.communityList = this.gridList = [] @@ -225,8 +224,10 @@ export default { if (!valid) { return false } + this.isAble = true this.$http[!this.dataForm.id ? 'post' : 'put']('/news/banner/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { + this.isAble = false return this.$message.error(res.msg) } this.$message({ diff --git a/src/views/modules/news/banner.vue b/src/views/modules/news/banner.vue index a73d19d..2947572 100644 --- a/src/views/modules/news/banner.vue +++ b/src/views/modules/news/banner.vue @@ -4,14 +4,14 @@
- - + + - {{ $t('query') }} + {{ $t('query') }} + + align="center" + width="120"> @@ -217,7 +220,11 @@ export default { this.positionList = res.data } }).catch(() => { }) - } + }, + btKeyUptitle(e){ + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') + this.dataForm.title = e.target.value + }, } } diff --git a/src/views/modules/news/news-publish.vue b/src/views/modules/news/news-publish.vue index 84493ad..1795f20 100644 --- a/src/views/modules/news/news-publish.vue +++ b/src/views/modules/news/news-publish.vue @@ -55,6 +55,7 @@ prop="newsCateroryId"> + style="width:450px"> @@ -130,9 +131,9 @@ 确认发布 + @click="dataFormSubmitHandle()" :disabled="isAble">确认发布 存草稿箱 + @click="draftDataFormSubmitHandle()" :disabled="isAble">存草稿箱 @@ -191,7 +192,8 @@ export default { ], uploadUrl: '', // 富文本end - fileList: [] + fileList: [], + isAble: false } }, activated () { @@ -360,8 +362,10 @@ export default { if (!valid) { return false } + this.isAble = true this.$http['post']('/news/news/publish', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { + this.isAble = false return this.$message.error(res.msg) } this.$message({ @@ -388,6 +392,7 @@ export default { this.quillEditor.root.innerHTML = '' this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null this.communityList = this.gridList = [] + this.isAble = false } }) }).catch(() => { }) @@ -402,8 +407,10 @@ export default { if (!valid) { return false } + this.isAble = true this.$http['post']('/news/news/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { + this.isAble = false return this.$message.error(res.msg) } this.$message({ @@ -430,6 +437,7 @@ export default { this.quillEditor.root.innerHTML = '' this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null this.communityList = this.gridList = [] + this.isAble = false } }) }).catch(() => { }) diff --git a/src/views/modules/news/news.vue b/src/views/modules/news/news.vue index 5d6f915..b500757 100644 --- a/src/views/modules/news/news.vue +++ b/src/views/modules/news/news.vue @@ -1,412 +1,477 @@ diff --git a/src/views/modules/news/newscategory-add-or-update.vue b/src/views/modules/news/newscategory-add-or-update.vue index 61ae84b..6f4068e 100644 --- a/src/views/modules/news/newscategory-add-or-update.vue +++ b/src/views/modules/news/newscategory-add-or-update.vue @@ -6,22 +6,21 @@ + placeholder="类别名称" maxlength="128"> + placeholder="类别编码" maxlength="32"> + placeholder="描述" maxlength="128"> diff --git a/src/views/modules/news/newscategory.vue b/src/views/modules/news/newscategory.vue index 9f6820b..d88f5ce 100644 --- a/src/views/modules/news/newscategory.vue +++ b/src/views/modules/news/newscategory.vue @@ -1,7 +1,7 @@