From d7d8489e2b9fbafcc816d0b50f4aa40a983f5ce0 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Wed, 19 Nov 2025 16:13:12 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E7=BC=96=E8=BE=91=E5=92=8C?=
=?UTF-8?q?=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/dashboard.js | 30 ++
pages.json | 6 +
pages/notice/edit/index.vue | 896 ++++++++++++++++++++++++++++++++++++
pages/notice/list/index.vue | 74 ++-
4 files changed, 1003 insertions(+), 3 deletions(-)
create mode 100644 pages/notice/edit/index.vue
diff --git a/api/dashboard.js b/api/dashboard.js
index 6d1624a..ef4a298 100644
--- a/api/dashboard.js
+++ b/api/dashboard.js
@@ -133,3 +133,33 @@ export const createNotice = (payload) => {
});
};
+/**
+ * 修改公告
+ * 对应接口:PUT bst/notice
+ * @param {Object} payload 公告数据,必须包含 id
+ * @returns {Promise}
+ */
+export const updateNotice = (payload) => {
+ return uni.$uv.http.put('bst/notice', payload, {
+ custom: {
+ auth: true
+ }
+ });
+};
+
+/**
+ * 删除公告
+ * 对应接口:DELETE bst/notice/{id}
+ * 支持单个 ID 或多个 ID(数组,逗号分隔)
+ * @param {string|string[]} ids 公告ID或ID数组
+ * @returns {Promise}
+ */
+export const deleteNotice = (ids) => {
+ const idParam = Array.isArray(ids) ? ids.join(',') : ids;
+ return uni.$uv.http.delete(`bst/notice/${idParam}`, {},{
+ custom: {
+ auth: true
+ }
+ });
+};
+
diff --git a/pages.json b/pages.json
index 09a8c98..4139ac0 100644
--- a/pages.json
+++ b/pages.json
@@ -163,6 +163,12 @@
"navigationBarTitleText": "新增公告"
}
},
+ {
+ "path": "pages/notice/edit/index",
+ "style": {
+ "navigationBarTitleText": "修改公告"
+ }
+ },
{
"path": "pages/notice/detail/index",
"style": {
diff --git a/pages/notice/edit/index.vue b/pages/notice/edit/index.vue
new file mode 100644
index 0000000..24df02d
--- /dev/null
+++ b/pages/notice/edit/index.vue
@@ -0,0 +1,896 @@
+
+
+
+
+ 公告信息
+
+
+ 标题
+
+
+
+
+ 类型
+
+
+ {{ type.label }}
+
+
+
+
+
+ 重要程度
+
+
+ {{ level.label }}
+
+
+
+
+
+ 置顶
+
+
+
+
+ 内容
+
+
+
+
+
+ 附件
+
+
+
+
+
+ 接收对象
+
+
+ 接收用户
+
+
+
+ {{ user.userName }}
+ ✕
+
+
+ 请选择接收用户,可多选
+
+
+ {{ formData.receiveUsers.length ? '调整' : '选择' }}
+ ›
+
+
+
+
+ 接收部门
+
+
+
+ {{ dept.deptName }}
+ ✕
+
+
+ 请选择接收部门,可多选
+
+
+ {{ formData.receiveDepts.length ? '调整' : '选择' }}
+ ›
+
+
+
+
+ 至少选择接收用户或接收部门中的任意一项。
+
+
+
+
+
+
+ 保存修改
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ user.userName }}
+ {{ user.deptName }}
+
+
+
+
+ 暂无可选人员
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dept.deptName }}
+
+
+
+
+ 暂无可选部门
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/notice/list/index.vue b/pages/notice/list/index.vue
index 7f2050d..734b38f 100644
--- a/pages/notice/list/index.vue
+++ b/pages/notice/list/index.vue
@@ -255,7 +255,7 @@