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 @@