Skip to content

Commit e2c5988

Browse files
author
QM303176530
committed
修复自动化代码bug
1 parent 3d2e9ef commit e2c5988

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

server/resource/template/fe/table.vue.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ import {
136136
find{{.StructName}},
137137
get{{.StructName}}List
138138
} from "@/api/{{.PackageName}}"; // 此处请自行替换地址
139-
import { formatTimeToStr } from "@/utils/data";
139+
import { formatTimeToStr } from "@/utils/date";
140140
import infoList from "@/mixins/infoList";
141141
export default {
142142
name: "{{.StructName}}",

server/resource/template/te/model.go.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
type {{.StructName}} struct {
1010
global.GVA_MODEL {{- range .Fields}}
1111
{{- if eq .FieldType "bool" }}
12-
{{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
12+
{{.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 .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
1313
{{- else }}
14-
{{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
15-
{{- end }} {{- end }}
14+
{{.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 .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
15+
{{- end }} {{- end }}
1616
}
1717

1818
{{ if .TableName }}

web/src/view/systemTools/autoCode/component/fieldDialog.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ export default {
195195
}
196196
},
197197
async created() {
198-
this.getDbfdOptions();
199198
const dictRes = await getSysDictionaryList({
200199
page: 1,
201200
pageSize: 999999

0 commit comments

Comments
 (0)