From 14dc8e04079df4f07b9142fd0a85936438aa3ef4 Mon Sep 17 00:00:00 2001 From: lijiahangmax Date: Wed, 3 Dec 2025 09:45:21 +0800 Subject: [PATCH] =?UTF-8?q?:hammer:=20=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/dict-key-form-modal.vue | 2 -- .../dict-key/components/dict-key-table.vue | 7 +---- .../components/dict-value-form-modal.vue | 2 -- .../components/dict-value-table.vue | 3 -- .../menu/components/menu-form-modal.vue | 2 -- .../system/menu/components/menu-table.vue | 3 -- .../notify-template-form-drawer.vue | 2 -- .../components/notify-template-table.vue | 2 -- .../system/tags/components/tag-form-modal.vue | 2 -- .../system/tags/components/tag-table.vue | 2 -- .../command-snippet-drawer.vue | 1 - .../command-snippet-form-drawer.vue | 2 -- .../new-connection/host-list-view.vue | 1 - .../path-bookmark/path-bookmark-drawer.vue | 1 - .../path-bookmark-form-drawer.vue | 2 -- .../setting/extra/host-extra-modal.vue | 1 - .../shortcut/terminal-shortcut-setting.vue | 2 -- .../components/view/sftp/sftp-chmod-modal.vue | 18 +++++------- .../view/sftp/sftp-create-modal.vue | 28 ++++++++----------- .../components/view/sftp/sftp-move-modal.vue | 18 +++++------- orion-visor-ui/src/views/terminal/index.vue | 1 - 21 files changed, 27 insertions(+), 75 deletions(-) diff --git a/orion-visor-ui/src/views/system/dict-key/components/dict-key-form-modal.vue b/orion-visor-ui/src/views/system/dict-key/components/dict-key-form-modal.vue index 1c927741..b0107171 100644 --- a/orion-visor-ui/src/views/system/dict-key/components/dict-key-form-modal.vue +++ b/orion-visor-ui/src/views/system/dict-key/components/dict-key-form-modal.vue @@ -227,8 +227,6 @@ } // 清空 handlerClear(); - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/dict-key/components/dict-key-table.vue b/orion-visor-ui/src/views/system/dict-key/components/dict-key-table.vue index 512bf114..dc1387c4 100644 --- a/orion-visor-ui/src/views/system/dict-key/components/dict-key-table.vue +++ b/orion-visor-ui/src/views/system/dict-key/components/dict-key-table.vue @@ -188,7 +188,7 @@ const queryOrder = useQueryOrder(TableName, DESC); const { tableColumns, columnsHook } = useTableColumns(TableName, columns); const { loading, setLoading } = useLoading(); - const { toOptions, getDictValue } = useDictStore(); + const { getDictValue } = useDictStore(); const selectedKeys = ref>([]); const tableRenderData = ref>([]); @@ -207,7 +207,6 @@ Message.success('删除成功'); // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -223,7 +222,6 @@ selectedKeys.value = []; // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -246,7 +244,6 @@ // 查看 const { data } = await getDictValueList([record.keyName]); emits('openView', data[record.keyName], `${record.keyName} - ${record.description}`); - } catch (e) { } finally { setLoading(false); } @@ -260,7 +257,6 @@ Message.success('刷新成功 页面缓存刷新后生效'); // 加载字典数据 fetchTableData(); - } catch (e) { } finally { setLoading(false); } @@ -276,7 +272,6 @@ pagination.current = request.page; pagination.pageSize = request.limit; selectedKeys.value = []; - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/dict-value/components/dict-value-form-modal.vue b/orion-visor-ui/src/views/system/dict-value/components/dict-value-form-modal.vue index ac14cf3d..f6452356 100644 --- a/orion-visor-ui/src/views/system/dict-value/components/dict-value-form-modal.vue +++ b/orion-visor-ui/src/views/system/dict-value/components/dict-value-form-modal.vue @@ -204,8 +204,6 @@ } // 清空 handlerClear(); - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/dict-value/components/dict-value-table.vue b/orion-visor-ui/src/views/system/dict-value/components/dict-value-table.vue index 4887f820..11b76c4c 100644 --- a/orion-visor-ui/src/views/system/dict-value/components/dict-value-table.vue +++ b/orion-visor-ui/src/views/system/dict-value/components/dict-value-table.vue @@ -189,7 +189,6 @@ selectedKeys.value = []; // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -204,7 +203,6 @@ Message.success('删除成功'); // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -243,7 +241,6 @@ pagination.current = request.page; pagination.pageSize = request.limit; selectedKeys.value = []; - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/menu/components/menu-form-modal.vue b/orion-visor-ui/src/views/system/menu/components/menu-form-modal.vue index 08392179..fa6e1995 100644 --- a/orion-visor-ui/src/views/system/menu/components/menu-form-modal.vue +++ b/orion-visor-ui/src/views/system/menu/components/menu-form-modal.vue @@ -249,8 +249,6 @@ } // 清空 handlerClear(); - } catch (e) { - return false; } finally { setLoading(false); } 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 4bf1b847..e2a9b0da 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 @@ -265,7 +265,6 @@ } cacheStore.reset('menus'); Message.success('删除成功'); - } catch (e) { } finally { setFetchLoading(false); } @@ -289,7 +288,6 @@ if (all) { cacheStore.set('menus', data); } - } catch (e) { } finally { setFetchLoading(false); } @@ -318,7 +316,6 @@ Message.success('刷新成功 页面缓存刷新后生效'); // 加载菜单数据 await loadMenuData(true); - } catch (e) { } finally { setFetchLoading(false); } diff --git a/orion-visor-ui/src/views/system/notify-template/components/notify-template-form-drawer.vue b/orion-visor-ui/src/views/system/notify-template/components/notify-template-form-drawer.vue index 88e75dac..cefbab36 100644 --- a/orion-visor-ui/src/views/system/notify-template/components/notify-template-form-drawer.vue +++ b/orion-visor-ui/src/views/system/notify-template/components/notify-template-form-drawer.vue @@ -211,8 +211,6 @@ } // 清空 handlerClear(); - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/notify-template/components/notify-template-table.vue b/orion-visor-ui/src/views/system/notify-template/components/notify-template-table.vue index 8edf0eb2..6df9c6f7 100644 --- a/orion-visor-ui/src/views/system/notify-template/components/notify-template-table.vue +++ b/orion-visor-ui/src/views/system/notify-template/components/notify-template-table.vue @@ -213,7 +213,6 @@ Message.success('删除成功'); // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -236,7 +235,6 @@ pagination.total = data.total; pagination.current = request.page; pagination.pageSize = request.limit; - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/tags/components/tag-form-modal.vue b/orion-visor-ui/src/views/system/tags/components/tag-form-modal.vue index 50f5e3fb..a3f3aba2 100644 --- a/orion-visor-ui/src/views/system/tags/components/tag-form-modal.vue +++ b/orion-visor-ui/src/views/system/tags/components/tag-form-modal.vue @@ -104,8 +104,6 @@ } handleClose(); return true; - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/system/tags/components/tag-table.vue b/orion-visor-ui/src/views/system/tags/components/tag-table.vue index 1cea4a71..a04bb31b 100644 --- a/orion-visor-ui/src/views/system/tags/components/tag-table.vue +++ b/orion-visor-ui/src/views/system/tags/components/tag-table.vue @@ -167,7 +167,6 @@ Message.success('删除成功'); // 重新加载 reload(); - } catch (e) { } finally { setLoading(false); } @@ -196,7 +195,6 @@ pagination.total = data.total; pagination.current = request.page; pagination.pageSize = request.limit; - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-drawer.vue b/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-drawer.vue index 77e5ee8b..e646094b 100644 --- a/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-drawer.vue +++ b/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-drawer.vue @@ -147,7 +147,6 @@ ungroupedItems.value = data.ungroupedItems || []; // 设置状态 filterSnippet(); - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-form-drawer.vue b/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-form-drawer.vue index 7aa7bc08..3dcd5173 100644 --- a/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-form-drawer.vue +++ b/orion-visor-ui/src/views/terminal/components/command-snippet/command-snippet-form-drawer.vue @@ -122,8 +122,6 @@ } // 清空 handlerClear(); - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/new-connection/host-list-view.vue b/orion-visor-ui/src/views/terminal/components/new-connection/host-list-view.vue index ca67b2e6..899bd858 100644 --- a/orion-visor-ui/src/views/terminal/components/new-connection/host-list-view.vue +++ b/orion-visor-ui/src/views/terminal/components/new-connection/host-list-view.vue @@ -215,7 +215,6 @@ extra: JSON.stringify({ alias: item.alias }) }); item.editable = false; - } catch (e) { } finally { item.loading = false; item.modCount = 0; diff --git a/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-drawer.vue b/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-drawer.vue index 732b2da6..7e337603 100644 --- a/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-drawer.vue +++ b/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-drawer.vue @@ -149,7 +149,6 @@ ungroupedItems.value = data.ungroupedItems || []; // 设置状态 filterPath(); - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-form-drawer.vue b/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-form-drawer.vue index bd80f055..9f953e18 100644 --- a/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-form-drawer.vue +++ b/orion-visor-ui/src/views/terminal/components/path-bookmark/path-bookmark-form-drawer.vue @@ -126,8 +126,6 @@ } handleClose(); return true; - } catch (e) { - return false; } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/setting/extra/host-extra-modal.vue b/orion-visor-ui/src/views/terminal/components/setting/extra/host-extra-modal.vue index 20beb3e2..ccd2d86a 100644 --- a/orion-visor-ui/src/views/terminal/components/setting/extra/host-extra-modal.vue +++ b/orion-visor-ui/src/views/terminal/components/setting/extra/host-extra-modal.vue @@ -127,7 +127,6 @@ extra: value as string }); Message.success('保存成功'); - } catch (e) { } finally { setLoading(false); } diff --git a/orion-visor-ui/src/views/terminal/components/setting/shortcut/terminal-shortcut-setting.vue b/orion-visor-ui/src/views/terminal/components/setting/shortcut/terminal-shortcut-setting.vue index 713a4964..95f8bf1c 100644 --- a/orion-visor-ui/src/views/terminal/components/setting/shortcut/terminal-shortcut-setting.vue +++ b/orion-visor-ui/src/views/terminal/components/setting/shortcut/terminal-shortcut-setting.vue @@ -175,7 +175,6 @@ keys: shortcutKeys.value } as TerminalShortcutSetting); Message.success('保存成功'); - } catch (e) { } finally { setLoading(false); } @@ -232,7 +231,6 @@ onMounted(async () => { try { await loadUserPreference(); - } catch (e) { } finally { render.value = true; } diff --git a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-chmod-modal.vue b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-chmod-modal.vue index 1672966c..a15c4643 100644 --- a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-chmod-modal.vue +++ b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-chmod-modal.vue @@ -86,19 +86,15 @@ // 确定 const handlerOk = async () => { - try { - // 验证参数 - const error = await formRef.value.validate(); - if (error) { - return false; - } - // 提权 - if (props.session) { - props.session.chmod(formModel.value.path, formModel.value.mod); - } - } catch (e) { + // 验证参数 + const error = await formRef.value.validate(); + if (error) { return false; } + // 提权 + if (props.session) { + props.session.chmod(formModel.value.path, formModel.value.mod); + } }; diff --git a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-create-modal.vue b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-create-modal.vue index a02d069e..8c4422e5 100644 --- a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-create-modal.vue +++ b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-create-modal.vue @@ -67,24 +67,20 @@ // 确定 const handlerOk = async () => { - try { - // 验证参数 - const error = await formRef.value.validate(); - if (error) { - return false; - } - if (props.session) { - if (touch.value) { - // 创建文件 - props.session.touch(formModel.value.path); - } else { - // 创建文件夹 - props.session.mkdir(formModel.value.path); - } - } - } catch (e) { + // 验证参数 + const error = await formRef.value.validate(); + if (error) { return false; } + if (props.session) { + if (touch.value) { + // 创建文件 + props.session.touch(formModel.value.path); + } else { + // 创建文件夹 + props.session.mkdir(formModel.value.path); + } + } }; diff --git a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-move-modal.vue b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-move-modal.vue index 0ed6fdb2..e8d63a70 100644 --- a/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-move-modal.vue +++ b/orion-visor-ui/src/views/terminal/components/view/sftp/sftp-move-modal.vue @@ -72,19 +72,15 @@ // 确定 const handlerOk = async () => { - try { - // 验证参数 - const error = await formRef.value.validate(); - if (error) { - return false; - } - // 移动文件 - if (props.session) { - props.session.move(formModel.value.path, formModel.value.target); - } - } catch (e) { + // 验证参数 + const error = await formRef.value.validate(); + if (error) { return false; } + // 移动文件 + if (props.session) { + props.session.move(formModel.value.path, formModel.value.target); + } }; diff --git a/orion-visor-ui/src/views/terminal/index.vue b/orion-visor-ui/src/views/terminal/index.vue index 54a87c4b..9d0c2cdf 100644 --- a/orion-visor-ui/src/views/terminal/index.vue +++ b/orion-visor-ui/src/views/terminal/index.vue @@ -183,7 +183,6 @@ Message.error(`主机 ${connectHostId} 不存在/无权限`); } } - } catch (e) { } finally { setLoading(false); }