From 1aa6ab53b25ea901707eaa10cfdd769bce00e0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Mon, 20 Sep 2021 21:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=89=8D=E7=AB=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=B0=83=E6=95=B4=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=B7=AF=E7=94=B1=E7=BB=84=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E8=87=AA=E5=8A=A8=E5=8C=96=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/template/server/router.go.tpl | 7 +++-- server/resource/template/web/table.vue.tpl | 10 +++---- server/router/autocode/autocodeExample.go | 7 +++-- server/router/example/exa_customer.go | 13 +++++---- server/router/example/exa_excel.go | 8 +++--- .../example/exa_file_upload_and_download.go | 14 +++++----- server/router/system/sys_api.go | 7 +++-- server/router/system/sys_authority.go | 7 +++-- server/router/system/sys_casbin.go | 5 +++- server/router/system/sys_dictionary.go | 7 +++-- server/router/system/sys_dictionary_detail.go | 7 +++-- server/router/system/sys_jwt.go | 3 +- server/router/system/sys_menu.go | 13 +++++---- server/router/system/sys_user.go | 7 +++-- web/src/style/main.scss | 6 ++-- .../dashboard/dashbordTable/dashbordTable.vue | 5 ---- web/src/view/example/customer/customer.vue | 10 +++---- web/src/view/example/excel/excel.vue | 14 +++++----- web/src/view/example/upload/upload.vue | 12 ++++---- web/src/view/superAdmin/api/api.vue | 12 ++++---- .../view/superAdmin/authority/authority.vue | 4 +-- .../superAdmin/dictionary/sysDictionary.vue | 12 ++++---- .../dictionary/sysDictionaryDetail.vue | 12 ++++---- web/src/view/superAdmin/menu/menu.vue | 28 +++++++++---------- .../operation/sysOperationRecord.vue | 20 ++++++------- web/src/view/superAdmin/user/user.vue | 12 ++++---- web/src/view/systemTools/autoCode/index.vue | 24 ++++++++-------- .../view/systemTools/autoCodeAdmin/index.vue | 14 +++++----- 28 files changed, 161 insertions(+), 139 deletions(-) diff --git a/server/resource/template/server/router.go.tpl b/server/resource/template/server/router.go.tpl index a4db665a..85f0f2bc 100644 --- a/server/resource/template/server/router.go.tpl +++ b/server/resource/template/server/router.go.tpl @@ -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}}列表 } } diff --git a/server/resource/template/web/table.vue.tpl b/server/resource/template/web/table.vue.tpl index a2895d7c..d76b3e56 100644 --- a/server/resource/template/web/table.vue.tpl +++ b/server/resource/template/web/table.vue.tpl @@ -49,24 +49,24 @@ @selection-change="handleSelectionChange" > - + {{- range .Fields}} {{- if .DictType}} - + {{- else if eq .FieldType "bool" }} - + {{- else }} - + {{- end }} {{- end }} - + diff --git a/web/src/view/example/customer/customer.vue b/web/src/view/example/customer/customer.vue index 74be9b2a..2a67f01f 100644 --- a/web/src/view/example/customer/customer.vue +++ b/web/src/view/example/customer/customer.vue @@ -11,15 +11,15 @@ tooltip-effect="dark" > - + - - - - + + + +