From ced3c6ee11e388fd9804dd477c48182910c2f22e Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Fri, 17 Jan 2025 18:17:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E5=B7=A5=E5=85=B7=E7=AE=B1?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B5=84=E6=BA=90=E6=B1=A0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=5Ftable=E5=85=A8=E5=B1=80=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=A2=9Eticket-payload=E7=BB=84=E4=BB=B6=20#?= =?UTF-8?q?8076=20#=20Reviewed,=20transaction=20id:=2029559?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/common/importComps.ts | 24 +++++++++ dbm-ui/frontend/src/hooks/useCreateTicket.tsx | 5 +- dbm-ui/frontend/src/types/biz-components.d.ts | 12 +++++ .../column/hybrid-host-column/Index.vue | 13 +++-- .../column/multiple-host-column/Index.vue | 13 +++-- .../column/single-host-column/Index.vue | 13 +++-- .../form-item/ticket-payload/Index.vue | 24 +++++++++ .../mysql/MYSQL_ADD_SLAVE/Create.vue | 21 ++++---- .../components/ClusterColumn.vue | 7 ++- .../components/ClusterMigrateTable.vue | 11 ++-- .../components/HostColumnGroup.vue | 19 ++++--- .../components/HostMigrateTable.vue | 11 ++-- .../mysql/MYSQL_PROXY_ADD/Create.vue | 21 ++++---- .../components/HostColumnGroup.vue | 19 ++++--- .../components/HostTable.vue | 11 ++-- .../components/InstanceColumnGroup.vue | 13 +++-- .../components/InstanceTable.vue | 11 ++-- .../components/local-restore/Index.vue | 27 +++++----- .../local-restore/SlaveInstanceColumn.vue | 7 ++- .../components/restore/Index.vue | 21 ++++---- .../restore/SlaveHostColumnGroup.vue | 13 +++-- .../WithRelatedClustersColumn.vue | 7 ++- .../redis/REDIS_CLUSTER_CUTOFF/Create.vue | 33 ++++++------ .../components/HostColumn.vue | 8 ++- .../components/SpecColumn.vue | 9 ++-- .../redis/REDIS_PROXY_SCALE_DOWN/Create.vue | 51 ++++++++----------- .../components/ClusterColumn.vue | 7 ++- .../redis/REDIS_SCALE_UPDOWN/Create.vue | 33 ++++++------ .../components/ClusterColumn.vue | 7 ++- .../components/CurrentCapacityColumn.vue | 7 ++- .../components/RedisVersionColumn.vue | 10 ++-- .../target-capacity-column/Index.vue | 9 ++-- .../sqlserver/SQLSERVER_ADD_SLAVE/Create.vue | 21 ++++---- .../components/ClusterColumn.vue | 7 ++- .../components/local-restore/Index.vue | 27 +++++----- .../local-restore/SlaveInstanceColumn.vue | 7 ++- .../components/restore/Index.vue | 21 ++++---- .../restore/SlaveHostColumnGroup.vue | 13 +++-- .../TENDBCLUSTER_MIGRATE_CLUSTER/Create.vue | 26 +++++----- .../components/MasterHostColumnGroup.vue | 13 +++-- .../components/SlaveHostColumnGroup.vue | 14 +++-- .../components/local-restore/Index.vue | 27 +++++----- .../local-restore/SlaveInstanceColumn.vue | 7 ++- .../components/restore/Index.vue | 32 ++++++------ .../components/restore/NewSlaveHostColumn.vue | 6 +-- .../restore/SlaveHostColumnGroup.vue | 13 +++-- .../TENDBCLUSTER_SPIDER_MNT_APPLY/Create.vue | 27 +++++----- .../components/ClusterColumn.vue | 7 ++- .../Create.vue | 32 ++++++------ .../components/ClusterColumn.vue | 7 ++- 50 files changed, 402 insertions(+), 402 deletions(-) create mode 100644 dbm-ui/frontend/src/views/db-manage/common/toolbox-field/form-item/ticket-payload/Index.vue diff --git a/dbm-ui/frontend/src/common/importComps.ts b/dbm-ui/frontend/src/common/importComps.ts index 61d2d3fb86..0b7f671539 100644 --- a/dbm-ui/frontend/src/common/importComps.ts +++ b/dbm-ui/frontend/src/common/importComps.ts @@ -30,6 +30,17 @@ import DbStatus from '@components/db-status/index.vue'; import DbTable from '@components/db-table/index.vue'; import DbOriginalTable from '@components/db-table/OriginalTable.vue'; import DbTextarea from '@components/db-textarea/DbTextarea.vue'; +import EditTable, { + Block as EditTableBlock, + Column as EditTableColumn, + DatePicker as EditTableDatePicker, + Input as EditTableInput, + Row as EditTableRow, + Select as EditTableSelect, + TagInput as EditTableTagInput, + Textarea as EditTableTextarea, + TimePicker as EditTableTimePicker, +} from '@components/editable-table/Index.vue'; import FunController from '@components/function-controller/FunController.vue'; import MoreActionExtend from '@components/more-action-extend/Index.vue'; import ScrollFaker from '@components/scroll-faker/Index.vue'; @@ -37,12 +48,25 @@ import SkeletonLoading from '@components/skeleton-loading/Index.vue'; import SmartAction from '@components/smart-action/Index.vue'; import { ipSelector } from '@components/vue2/ip-selector'; +import OperationColumn from '@views/db-manage/common/toolbox-field/column/operation-column/Index.vue'; + import { Table, TableColumn } from '@blueking/table'; import UserSelector from '@patch/user-selector/selector.vue'; import('@blueking/table/vue3/vue3.css'); export const setGlobalComps = (app: App) => { + app.component('EditTable', EditTable); + app.component('EditTableBlock', EditTableBlock); + app.component('EditTableColumn', EditTableColumn); + app.component('EditTableDatePicker', EditTableDatePicker); + app.component('EditTableInput', EditTableInput); + app.component('EditTableRow', EditTableRow); + app.component('EditTableSelect', EditTableSelect); + app.component('EditTableTagInput', EditTableTagInput); + app.component('EditTableTextarea', EditTableTextarea); + app.component('EditTableTimePicker', EditTableTimePicker); + app.component('OperationColumn', OperationColumn); app.component('DbCard', DbCard); app.component('DbForm', DbForm); app.component('DbFormItem', DbFormItem); diff --git a/dbm-ui/frontend/src/hooks/useCreateTicket.tsx b/dbm-ui/frontend/src/hooks/useCreateTicket.tsx index 1496f1c342..d3635f406d 100644 --- a/dbm-ui/frontend/src/hooks/useCreateTicket.tsx +++ b/dbm-ui/frontend/src/hooks/useCreateTicket.tsx @@ -13,11 +13,12 @@ export function useCreateTicket(ticketType: TicketTypes, options?: { onSucces const router = useRouter(); const { t, locale } = useI18n(); - const run = async (formData: { details: T; remark: string; ignore_duplication?: boolean }) => { + const run = async (formData: { details: T; remark?: string; ignore_duplication?: boolean }) => { const params = { ticket_type: ticketType, bk_biz_id: window.PROJECT_CONFIG.BIZ_ID, - ...formData, + details: formData.details, + remark: formData.remark || '', }; try { loading.value = true; diff --git a/dbm-ui/frontend/src/types/biz-components.d.ts b/dbm-ui/frontend/src/types/biz-components.d.ts index 9753c30ecd..e5b1aa2511 100644 --- a/dbm-ui/frontend/src/types/biz-components.d.ts +++ b/dbm-ui/frontend/src/types/biz-components.d.ts @@ -14,6 +14,18 @@ declare module 'vue' { DbStatus: typeof import('@components/db-status/index.vue').default; DbTable: typeof import('@blueking/table/typings/BkTable.vue'); DbTable: typeof import('@blueking/table/typings/BkTableColumn.vue'); + EditTable: typeof import('@components/editable-table/Index.vue').default; + EditTableBlock: typeof import('@components/editable-table/Index.vue').Block; + EditTableColumn: typeof import('@components/editable-table/Index.vue').Column; + EditTableDatePicker: typeof import('@components/editable-table/Index.vue').DatePicker; + EditTableInput: typeof import('@components/editable-table/Index.vue').Input; + EditTableRow: typeof import('@components/editable-table/Index.vue').Row; + EditTableSelect: typeof import('@components/editable-table/Index.vue').Select; + EditTableTagInput: typeof import('@components/editable-table/Index.vue').TagInput; + EditTableTextarea: typeof import('@components/editable-table/Index.vue').Textarea; + EditTableTimePicker: typeof import('@components/editable-table/Index.vue').TimePicker; + OperationColumn: typeof import('@views/db-manage/common/toolbox-field/column/operation-column/Index.vue').default; + OperationRow: typeof import('@views/db-manage/common/toolbox-field/row/operation-row/Index.vue').default; FunController: typeof import('@components/function-controller/FunController.vue').default; MoreActionExtend: typeof import('@components/more-action-extend/Index.vue').default; ScrollFaker: typeof import('@components/scroll-faker/Index.vue').default; diff --git a/dbm-ui/frontend/src/views/db-manage/common/toolbox-field/column/hybrid-host-column/Index.vue b/dbm-ui/frontend/src/views/db-manage/common/toolbox-field/column/hybrid-host-column/Index.vue index 1ddf2e8215..c107d7c772 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/toolbox-field/column/hybrid-host-column/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/toolbox-field/column/hybrid-host-column/Index.vue @@ -12,13 +12,13 @@ --> - +
@@ -55,8 +55,8 @@ {{ t(placeholder) }}
- - + + - - + @@ -49,8 +49,8 @@ type="host-select" @click="handleShowSelector" /> - - + + - - + @@ -43,8 +43,8 @@ type="host-select" @click="handleShowSelector" /> - - + + + + + + + + diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/MYSQL_ADD_SLAVE/Create.vue b/dbm-ui/frontend/src/views/db-manage/mysql/MYSQL_ADD_SLAVE/Create.vue index cac1f165fe..32a17e9c79 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/MYSQL_ADD_SLAVE/Create.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/MYSQL_ADD_SLAVE/Create.vue @@ -21,12 +21,12 @@ class="mb-20" form-type="vertical" :model="formData"> - - - - + + - +