From 7c5939d50031c03fe2d3e37d25778db661902ab0 Mon Sep 17 00:00:00 2001 From: piexlmax Date: Mon, 13 Dec 2021 17:27:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=95=B0=E6=8D=AE=E5=BA=93=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=20=E5=AF=B9=E4=BC=9A=E4=BA=A7=E7=94=9F?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E5=9C=B0=E6=96=B9=E5=81=9A=E4=BA=86?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/model/system/sys_auto_code.go | 1 - server/resource/template/server/model.go.tpl | 4 +-- web/package.json | 6 ++-- .../autoCode/component/fieldDialog.vue | 36 ++----------------- web/src/view/systemTools/autoCode/index.vue | 15 +++++--- 5 files changed, 18 insertions(+), 44 deletions(-) diff --git a/server/model/system/sys_auto_code.go b/server/model/system/sys_auto_code.go index f3128898..349bec61 100644 --- a/server/model/system/sys_auto_code.go +++ b/server/model/system/sys_auto_code.go @@ -21,7 +21,6 @@ type Field struct { FieldDesc string `json:"fieldDesc"` // 中文名 FieldType string `json:"fieldType"` // Field数据类型 FieldJson string `json:"fieldJson"` // FieldJson - DataType string `json:"dataType"` // 数据库字段类型 DataTypeLong string `json:"dataTypeLong"` // 数据库字段长度 Comment string `json:"comment"` // 数据库字段描述 ColumnName string `json:"columnName"` // 数据库字段 diff --git a/server/resource/template/server/model.go.tpl b/server/resource/template/server/model.go.tpl index fbad1e01..e585cc20 100644 --- a/server/resource/template/server/model.go.tpl +++ b/server/resource/template/server/model.go.tpl @@ -10,9 +10,9 @@ import ( type {{.StructName}} struct { global.GVA_MODEL {{- range .Fields}} {{- if ne .FieldType "string" }} - {{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- end }}"` + {{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}"` {{- else }} - {{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if eq .FieldType "string" -}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}}{{- end -}};{{- if ne .FieldType "string" -}}{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}{{- end -}}"` + {{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}"` {{- end }} {{- end }} } diff --git a/web/package.json b/web/package.json index c13bf41b..10a1381b 100644 --- a/web/package.json +++ b/web/package.json @@ -24,7 +24,7 @@ "screenfull": "^5.0.2", "script-ext-html-webpack-plugin": "^2.1.4", "spark-md5": "^3.0.1", - "vue": "^3.2.0", + "vue": "^3.2.25", "vue-particle-line": "^0.1.4", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0", @@ -47,8 +47,8 @@ "eslint-plugin-vue": "^7.0.0", "sass": "^1.26.5", "sass-loader": "^8.0.2", - "vite": "2.5.3", + "vite": "2.5.10", "vite-plugin-banner": "^0.1.3", "vite-plugin-importer": "^0.2.5" } -} \ No newline at end of file +} diff --git a/web/src/view/systemTools/autoCode/component/fieldDialog.vue b/web/src/view/systemTools/autoCode/component/fieldDialog.vue index 18f2c9f3..0661ba89 100644 --- a/web/src/view/systemTools/autoCode/component/fieldDialog.vue +++ b/web/src/view/systemTools/autoCode/component/fieldDialog.vue @@ -40,25 +40,8 @@ /> - - - - - - - - + + diff --git a/web/src/view/systemTools/autoCode/index.vue b/web/src/view/systemTools/autoCode/index.vue index 720b6d38..85cc8e5d 100644 --- a/web/src/view/systemTools/autoCode/index.vue +++ b/web/src/view/systemTools/autoCode/index.vue @@ -61,7 +61,7 @@ - +