+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:alpine
|
||||
FROM golang:alpine as builder
|
||||
|
||||
WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
|
||||
COPY . .
|
||||
|
||||
@@ -41,6 +41,12 @@ func Routers() *gin.Engine {
|
||||
exampleRouter := router.RouterGroupApp.Example
|
||||
autocodeRouter := router.RouterGroupApp.Autocode
|
||||
PublicGroup := Router.Group("")
|
||||
{
|
||||
// 健康监测
|
||||
PublicGroup.GET("/health", func(c *gin.Context) {
|
||||
c.JSON(200, "ok")
|
||||
})
|
||||
}
|
||||
{
|
||||
systemRouter.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
||||
systemRouter.InitInitRouter(PublicGroup) // 自动初始化相关
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;">删除</el-button>
|
||||
<el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;" :disabled="!multipleSelection.length">删除</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
@@ -50,24 +50,24 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column align="center" label="日期" width="180">
|
||||
<el-table-column align="left" label="日期" width="180">
|
||||
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
|
||||
</el-table-column>
|
||||
{{- range .Fields}}
|
||||
{{- if .DictType}}
|
||||
<el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<el-table-column align="left" 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 align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<el-table-column align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
|
||||
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
|
||||
</el-table-column> {{- else }}
|
||||
<el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
|
||||
<el-table-column align="left" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<el-table-column align="center" label="按钮组">
|
||||
<el-table-column align="left" 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>
|
||||
|
||||
@@ -121,7 +121,8 @@ func (authorityService *AuthorityService) DeleteAuthority(auth *system.SysAuthor
|
||||
func (authorityService *AuthorityService) GetAuthorityInfoList(info request.PageInfo) (err error, list interface{}, total int64) {
|
||||
limit := info.PageSize
|
||||
offset := info.PageSize * (info.Page - 1)
|
||||
db := global.GVA_DB
|
||||
db := global.GVA_DB.Model(&system.SysAuthority{})
|
||||
err = db.Where("parent_id = 0").Count(&total).Error
|
||||
var authority []system.SysAuthority
|
||||
err = db.Limit(limit).Offset(offset).Preload("DataAuthorityId").Where("parent_id = 0").Find(&authority).Error
|
||||
if len(authority) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user