diff --git a/template/v4/actions/router_check_role.go.template b/template/v4/actions/router_check_role.go.template
new file mode 100644
index 00000000..88451bd2
--- /dev/null
+++ b/template/v4/actions/router_check_role.go.template
@@ -0,0 +1,31 @@
+package router
+
+import (
+ "github.com/gin-gonic/gin"
+
+ "go-admin/app/admin/middleware"
+ "go-admin/app/admin/models"
+ "go-admin/app/admin/service/dto"
+ "go-admin/common/actions"
+ jwt "go-admin/pkg/jwtauth"
+)
+
+func init() {
+ routerCheckRole = append(routerCheckRole, register{{.ClassName}}Router)
+}
+
+// 需认证的路由代码
+func register{{.ClassName}}Router(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
+ r := v1.Group("/{{.ModuleName}}").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
+ {
+ model := &models.{{.ClassName}}{}
+ r.GET("", actions.PermissionAction(), actions.IndexAction(model, new(dto.{{.ClassName}}Search), func() interface{} {
+ list := make([]models.{{.ClassName}}, 0)
+ return &list
+ }))
+ r.GET("/:id", actions.PermissionAction(), actions.ViewAction(new(dto.{{.ClassName}}ById), nil))
+ r.POST("", actions.CreateAction(new(dto.{{.ClassName}}Control)))
+ r.PUT("/:id", actions.PermissionAction(), actions.UpdateAction(new(dto.{{.ClassName}}Control)))
+ r.DELETE("", actions.PermissionAction(), actions.DeleteAction(new(dto.{{.ClassName}}ById)))
+ }
+}
diff --git a/template/v4/actions/router_no_check_role.go.template b/template/v4/actions/router_no_check_role.go.template
new file mode 100644
index 00000000..c647266e
--- /dev/null
+++ b/template/v4/actions/router_no_check_role.go.template
@@ -0,0 +1,30 @@
+package router
+
+import (
+ "github.com/gin-gonic/gin"
+
+ "go-admin/app/admin/middleware"
+ "go-admin/app/admin/models"
+ "go-admin/app/admin/service/dto"
+ "go-admin/common/actions"
+)
+
+func init() {
+ routerNoCheckRole = append(routerNoCheckRole, register{{.ClassName}}Router)
+}
+
+// 无需认证的路由代码
+func register{{.ClassName}}Router(v1 *gin.RouterGroup) {
+ r := v1.Group("/{{.ModuleName}}")
+ {
+ model := &models.{{.ClassName}}{}
+ r.GET("", actions.IndexAction(model, new(dto.{{.ClassName}}Search), func() interface{} {
+ list := make([]models.{{.ClassName}}, 0)
+ return &list
+ }))
+ r.GET("/:id", actions.ViewAction(new(dto.{{.ClassName}}ById), nil))
+ r.POST("", actions.CreateAction(new(dto.{{.ClassName}}Control)))
+ r.PUT("/:id", actions.UpdateAction(new(dto.{{.ClassName}}Control)))
+ r.DELETE("", actions.DeleteAction(new(dto.{{.ClassName}}ById)))
+ }
+}
diff --git a/template/v4/dto.go.template b/template/v4/dto.go.template
new file mode 100644
index 00000000..c967c3b7
--- /dev/null
+++ b/template/v4/dto.go.template
@@ -0,0 +1,123 @@
+package dto
+
+import (
+ "github.com/gin-gonic/gin"
+ "gorm.io/gorm"
+
+ "go-admin/app/admin/models"
+ "go-admin/common/dto"
+ "go-admin/common/log"
+ "go-admin/tools"
+)
+
+type {{.ClassName}}Search struct {
+ dto.Pagination `search:"-"`
+ {{ $tablename := .TBName -}}
+ {{ range .Columns -}}
+ {{$z := .IsQuery}}
+ {{- if ($z) -}}
+ {{.GoField}} {{.GoType}} `form:"{{.JsonField}}" search:"type:{{if eq .QueryType "EQ"}}exact{{ else if eq .QueryType "NE"}}iexact{{ else if eq .QueryType "LIKE"}}contains{{ else if eq .QueryType "GT"}}gt{{ else if eq .QueryType "GTE"}}gte{{ else if eq .QueryType "LT"}}lt{{ else if eq .QueryType "LTE"}}lte{{- end }};column:{{.ColumnName}};table:{{$tablename}}" comment:"{{.ColumnComment}}"`
+
+ {{ end -}}
+ {{- end }}
+}
+
+func (m *{{.ClassName}}Search) GetNeedSearch() interface{} {
+ return *m
+}
+
+func (m *{{.ClassName}}Search) Bind(ctx *gin.Context) error {
+ msgID := tools.GenerateMsgIDFromContext(ctx)
+ err := ctx.ShouldBind(m)
+ if err != nil {
+ log.Debugf("MsgID[%s] ShouldBind error: %s", msgID, err.Error())
+ }
+ return err
+}
+
+type {{.ClassName}}Control struct {
+ {{ range .Columns -}}
+ {{$x := .Pk}}
+ {{- if ($x) }}
+ {{.GoField}} {{.GoType}} `uri:"{{.JsonField}}" comment:"{{.ColumnComment}}"` // {{.ColumnComment}}
+ {{- else if eq .GoField "CreatedAt" -}}
+ {{- else if eq .GoField "UpdatedAt" -}}
+ {{- else if eq .GoField "DeletedAt" -}}
+ {{- else if eq .GoField "CreateBy" -}}
+ {{- else if eq .GoField "UpdateBy" -}}
+
+ {{- else }}
+
+ {{.GoField}} {{.GoType}} `json:"{{.JsonField}}" comment:"{{.ColumnComment}}"`
+ {{end -}}
+ {{- end }}
+}
+
+func (s *{{.ClassName}}Control) Bind(ctx *gin.Context) error {
+ msgID := tools.GenerateMsgIDFromContext(ctx)
+ err := ctx.ShouldBindUri(s)
+ if err != nil {
+ log.Debugf("MsgID[%s] ShouldBindUri error: %s", msgID, err.Error())
+ return err
+ }
+ err = ctx.ShouldBind(s)
+ if err != nil {
+ log.Debugf("MsgID[%s] ShouldBind error: %#v", msgID, err.Error())
+ }
+ return err
+}
+
+func (s *{{.ClassName}}Control) Generate() (*models.{{.ClassName}}, error) {
+ return &models.{{.ClassName}}{
+ {{ range .Columns -}}
+ {{$x := .Pk}}
+ {{- if ($x) }}
+ Model: gorm.Model{ID: s.ID},
+ {{- else if eq .GoField "CreatedAt" -}}
+ {{- else if eq .GoField "UpdatedAt" -}}
+ {{- else if eq .GoField "DeletedAt" -}}
+ {{- else if eq .GoField "CreateBy" -}}
+
+
+ {{- else if eq .GoField "UpdateBy" -}}
+ {{- else }}
+ {{.GoField}}: s.{{.GoField}},
+ {{- end }}
+ {{- end }}
+ }, nil
+}
+
+func (s *{{.ClassName}}Control) GetId() interface{} {
+ return s.{{.PkGoField}}
+}
+
+type {{.ClassName}}ById struct {
+ Id int `uri:"id"`
+ Ids []int `json:"ids"`
+}
+
+func (s *{{.ClassName}}ById) GetId() interface{} {
+ if len(s.Ids) > 0 {
+ s.Ids = append(s.Ids, s.Id)
+ return s.Ids
+ }
+ return s.Id
+}
+
+func (s *{{.ClassName}}ById) Bind(ctx *gin.Context) error {
+ msgID := tools.GenerateMsgIDFromContext(ctx)
+ err := ctx.ShouldBindUri(s)
+ if err != nil {
+ log.Debugf("MsgID[%s] ShouldBindUri error: %s", msgID, err.Error())
+ return err
+ }
+ err = ctx.ShouldBind(s)
+ if err != nil {
+ log.Debugf("MsgID[%s] ShouldBind error: %#v", msgID, err.Error())
+ }
+ return err
+}
+
+func (s *{{.ClassName}}ById) SetUpdateBy(id int) {
+
+}
diff --git a/template/v4/js.go.template b/template/v4/js.go.template
new file mode 100644
index 00000000..db3d4a27
--- /dev/null
+++ b/template/v4/js.go.template
@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+
+// 查询{{.ClassName}}列表
+export function list{{.ClassName}}(query) {
+ return request({
+ url: '/api/v1/{{.ModuleName}}',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询{{.ClassName}}详细
+export function get{{.ClassName}} ({{.PkJsonField}}) {
+ return request({
+ url: '/api/v1/{{.ModuleName}}/' + {{.PkJsonField}},
+ method: 'get'
+ })
+}
+
+
+// 新增{{.ClassName}}
+export function add{{.ClassName}}(data) {
+ return request({
+ url: '/api/v1/{{.ModuleName}}',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改{{.ClassName}}
+export function update{{.ClassName}}(data) {
+ return request({
+ url: '/api/v1/{{.ModuleName}}/'+data.{{.PkJsonField}},
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除{{.ClassName}}
+export function del{{.ClassName}}(data) {
+ return request({
+ url: '/api/v1/{{.ModuleName}}',
+ method: 'delete',
+ data: data
+ })
+}
+
diff --git a/template/v4/model.go.template b/template/v4/model.go.template
new file mode 100644
index 00000000..913fb1cb
--- /dev/null
+++ b/template/v4/model.go.template
@@ -0,0 +1,37 @@
+package models
+
+import (
+ "gorm.io/gorm"
+
+ "go-admin/common/models"
+)
+
+type {{.ClassName}} struct {
+ gorm.Model
+ models.ControlBy
+ {{ range .Columns -}}
+ {{$x := .Pk}}
+ {{- if ($x) }}
+
+ {{- else if eq .GoField "CreatedAt" -}}
+ {{- else if eq .GoField "UpdatedAt" -}}
+ {{- else if eq .GoField "DeletedAt" -}}
+ {{- else if eq .GoField "CreateBy" -}}
+ {{- else if eq .GoField "UpdateBy" -}}
+ {{- else }}
+ {{.GoField}} {{.GoType}} `json:"{{.JsonField}}" gorm:"type:{{.ColumnType}};comment:{{- if eq .ColumnComment "" -}}{{.GoField}}{{- else -}}{{.ColumnComment}}{{end -}}"` {{end -}}
+ {{- end }}
+}
+
+func ({{.ClassName}}) TableName() string {
+ return "{{.TBName}}"
+}
+
+func (e *{{.ClassName}}) Generate() models.ActiveRecord {
+ o := *e
+ return &o
+}
+
+func (e *{{.ClassName}}) GetId() interface{} {
+ return e.{{.PkGoField}}
+}
diff --git a/template/v4/no_actions/apis.go.template b/template/v4/no_actions/apis.go.template
new file mode 100644
index 00000000..60beaf05
--- /dev/null
+++ b/template/v4/no_actions/apis.go.template
@@ -0,0 +1,189 @@
+package {{.ModuleName}}
+
+import (
+ "github.com/gin-gonic/gin"
+ "go-admin/app/admin/service"
+ "net/http"
+
+ "go-admin/app/admin/models"
+ "go-admin/app/admin/service/dto"
+ "go-admin/common/actions"
+ "go-admin/common/apis"
+ "go-admin/common/log"
+ "go-admin/tools"
+)
+
+type {{.ClassName}} struct {
+ apis.Api
+}
+
+func (e *{{.ClassName}}) Get{{.ClassName}}List(c *gin.Context) {
+ msgID := tools.GenerateMsgIDFromContext(c)
+ d := new(dto.{{.ClassName}}Search)
+ db, err := tools.GetOrm(c)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+
+ //查询列表
+ err = d.Bind(c)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "参数验证失败")
+ return
+ }
+
+ //数据权限检查
+ p := actions.GetPermissionFromContext(c)
+
+ list := make([]models.{{.ClassName}}, 0)
+ var count int64
+ serviceStudent := service.{{.ClassName}}{}
+ serviceStudent.MsgID = msgID
+ serviceStudent.Orm = db
+ err = serviceStudent.Get{{.ClassName}}Page(d, p, &list, &count)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "查询失败")
+ return
+ }
+
+ e.PageOK(c, list, int(count), d.GetPageIndex(), d.GetPageSize(), "查询成功")
+}
+
+func (e *{{.ClassName}}) Get{{.ClassName}}(c *gin.Context) {
+ control := new(dto.{{.ClassName}}ById)
+ db, err := tools.GetOrm(c)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+
+ msgID := tools.GenerateMsgIDFromContext(c)
+ //查看详情
+ err = control.Bind(c)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "参数验证失败")
+ return
+ }
+ var object models.{{.ClassName}}
+
+ //数据权限检查
+ p := actions.GetPermissionFromContext(c)
+
+ service{{.ClassName}} := service.{{.ClassName}}{}
+ service{{.ClassName}}.MsgID = msgID
+ service{{.ClassName}}.Orm = db
+ err = service{{.ClassName}}.Get{{.ClassName}}(control, p, &object)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "查询失败")
+ return
+ }
+
+ e.OK(c, object, "查看成功")
+}
+
+func (e *{{.ClassName}}) Insert{{.ClassName}}(c *gin.Context) {
+ control := new(dto.{{.ClassName}}Control)
+ db, err := tools.GetOrm(c)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+
+ msgID := tools.GenerateMsgIDFromContext(c)
+ //新增操作
+ err = control.Bind(c)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "参数验证失败")
+ return
+ }
+ object, err := control.Generate()
+ if err != nil {
+ e.Error(c, http.StatusInternalServerError, err, "模型生成失败")
+ return
+ }
+ // 设置创建人
+ object.SetCreateBy(tools.GetUserId(c))
+
+ service{{.ClassName}} := service.{{.ClassName}}{}
+ service{{.ClassName}}.Orm = db
+ service{{.ClassName}}.MsgID = msgID
+ err = service{{.ClassName}}.Insert{{.ClassName}}(object)
+ if err != nil {
+ log.Error(err)
+ e.Error(c, http.StatusInternalServerError, err, "创建失败")
+ return
+ }
+
+ e.OK(c, object.GetId(), "创建成功")
+}
+
+func (e *{{.ClassName}}) Update{{.ClassName}}(c *gin.Context) {
+ control := new(dto.{{.ClassName}}Control)
+ db, err := tools.GetOrm(c)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+
+ msgID := tools.GenerateMsgIDFromContext(c)
+ //更新操作
+ err = control.Bind(c)
+ if err != nil {
+ e.Error(c, http.StatusUnprocessableEntity, err, "参数验证失败")
+ return
+ }
+ object, err := control.Generate()
+ if err != nil {
+ e.Error(c, http.StatusInternalServerError, err, "模型生成失败")
+ return
+ }
+ object.SetUpdateBy(tools.GetUserId(c))
+
+ //数据权限检查
+ p := actions.GetPermissionFromContext(c)
+
+ service{{.ClassName}} := service.{{.ClassName}}{}
+ service{{.ClassName}}.Orm = db
+ service{{.ClassName}}.MsgID = msgID
+ err = service{{.ClassName}}.Update{{.ClassName}}(object, p)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+ e.OK(c, object.GetId(), "更新成功")
+}
+
+func (e *{{.ClassName}}) Delete{{.ClassName}}(c *gin.Context) {
+ control := new(dto.{{.ClassName}}ById)
+ db, err := tools.GetOrm(c)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+
+ msgID := tools.GenerateMsgIDFromContext(c)
+ //删除操作
+ err = control.Bind(c)
+ if err != nil {
+ log.Errorf("MsgID[%s] Bind error: %s", msgID, err)
+ e.Error(c, http.StatusUnprocessableEntity, err, "参数验证失败")
+ return
+ }
+
+ // 设置编辑人
+ control.SetUpdateBy(tools.GetUserId(c))
+
+ // 数据权限检查
+ p := actions.GetPermissionFromContext(c)
+
+ service{{.ClassName}} := service.{{.ClassName}}{}
+ service{{.ClassName}}.Orm = db
+ service{{.ClassName}}.MsgID = msgID
+ err = service{{.ClassName}}.Remove{{.ClassName}}(control, p)
+ if err != nil {
+ log.Error(err)
+ return
+ }
+ e.OK(c, control.GetId(), "删除成功")
+}
diff --git a/template/v4/no_actions/router_check_role.go.template b/template/v4/no_actions/router_check_role.go.template
new file mode 100644
index 00000000..6caf11cc
--- /dev/null
+++ b/template/v4/no_actions/router_check_role.go.template
@@ -0,0 +1,25 @@
+package router
+
+import (
+ "github.com/gin-gonic/gin"
+ "go-admin/app/admin/apis/{{.ModuleName}}"
+ "go-admin/app/admin/middleware"
+ jwt "go-admin/pkg/jwtauth"
+)
+
+func init() {
+ routerCheckRole = append(routerCheckRole, register{{.ClassName}}Router)
+}
+
+// 需认证的路由代码
+func register{{.ClassName}}Router(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
+ api := &{{.ModuleName}}.{{.ClassName}}{}
+ r := v1.Group("/{{.ModuleName}}").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
+ {
+ r.GET("", api.Get{{.ClassName}}List)
+ r.GET("/:id", api.Get{{.ClassName}})
+ r.POST("", api.Insert{{.ClassName}})
+ r.PUT("/:id", api.Update{{.ClassName}})
+ r.DELETE("", api.Delete{{.ClassName}})
+ }
+}
diff --git a/template/v4/no_actions/router_no_check_role.go.template b/template/v4/no_actions/router_no_check_role.go.template
new file mode 100644
index 00000000..c74691e0
--- /dev/null
+++ b/template/v4/no_actions/router_no_check_role.go.template
@@ -0,0 +1,24 @@
+package router
+
+import (
+ "github.com/gin-gonic/gin"
+ "go-admin/app/admin/apis/{{.ModuleName}}"
+ jwt "go-admin/pkg/jwtauth"
+)
+
+func init() {
+ routerCheckRole = append(routerCheckRole, register{{.ClassName}}Router)
+}
+
+// 需认证的路由代码
+func register{{.ClassName}}Router(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
+ api := &{{.ModuleName}}.{{.ClassName}}{}
+ r := v1.Group("/{{.ModuleName}}").Use(authMiddleware.MiddlewareFunc())
+ {
+ r.GET("", api.Get{{.ClassName}}List)
+ r.GET("/:id", api.Get{{.ClassName}})
+ r.POST("", api.Insert{{.ClassName}})
+ r.PUT("/:id", api.Update{{.ClassName}})
+ r.DELETE("", api.Delete{{.ClassName}})
+ }
+}
diff --git a/template/v4/no_actions/service.go.template b/template/v4/no_actions/service.go.template
new file mode 100644
index 00000000..e0ac9bd3
--- /dev/null
+++ b/template/v4/no_actions/service.go.template
@@ -0,0 +1,119 @@
+package service
+
+import (
+ "errors"
+ "go-admin/app/admin/models"
+ "go-admin/common/actions"
+ cDto "go-admin/common/dto"
+ "go-admin/common/log"
+ "go-admin/app/admin/service/dto"
+ "go-admin/common/service"
+ "gorm.io/gorm"
+)
+
+type {{.ClassName}} struct {
+ service.Service
+}
+
+// Get{{.ClassName}}Page 获取{{.ClassName}}列表
+func (e *{{.ClassName}}) Get{{.ClassName}}Page(c *dto.{{.ClassName}}Search, p *actions.DataPermission, list *[]models.{{.ClassName}}, count *int64) error {
+ var err error
+ var data models.{{.ClassName}}
+ msgID := e.MsgID
+
+ err = e.Orm.Model(&data).
+ Scopes(
+ cDto.MakeCondition(c.GetNeedSearch()),
+ cDto.Paginate(c.GetPageSize(), c.GetPageIndex()),
+ actions.Permission(data.TableName(), p),
+ ).
+ Find(list).Limit(-1).Offset(-1).
+ Count(count).Error
+ if err != nil {
+ log.Errorf("msgID[%s] db error:%s", msgID, err)
+ return err
+ }
+ return nil
+}
+
+// Get{{.ClassName}} 获取{{.ClassName}}对象
+func (e *{{.ClassName}}) Get{{.ClassName}}(d *dto.{{.ClassName}}ById, p *actions.DataPermission, model *models.{{.ClassName}}) error {
+ var err error
+ var data models.{{.ClassName}}
+ msgID := e.MsgID
+
+ db := e.Orm.Model(&data).
+ Scopes(
+ actions.Permission(data.TableName(), p),
+ ).
+ First(model, d.GetId())
+ err = db.Error
+ if err != nil && errors.Is(err, gorm.ErrRecordNotFound) {
+ err = errors.New("查看对象不存在或无权查看")
+ log.Errorf("msgID[%s] db error:%s", msgID, err)
+ return err
+ }
+ if db.Error != nil {
+ log.Errorf("msgID[%s] db error:%s", msgID, err)
+ return err
+ }
+ return nil
+}
+
+// Insert{{.ClassName}} 创建{{.ClassName}}对象
+func (e *{{.ClassName}}) Insert{{.ClassName}}(model *models.{{.ClassName}}) error {
+ var err error
+ var data models.{{.ClassName}}
+ msgID := e.MsgID
+
+ err = e.Orm.Model(&data).
+ Create(model).Error
+ if err != nil {
+ log.Errorf("msgID[%s] db error:%s", msgID, err)
+ return err
+ }
+ return nil
+}
+
+// Update{{.ClassName}} 修改{{.ClassName}}对象
+func (e *{{.ClassName}}) Update{{.ClassName}}(c *models.{{.ClassName}}, p *actions.DataPermission) error {
+ var err error
+ var data models.{{.ClassName}}
+ msgID := e.MsgID
+
+ db := e.Orm.Model(&data).
+ Scopes(
+ actions.Permission(data.TableName(), p),
+ ).Where(c.GetId()).Updates(c)
+ if db.Error != nil {
+ log.Errorf("msgID[%s] db error:%s", msgID, err)
+ return err
+ }
+ if db.RowsAffected == 0 {
+ return errors.New("无权更新该数据")
+
+ }
+ return nil
+}
+
+// Remove{{.ClassName}} 删除{{.ClassName}}
+func (e *{{.ClassName}}) Remove{{.ClassName}}(d *dto.{{.ClassName}}ById, p *actions.DataPermission) error {
+ var err error
+ var data models.{{.ClassName}}
+ msgID := e.MsgID
+
+ db := e.Orm.Model(&data).
+ Scopes(
+ actions.Permission(data.TableName(), p),
+ ).Delete(&data, d.GetId())
+ if db.Error != nil {
+ err = db.Error
+ log.Errorf("MsgID[%s] Delete error: %s", msgID, err)
+ return err
+ }
+ if db.RowsAffected == 0 {
+ err = errors.New("无权删除该数据")
+ return err
+ }
+ return nil
+}
\ No newline at end of file
diff --git a/template/v4/vue.go.template b/template/v4/vue.go.template
new file mode 100644
index 00000000..b479b09a
--- /dev/null
+++ b/template/v4/vue.go.template
@@ -0,0 +1,470 @@
+{{$tableComment:=.TableComment}}
+
+
+
+
+
+ {{range .Columns}}
+ {{- $x := .IsQuery -}}
+ {{- if ($x) -}}
+
+ {{- if ne .FkTableName "" -}}
+
+
+
+ {{- else -}}
+ {{if eq .DictType "" -}}
+
+ {{- else -}}
+
+
+
+ {{- end}}
+ {{- end}}
+
+ {{end}}
+ {{- end }}
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+
+ 修改
+
+
+
+ 删除
+
+
+
+
+
+
+ {{- range .Columns -}}
+ {{- $x := .IsList -}}
+ {{- if (eq $x "1") }}
+ {{- if ne .FkTableName "" -}}
+
+
+ {{ "{{" }} {{.JsonField}}Format(scope.row) {{"}}"}}
+
+
+
+ {{- else -}}
+ {{- if ne .DictType "" -}}
+
+
+ {{ "{{" }} {{.JsonField}}Format(scope.row) {{"}}"}}
+
+
+
+ {{- end -}}
+ {{- if eq .DictType "" -}}
+
+
+ {{- end -}}
+ {{- end -}}
+ {{- end }}
+ {{- end }}
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+ {{ range .Columns }}
+ {{- $x := .IsInsert -}}
+ {{- if (eq $x "1") -}}
+ {{- if (.Pk) }}
+ {{- else if eq .GoField "CreatedAt" -}}
+ {{- else if eq .GoField "UpdatedAt" -}}
+ {{- else if eq .GoField "DeletedAt" -}}
+ {{- else if eq .GoField "UpdateBy" -}}
+ {{- else if eq .GoField "CreateBy" -}}
+ {{- else }}
+
+ {{ if eq "input" .HtmlType -}}
+
+ {{- else if eq "select" .HtmlType -}}
+ {{- if ne .FkTableName "" -}}
+
+
+
+ {{- else -}}
+
+
+
+ {{- end -}}
+ {{- else if eq "radio" .HtmlType -}}
+
+ {{"{{"}} dict.dictLabel {{"}}"}}
+
+ {{- else if eq "file" .HtmlType -}}
+
+ 选择文件
+ {{- else if eq "datetime" .HtmlType -}}
+
+
+ {{- else if eq "textarea" .HtmlType -}}
+
+
+ {{- end }}
+
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+
+
+
+
+
+
+
+
+