提交 e6801342 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复自动化代码bug

上级 99569bc2
......@@ -136,7 +136,7 @@ import {
find{{.StructName}},
get{{.StructName}}List
} from "@/api/{{.PackageName}}"; // 此处请自行替换地址
import { formatTimeToStr } from "@/utils/data";
import { formatTimeToStr } from "@/utils/date";
import infoList from "@/mixins/infoList";
export default {
name: "{{.StructName}}",
......
......@@ -9,10 +9,10 @@ import (
type {{.StructName}} struct {
global.GVA_MODEL {{- range .Fields}}
{{- if eq .FieldType "bool" }}
{{.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 -}}"`
{{.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 -}}"`
{{- else }}
{{.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 -}}"`
{{- end }} {{- end }}
{{.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 -}}"`
{{- end }} {{- end }}
}
{{ if .TableName }}
......
......@@ -195,7 +195,6 @@ export default {
}
},
async created() {
this.getDbfdOptions();
const dictRes = await getSysDictionaryList({
page: 1,
pageSize: 999999
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册