From 66efa6c3104a722ae746cc2a6fd86d5f6905fbee Mon Sep 17 00:00:00 2001 From: Kunagisa <1549184870@qq.com> Date: Thu, 10 Jul 2025 17:21:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=94=B9=E4=BA=86=E5=A5=BD?= =?UTF-8?q?=E5=A4=9A=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E8=BE=93=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8Cqq=E5=8F=B7?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/demands.js | 14 + src/components/backend/AffairManagement.vue | 306 ++++++++++++++++---- src/components/login_module.vue | 8 +- src/views/index/DemandList.vue | 2 +- 4 files changed, 264 insertions(+), 66 deletions(-) diff --git a/src/api/demands.js b/src/api/demands.js index 096cea8..adcc47b 100644 --- a/src/api/demands.js +++ b/src/api/demands.js @@ -99,3 +99,17 @@ export const addDemandReply = async (id, replyData) => { throw error; } }; + +/** + * 获取所有需求列表(管理员) + * @returns {Promise>} 返回所有需求列表数据 + */ +export const getAllDemandsList = async () => { + try { + const response = await axiosInstance.get('/demands/getlistall'); + return response.data; + } catch (error) { + console.error('获取所有需求列表失败:', error); + throw error; + } +}; diff --git a/src/components/backend/AffairManagement.vue b/src/components/backend/AffairManagement.vue index 14f12d7..73caac1 100644 --- a/src/components/backend/AffairManagement.vue +++ b/src/components/backend/AffairManagement.vue @@ -50,15 +50,27 @@ {{ formatDate(demand.date) }} {{ getReplyCount(demand.sendcontent) }} - - {{ isDeleted(demand.content) ? '已删除' : '正常' }} + + {{ getStatusText(demand) }} - - - + + + @@ -99,23 +111,27 @@
状态: - - {{ isDeleted(selectedDemand?.content) ? '已删除' : '正常' }} + + {{ getStatusText(selectedDemand) }}

回复内容

-
-
+
+
- User Avatar + User Avatar
- {{ parseReplyText(reply).user }} {{ parseReplyText(reply).content }} + {{ parsedReply.user }} + {{ parsedReply.content }}
+
+ 加载中... +
暂无回复
@@ -201,7 +217,9 @@