Merge branch 'main' into i18n-dev-new

This commit is contained in:
Mohamed Hassan
2022-02-22 11:52:34 +02:00
32 changed files with 5019 additions and 525 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
</div>
<div align=center>
<img src="https://img.shields.io/badge/golang-1.14-blue"/>
<img src="https://img.shields.io/badge/gin-1.6.3-lightBlue"/>
<img src="https://img.shields.io/badge/gin-1.7.0-lightBlue"/>
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen"/>
<img src="https://img.shields.io/badge/element--ui-2.12.0-green"/>
<img src="https://img.shields.io/badge/gorm-1.20.7-red"/>
+1 -1
View File
@@ -4,7 +4,7 @@
</div>
<div align=center>
<img src="https://img.shields.io/badge/golang-1.16-blue"/>
<img src="https://img.shields.io/badge/gin-1.6.3-lightBlue"/>
<img src="https://img.shields.io/badge/gin-1.7.0-lightBlue"/>
<img src="https://img.shields.io/badge/vue-3.0.0-brightgreen"/>
<img src="https://img.shields.io/badge/element--plus-1.1.0beta8-green"/>
<img src="https://img.shields.io/badge/gorm-1.20.7-red"/>
+2
View File
@@ -16,6 +16,7 @@ type ApiGroup struct {
OperationRecordApi
AutoCodeHistoryApi
DictionaryDetailApi
AuthorityBtnApi
}
var (
@@ -33,4 +34,5 @@ var (
operationRecordService = service.ServiceGroupApp.SystemServiceGroup.OperationRecordService
autoCodeHistoryService = service.ServiceGroupApp.SystemServiceGroup.AutoCodeHistoryService
dictionaryDetailService = service.ServiceGroupApp.SystemServiceGroup.DictionaryDetailService
authorityBtnService = service.ServiceGroupApp.SystemServiceGroup.AuthorityBtnService
)
+66
View File
@@ -0,0 +1,66 @@
package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
type AuthorityBtnApi struct{}
// @Tags AuthorityBtn
// @Summary 获取权限按钮
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SysAuthorityBtnReq true "菜单id, 角色id, 选中的按钮id"
// @Success 200 {object} response.Response{data=response.SysAuthorityBtnRes,msg=string} "返回列表成功"
// @Router /authorityBtn/getAuthorityBtn [post]
func (a *AuthorityBtnApi) GetAuthorityBtn(c *gin.Context) {
var req request.SysAuthorityBtnReq
_ = c.ShouldBindJSON(&req)
if err, res := authorityBtnService.GetAuthorityBtn(req); err != nil {
global.GVA_LOG.Error("查询失败!", zap.Error(err))
response.FailWithMessage("查询失败", c)
} else {
response.OkWithDetailed(res, "查询成功", c)
}
}
// @Tags AuthorityBtn
// @Summary 设置权限按钮
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SysAuthorityBtnReq true "菜单id, 角色id, 选中的按钮id"
// @Success 200 {object} response.Response{msg=string} "返回列表成功"
// @Router /authorityBtn/getAuthorityBtn [post]
func (a *AuthorityBtnApi) SetAuthorityBtn(c *gin.Context) {
var req request.SysAuthorityBtnReq
_ = c.ShouldBindJSON(&req)
if err := authorityBtnService.SetAuthorityBtn(req); err != nil {
global.GVA_LOG.Error("分配失败!", zap.Error(err))
response.FailWithMessage("分配失败", c)
} else {
response.OkWithMessage("分配成功", c)
}
}
// @Tags AuthorityBtn
// @Summary 设置权限按钮
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{msg=string} "删除成功"
// @Router /authorityBtn/canRemoveAuthorityBtn [post]
func (a *AuthorityBtnApi) CanRemoveAuthorityBtn(c *gin.Context) {
id := c.Query("id")
if err := authorityBtnService.CanRemoveAuthorityBtn(id); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Error(err))
response.FailWithMessage(err.Error(), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
+1799 -170
View File
File diff suppressed because it is too large Load Diff
+1799 -170
View File
File diff suppressed because it is too large Load Diff
+1000 -170
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -40,7 +40,8 @@ func RegisterTables(db *gorm.DB) {
system.SysAutoCodeHistory{},
system.SysDictionaryDetail{},
system.SysBaseMenuParameter{},
system.SysBaseMenuBtn{},
system.SysAuthorityBtn{},
// 示例模块表
example.ExaFile{},
example.ExaCustomer{},
+1
View File
@@ -71,6 +71,7 @@ func Routers() *gin.Engine {
systemRouter.InitAutoCodeHistoryRouter(PrivateGroup) // 自动化代码历史
systemRouter.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
systemRouter.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
systemRouter.InitAuthorityBtnRouterRouter(PrivateGroup) // 字典详情管理
exampleRouter.InitExcelRouter(PrivateGroup) // 表格导入导出
exampleRouter.InitCustomerRouter(PrivateGroup) // 客户路由
@@ -0,0 +1,7 @@
package request
type SysAuthorityBtnReq struct {
MenuID uint `json:"menuID"`
AuthorityId string `json:"authorityId"`
Selected []uint `json:"selected"`
}
@@ -0,0 +1,5 @@
package response
type SysAuthorityBtnRes struct {
Selected []uint `json:"selected"`
}
+8
View File
@@ -0,0 +1,8 @@
package system
type SysAuthorityBtn struct {
AuthorityId string
SysMenuID uint
SysBaseMenuBtnID uint
SysBaseMenuBtn SysBaseMenuBtn
}
@@ -6,6 +6,7 @@ type SysMenu struct {
AuthorityId string `json:"-" gorm:"comment:角色ID"`
Children []SysMenu `json:"children" gorm:"-"`
Parameters []SysBaseMenuParameter `json:"parameters" gorm:"foreignKey:SysBaseMenuID;references:MenuId"`
Btns map[string]string `json:"btns" gorm:"-"`
}
func (s SysMenu) TableName() string {
+1
View File
@@ -17,6 +17,7 @@ type SysBaseMenu struct {
SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
Children []SysBaseMenu `json:"children" gorm:"-"`
Parameters []SysBaseMenuParameter `json:"parameters"`
MenuBtn []SysBaseMenuBtn `json:"menuBtn"`
}
type Meta struct {
+10
View File
@@ -0,0 +1,10 @@
package system
import "github.com/flipped-aurora/gin-vue-admin/server/global"
type SysBaseMenuBtn struct {
global.GVA_MODEL
Name string `json:"name" gorm:"comment:按钮关键key"`
Desc string `json:"desc" gorm:"按钮备注"`
SysBaseMenuID uint `json:"sysBaseMenuID" gorm:"comment:菜单ID"`
}
+1
View File
@@ -14,4 +14,5 @@ type RouterGroup struct {
DictionaryRouter
OperationRecordRouter
DictionaryDetailRouter
AuthorityBtnRouter
}
+19
View File
@@ -0,0 +1,19 @@
package system
import (
v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
"github.com/gin-gonic/gin"
)
type AuthorityBtnRouter struct{}
func (s *AuthorityBtnRouter) InitAuthorityBtnRouterRouter(Router *gin.RouterGroup) {
//authorityRouter := Router.Group("authorityBtn").Use(middleware.OperationRecord())
authorityRouterWithoutRecord := Router.Group("authorityBtn")
authorityBtnApi := v1.ApiGroupApp.SystemApiGroup.AuthorityBtnApi
{
authorityRouterWithoutRecord.POST("getAuthorityBtn", authorityBtnApi.GetAuthorityBtn)
authorityRouterWithoutRecord.POST("setAuthorityBtn", authorityBtnApi.SetAuthorityBtn)
authorityRouterWithoutRecord.POST("canRemoveAuthorityBtn", authorityBtnApi.CanRemoveAuthorityBtn)
}
}
+1
View File
@@ -15,4 +15,5 @@ type ServiceGroup struct {
AutoCodeHistoryService
OperationRecordService
DictionaryDetailService
AuthorityBtnService
}
@@ -0,0 +1,58 @@
package system
import (
"errors"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
"gorm.io/gorm"
)
type AuthorityBtnService struct{}
func (a *AuthorityBtnService) GetAuthorityBtn(req request.SysAuthorityBtnReq) (err error, res response.SysAuthorityBtnRes) {
var authorityBtn []system.SysAuthorityBtn
err = global.GVA_DB.Find(&authorityBtn, "authority_id = ? and sys_menu_id = ?", req.AuthorityId, req.MenuID).Error
if err != nil {
return
}
var selected []uint
for _, v := range authorityBtn {
selected = append(selected, v.SysBaseMenuBtnID)
}
res.Selected = selected
return err, res
}
func (a *AuthorityBtnService) SetAuthorityBtn(req request.SysAuthorityBtnReq) (err error) {
return global.GVA_DB.Transaction(func(tx *gorm.DB) error {
var authorityBtn []system.SysAuthorityBtn
err = tx.Delete(&[]system.SysAuthorityBtn{}, "authority_id = ? and sys_menu_id = ?", req.AuthorityId, req.MenuID).Error
if err != nil {
return err
}
for _, v := range req.Selected {
authorityBtn = append(authorityBtn, system.SysAuthorityBtn{
AuthorityId: req.AuthorityId,
SysMenuID: req.MenuID,
SysBaseMenuBtnID: v,
})
}
if len(authorityBtn) > 0 {
err = tx.Create(&authorityBtn).Error
}
if err != nil {
return err
}
return err
})
}
func (a *AuthorityBtnService) CanRemoveAuthorityBtn(ID string) (err error) {
fErr := global.GVA_DB.First(&system.SysAuthorityBtn{}, "sys_base_menu_btn_id = ?", ID).Error
if errors.Is(fErr, gorm.ErrRecordNotFound) {
return nil
}
return errors.New("此按钮正在被使用无法删除")
}
+18 -2
View File
@@ -17,7 +17,7 @@ type BaseMenuService struct{}
//@return: err error
func (baseMenuService *BaseMenuService) DeleteBaseMenu(id float64) (err error) {
err = global.GVA_DB.Preload("Parameters").Where("parent_id = ?", id).First(&system.SysBaseMenu{}).Error
err = global.GVA_DB.Preload("MenuBtn").Preload("Parameters").Where("parent_id = ?", id).First(&system.SysBaseMenu{}).Error
if err != nil {
var menu system.SysBaseMenu
db := global.GVA_DB.Preload("SysAuthoritys").Where("id = ?", id).First(&menu).Delete(&menu)
@@ -73,6 +73,11 @@ func (baseMenuService *BaseMenuService) UpdateBaseMenu(menu system.SysBaseMenu)
global.GVA_LOG.Debug(txErr.Error())
return txErr
}
txErr = tx.Unscoped().Delete(&system.SysBaseMenuBtn{}, "sys_base_menu_id = ?", menu.ID).Error
if txErr != nil {
global.GVA_LOG.Debug(txErr.Error())
return txErr
}
if len(menu.Parameters) > 0 {
for k := range menu.Parameters {
menu.Parameters[k].SysBaseMenuID = menu.ID
@@ -84,6 +89,17 @@ func (baseMenuService *BaseMenuService) UpdateBaseMenu(menu system.SysBaseMenu)
}
}
if len(menu.MenuBtn) > 0 {
for k := range menu.MenuBtn {
menu.MenuBtn[k].SysBaseMenuID = menu.ID
}
txErr = tx.Create(&menu.MenuBtn).Error
if txErr != nil {
global.GVA_LOG.Debug(txErr.Error())
return txErr
}
}
txErr = db.Updates(upDateMap).Error
if txErr != nil {
global.GVA_LOG.Debug(txErr.Error())
@@ -101,6 +117,6 @@ func (baseMenuService *BaseMenuService) UpdateBaseMenu(menu system.SysBaseMenu)
//@return: err error, menu model.SysBaseMenu
func (baseMenuService *BaseMenuService) GetBaseMenuById(id float64) (err error, menu system.SysBaseMenu) {
err = global.GVA_DB.Preload("Parameters").Where("id = ?", id).First(&menu).Error
err = global.GVA_DB.Preload("MenuBtn").Preload("Parameters").Where("id = ?", id).First(&menu).Error
return
}
+2
View File
@@ -42,6 +42,8 @@ func (initDBService *InitDBService) initTables() error {
system.SysOperationRecord{},
system.SysDictionaryDetail{},
system.SysBaseMenuParameter{},
system.SysBaseMenuBtn{},
system.SysAuthorityBtn{},
adapter.CasbinRule{},
+17 -1
View File
@@ -22,9 +22,25 @@ var MenuServiceApp = new(MenuService)
func (menuService *MenuService) getMenuTreeMap(authorityId string) (err error, treeMap map[string][]system.SysMenu) {
var allMenus []system.SysMenu
var btns []system.SysAuthorityBtn
treeMap = make(map[string][]system.SysMenu)
err = global.GVA_DB.Where("authority_id = ?", authorityId).Order("sort").Preload("Parameters").Find(&allMenus).Error
if err != nil {
return
}
err = global.GVA_DB.Where("authority_id = ?", authorityId).Preload("SysBaseMenuBtn").Find(&btns).Error
if err != nil {
return
}
var btnMap = make(map[uint]map[string]string)
for _, v := range btns {
if btnMap[v.SysMenuID] == nil {
btnMap[v.SysMenuID] = make(map[string]string)
}
btnMap[v.SysMenuID][v.SysBaseMenuBtn.Name] = authorityId
}
for _, v := range allMenus {
v.Btns = btnMap[v.ID]
treeMap[v.ParentId] = append(treeMap[v.ParentId], v)
}
return err, treeMap
@@ -109,7 +125,7 @@ func (menuService *MenuService) AddBaseMenu(menu system.SysBaseMenu) error {
func (menuService *MenuService) getBaseMenuTreeMap() (err error, treeMap map[string][]system.SysBaseMenu) {
var allMenus []system.SysBaseMenu
treeMap = make(map[string][]system.SysBaseMenu)
err = global.GVA_DB.Order("sort").Preload("Parameters").Find(&allMenus).Error
err = global.GVA_DB.Order("sort").Preload("MenuBtn").Preload("Parameters").Preload("Parameters").Find(&allMenus).Error
for _, v := range allMenus {
treeMap[v.ParentId] = append(treeMap[v.ParentId], v)
}
+4
View File
@@ -119,6 +119,10 @@ func (a *api) Initialize() error {
{ApiGroup: "excel", Method: "GET", Path: "/excel/loadExcel", Description: "下载excel"},
{ApiGroup: "excel", Method: "POST", Path: "/excel/exportExcel", Description: "导出excel"},
{ApiGroup: "excel", Method: "GET", Path: "/excel/downloadTemplate", Description: "下载excel模板"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/setAuthorityBtn", Description: "设置按钮权限"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/getAuthorityBtn", Description: "获取已有按钮权限"},
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/canRemoveAuthorityBtn", Description: "删除按钮"},
}
if err := global.GVA_DB.Create(&entities).Error; err != nil {
return errors.Wrap(err, a.TableName()+" "+"general.tabelDataInitFail")
+4
View File
@@ -120,6 +120,10 @@ func (c *casbin) Initialize() error {
{PType: "p", V0: "888", V1: "/excel/exportExcel", V2: "POST"},
{PType: "p", V0: "888", V1: "/excel/downloadTemplate", V2: "GET"},
{PType: "p", V0: "888", V1: "/authorityBtn/setAuthorityBtn", V2: "POST"},
{PType: "p", V0: "888", V1: "/authorityBtn/getAuthorityBtn", V2: "POST"},
{PType: "p", V0: "888", V1: "/authorityBtn/canRemoveAuthorityBtn", V2: "POST"},
{PType: "p", V0: "8881", V1: "/base/login", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/register", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},
+27
View File
@@ -0,0 +1,27 @@
import service from '@/utils/request'
export const getAuthorityBtnApi = (data) => {
return service({
url: '/authorityBtn/getAuthorityBtn',
method: 'post',
data
})
}
export const setAuthorityBtnApi = (data) => {
return service({
url: '/authorityBtn/setAuthorityBtn',
method: 'post',
data
})
}
export const canRemoveAuthorityBtnApi = (params) => {
return service({
url: '/authorityBtn/canRemoveAuthorityBtn',
method: 'post',
params
})
}
+2 -4
View File
@@ -23,9 +23,7 @@ export default {
break
}
if (type === '') {
/* eslint-disable */
console.error("v-auth必须是Array,Number,String属性,暂不支持其他属性")
/* eslint-enable */
el.parentNode.removeChild(el)
return
}
const waitUse = binding.value.toString().split(',')
@@ -34,7 +32,7 @@ export default {
flag = !flag
}
if (!flag) {
el.style.display = 'none'
el.parentNode.removeChild(el)
}
}
})
+1
View File
@@ -12,6 +12,7 @@ const formatRouter = (routes, routeMap) => {
if ((!item.children || item.children.every(ch => ch.hidden)) && item.name !== '404' && !item.hidden) {
routerListArr.push({ label: item.meta.title, value: item.name })
}
item.meta.btns = item.btns
item.meta.hidden = item.hidden
routeMap[item.name] = item
if (item.children && item.children.length > 0) {
+6
View File
@@ -0,0 +1,6 @@
import { useRoute } from 'vue-router'
import {reactive }from 'vue'
export const useBtnAuth = () => {
const route = useRoute()
return route.meta.btns || reactive({})
}
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="gva-top-card-left-title">{{ t("view.dashboard.title") }}</div>
<div class="gva-top-card-left-dot">{{ t("view.dashboard.note") }}</div>
<div class="gva-top-card-left-rows">
<el-row>
<el-row v-auth="888">
<el-col :span="8" :xs="24" :sm="8">
<div class="flex-center">
<el-icon class="dasboard-icon">
@@ -28,9 +28,37 @@
{{ row.defaultRouter === data.name? t('menus.home') : t('menus.setAsHome') }}
</el-button>
</span>
<span v-if="data.menuBtn.length">
<el-button
type="text"
size="small"
@click="() => OpenBtn(data)"
>
分配按钮
</el-button>
</span>
</span>
</template>
</el-tree>
<el-dialog v-model="btnVisible" title="分配按钮" destroy-on-close>
<el-table
ref="btnTableRef"
:data="btnData"
row-key="ID"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="按钮名称" prop="name" />
<el-table-column label="按钮备注" prop="desc" />
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
@@ -39,7 +67,8 @@ import { getBaseMenuTree, getMenuAuthority, addMenuAuthority } from '@/api/menu'
import {
updateAuthority
} from '@/api/authority'
import { ref } from 'vue'
import { getAuthorityBtnApi, setAuthorityBtnApi } from '@/api/authorityBtn'
import { nextTick, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { useI18n } from 'vue-i18n' // added by mohamed hassan to support multilanguage
@@ -71,7 +100,6 @@ const init = async() => {
//
const res = await getBaseMenuTree()
menuTreeData.value = res.data.menus
const res1 = await getMenuAuthority({ authorityId: props.row.authorityId })
const menus = res1.data.menus
const arr = []
@@ -118,6 +146,55 @@ const relation = async() => {
defineExpose({ enterAndNext, needConfirm })
const btnVisible = ref(false)
const btnData = ref([])
const multipleSelection = ref([])
const btnTableRef = ref()
let menuID = ''
const OpenBtn = async(data) => {
menuID = data.ID
const res = await getAuthorityBtnApi({ menuID: menuID, authorityId: props.row.authorityId })
if (res.code === 0) {
openDialog(data)
await nextTick()
if (res.data.selected) {
res.data.selected.forEach(id => {
btnData.value.some(item => {
if (item.ID === id) {
btnTableRef.value.toggleRowSelection(item, true)
}
})
})
}
}
}
const handleSelectionChange = (val) => {
multipleSelection.value = val
}
const openDialog = (data) => {
btnVisible.value = true
btnData.value = data.menuBtn
}
const closeDialog = () => {
btnVisible.value = false
}
const enterDialog = async() => {
const selected = multipleSelection.value.map(item => item.ID)
const res = await setAuthorityBtnApi({
menuID,
selected,
authorityId: props.row.authorityId
})
if (res.code === 0) {
ElMessage({ type: 'success', message: '设置成功' })
btnVisible.value = false
}
}
</script>
<script>
@@ -126,3 +203,11 @@ export default {
name: 'Menus'
}
</script>
<style lang="scss" scope>
.custom-tree-node{
span+span{
margin-left: 12px;
}
}
</style>
+65 -2
View File
@@ -177,6 +177,42 @@
</template>
</el-table-column>
</el-table>
<el-button
style="margin-top:12px"
size="small"
type="primary"
icon="edit"
@click="addBtn(form)"
>新增可控按钮</el-button>
<el-table :data="form.menuBtn" style="width: 100%">
<el-table-column align="left" prop="name" label="按钮名称" width="180">
<template #default="scope">
<div>
<el-input v-model="scope.row.name" />
</div>
</template>
</el-table-column>
<el-table-column align="left" prop="name" label="备注" width="180">
<template #default="scope">
<div>
<el-input v-model="scope.row.desc" />
</div>
</template>
</el-table-column>
<el-table-column align="left">
<template #default="scope">
<div>
<el-button
type="danger"
size="small"
icon="delete"
@click="deleteBtn(form.menuBtn,scope.$index)"
>删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
<template #footer>
<div class="dialog-footer">
@@ -198,6 +234,7 @@ import {
} from '@/api/menu'
import icon from '@/view/superAdmin/menu/icon.vue'
import warningBar from '@/components/warningBar/warningBar.vue'
import { canRemoveAuthorityBtnApi } from '@/api/authorityBtn'
import { reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useI18n } from 'vue-i18n' // added by mohamed hassan to support multilanguage
@@ -235,7 +272,7 @@ getTableData()
//
const addParameter = (form) => {
if (!form.parameters) {
form.value.parameters = []
form.parameters = []
}
form.parameters.push({
type: 'query',
@@ -248,6 +285,31 @@ const deleteParameter = (parameters, index) => {
parameters.splice(index, 1)
}
//
const addBtn = (form) => {
console.log(form)
if (!form.menuBtn) {
form.menuBtn = []
}
form.menuBtn.push({
name: '',
desc: '',
})
}
//
const deleteBtn = async(btns, index) => {
const btn = btns[index]
if (btn.ID === 0) {
btns.splice(index, 1)
return
}
const res = await canRemoveAuthorityBtnApi({ id: btn.ID })
if (res.code === 0) {
btns.splice(index, 1)
return
}
}
const form = ref({
ID: 0,
path: '',
@@ -262,7 +324,8 @@ const form = ref({
closeTab: false,
keepAlive: false
},
parameters: []
parameters: [],
menuBtn: []
})
const changeName = () => {
form.value.path = form.value.name
@@ -28,6 +28,9 @@
<el-form-item label="多点登录拦截">
<el-checkbox v-model="config.system.useMultipoint">开启</el-checkbox>
</el-form-item>
<el-form-item label="开启redis">
<el-checkbox v-model="config.system.useRedis">开启</el-checkbox>
</el-form-item>
<el-form-item label="限流次数">
<el-input-number v-model.number="config.system.iplimitCount" />
</el-form-item>