From 3ebf61c9361cc14cb0360ea8421bea6bb93531a2 Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Sat, 10 Dec 2022 13:15:34 +0800 Subject: [PATCH] 1 --- ebts-ui/src/layout/components/Navbar.vue | 79 +++---- ebts-ui/src/router/index.js | 31 +++ ebts-ui/src/views/system/notice/index.vue | 206 +++---------------- ebts-ui/src/views/system/notice/notice.vue | 155 ++++++++++++++ ebts-ui/src/views/system/notice/view.vue | 53 +++++ ebts-ui/src/views/system/notice/viewuser.vue | 53 +++++ ebts-ui/src/views/utils/tinymce/Tinymce.vue | 2 + 7 files changed, 370 insertions(+), 209 deletions(-) create mode 100644 ebts-ui/src/views/system/notice/notice.vue create mode 100644 ebts-ui/src/views/system/notice/view.vue create mode 100644 ebts-ui/src/views/system/notice/viewuser.vue diff --git a/ebts-ui/src/layout/components/Navbar.vue b/ebts-ui/src/layout/components/Navbar.vue index fdded5c..5f99afc 100644 --- a/ebts-ui/src/layout/components/Navbar.vue +++ b/ebts-ui/src/layout/components/Navbar.vue @@ -1,19 +1,28 @@ - - - + + + + + {{ notice.noticeTitle }} + + + 删 除 + + + + - {{item.noticeTitle}} + {{ item.noticeTitle }} - + @@ -26,9 +35,9 @@ - - - + + + { - if (type != '1'){ + setTimeout(() => { + if (type != '1') { this.initFiche() - }else { + } else { this.initInform() } - },300) + }, 300) this.open = false }, - initInform(){ + initInform() { this.noticeState = false this.informList = [] - getInform().then(res=>{ + getInform().then(res => { let data = res.data for (let datum of data) { - if (datum.status == "1"){ - this.noticeState = true; - } + if (datum.status == '1') { + this.noticeState = true + } } this.informList = data }) @@ -167,26 +176,26 @@ export default { initFiche() { getFiche().then(res => { let data = res.data - if (data){ + if (data) { this.fiche = data - }else { - this.fiche.noticeTitle = "" + } else { + this.fiche.noticeTitle = '' } }) }, - noticeClick(noticeId,type) { + noticeClick(noticeId, type) { getNotice(noticeId).then(res => { this.notice = res.data }) this.open = true read(noticeId) - setTimeout(()=>{ - if (type != '1'){ + setTimeout(() => { + if (type != '1') { this.initFiche() - }else { + } else { this.initInform() } - },300) + }, 300) }, handleClickBellBlock() { let bell_block = document.getElementById('bell_block') @@ -265,9 +274,9 @@ export default { } } -/deep/ .el-dialog__body { - height: 600px !important; -} +///deep/ .el-dialog__body { +// height: 600px !important; +//} /deep/ .el-dialog__header { padding: 20px 30px 10px 20px; diff --git a/ebts-ui/src/router/index.js b/ebts-ui/src/router/index.js index bd5edc6..cb2cbd3 100644 --- a/ebts-ui/src/router/index.js +++ b/ebts-ui/src/router/index.js @@ -166,6 +166,37 @@ export const constantRoutes = [ }, ] }, + { + path: '/notice', + component: Layout, + hidden: true, + children: [ + { + path: 'add', + component: (resolve) => require(['@/views/system/notice/notice'], resolve), + name: 'addNotice', + meta: { title: '添加通知' } + }, + { + path: 'edit/:noticeId', + component: (resolve) => require(['@/views/system/notice/notice'], resolve), + name: 'editNotice', + meta: { title: '修改通知' } + }, + { + path: 'view/:noticeId', + component: (resolve) => require(['@/views/system/notice/view'], resolve), + name: 'viewNotice', + meta: { title: '查看通知' } + }, + { + path: 'view/user/:noticeId', + component: (resolve) => require(['@/views/system/notice/viewuser'], resolve), + name: 'viewUser', + meta: { title: '查看通知' } + }, + ] + }, { path: '/module', component: Layout, diff --git a/ebts-ui/src/views/system/notice/index.vue b/ebts-ui/src/views/system/notice/index.vue index d790759..27b1608 100644 --- a/ebts-ui/src/views/system/notice/index.vue +++ b/ebts-ui/src/views/system/notice/index.vue @@ -113,6 +113,13 @@ v-hasPermi="['system:notice:edit']" >修改 + 查看 + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 选取文件 - - - - - - - - - - - - + + {{ form.noticeTitle }} + - - - + + diff --git a/ebts-ui/src/views/system/notice/view.vue b/ebts-ui/src/views/system/notice/view.vue new file mode 100644 index 0000000..84c923d --- /dev/null +++ b/ebts-ui/src/views/system/notice/view.vue @@ -0,0 +1,53 @@ + + + + + {{ formData.noticeTitle }} + + + + + + + + + + diff --git a/ebts-ui/src/views/system/notice/viewuser.vue b/ebts-ui/src/views/system/notice/viewuser.vue new file mode 100644 index 0000000..f99be17 --- /dev/null +++ b/ebts-ui/src/views/system/notice/viewuser.vue @@ -0,0 +1,53 @@ + + + + + {{ formData.noticeTitle }} + + + + + + + + + + + + diff --git a/ebts-ui/src/views/utils/tinymce/Tinymce.vue b/ebts-ui/src/views/utils/tinymce/Tinymce.vue index a44894b..298a5a7 100644 --- a/ebts-ui/src/views/utils/tinymce/Tinymce.vue +++ b/ebts-ui/src/views/utils/tinymce/Tinymce.vue @@ -191,6 +191,8 @@ export default { // }, methods: { initTinymce(){ + this.$forceUpdate() + console.log("qqqq") tinymce.init({ images_upload_handler: (blobInfo, success, failure) => { this.upload_handler(blobInfo, success, failure)