From 83859e2d1c83889c269b7a948d9d3c42537eb200 Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Thu, 24 Feb 2022 18:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice/notice.js | 10 +- src/views/notice/NoticeDetail.vue | 13 +- src/views/notice/NoticeForm.vue | 6 +- src/views/notice/NoticeList.vue | 153 +++++++++++------- src/views/security/menu/MenuForm.vue | 2 +- src/views/security/menu/MenuList.vue | 6 +- src/views/security/role/RoleForm.vue | 2 +- src/views/sys/dictionary/DictionaryForm.vue | 5 +- src/views/sys/dictionary/DictionaryList.vue | 41 +++-- .../sys/dictionaryItem/DictionaryItemForm.vue | 7 +- .../sys/dictionaryItem/DictionaryItemList.vue | 41 +++-- 11 files changed, 180 insertions(+), 106 deletions(-) diff --git a/src/api/notice/notice.js b/src/api/notice/notice.js index 3fdf13c..c53d9ad 100644 --- a/src/api/notice/notice.js +++ b/src/api/notice/notice.js @@ -6,7 +6,8 @@ const noticeApi = { get: 'notice/get', page: 'notice/pageList', read: 'notice/read', - pagePerson: 'notice/pagePersonList' + pagePerson: 'notice/pagePersonList', + cancel: 'notice/cancel' } export function noticeAdd (params) { @@ -52,3 +53,10 @@ export function noticePagePerson (params) { params: params }) } +export function noticeCancel (params) { + return request({ + url: noticeApi.cancel, + method: 'post', + params: params + }) +} diff --git a/src/views/notice/NoticeDetail.vue b/src/views/notice/NoticeDetail.vue index 48a5033..86b7722 100644 --- a/src/views/notice/NoticeDetail.vue +++ b/src/views/notice/NoticeDetail.vue @@ -2,7 +2,7 @@
@@ -73,6 +73,7 @@ export default { queryParam: { noticeId: this.$route.query.id, isRead: 1 }, readCount: 0, unreadCount: 0, + noticeRange : 1, // 表头 columns1: [ { @@ -122,17 +123,16 @@ export default { const noticeId = this.$route.query.id this.getDetail(noticeId) const type = this.$route.query.type - console.log(type) // 查看类型是“我接收的” if (type == 2) { this.readNotice(noticeId) } + this.noticeRange = type }, methods: { // 返回 按钮 close () { - // this.$router.push({ path: '/notice/list', query: {} }) - this.$router.go(-1) + this.$router.push({ path: '/notice/list', query: {noticeRange: this.noticeRange} }) }, getDetail (id) { noticeGet({ id: id }).then(res => { @@ -140,11 +140,8 @@ export default { }) }, readNotice (id) { - console.log('-------------read') - console.log(id) noticeRead({ id: id }).then(res => { // - console.log(res) }) }, tabsCallback (key) { @@ -156,7 +153,7 @@ export default { this.queryParam.isRead = 0 this.$nextTick(()=>{ this.$refs.table2.refresh(true) - }) + }) } } } diff --git a/src/views/notice/NoticeForm.vue b/src/views/notice/NoticeForm.vue index d21019c..3a44f0d 100644 --- a/src/views/notice/NoticeForm.vue +++ b/src/views/notice/NoticeForm.vue @@ -176,7 +176,11 @@ export default { methods: { // 返回 按钮 goback() { - this.$router.push({ path: '/notice/list', query: {} }) + this.$router.push({ path: '/notice/list', + query: { + noticeRange: 1 // 只有noticeRange=1的才有新增/编辑页面权限 + } + }) }, edit(id) { noticeGet({ id: id }).then(res => { diff --git a/src/views/notice/NoticeList.vue b/src/views/notice/NoticeList.vue index 871d4dd..fabe8af 100644 --- a/src/views/notice/NoticeList.vue +++ b/src/views/notice/NoticeList.vue @@ -1,6 +1,57 @@