# 系统控权
# 1. 云平台配置模块权限
云平台->集成管理->功能操作
# 2. 进行工程授权
云平台->系统管理->授权管理
# 3. 主应用升级拉取最新代码
http://gitlab.gosp.glkyun.com/glink-extend/glink-project-web.git (opens new window)
# 子应用修改
# 1. 子应用升级组件库版本大于等于 0.5.53
# 2. 权限全局配置
路径:\src\plugins\config\glink_config.js
平台提供了form,table,tree这3个组件的全局控权,可在项目内进行配置。
module.exports = {
GdForm: {
needAuth: true, //是否默认控权
},
GdTable: {
dialogBoxHeight: '450px', //dialog内部table高度
needAuth: true, //是否默认控权,GdAttament
},
GdTree: {
needAuth: true, //是否默认控权
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 组件内使用
- gd-table,gd-form,gd-tree
配置 buttons 时,添加 id 为控权编码,与云平台配置保持一致(例如:增加=add,编辑 edit,删除 delete 等)
buttons: [
{
id: 'add',
text: '新建',
icon: 'el-icon-plus',
type: 'primary',
click: this.handleNew
},
{
id: 'delete',
icon: 'el-icon-delete',
text: '删除',
click: rows => {
this.handleDelete(rows)
}
},
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- gl-button
控权参数(needAuth:是否控权,authCode 为控权编码)
button 为单独控权,每个按钮需独立控制权限编码,使用方式为:
<gl-button>不控权</gl-button>
<gl-button :needAuth="true">控权无编码</gl-button>
<gl-button :needAuth="true" authCode="add" type="primary">控权add</gl-button>
<gl-button :needAuth="true" authCode="edit" type="success">控权edit</gl-button>
1
2
3
4
2
3
4