diff --git a/dbm-ui/frontend/src/common/importComps.ts b/dbm-ui/frontend/src/common/importComps.ts index 61d2d3fb86..4f3da5761a 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 EditableTable, { + Block as EditableBlock, + Column as EditableColumn, + DatePicker as EditableDatePicker, + Input as EditableInput, + Row as EditableRow, + Select as EditableSelect, + TagInput as EditableTagInput, + Textarea as EditableTextarea, + TimePicker as EditableTimePicker, +} 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('EditableTable', EditableTable); + app.component('EditableBlock', EditableBlock); + app.component('EditableColumn', EditableColumn); + app.component('EditableDatePicker', EditableDatePicker); + app.component('EditableInput', EditableInput); + app.component('EditableRow', EditableRow); + app.component('EditableSelect', EditableSelect); + app.component('EditableTagInput', EditableTagInput); + app.component('EditableTextarea', EditableTextarea); + app.component('EditableTimePicker', EditableTimePicker); + 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..9d68db706e 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'); + EditableTable: typeof import('@components/editable-table/Index.vue').default; + EditableBlock: typeof import('@components/editable-table/Index.vue').Block; + EditableColumn: typeof import('@components/editable-table/Index.vue').Column; + EditableDatePicker: typeof import('@components/editable-table/Index.vue').DatePicker; + EditableInput: typeof import('@components/editable-table/Index.vue').Input; + EditableRow: typeof import('@components/editable-table/Index.vue').Row; + EditableSelect: typeof import('@components/editable-table/Index.vue').Select; + EditableTagInput: typeof import('@components/editable-table/Index.vue').TagInput; + EditableTextarea: typeof import('@components/editable-table/Index.vue').Textarea; + EditableTimePicker: 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..149409eb25 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..aed310b81e 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 @@ -26,7 +26,7 @@ class="mb-20" :model="formData.tableData" :rules="rules"> - - + - +