opt: 通知、点位管理、任务自动创建

This commit is contained in:
2025-09-28 14:44:23 +08:00
parent e69f55c046
commit 7b6fe148f0
14 changed files with 93 additions and 54 deletions

View File

@@ -29,7 +29,7 @@
</div>
</div>
<span slot="reference" @click="fetchNotice">
<el-badge :value="notReadMsgCount" :hidden="notReadMsgCount==0">
<el-badge :value="notReadMsgCount" :max="99" :hidden="notReadMsgCount==0">
<el-icon class="el-icon-bell" style="font-size: 22px;" />
</el-badge>
</span>

View File

@@ -1,5 +1,5 @@
<template>
<div class="app-container">
<div v-loading="loadingAll" class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
@@ -82,6 +82,16 @@
>
{{ $t('Notice.table.batch_reader') }}
</el-button>
<el-button
slot="right"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-circle-check"
@click="allSetRead"
>
{{ $t('Notice.table.all_set_reader') }}
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
@@ -244,6 +254,7 @@ export default {
data() {
return {
permission: {},
loadingAll: false,
rules: {
notice_title: [
{ required: true, message: '信息标题不能为空', trigger: 'blur' }
@@ -308,6 +319,17 @@ export default {
this.crud.notify(i18n.t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
allSetRead() {
this.loadingAll = true
const param = {}
crudNotice.allRead(param).then(() => {
this.$bus.emit(NOTICE_MESSAGE_UPDATE)
this.crud.notify(i18n.t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).finally(() => {
this.loadingAll = false
})
}
}
}

View File

@@ -12,7 +12,8 @@ export default {
'see': 'View',
'deal': 'Handle',
'input_tip': 'Please enter the title',
'batch_reader': 'Batch Read'
'batch_reader': 'Batch Read',
'all_set_reader': 'All Read'
},
'reader': {
'title': 'Message Detail',

View File

@@ -12,7 +12,8 @@ export default {
'see': 'Memeriksa',
'deal': 'Beroperasi',
'input_tip': 'Silakan masukkan judul',
'batch_reader': 'Bacaan Batch'
'batch_reader': 'Bacaan Batch',
'all_set_reader': 'Bacaan All'
},
'reader': {
'title': 'Detail Pesan',

View File

@@ -12,7 +12,8 @@ export default {
'see': '查看',
'deal': '处理',
'input_tip': '请输入标题',
'batch_reader': '批量已读'
'batch_reader': '批量已读',
'all_set_reader': '全部设置已读'
},
'reader': {
'title': '消息详情',

View File

@@ -55,6 +55,18 @@ export function changeRead(data) {
data: data
})
}
/**
* 批量已读
* @param data
* @returns {*}
*/
export function allRead(data) {
return request({
url: 'api/notice/allRead',
method: 'post',
data: data
})
}
/**
* 查看消息
@@ -91,4 +103,4 @@ export function edit(data) {
})
}
export default { add, edit, del, pageByReceive, countByReceiveNotRead, read, findById, deal, changeRead }
export default { add, edit, del, pageByReceive, countByReceiveNotRead, read, findById, deal, changeRead, allRead }