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