@@ -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 @@
-
+
+
+
+
+
+
+
+
+
+ 查询
+ {queryParam = {noticeRange: 1}, $refs.table1.refresh(true)}">重置
+
+
+
+
+
+
+
+
+
+ {{ record.type | typeFilter }}
+
+
+ {{ record.publishTime | moment('YYYY-MM-DD HH:mm:ss') }}
+
+
+ {{ record.status | statusFilter }}
+
+
+
+ 编辑
+
+ handleCancel(record)">
+ 撤销
+
+
+ 查看
+
+ handleDel(record)">
+ 删除
+
+
+
+
+
@@ -9,8 +60,8 @@
- 查询
- {queryParam = {}, $refs.table.refresh(true)}">重置
+ 查询
+ {queryParam = {noticeRange: 2}, $refs.table2.refresh(true)}">重置
@@ -33,56 +84,12 @@
-
-
-
-
-
-
-
-
- 查询
- {queryParam = {}, $refs.table.refresh(true)}">重置
-
-
-
-
-
-
-
-
-
-
- {{ record.type | typeFilter }}
-
-
- {{ record.publishTime | moment('YYYY-MM-DD HH:mm:ss') }}
-
-
-
- 编辑
-
- 查看
-
- handleDel(record)">
- 删除
-
-
-
-