diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue index 02a2dc1a1..5aef08324 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue @@ -1,13 +1,34 @@ + - diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/codegen.data.ts b/yudao-ui-admin-vue3/src/views/infra/codegen/codegen.data.ts index 897a89cfb..6de4c7475 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/codegen.data.ts +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/codegen.data.ts @@ -1,7 +1,7 @@ import { reactive } from 'vue' import { useI18n } from '@/hooks/web/useI18n' import { required } from '@/utils/formRules' -import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' const { t } = useI18n() // 国际化 // 表单校验 @@ -12,54 +12,45 @@ export const rules = reactive({ }) // CrudSchema -const crudSchemas = reactive([ - { - label: t('common.index'), - field: 'id', - type: 'index', - isForm: false, - isDetail: false - }, - { - label: '表名称', - field: 'tableName', - isSearch: true - }, - { - label: '表描述', - field: 'tableComment', - isSearch: true - }, - { - label: '实体', - field: 'className', - isSearch: true - }, - { - label: t('common.createTime'), - field: 'createTime', - isForm: false, - search: { - show: true, - component: 'DatePicker', - componentProps: { - type: 'datetimerange', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)] +const crudSchemas = reactive({ + primaryKey: 'id', + primaryType: 'seq', + action: true, + actionWidth: '400px', + columns: [ + { + title: '表名称', + field: 'tableName', + isSearch: true + }, + { + title: '表描述', + field: 'tableComment', + isSearch: true + }, + { + title: '实体', + field: 'className', + isSearch: true + }, + { + title: t('common.createTime'), + field: 'createTime', + formatter: 'formatDate', + isForm: false, + search: { + show: true, + itemRender: { + name: 'XDataTimePicker' + } } + }, + { + title: t('common.updateTime'), + field: 'updateTime', + formatter: 'formatDate', + isForm: false } - }, - { - label: t('common.updateTime'), - field: 'updateTime', - isForm: false - }, - { - label: t('table.action'), - field: 'action', - width: '350px', - isForm: false, - isDetail: false - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/components/BasicInfoForm.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/components/BasicInfoForm.vue index a61bf0f81..9fec5ea04 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/components/BasicInfoForm.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/components/BasicInfoForm.vue @@ -1,11 +1,13 @@ + - diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/components/CloumInfoForm.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/components/CloumInfoForm.vue index 0f831f13b..789a4ec88 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/components/CloumInfoForm.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/components/CloumInfoForm.vue @@ -1,28 +1,3 @@ - + diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue index c2b592207..b67795cf9 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue @@ -1,10 +1,12 @@ + - diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/components/ImportTable.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/components/ImportTable.vue index 8c1b9ef9a..e4dd8d743 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/components/ImportTable.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/components/ImportTable.vue @@ -48,16 +48,16 @@ - - diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/index.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/index.vue index fb56ea9fb..e0fdfc42c 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/index.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/index.vue @@ -1,24 +1,77 @@ + -