From 73dd7cd3d5a08593de6424835f50634668e16fae Mon Sep 17 00:00:00 2001 From: lijiahang Date: Fri, 8 Dec 2023 16:40:14 +0800 Subject: [PATCH] =?UTF-8?q?feat.=20=E7=BB=88=E7=AB=AF=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...on-vue-views-components-form-drawer.vue.vm | 1 - ...ion-vue-views-components-form-modal.vue.vm | 1 - orion-ops-ui/src/api/user/preference.ts | 8 +-- .../user/user/update-password-modal.vue | 1 - .../grant/components/host-identity-grant.vue | 8 ++- .../components/host-identity-form-modal.vue | 1 - .../components/host-key-form-drawer.vue | 1 - .../components/config/ssh/types/const.ts | 2 +- .../host-list/components/host-form-modal.vue | 1 - .../components/layout/terminal-content.vue | 11 +++- .../terminal/components/terminal-example.vue | 13 ++-- .../components/terminal-theme-setting.vue | 65 +++++++++---------- .../src/views/host-ops/terminal/index.vue | 51 +++++++++++---- .../host-ops/terminal/types/terminal.theme.ts | 4 +- .../host-ops/terminal/types/terminal.type.ts | 28 ++++---- .../components/dict-key-form-modal.vue | 1 - .../dict-key/components/dict-key-table.vue | 6 +- .../components/dict-value-form-modal.vue | 13 ++-- .../menu/components/menu-form-modal.vue | 1 - .../user/role/components/role-form-modal.vue | 1 - .../role/components/role-menu-grant-modal.vue | 1 - .../user/user/components/user-form-modal.vue | 1 - .../user-grant-roles-form-modal.vue | 1 - .../user-reset-password-form-modal.vue | 1 - 24 files changed, 128 insertions(+), 94 deletions(-) diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm index af036585..255afef4 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm @@ -151,7 +151,6 @@ // 清空 const handlerClear = () => { setLoading(false); - setVisible(false); }; diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm index 60f2e3ce..c6302208 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm @@ -155,7 +155,6 @@ // 清空 const handlerClear = () => { setLoading(false); - setVisible(false); }; diff --git a/orion-ops-ui/src/api/user/preference.ts b/orion-ops-ui/src/api/user/preference.ts index cb3aa215..1f590663 100644 --- a/orion-ops-ui/src/api/user/preference.ts +++ b/orion-ops-ui/src/api/user/preference.ts @@ -13,8 +13,8 @@ export interface PreferenceUpdateRequest { /** * 用户偏好查询响应 */ -export interface PreferenceQueryResponse { - config: object; +export interface PreferenceQueryResponse { + config: T; } /** @@ -34,7 +34,7 @@ export function updatePreferencePartial(request: PreferenceUpdateRequest) { /** * 查询用户偏好 */ -export function getPreference(type: Preference) { - return axios.get('/infra/preference/get', { params: { type } }); +export function getPreference(type: Preference) { + return axios.get>('/infra/preference/get', { params: { type } }); } diff --git a/orion-ops-ui/src/components/user/user/update-password-modal.vue b/orion-ops-ui/src/components/user/user/update-password-modal.vue index 43e30858..e482d84f 100644 --- a/orion-ops-ui/src/components/user/user/update-password-modal.vue +++ b/orion-ops-ui/src/components/user/user/update-password-modal.vue @@ -125,7 +125,6 @@ // 清空 const handlerClear = () => { setLoading(false); - setVisible(false); }; diff --git a/orion-ops-ui/src/views/asset/grant/components/host-identity-grant.vue b/orion-ops-ui/src/views/asset/grant/components/host-identity-grant.vue index 29a54b14..004412e4 100644 --- a/orion-ops-ui/src/views/asset/grant/components/host-identity-grant.vue +++ b/orion-ops-ui/src/views/asset/grant/components/host-identity-grant.vue @@ -86,8 +86,6 @@ onMounted(async () => { setLoading(true); try { - // 加载主机秘钥 - hostKeys.value = await cacheStore.loadHostKeys(); // 加载主机身份 hostIdentities.value = await cacheStore.loadHostIdentities(); } catch (e) { @@ -96,6 +94,12 @@ } }); + // 初始化数据 + onMounted(async () => { + // 加载主机秘钥 + hostKeys.value = await cacheStore.loadHostKeys(); + }); +