From 4f3622a553eb77d7aed962839fd2df23f74ff424 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Dec 2024 18:15:40 +0800 Subject: [PATCH] =?UTF-8?q?[Debug]=20=E9=BB=98=E8=AE=A4=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E8=BF=87=E9=95=BF=E7=9A=84=E6=97=A5=E5=BF=97=20[=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86]=20=E6=94=AF=E6=8C=81=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=90=9C=E7=B4=A2=E5=92=8C=E4=B8=8B=E8=BD=BD=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E6=9F=A5=E7=9C=8B=20[=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20=E6=94=AF=E6=8C=81=E5=90=8E=E5=8F=B0=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=85=B6=E4=BB=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 + src/api/task.js | 19 ++ src/api/user.js | 13 + src/views/DebugView.vue | 51 +++- src/views/TaskManagement.vue | 454 ++++++++++++++++++++--------------- src/views/UserManagement.vue | 164 ++++++++++++- 6 files changed, 505 insertions(+), 206 deletions(-) diff --git a/src/App.vue b/src/App.vue index c664e0e..889458c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -127,4 +127,14 @@ onMounted(async () => { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } + +/* 全局气泡提示样式 */ +.el-popper { + z-index: 9999 !important; +} + +/* 确保日志内容的气泡提示显示在最上层 */ +.el-popper.is-pure.el-tooltip__popper { + z-index: 99999 !important; +} \ No newline at end of file diff --git a/src/api/task.js b/src/api/task.js index 09da9b4..96a284e 100644 --- a/src/api/task.js +++ b/src/api/task.js @@ -112,5 +112,24 @@ export const TaskAPI = { */ getConnectionPoolInfo() { return request.get('/Management/GetConnectionPoolInfo') + }, + + /** + * 获取任务下载历史 + * @param {string} taskId 任务ID + */ + getDownloadHistory(taskId) { + return request.get(`/Management/GetDownloadHistory/${taskId}`) + }, + + /** + * 搜索任务 + * @param {Object} params 搜索参数 + * @param {string} params.keyword 搜索关键词 + * @param {number} params.page 页码 + * @param {number} params.pageSize 每页数量 + */ + searchTasks(params) { + return request.get('/Management/SearchTasks', { params }) } } \ No newline at end of file diff --git a/src/api/user.js b/src/api/user.js index f32d0a2..2c884f7 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -103,5 +103,18 @@ export const UserAPI = { return request.post(`/user/updateNickname/${userId}`, { newNickname }) + }, + + /** + * 添加用户 + * @param {Object} data 用户信息 + * @param {string} data.username 用户名 + * @param {string} data.password 密码 + * @param {string} data.nickname 昵称 + * @param {string} data.email 邮箱 + * @param {number} data.mask 权限掩码 + */ + addUser(data) { + return request.post('/Management/AddUser', data) } } \ No newline at end of file diff --git a/src/views/DebugView.vue b/src/views/DebugView.vue index 1b03dcf..e9fd8e3 100644 --- a/src/views/DebugView.vue +++ b/src/views/DebugView.vue @@ -179,11 +179,24 @@ + min-width="300"> @@ -459,6 +472,19 @@ const showExceptionDialog = (exception) => { currentException.value = exception exceptionDialogVisible.value = true } + +// 添加展开状态管理 +const expandedMessages = ref({}) + +// 判断是否是长消息 +const isLongMessage = (message) => { + return message && message.length > 100 +} + +// 切换消息展开状态 +const toggleMessage = (logId) => { + expandedMessages.value[logId] = !expandedMessages.value[logId] +} \ No newline at end of file + +.details-tabs { + margin-top: 20px; +} + +/* 移动端样式优化 */ +@media screen and (max-width: 768px) { + .details-tabs { + :deep(.el-tabs__header) { + margin-bottom: 12px; + } + + :deep(.el-tabs__item) { + padding: 0 12px; + font-size: 13px; + } + } + + :deep(.el-table) { + font-size: 12px; + + .el-table__cell { + padding: 6px; + } + } +} + \ No newline at end of file diff --git a/src/views/UserManagement.vue b/src/views/UserManagement.vue index 2146dbc..3f1623a 100644 --- a/src/views/UserManagement.vue +++ b/src/views/UserManagement.vue @@ -20,6 +20,9 @@ + + 添加用户 + @@ -177,13 +180,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file