调整前端样式,调整日志记录路由组,调整对应自动化模板
This commit is contained in:
@@ -12,13 +12,16 @@ type {{.StructName}}Router struct {
|
||||
// Init{{.StructName}}Router 初始化 {{.StructName}} 路由信息
|
||||
func (s *{{.StructName}}Router) Init{{.StructName}}Router(Router *gin.RouterGroup) {
|
||||
{{.Abbreviation}}Router := Router.Group("{{.Abbreviation}}").Use(middleware.OperationRecord())
|
||||
{{.Abbreviation}}RouterWithoutRecord := Router.Group("{{.Abbreviation}}")
|
||||
var {{.Abbreviation}}Api = v1.ApiGroupApp.AutoCodeApiGroup.{{.StructName}}Api
|
||||
{
|
||||
{{.Abbreviation}}Router.POST("create{{.StructName}}", {{.Abbreviation}}Api.Create{{.StructName}}) // 新建{{.StructName}}
|
||||
{{.Abbreviation}}Router.DELETE("delete{{.StructName}}", {{.Abbreviation}}Api.Delete{{.StructName}}) // 删除{{.StructName}}
|
||||
{{.Abbreviation}}Router.DELETE("delete{{.StructName}}ByIds", {{.Abbreviation}}Api.Delete{{.StructName}}ByIds) // 批量删除{{.StructName}}
|
||||
{{.Abbreviation}}Router.PUT("update{{.StructName}}", {{.Abbreviation}}Api.Update{{.StructName}}) // 更新{{.StructName}}
|
||||
{{.Abbreviation}}Router.GET("find{{.StructName}}", {{.Abbreviation}}Api.Find{{.StructName}}) // 根据ID获取{{.StructName}}
|
||||
{{.Abbreviation}}Router.GET("get{{.StructName}}List", {{.Abbreviation}}Api.Get{{.StructName}}List) // 获取{{.StructName}}列表
|
||||
}
|
||||
{
|
||||
{{.Abbreviation}}RouterWithoutRecord.GET("find{{.StructName}}", {{.Abbreviation}}Api.Find{{.StructName}}) // 根据ID获取{{.StructName}}
|
||||
{{.Abbreviation}}RouterWithoutRecord.GET("get{{.StructName}}List", {{.Abbreviation}}Api.Get{{.StructName}}List) // 获取{{.StructName}}列表
|
||||
}
|
||||
}
|
||||
|
@@ -49,24 +49,24 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="日期" width="180">
|
||||
<el-table-column align="center" label="日期" width="180">
|
||||
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
|
||||
</el-table-column>
|
||||
{{- range .Fields}}
|
||||
{{- if .DictType}}
|
||||
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<template #default="scope">
|
||||
{{"{{"}} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {{"}}"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
{{- else if eq .FieldType "bool" }}
|
||||
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
|
||||
</el-table-column> {{- else }}
|
||||
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
|
||||
<el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<el-table-column label="按钮组">
|
||||
<el-table-column align="center" label="按钮组">
|
||||
<template #default="scope">
|
||||
<el-button type="text" icon="el-icon-edit" size="small" class="table-button" @click="update{{.StructName}}(scope.row)">变更</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" size="mini" @click="deleteRow(scope.row)">删除</el-button>
|
||||
|
Reference in New Issue
Block a user