From f6ec4bb2972f93f597d03febd1336c92dbf12cbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com>
Date: Mon, 2 Dec 2024 15:48:01 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=B7=A5=E5=85=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/tool/generator/columns.ts | 50 ++++++++
src/views/tool/generator/index.vue | 146 +++++++++++++++++++++++
src/views/tool/generator/querySchemas.ts | 19 +++
3 files changed, 215 insertions(+)
create mode 100644 src/views/tool/generator/columns.ts
create mode 100644 src/views/tool/generator/index.vue
create mode 100644 src/views/tool/generator/querySchemas.ts
diff --git a/src/views/tool/generator/columns.ts b/src/views/tool/generator/columns.ts
new file mode 100644
index 0000000..7e7ddf7
--- /dev/null
+++ b/src/views/tool/generator/columns.ts
@@ -0,0 +1,50 @@
+import { h } from 'vue';
+import { ElTag } from 'element-plus';
+
+export const columns = [
+ {
+ type: 'selection',
+ width: 50,
+ fixed: 'left',
+ },
+ {
+ title: '数据表名称',
+ key: 'tableName',
+ width: 150,
+ },
+ {
+ title: '数据表描述',
+ key: 'tableComment',
+ width: 150,
+ },
+ {
+ title: '数据表引擎',
+ key: 'engine',
+ width: 100,
+ },
+ {
+ title: '数据表行数',
+ key: 'tableRows',
+ width: 100,
+ },
+ {
+ title: '数据表长度',
+ key: 'dataLength',
+ width: 100,
+ },
+ {
+ title: '数据表自增索引',
+ key: 'autoIncrement',
+ width: 120,
+ },
+ {
+ title: '数据表编码',
+ key: 'tableCollation',
+ width: 150,
+ },
+ {
+ title: '创建时间',
+ key: 'createTime',
+ width: 180,
+ },
+];
diff --git a/src/views/tool/generator/index.vue b/src/views/tool/generator/index.vue
new file mode 100644
index 0000000..01ad6ff
--- /dev/null
+++ b/src/views/tool/generator/index.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 批量生成
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/generator/querySchemas.ts b/src/views/tool/generator/querySchemas.ts
new file mode 100644
index 0000000..d75ee99
--- /dev/null
+++ b/src/views/tool/generator/querySchemas.ts
@@ -0,0 +1,19 @@
+import { FormSchema } from '@/components/Form/index';
+export const schemas: FormSchema[] = [
+ {
+ field: 'tableName',
+ component: 'NInput',
+ label: '数据表名称',
+ componentProps: {
+ placeholder: '请输入数据表名称',
+ },
+ },
+ {
+ field: 'tableComment',
+ component: 'NInput',
+ label: '数据表描述',
+ componentProps: {
+ placeholder: '请输入数据表描述',
+ },
+ },
+];