diff --git a/apps/web-antd/src/router/routes/modules/local.ts b/apps/web-antd/src/router/routes/modules/local.ts
index 999972ea2..ff06b80c2 100644
--- a/apps/web-antd/src/router/routes/modules/local.ts
+++ b/apps/web-antd/src/router/routes/modules/local.ts
@@ -1,28 +1,6 @@
import type { RouteRecordRaw } from 'vue-router';
-import { $t } from '#/locales';
-
const routes: RouteRecordRaw[] = [
- {
- meta: {
- icon: 'ic:baseline-view-in-ar',
- keepAlive: true,
- order: 1000,
- title: $t('demos.title'),
- },
- name: 'Demos',
- path: '/demos',
- children: [
- {
- meta: {
- title: $t('demos.antd'),
- },
- name: 'AntDesignDemos',
- path: '/demos/ant-design',
- component: () => import('#/views/demos/antd/index.vue'),
- },
- ],
- },
{
path: '/codegen',
name: 'CodegenEdit',
@@ -30,18 +8,19 @@ const routes: RouteRecordRaw[] = [
icon: 'ic:baseline-view-in-ar',
keepAlive: true,
order: 1000,
- title: $t('demos.title'),
+ title: '代码生成',
+ hideInMenu: true,
},
children: [
- // {
- // path: 'codegen/edit',
- // name: 'InfraCodegenEdit',
- // component: () => import('#/views/infra/codegen/edit.vue'),
- // meta: {
- // title: '修改生成配置',
- // activeMenu: '/infra/codegen',
- // },
- // },
+ {
+ path: '/codegen/edit',
+ name: 'InfraCodegenEdit',
+ component: () => import('#/views/infra/codegen/edit.vue'),
+ meta: {
+ title: '修改生成配置',
+ activeMenu: '/infra/codegen',
+ },
+ },
],
},
];
diff --git a/apps/web-antd/src/views/infra/codegen/components/BasicInfoForm.vue b/apps/web-antd/src/views/infra/codegen/components/BasicInfoForm.vue
index 4c315e9bf..c5af46640 100644
--- a/apps/web-antd/src/views/infra/codegen/components/BasicInfoForm.vue
+++ b/apps/web-antd/src/views/infra/codegen/components/BasicInfoForm.vue
@@ -1,7 +1,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/infra/codegen/components/ColumInfoForm.vue b/apps/web-antd/src/views/infra/codegen/components/ColumInfoForm.vue
index ff94ef078..b1051e543 100644
--- a/apps/web-antd/src/views/infra/codegen/components/ColumInfoForm.vue
+++ b/apps/web-antd/src/views/infra/codegen/components/ColumInfoForm.vue
@@ -2,23 +2,25 @@
import type { InfraCodegenApi } from '#/api/infra/codegen';
import type { SystemDictTypeApi } from '#/api/system/dict/type';
+import { Checkbox, Input, Select, SelectOption, Table } from 'ant-design-vue';
+
import { getSimpleDictTypeList } from '#/api/system/dict/type';
import { computed, onMounted, ref, watch } from 'vue';
defineOptions({ name: 'InfraCodegenColumInfoForm' });
+const props = defineProps();
+
interface Props {
columns?: InfraCodegenApi.CodegenColumn[];
}
-const props = defineProps();
-
const formData = ref([]);
const tableHeight = computed(() => document.documentElement.scrollHeight - 350);
const dictOptions = ref([]);
// 表格列定义
-const columns = [
+const tableColumns = [
{ title: '字段列名', dataIndex: 'columnName', width: 100 },
{ title: '字段描述', dataIndex: 'columnComment', width: 100 },
{ title: '物理类型', dataIndex: 'dataType', width: 100 },
@@ -62,74 +64,73 @@ onMounted(async () => {
});
-
-
+
-
+
-
- Long
- String
- Integer
- Double
- BigDecimal
- LocalDateTime
- Boolean
-
+
-
+
-
+
-
+
-
+
-
+
-
- =
- !=
- >
- >=
- <
- <=
- LIKE
- BETWEEN
-
+
-
+
-
- 文本框
- 文本域
- 下拉框
- 单选框
- 复选框
- 日期控件
- 图片上传
- 文件上传
- 富文本控件
-
+
- {
style="width: 100%"
:filter-option="filterOption"
>
-
+
{{ dict.name }}
-
-
+
+
-
+
-
+
diff --git a/apps/web-antd/src/views/infra/codegen/components/GenerateInfoForm.vue b/apps/web-antd/src/views/infra/codegen/components/GenerateInfoForm.vue
index 64a83674c..ef20fbc65 100644
--- a/apps/web-antd/src/views/infra/codegen/components/GenerateInfoForm.vue
+++ b/apps/web-antd/src/views/infra/codegen/components/GenerateInfoForm.vue
@@ -2,7 +2,9 @@
import type { InfraCodegenApi } from '#/api/infra/codegen';
import type { SystemMenuApi } from '#/api/system/menu';
-import { QuestionCircleFilled } from '@vben/icons';
+import { CircleHelp } from '@vben/icons';
+import { Col, Divider, Form, FormItem, Input, Row, Select, SelectOption, Tooltip, TreeSelect } from 'ant-design-vue';
+
import { getCodegenTableList } from '#/api/infra/codegen';
import { getSimpleMenusList } from '#/api/system/menu';
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
@@ -10,13 +12,13 @@ import { onMounted, ref, unref, watch } from 'vue';
defineOptions({ name: 'InfraCodegenGenerateInfoForm' });
+const props = defineProps();
+
interface Props {
columns?: InfraCodegenApi.CodegenColumn[];
table?: InfraCodegenApi.CodegenTable;
}
-const props = defineProps();
-
const formRef = ref();
const formData = ref({} as InfraCodegenApi.CodegenTable);
const subColumns = ref([]);
@@ -97,54 +99,54 @@ defineExpose({
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
分配到指定菜单下,例如 系统管理
-
-
-
-
+
+
+
-
-
-
+
+
+
模块名,即一级目录,例如 system、infra、tool 等等
-
+
-
-
-
+
+
+
-
-
-
+
+
+
业务名,即二级目录,例如 user、permission、dict 等等
-
+
-
-
-
+
+
+
-
-
-
+
+
+
类名称(首字母大写),例如SysUser、SysMenu、SysDictData 等等
-
+
-
-
-
+
+
+
-
-
-
+
+
+
用作类描述,例如 用户
-
+
-
-
-
-
+
+
+
+
-
- 树表信息
-
-
-
-
+
+ 树表信息
+
+
+
+
树显示的父编码字段名, 如:parent_Id
-
+
-
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
树节点显示的名称字段,一般是name
-
+
-
-
+
-
+
+
-
-
-
-
+
+
+
+
-
- 主子表信息
-
-
-
-
+
+ 主子表信息
+
+
+
+
子表的成员变量名,默认为子表的名称
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
关联的子表的表名, 如:sys_user_post
-
+
-
-
+
{{ `${table.tableName}:${table.tableComment}` }}
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
子表的类名, 如:SysUserPost
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
子表的外键字段的编号,对应主表的主键
-
+
-
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
主表的类名, 如:SysUser
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
子表的外键关联到主表的主键字段编号
-
+
-
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
子表的描述,例如 用户岗位
-
+
-
+
-
-
-
-
+
+
+
+
-
+