From b873f72e415f4ba5ddcdf2c86370218af2a9bb58 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Wed, 19 Nov 2025 10:47:28 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/dashboard.js | 24 +
components/index/ContentDashboard.vue | 6 +-
pages.json | 6 +
pages/notice/list/index.vue | 738 ++++++++++++++++++++++++++
4 files changed, 770 insertions(+), 4 deletions(-)
create mode 100644 pages/notice/list/index.vue
diff --git a/api/dashboard.js b/api/dashboard.js
index fe4c78d..e40a5fe 100644
--- a/api/dashboard.js
+++ b/api/dashboard.js
@@ -54,6 +54,12 @@ export const getCustomerStatistics = (params = {}) => {
* @param {Object} params 请求参数
* @param {number} params.pageNum 页码
* @param {number} params.pageSize 每页数量
+ * @param {string} params.title 标题(搜索)
+ * @param {string} params.userName 创建人(搜索)
+ * @param {string} params.level 重要程度(筛选)
+ * @param {boolean} params.top 是否置顶(筛选)
+ * @param {string} params.orderByColumn 排序字段
+ * @param {string} params.isAsc 排序方式(ascending/descending)
* @returns {Promise} 返回公告列表
*/
export const getNoticeList = (params = {}) => {
@@ -65,6 +71,24 @@ export const getNoticeList = (params = {}) => {
if (params.pageSize !== undefined) {
queryParams.push(`pageSize=${params.pageSize}`);
}
+ if (params.title) {
+ queryParams.push(`title=${encodeURIComponent(params.title)}`);
+ }
+ if (params.userName) {
+ queryParams.push(`userName=${encodeURIComponent(params.userName)}`);
+ }
+ if (params.level) {
+ queryParams.push(`level=${encodeURIComponent(params.level)}`);
+ }
+ if (params.top !== undefined && params.top !== null && params.top !== '') {
+ queryParams.push(`top=${params.top}`);
+ }
+ if (params.orderByColumn) {
+ queryParams.push(`orderByColumn=${encodeURIComponent(params.orderByColumn)}`);
+ }
+ if (params.isAsc) {
+ queryParams.push(`isAsc=${encodeURIComponent(params.isAsc)}`);
+ }
const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
diff --git a/components/index/ContentDashboard.vue b/components/index/ContentDashboard.vue
index 1a6b9f2..a685a3b 100644
--- a/components/index/ContentDashboard.vue
+++ b/components/index/ContentDashboard.vue
@@ -460,10 +460,8 @@ const viewAnnouncement = (announcement) => {
// 查看全部公告
const viewAllAnnouncements = () => {
- // TODO: 跳转到公告列表页
- uni.showToast({
- title: '查看全部公告',
- icon: 'none'
+ uni.navigateTo({
+ url: '/pages/notice/list/index'
});
};
diff --git a/pages.json b/pages.json
index 80d3f59..28663d5 100644
--- a/pages.json
+++ b/pages.json
@@ -150,6 +150,12 @@
"style": {
"navigationBarTitleText": "项目管理"
}
+ },
+ {
+ "path": "pages/notice/list/index",
+ "style": {
+ "navigationBarTitleText": "公告列表"
+ }
}
],
diff --git a/pages/notice/list/index.vue b/pages/notice/list/index.vue
new file mode 100644
index 0000000..ca5ad94
--- /dev/null
+++ b/pages/notice/list/index.vue
@@ -0,0 +1,738 @@
+
+
+
+
+
+
+ 标题
+
+
+
+ 创建人
+
+
+
+
+
+
+ 重要程度
+
+
+ {{ getLevelText(searchForm.level) || '请选择重要程度' }}
+
+ ▼
+
+
+
+
+
+
+ 选择重要程度
+
+
+ {{ item.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
+ 是否置顶
+
+
+ 全部
+
+
+ 是
+
+
+ 否
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ truncateText(notice.content, 50) }}
+
+
+
+
+
+ 👤
+ {{ notice.userName || '未知' }}
+
+
+ 🕐
+ {{ formatTime(notice.createTime) }}
+
+
+
+
+
+
+ 接收用户:
+
+
+
+ {{ user.nickName?.charAt(0) || '?' }}
+
+
+ 等{{ notice.receiveUserList.length }}项
+
+
+
+
+ 接收部门:
+
+
+ {{ dept.deptName }}
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+ 暂无公告
+
+
+
+
+ 上拉加载更多
+
+
+ 没有更多数据了
+
+
+
+
+
+
+
+
+
+