|
@@ -130,6 +130,9 @@
|
|
|
<el-badge :is-dot="isDot2" class="item">
|
|
|
<el-radio-button :label="['NOTICE']">平台公告</el-radio-button>
|
|
|
</el-badge>
|
|
|
+ <el-badge :is-dot="isDot3" class="item">
|
|
|
+ <el-radio-button :label="['WDTZ']">网点通知</el-radio-button>
|
|
|
+ </el-badge>
|
|
|
</el-radio-group>
|
|
|
<el-switch
|
|
|
v-model="isOpen"
|
|
@@ -170,12 +173,53 @@
|
|
|
toDetail(
|
|
|
item.adminNoticeType,
|
|
|
item.paidType,
|
|
|
- item.adminNoticeType == 'NOTICE' ? item.noticeId : item.orderId,
|
|
|
- item.id
|
|
|
+ messageType.includes('WDTZ')
|
|
|
+ ? item.noticeWebsitId
|
|
|
+ : item.adminNoticeType == 'NOTICE'
|
|
|
+ ? item.noticeId
|
|
|
+ : item.orderId,
|
|
|
+ item.id,
|
|
|
+ item
|
|
|
)
|
|
|
"
|
|
|
>
|
|
|
- <div v-if="item.adminNoticeType == 'NOTICE'">
|
|
|
+ <div v-if="messageType.includes('WDTZ')">
|
|
|
+ <div class="flex_asb item">
|
|
|
+ <div>
|
|
|
+ <span>公告类型:</span>
|
|
|
+ <span>网点通知</span>
|
|
|
+ </div>
|
|
|
+ <div class="read1" v-if="item.readFlag == 'NO'">未读</div>
|
|
|
+ <div class="read2" v-if="item.readFlag == 'YES'">已读</div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div>
|
|
|
+ <span>文件标题:</span>
|
|
|
+ <span style="color: #409eff">{{ item.title }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div>
|
|
|
+ <span>发布人:</span>
|
|
|
+ <span>{{ item.issueNickName || '' }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div>
|
|
|
+ <span>发布时间:</span>
|
|
|
+ <span>{{ item.issueTime }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.readFlag == 'YES'" class="item">
|
|
|
+ <span>阅读人:</span>
|
|
|
+ <span>{{ item.adminWebsitName }} </span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.readFlag == 'YES'" class="item">
|
|
|
+ <span>阅读时间:</span>
|
|
|
+ <span>{{ item.readTime }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="item.adminNoticeType == 'NOTICE'">
|
|
|
<div class="flex_asb item">
|
|
|
<div>
|
|
|
<span>公告类型:</span>
|
|
@@ -303,7 +347,8 @@ export default {
|
|
|
pageSize: 10, // 每页数量
|
|
|
count: 0,
|
|
|
isDot1: false,
|
|
|
- isDot2: false
|
|
|
+ isDot2: false,
|
|
|
+ isDot3: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -327,7 +372,6 @@ export default {
|
|
|
var mon = date.getMonth() + 1 //获取当前月份
|
|
|
var day = date.getDate() //获取当前日
|
|
|
var oneDay = 24 * 3600 * 1000
|
|
|
-
|
|
|
var daytimeArr = []
|
|
|
var now = new Date(base - oneDay * this.dateType)
|
|
|
var myear = now.getFullYear()
|
|
@@ -423,7 +467,6 @@ export default {
|
|
|
this.path = item.path
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
goBigViews() {
|
|
|
this.$router.push({
|
|
|
name: 'bigViews'
|
|
@@ -457,6 +500,187 @@ export default {
|
|
|
toggleSideBar() {
|
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
|
},
|
|
|
+ getUserInfo() {
|
|
|
+ request({
|
|
|
+ url: `/admin/user/detail`,
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ adminUserId: this.userid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.isOpen = res.data.isNotice == 'YES' ? true : false
|
|
|
+ if (res.data.isNotice == 'NO') {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ } else {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.getMessageTips()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCount() {
|
|
|
+ if (this.messageType.includes('WDTZ')) {
|
|
|
+ request({
|
|
|
+ url: `/noticeWebsit/list/count`,
|
|
|
+ method: 'post',
|
|
|
+ params: {
|
|
|
+ readFlag: 'NO'
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.count = res.data
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ request({
|
|
|
+ url: `/notice/list/count`,
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ noticeType: this.messageType.join(','),
|
|
|
+ readFlag: 'NO'
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.count = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ redDot() {
|
|
|
+ if (this.messageType.includes('WDTZ')) {
|
|
|
+ } else {
|
|
|
+ request({
|
|
|
+ url: `/notice/list/count`,
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ noticeType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'].join(','),
|
|
|
+ readFlag: 'NO'
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.isDot1 = res.data > 0 ? true : false
|
|
|
+ })
|
|
|
+ request({
|
|
|
+ url: `/notice/list/count`,
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ noticeType: ['NOTICE'].join(','),
|
|
|
+ readFlag: 'NO'
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.isDot2 = res.data > 0 ? true : false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //全部已读
|
|
|
+ confirmRead() {
|
|
|
+ this.$confirm('是否全部设为已读, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if (this.messageType.includes('WDTZ')) {
|
|
|
+ request({
|
|
|
+ url: `/noticeWebsit/mark/read/all`,
|
|
|
+ method: 'post',
|
|
|
+ data: {}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList()
|
|
|
+ this.$message.success('全部已读成功!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ request({
|
|
|
+ url: `/notice/mark/read/all`,
|
|
|
+ method: 'post',
|
|
|
+ data: {}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList()
|
|
|
+ this.$message.success('全部已读成功!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ if (this.messageType.includes('WDTZ')) {
|
|
|
+ request({
|
|
|
+ url: `/noticeWebsit/listWebsit`,
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ params: [
|
|
|
+ { param: 'b.read_flag', compare: '=', value: this.readFlag },
|
|
|
+ { param: 'a.issue_time', compare: '>=', value: this.filterTime[0] },
|
|
|
+ { param: 'a.issue_time', compare: '<=', value: this.filterTime[1] }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.getCount()
|
|
|
+ this.redDot()
|
|
|
+ this.listTotal = res.data.total
|
|
|
+ this.messageData = res.data.records
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ request({
|
|
|
+ url: `/notice/list`,
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ params: [
|
|
|
+ { param: 'nr.read_flag', compare: '=', value: this.readFlag },
|
|
|
+ { param: 'nr.admin_notice_type', compare: '=', value: this.messageType },
|
|
|
+ { param: 'nr.issue_time', compare: '>=', value: this.filterTime[0] },
|
|
|
+ { param: 'nr.issue_time', compare: '<=', value: this.filterTime[1] }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.getCount()
|
|
|
+ this.redDot()
|
|
|
+ this.listTotal = res.data.total
|
|
|
+ this.messageData = res.data.records
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 更改当前页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ toDetail(type, paidType, orderId, id, item) {
|
|
|
+ if (this.messageType.includes('WDTZ') || paidType == 'WDTZ') {
|
|
|
+ if (item.readFlag == 'NO') {
|
|
|
+ this.read(id)
|
|
|
+ }
|
|
|
+ this.$router.push({
|
|
|
+ name: 'networkNotification',
|
|
|
+ params: {
|
|
|
+ pageName: orderId,
|
|
|
+ pageType: 'detail',
|
|
|
+ pageCode: orderId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.read(id)
|
|
|
+ this.$router.push({
|
|
|
+ name: this.typeFilter(type, paidType),
|
|
|
+ params: {
|
|
|
+ pageName: orderId,
|
|
|
+ pageType: 'detail',
|
|
|
+ pageCode: orderId
|
|
|
+ },
|
|
|
+ query: {
|
|
|
+ id: orderId,
|
|
|
+ orderId: orderId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取最新消息并弹窗
|
|
|
getMessageTips() {
|
|
|
const that = this
|
|
@@ -497,14 +721,6 @@ export default {
|
|
|
' ' + item.adminNoticeType == 'NOTICE' ? item.title : item.orderId
|
|
|
),
|
|
|
that.$createElement('span', null, item.adminNoticeType == 'NOTICE' ? '' : item.content)
|
|
|
- // that.$createElement(
|
|
|
- // "el-checkbox",
|
|
|
- // {
|
|
|
- // on: {
|
|
|
- // change: that.updateIsNotice.bind(that)
|
|
|
- // },
|
|
|
- // }, '不再弹窗新消息'
|
|
|
- // )
|
|
|
]
|
|
|
)
|
|
|
})
|
|
@@ -512,84 +728,6 @@ export default {
|
|
|
})
|
|
|
}, 30000)
|
|
|
},
|
|
|
- getCount() {
|
|
|
- request({
|
|
|
- url: `/notice/list/count`,
|
|
|
- method: 'get',
|
|
|
- params: {
|
|
|
- noticeType: this.messageType.join(','),
|
|
|
- readFlag: 'NO'
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.count = res.data
|
|
|
- })
|
|
|
- },
|
|
|
- redDot() {
|
|
|
- request({
|
|
|
- url: `/notice/list/count`,
|
|
|
- method: 'get',
|
|
|
- params: {
|
|
|
- noticeType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'].join(','),
|
|
|
- readFlag: 'NO'
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.isDot1 = res.data > 0 ? true : false
|
|
|
- })
|
|
|
- request({
|
|
|
- url: `/notice/list/count`,
|
|
|
- method: 'get',
|
|
|
- params: {
|
|
|
- noticeType: ['NOTICE'].join(','),
|
|
|
- readFlag: 'NO'
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.isDot2 = res.data > 0 ? true : false
|
|
|
- })
|
|
|
- },
|
|
|
- getUserInfo() {
|
|
|
- const that = this
|
|
|
- request({
|
|
|
- url: `/admin/user/detail`,
|
|
|
- method: 'get',
|
|
|
- params: {
|
|
|
- adminUserId: this.userid
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.isOpen = res.data.isNotice == 'YES' ? true : false
|
|
|
- if (res.data.isNotice == 'NO') {
|
|
|
- clearInterval(this.timer)
|
|
|
- } else {
|
|
|
- clearInterval(this.timer)
|
|
|
- this.getMessageTips()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //全部已读
|
|
|
- confirmRead() {
|
|
|
- this.$confirm('是否全部设为已读, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- request({
|
|
|
- url: `/notice/mark/read/all`,
|
|
|
- method: 'post',
|
|
|
- data: {}
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.getList()
|
|
|
- this.$message.success('全部已读成功!')
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消'
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
//点击不再弹窗新消息
|
|
|
updateIsNotice(e) {
|
|
|
request({
|
|
@@ -608,56 +746,24 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getList() {
|
|
|
- request({
|
|
|
- url: `/notice/list`,
|
|
|
- method: 'post',
|
|
|
- data: {
|
|
|
- pageNum: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
- params: [
|
|
|
- { param: 'nr.read_flag', compare: '=', value: this.readFlag },
|
|
|
- { param: 'nr.admin_notice_type', compare: '=', value: this.messageType },
|
|
|
- { param: 'nr.issue_time', compare: '>=', value: this.filterTime[0] },
|
|
|
- { param: 'nr.issue_time', compare: '<=', value: this.filterTime[1] }
|
|
|
- ]
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.getCount()
|
|
|
- this.redDot()
|
|
|
- this.listTotal = res.data.total
|
|
|
- this.messageData = res.data.records
|
|
|
- })
|
|
|
- },
|
|
|
- // 更改当前页
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentPage = val
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- toDetail(type, paidType, orderId, id) {
|
|
|
- console.log(this.typeFilter(type, paidType))
|
|
|
- this.read(id)
|
|
|
- this.$router.push({
|
|
|
- name: this.typeFilter(type, paidType),
|
|
|
- params: {
|
|
|
- pageName: orderId,
|
|
|
- pageType: 'detail',
|
|
|
- pageCode: orderId
|
|
|
- },
|
|
|
- query: {
|
|
|
- id: orderId,
|
|
|
- orderId: orderId
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
read(id) {
|
|
|
- request({
|
|
|
- url: `/notice/mark/read`,
|
|
|
- method: 'post',
|
|
|
- params: {
|
|
|
- noticeIds: id
|
|
|
- }
|
|
|
- }).then(res => {})
|
|
|
+ if (this.messageType.includes('WDTZ')) {
|
|
|
+ request({
|
|
|
+ url: `/noticeWebsit/mark/readOne`,
|
|
|
+ method: 'post',
|
|
|
+ params: {
|
|
|
+ noticeIds: id
|
|
|
+ }
|
|
|
+ }).then(res => {})
|
|
|
+ } else {
|
|
|
+ request({
|
|
|
+ url: `/notice/mark/read`,
|
|
|
+ method: 'post',
|
|
|
+ params: {
|
|
|
+ noticeIds: id
|
|
|
+ }
|
|
|
+ }).then(res => {})
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -701,7 +807,7 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.head {
|
|
|
- width: 25%;
|
|
|
+ width: 405px;
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
right: 0;
|