From e0a6057515b31ab7bce74c8b170886e229cbd4b8 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Wed, 18 Oct 2023 18:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E7=BB=93=E6=9E=84.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset/host/components/host-card-list.vue | 2 +- .../host/components/host-config-ssh-form.vue | 2 +- .../asset/host/components/host-form-modal.vue | 2 +- .../asset/host/components/host-table.vue | 2 +- ...fig.rules.ts => host-config.form.rules.ts} | 0 .../{card.fields.ts => host.card.fields.ts} | 0 .../{form.rules.ts => host.form.rules.ts} | 0 ...table.columns.ts => host.table.columns.ts} | 1 - .../dict/components/dict-key-form-modal.vue | 151 ++++++++++++++++++ .../dict/components/dict-value-form-modal.vue | 2 +- .../dict/components/dict-value-table.vue | 6 +- orion-ops-ui/src/views/system/dict/index.vue | 40 +++-- .../system/dict/types/dict-key.form.rules.ts | 37 +++++ .../dict/types/dict-key.table.columns.ts | 75 +++++++++ ...form.rules.ts => dict-value.form.rules.ts} | 0 ...columns.ts => dict-value.table.columns.ts} | 0 .../src/views/system/dict/types/enum.types.ts | 26 +++ 17 files changed, 326 insertions(+), 20 deletions(-) rename orion-ops-ui/src/views/asset/host/types/{host-config.rules.ts => host-config.form.rules.ts} (100%) rename orion-ops-ui/src/views/asset/host/types/{card.fields.ts => host.card.fields.ts} (100%) rename orion-ops-ui/src/views/asset/host/types/{form.rules.ts => host.form.rules.ts} (100%) rename orion-ops-ui/src/views/asset/host/types/{table.columns.ts => host.table.columns.ts} (98%) create mode 100644 orion-ops-ui/src/views/system/dict/components/dict-key-form-modal.vue create mode 100644 orion-ops-ui/src/views/system/dict/types/dict-key.form.rules.ts create mode 100644 orion-ops-ui/src/views/system/dict/types/dict-key.table.columns.ts rename orion-ops-ui/src/views/system/dict/types/{form.rules.ts => dict-value.form.rules.ts} (100%) rename orion-ops-ui/src/views/system/dict/types/{table.columns.ts => dict-value.table.columns.ts} (100%) diff --git a/orion-ops-ui/src/views/asset/host/components/host-card-list.vue b/orion-ops-ui/src/views/asset/host/components/host-card-list.vue index 72c6d8d5..cc4f48fd 100644 --- a/orion-ops-ui/src/views/asset/host/components/host-card-list.vue +++ b/orion-ops-ui/src/views/asset/host/components/host-card-list.vue @@ -145,7 +145,7 @@ import { computed, reactive, ref } from 'vue'; import useLoading from '@/hooks/loading'; import { dataColor, objectTruthKeyCount, resetObject } from '@/utils'; - import fieldConfig from '../types/card.fields'; + import fieldConfig from '../types/host.card.fields'; import { deleteHost, getHostPage, HostQueryRequest, HostQueryResponse } from '@/api/asset/host'; import { Message, Modal } from '@arco-design/web-vue'; import { tagColor } from '@/views/asset/host/types/const'; diff --git a/orion-ops-ui/src/views/asset/host/components/host-config-ssh-form.vue b/orion-ops-ui/src/views/asset/host/components/host-config-ssh-form.vue index 0f745094..17d23ba9 100644 --- a/orion-ops-ui/src/views/asset/host/components/host-config-ssh-form.vue +++ b/orion-ops-ui/src/views/asset/host/components/host-config-ssh-form.vue @@ -141,7 +141,7 @@ import { ref, watch } from 'vue'; import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host'; import { HostSshConfig, AuthTypeEnum } from '@/views/asset/host/types/host-config.types'; - import { sshRules } from '@/views/asset/host/types/host-config.rules'; + import { sshRules } from '@/views/asset/host/types/host-config.form.rules'; import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue'; import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue'; import { toOptions } from '@/utils/enum'; diff --git a/orion-ops-ui/src/views/asset/host/components/host-form-modal.vue b/orion-ops-ui/src/views/asset/host/components/host-form-modal.vue index dbbe384d..2e8a5136 100644 --- a/orion-ops-ui/src/views/asset/host/components/host-form-modal.vue +++ b/orion-ops-ui/src/views/asset/host/components/host-form-modal.vue @@ -56,7 +56,7 @@ import { ref } from 'vue'; import useLoading from '@/hooks/loading'; import useVisible from '@/hooks/visible'; - import formRules from '../types/form.rules'; + import formRules from '../types/host.form.rules'; import { createHost, updateHost, HostUpdateRequest } from '@/api/asset/host'; import { Message } from '@arco-design/web-vue'; import TagMultiSelector from '@/components/meta/tag/tag-multi-selector.vue'; 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 205a0acd..cb706d8a 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 @@ -166,7 +166,7 @@ import { deleteHost, getHostPage, HostQueryRequest, HostQueryResponse } from '@/api/asset/host'; import { Message } from '@arco-design/web-vue'; import useLoading from '@/hooks/loading'; - import columns from '../types/table.columns'; + import columns from '../types/host.table.columns'; import { tagColor } from '../types/const'; import { usePagination } from '@/types/table'; import useCopy from '@/hooks/copy'; diff --git a/orion-ops-ui/src/views/asset/host/types/host-config.rules.ts b/orion-ops-ui/src/views/asset/host/types/host-config.form.rules.ts similarity index 100% rename from orion-ops-ui/src/views/asset/host/types/host-config.rules.ts rename to orion-ops-ui/src/views/asset/host/types/host-config.form.rules.ts diff --git a/orion-ops-ui/src/views/asset/host/types/card.fields.ts b/orion-ops-ui/src/views/asset/host/types/host.card.fields.ts similarity index 100% rename from orion-ops-ui/src/views/asset/host/types/card.fields.ts rename to orion-ops-ui/src/views/asset/host/types/host.card.fields.ts diff --git a/orion-ops-ui/src/views/asset/host/types/form.rules.ts b/orion-ops-ui/src/views/asset/host/types/host.form.rules.ts similarity index 100% rename from orion-ops-ui/src/views/asset/host/types/form.rules.ts rename to orion-ops-ui/src/views/asset/host/types/host.form.rules.ts diff --git a/orion-ops-ui/src/views/asset/host/types/table.columns.ts b/orion-ops-ui/src/views/asset/host/types/host.table.columns.ts similarity index 98% rename from orion-ops-ui/src/views/asset/host/types/table.columns.ts rename to orion-ops-ui/src/views/asset/host/types/host.table.columns.ts index 0c6497ea..19cb9ab2 100644 --- a/orion-ops-ui/src/views/asset/host/types/table.columns.ts +++ b/orion-ops-ui/src/views/asset/host/types/host.table.columns.ts @@ -22,7 +22,6 @@ const columns = [ title: '主机地址', dataIndex: 'address', slotName: 'address', - width: 260 }, { title: '主机标签', dataIndex: 'tags', diff --git a/orion-ops-ui/src/views/system/dict/components/dict-key-form-modal.vue b/orion-ops-ui/src/views/system/dict/components/dict-key-form-modal.vue new file mode 100644 index 00000000..152c494b --- /dev/null +++ b/orion-ops-ui/src/views/system/dict/components/dict-key-form-modal.vue @@ -0,0 +1,151 @@ + + + + + + + diff --git a/orion-ops-ui/src/views/system/dict/components/dict-value-form-modal.vue b/orion-ops-ui/src/views/system/dict/components/dict-value-form-modal.vue index f81a47fa..917534fe 100644 --- a/orion-ops-ui/src/views/system/dict/components/dict-value-form-modal.vue +++ b/orion-ops-ui/src/views/system/dict/components/dict-value-form-modal.vue @@ -67,7 +67,7 @@ import { ref } from 'vue'; import useLoading from '@/hooks/loading'; import useVisible from '@/hooks/visible'; - import formRules from '../types/form.rules'; + import formRules from '../types/dict-value.form.rules'; import { createDictValue, updateDictValue, DictValueUpdateRequest } from '@/api/system/dict-value'; import { Message } from '@arco-design/web-vue'; import {} from '../types/const'; diff --git a/orion-ops-ui/src/views/system/dict/components/dict-value-table.vue b/orion-ops-ui/src/views/system/dict/components/dict-value-table.vue index 84a251da..0914a08e 100644 --- a/orion-ops-ui/src/views/system/dict/components/dict-value-table.vue +++ b/orion-ops-ui/src/views/system/dict/components/dict-value-table.vue @@ -95,7 +95,7 @@ + @click="emits('openUpdateValue', record)"> 修改 @@ -134,7 +134,7 @@ import { batchDeleteDictValue, deleteDictValue, getDictValuePage, DictValueQueryRequest, DictValueQueryResponse } from '@/api/system/dict-value'; import { Message } from '@arco-design/web-vue'; import useLoading from '@/hooks/loading'; - import columns from '../types/table.columns'; + import columns from '../types/dict-value.table.columns'; import { usePagination, useRowSelection } from '@/types/table'; import {} from '../types/const'; import {} from '../types/enum.types'; @@ -142,7 +142,7 @@ const tableRenderData = ref([]); const { loading, setLoading } = useLoading(); - const emits = defineEmits(['openAddKey', 'openAddValue', 'openValueUpdate', 'openValueHistory']); + const emits = defineEmits(['openAddKey', 'openAddValue', 'openUpdateValue', 'openValueHistory']); const pagination = usePagination(); const selectedKeys = ref([]); diff --git a/orion-ops-ui/src/views/system/dict/index.vue b/orion-ops-ui/src/views/system/dict/index.vue index 4e7aff24..d3113f3e 100644 --- a/orion-ops-ui/src/views/system/dict/index.vue +++ b/orion-ops-ui/src/views/system/dict/index.vue @@ -2,12 +2,18 @@
- - + @openAddKey="() => keyModal.openAdd()" + @openValueHistory="() => keyModal.openAdd()" + @openAddValue="() => valueModal.openAdd()" + @openUpdateValue="(e) => valueModal.openUpdate(e)" /> + + + +
@@ -20,19 +26,31 @@