From 5d43a9ce886087f562a2f9ccdc1e7c850ed0fa90 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Thu, 26 Oct 2023 19:25:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=97=E5=85=B8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orion-ops-ui/src/api/system/dict-value.ts | 22 +++++++---------- .../src/components/view/editor/core.ts | 2 +- .../asset/host/components/host-table.vue | 14 ++++------- .../dict-key/components/dict-key-table.vue | 5 ++-- .../components/dict-key-view-modal.vue | 6 ++--- .../src/views/system/dict-key/types/const.ts | 2 +- .../system/dict-key/types/table.columns.ts | 12 +++++----- .../components/dict-value-form-modal.vue | 10 -------- .../components/dict-value-table.vue | 24 ++++--------------- .../system/dict-value/types/form.rules.ts | 9 ------- .../system/dict-value/types/table.columns.ts | 18 +++++--------- 11 files changed, 36 insertions(+), 88 deletions(-) diff --git a/orion-ops-ui/src/api/system/dict-value.ts b/orion-ops-ui/src/api/system/dict-value.ts index 6f8a71f6..c4de113a 100644 --- a/orion-ops-ui/src/api/system/dict-value.ts +++ b/orion-ops-ui/src/api/system/dict-value.ts @@ -38,7 +38,6 @@ export interface DictValueQueryRequest extends Pagination { id?: number; keyId?: number; keyName?: string; - name?: string; value?: string; label?: string; extra?: string; @@ -53,7 +52,6 @@ export interface DictValueQueryResponse extends TableData { keyId?: number; keyName?: string; keyDescription?: string; - name?: string; value?: string; label?: string; extra?: string; @@ -65,9 +63,9 @@ export interface DictValueQueryResponse extends TableData { } /** - * 字典配置值枚举查询响应 + * 字典配置值选项查询响应 */ -export interface DictValueEnumQueryResponse extends Options { +export interface DictValueOptionsQueryResponse extends Options { [key: string]: unknown; } @@ -96,15 +94,13 @@ export function rollbackDictValue(request: DictValueRollbackRequest) { /** * 查询字典配置值 */ -export function getDictValue(keyName: string) { - return axios.get>('/infra/dict-value/list', { params: { keyName } }); -} - -/** - * 查询字典配置值枚举 - */ -export function getDictValueEnum(keyName: string) { - return axios.get>('/infra/dict-value/enum', { params: { keyName } }); +export function getDictValueList(keys: string[]) { + return axios.get>>('/infra/dict-value/list', { + params: { keys }, + paramsSerializer: params => { + return qs.stringify(params, { arrayFormat: 'comma' }); + } + }); } /** diff --git a/orion-ops-ui/src/components/view/editor/core.ts b/orion-ops-ui/src/components/view/editor/core.ts index 65c8f20a..b3adc7e5 100644 --- a/orion-ops-ui/src/components/view/editor/core.ts +++ b/orion-ops-ui/src/components/view/editor/core.ts @@ -84,7 +84,7 @@ export const createDefaultOptions = (): Options => { minimap: { enabled: false, }, - fontSize: 16, + fontSize: 14, scrollBeyondLastLine: false, overviewRulerBorder: false, colorDecorators: true, diff --git a/orion-ops-ui/src/views/asset/host/components/host-table.vue b/orion-ops-ui/src/views/asset/host/components/host-table.vue index 30d2eddb..b8042c57 100644 --- a/orion-ops-ui/src/views/asset/host/components/host-table.vue +++ b/orion-ops-ui/src/views/asset/host/components/host-table.vue @@ -92,11 +92,10 @@