Merge pull request #67 from jiazea1/v2.0

修正导出按钮鉴权问题
This commit is contained in:
孟帅 2023-11-25 09:10:29 +08:00 committed by GitHub
commit 40117c700d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -9,9 +9,10 @@ import (
"bytes"
"context"
"fmt"
"strings"
"hotgo/internal/dao"
"hotgo/internal/model/input/sysin"
"strings"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gerror"
@ -175,9 +176,9 @@ func makeValidatorFunc(field *sysin.GenCodesColumnListModel) (err error, rule st
} else if field.FormRole == FormRolePercentage {
rule = fmt.Sprintf(EditInpValidatorGenerally, "min:0|max:100", field.GoName, field.Dc+"必须0-100之间")
} else if field.FormRole == FormRoleTel {
rule = fmt.Sprintf(EditInpValidatorGenerally, "phone", field.GoName, field.Dc+"不是手机号码")
} else if field.FormRole == FormRolePhone {
rule = fmt.Sprintf(EditInpValidatorGenerally, "telephone", field.GoName, field.Dc+"不是座机号码")
} else if field.FormRole == FormRolePhone {
rule = fmt.Sprintf(EditInpValidatorGenerally, "phone", field.GoName, field.Dc+"不是手机号码")
} else if field.FormRole == FormRoleQq {
rule = fmt.Sprintf(EditInpValidatorGenerally, "qq", field.GoName, field.Dc+"不是QQ号码")
} else if field.FormRole == FormRoleEmail {

View File

@ -63,7 +63,7 @@
type="primary"
@click="handleExport"
class="min-left-space"
v-if="hasPermission(['/@{.apiPrefix}/delete'])"
v-if="hasPermission(['/@{.apiPrefix}/export'])"
>
<template #icon>
<n-icon>