fix:站内信增加全部已读功能。部门列表页显示部门编码

This commit is contained in:
zhangxuanming 2024-12-30 11:42:10 +08:00
parent 3a4c59645b
commit 7caafe2651
3 changed files with 36 additions and 8 deletions

View File

@ -42,3 +42,11 @@ export function delMessage(messageId) {
method: 'delete' method: 'delete'
}) })
} }
// 全部已读
export function allRead() {
return request({
url: '/system/message/read',
method: 'get'
})
}

View File

@ -57,6 +57,7 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
> >
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column> <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-table-column prop="deptCode" label="部门编码" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column> <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -90,6 +90,16 @@
v-hasPermi="['system:message:export']" v-hasPermi="['system:message:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-bell"
size="mini"
@click="handleAllRead"
v-hasPermi="['system:message:READ']"
>全部已读</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -216,7 +226,7 @@
</template> </template>
<script> <script>
import { listMessage, getMessage, delMessage, addMessage, updateMessage } from "@/api/system/message"; import {listMessage, getMessage, delMessage, addMessage, updateMessage, allRead} from "@/api/system/message";
import UserSingleSelect from "@/components/userSelect/single.vue" import UserSingleSelect from "@/components/userSelect/single.vue"
export default { export default {
name: "Message", name: "Message",
@ -273,6 +283,15 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
handleAllRead() {
allRead().then(res => {
if (res.code == 200) {
this.getList();
this.$message.success("操作成功")
}
})
},
/** 查询消息列表 */ /** 查询消息列表 */
getList() { getList() {
this.loading = true; this.loading = true;