From 4befe5981ebb6e5cc22d9e2b3445377bf8050244 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Tue, 16 Mar 2021 16:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AE=B9=E9=80=9A=E7=9F=A5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AF=84=E8=AE=BA=E5=8A=9F=E8=83=BD=201=E3=80=81?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=202=E3=80=81=E5=86=85=E5=AE=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=96=B0=E5=A2=9E=E8=AF=84=E8=AE=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/modulecategory-add-or-update.vue | 23 ++++- src/views/modules/news/notice.vue | 83 ++++++++++++++++++- src/views/modules/worklog/worklog.vue | 2 +- src/views/pages/login.vue | 18 ++-- 4 files changed, 112 insertions(+), 14 deletions(-) diff --git a/src/views/modules/news/modulecategory-add-or-update.vue b/src/views/modules/news/modulecategory-add-or-update.vue index 01ca163..71c0d2a 100644 --- a/src/views/modules/news/modulecategory-add-or-update.vue +++ b/src/views/modules/news/modulecategory-add-or-update.vue @@ -79,6 +79,16 @@ + + + + + + @@ -114,7 +124,8 @@ export default { enableFlag: '', imgUrl: '', moduleStyle: '', - bannerFlag: '' + bannerFlag: '', + commentFlag: '' }, secondOrgDictList: [], // 图片 @@ -127,6 +138,13 @@ export default { value: '1', label: '是' }], + isCommentFlag: [{ + value: '0', + label: '否' + }, { + value: '1', + label: '是' + }], moduleStyleName: '', moduleStyleListVisible: false, moduleStyleList: [], @@ -162,6 +180,9 @@ export default { ], bannerFlag: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } + ], + commentFlag: [ + { required: true, message: this.$t('validate.required'), trigger: 'blur' } ] } } diff --git a/src/views/modules/news/notice.vue b/src/views/modules/news/notice.vue index 21332c3..2b3b749 100644 --- a/src/views/modules/news/notice.vue +++ b/src/views/modules/news/notice.vue @@ -82,13 +82,13 @@ fixed="right" header-align="center" align="center" - width="150"> + width="180"> @@ -111,6 +114,30 @@ + + + + + + + + + + + + + + @@ -137,7 +164,15 @@ export default { optionProps: { checkStrictly: true, value: 'categoryCode' - } + }, + noticeCommentVisible: false, + noticeCommentsData: [], + showNoticeCommentsNoticeId: '', + order: '', + orderField: '', + pageIndex: 1, + limitVal: 10, + total: 0 } }, watch: { @@ -221,6 +256,48 @@ export default { this.getSelectedNode(item.children, item) } }) + }, + noticeComments (id) { + this.noticeCommentVisible = true + this.showNoticeCommentsNoticeId = id + this.getNoticeCommentList() + }, + pageSizeChangeHandleNew (val) { + this.pageIndex = 1 + this.limitVal = val + this.getNoticeCommentList() + }, + pageCurrentChangeHandleNew (val) { + this.pageIndex = val + this.getNoticeCommentList() + }, + getNoticeCommentList () { + this.$http.get('/news/noticecomment/comments', { params: { id: this.showNoticeCommentsNoticeId, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal } + }).then(({ data: res }) => { + if (res.code !== 0) { + this.noticeCommentsData = [] + this.total = 0 + return this.$message.error(res.msg) + } + this.noticeComments = res.data.list + this.total = res.data.total + }).catch(() => {}) + }, + shieldComment (val) { + this.$http['post']( + '/news/noticecomment/shieldComment', { commentIds: [val] }).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getNoticeCommentList() + } + }) + }).catch(() => {}) } } } diff --git a/src/views/modules/worklog/worklog.vue b/src/views/modules/worklog/worklog.vue index 4b17d8e..1661aaa 100644 --- a/src/views/modules/worklog/worklog.vue +++ b/src/views/modules/worklog/worklog.vue @@ -7,7 +7,7 @@