refactor(api): 统一详情接口使用路径参数替代查询参数

feat(utils): 新增部门树格式化工具函数
style(components): 调整通知组件样式和内容显示
fix(store): 修复通知公告获取逻辑并添加日志
perf(request): 优化请求拦截器仅对非GET请求显示成功消息
refactor(views): 重构多个模块的删除操作确认逻辑
docs(types): 移除未使用的全局类型定义
style(views): 调整表格列顺序和操作按钮样式
fix(components): 修复部门树组件数据加载和格式化
refactor(api): 重构用户、角色等模块的接口参数类型
style(views): 统一表单选择器宽度和布局
This commit is contained in:
zhangtao
2025-07-19 02:19:58 +08:00
parent d8bac53c72
commit df2c0a76c5
49 changed files with 584 additions and 577 deletions
@@ -10,7 +10,7 @@
<template #dropdown>
<div class="p-5">
<template v-if="noticeList.length > 0">
<div v-for="(item, index) in noticeList" :key="index" class="py-3">
<div v-for="(item, index) in noticeList" :key="index" class="w-400px py-3">
<div class="flex-y-center">
<el-tag :type="item.notice_type === '1' ? 'primary' : 'warning'">
{{ item.notice_type === '1' ? '通知' : '公告' }}
@@ -18,7 +18,7 @@
<!-- truncated: 超出部分省略 -->
<el-text size="small" class="w-200px cursor-pointer !ml-2 !flex-1" truncated >
{{ item.notice_title }}
{{ item.notice_content }}
</el-text>
<!-- 时间 -->
@@ -89,19 +89,20 @@ const noticeDetail = ref<NoticeTable | null>(null);
/**
* 获取我的通知公告
*/
function featchMyNotice() {
async function featchMyNotice() {
await noticeStore.getNotice()
noticeList.value = noticeStore.noticeList;
}
// 查看更多
function handleViewMoreNotice() {
router.push({ name: "MyNotice" });
router.push({ name: "Notice" });
}
// 全部已读
function handleMarkAllAsRead() {
NoticeAPI.batchAvailableNotice({
ids: noticeList.value.map((item) => item.id),
ids: noticeList.value.map((item) => item.id).filter((id): id is number => id !== undefined),
status: true
}).then(() => {
noticeList.value = [];
+1 -1
View File
@@ -42,7 +42,7 @@ type InsertFnType = (_url: string, _alt: string, _href: string) => void;
defineProps({
height: {
type: String,
default: "500px",
default: "200px",
},
});
// 双向绑定