From 48d308b1a835ce370250a27bbbcbe66514ab17ad Mon Sep 17 00:00:00 2001 From: lijiahang Date: Wed, 17 Jul 2024 13:38:51 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ssh-config-form.vue | 38 ++++++++++------ .../batch-upload/components/upload-panel.vue | 2 +- .../components/exec-command-panel-history.vue | 14 ++++-- .../views/exec/exec-command/types/const.ts | 6 +++ .../components/sftp/sftp-table-header.vue | 1 + .../terminal/components/sftp/sftp-view.vue | 2 +- .../system/menu/components/menu-table.vue | 44 ++++++++++++++----- .../views/user/role/types/table.columns.ts | 2 + 8 files changed, 80 insertions(+), 29 deletions(-) diff --git a/orion-visor-ui/src/views/asset/host-config/components/ssh-config-form.vue b/orion-visor-ui/src/views/asset/host-config/components/ssh-config-form.vue index 686cf5c7..11af8acb 100644 --- a/orion-visor-ui/src/views/asset/host-config/components/ssh-config-form.vue +++ b/orion-visor-ui/src/views/asset/host-config/components/ssh-config-form.vue @@ -84,27 +84,27 @@ :hide-asterisk="true"> + + + + + + - - - - - - - @@ -311,4 +311,14 @@ width: 148px; margin-left: 8px; } + + :deep(.arco-collapse-item-content) { + background: unset; + padding: 0; + } + + :deep(.arco-collapse-item-header) { + border: none; + } + diff --git a/orion-visor-ui/src/views/exec/batch-upload/components/upload-panel.vue b/orion-visor-ui/src/views/exec/batch-upload/components/upload-panel.vue index ff438127..0e970ad2 100644 --- a/orion-visor-ui/src/views/exec/batch-upload/components/upload-panel.vue +++ b/orion-visor-ui/src/views/exec/batch-upload/components/upload-panel.vue @@ -143,7 +143,7 @@ // 上传文件 await filesRef.value.startUpload(data.token); } catch (e) { - taskStatus.value = UploadTaskStepStatus.FAILED; + taskStatus.value = UploadTaskStepStatus.WAITING; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue b/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue index 6566c45a..6a0bec60 100644 --- a/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue +++ b/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue @@ -47,7 +47,7 @@ import type { ExecCommandRequest } from '@/api/exec/exec-command'; import { onMounted, ref } from 'vue'; import { getExecCommandLogHistory } from '@/api/exec/exec-command-log'; - import { historyCount } from '../types/const'; + import { historyCount, descOmit, omit } from '../types/const'; import useLoading from '@/hooks/loading'; const emits = defineEmits(['selected']); @@ -58,12 +58,20 @@ // 添加 const add = (record: ExecCommandRequest) => { + const command = record.command as string; + if (!record.description) { + if (command.length < descOmit + omit.length) { + record.description = command; + } else { + record.description = command.substring(0, descOmit) + omit; + } + } const index = historyLogs.value.findIndex(s => s.description === record.description); if (index === -1) { // 不存在 historyLogs.value.unshift({ description: record.description, - command: record.command, + command: command, parameterSchema: record.parameterSchema, timeout: record.timeout, hostIdList: record.hostIdList @@ -74,7 +82,7 @@ historyLogs.value.splice(index, 1); historyLogs.value.unshift({ ...his, - command: record.command, + command: command, parameterSchema: record.parameterSchema, timeout: record.timeout, hostIdList: record.hostIdList diff --git a/orion-visor-ui/src/views/exec/exec-command/types/const.ts b/orion-visor-ui/src/views/exec/exec-command/types/const.ts index 38302e24..2f1fa5a5 100644 --- a/orion-visor-ui/src/views/exec/exec-command/types/const.ts +++ b/orion-visor-ui/src/views/exec/exec-command/types/const.ts @@ -1,2 +1,8 @@ // 历史数量 export const historyCount = 15; + +// 描述最大大小 +export const descOmit = 60; + +// 省略 +export const omit = '...'; diff --git a/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-table-header.vue b/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-table-header.vue index a22f0ed5..0e1a2abc 100644 --- a/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-table-header.vue +++ b/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-table-header.vue @@ -353,6 +353,7 @@ :deep(.sftp-path-unit) { cursor: pointer; + white-space: nowrap; font-size: 12px; &:hover { diff --git a/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-view.vue b/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-view.vue index 78221595..35007525 100644 --- a/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-view.vue +++ b/orion-visor-ui/src/views/host/terminal/components/sftp/sftp-view.vue @@ -148,7 +148,7 @@ // 下载文件 const downloadFiles = (paths: Array) => { if (!paths.length) { - return paths; + return; } Message.success('已开始下载, 点击右侧传输列表查看进度'); // 映射为文件 diff --git a/orion-visor-ui/src/views/system/menu/components/menu-table.vue b/orion-visor-ui/src/views/system/menu/components/menu-table.vue index 67c96cb1..cbfb7d5c 100644 --- a/orion-visor-ui/src/views/system/menu/components/menu-table.vue +++ b/orion-visor-ui/src/views/system/menu/components/menu-table.vue @@ -140,6 +140,30 @@ + + + + + +