Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
229ad72d
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
332
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
229ad72d
编写于
4月 24, 2020
作者:
R
rainyan
提交者:
GitHub
4月 24, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #66 from flipped-aurora/gin-vue-admin_v2_dev
Gin vue admin v2 dev
上级
2527251b
74fca64f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
58 addition
and
4 deletion
+58
-4
server/Dockerfile
server/Dockerfile
+3
-1
web/src/api/authority.js
web/src/api/authority.js
+16
-0
web/src/view/superAdmin/authority/authority.vue
web/src/view/superAdmin/authority/authority.vue
+39
-3
未找到文件。
server/Dockerfile
浏览文件 @
229ad72d
...
...
@@ -7,7 +7,9 @@ ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin"
ARG
GO_VERSION=1.13.3
# 安装 golang 1.13.3
RUN
wget
"https://dl.google.com/go/go
$GO_VERSION
.linux-amd64.tar.gz"
&&
\
RUN
yum
install
-y
wget
&&
\
yum
install
-y
wqy-microhei-fonts wqy-zenhei-fonts
&&
\
wget
"https://dl.google.com/go/go
$GO_VERSION
.linux-amd64.tar.gz"
&&
\
rm
-rf
/usr/local/go
&&
\
tar
-C
/usr/local
-xzf
"go
$GO_VERSION
.linux-amd64.tar.gz"
&&
\
rm
-rf
*
.tar.gz
&&
\
...
...
web/src/api/authority.js
浏览文件 @
229ad72d
...
...
@@ -46,6 +46,22 @@ export const createAuthority = (data) => {
})
}
// @Tags authority
// @Summary 拷贝角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.CreateAuthorityPatams true "拷贝角色"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"拷贝成功"}"
// @Router /authority/copyAuthority [post]
export
const
copyAuthority
=
(
data
)
=>
{
return
service
({
url
:
"
/authority/copyAuthority
"
,
method
:
'
post
'
,
data
})
}
// @Summary 设置角色资源权限
// @Security ApiKeyAuth
// @accept application/json
...
...
web/src/view/superAdmin/authority/authority.vue
浏览文件 @
229ad72d
...
...
@@ -17,6 +17,7 @@
<template
slot-scope=
"scope"
>
<el-button
@
click=
"opdendrawer(scope.row)"
size=
"small"
type=
"text"
>
设置权限
</el-button>
<el-button
@
click=
"addAuthority(scope.row.authorityId)"
size=
"small"
type=
"text"
>
新增子角色
</el-button>
<el-button
@
click=
"copyAuthority(scope.row)"
size=
"small"
type=
"text"
>
拷贝角色
</el-button>
<el-button
@
click=
"editAuthority(scope.row)"
size=
"small"
type=
"text"
>
编辑角色
</el-button>
<el-button
@
click=
"deleteAuth(scope.row)"
size=
"small"
type=
"text"
>
删除角色
</el-button>
...
...
@@ -72,7 +73,8 @@ import {
getAuthorityList
,
deleteAuthority
,
createAuthority
,
updateAuthority
updateAuthority
,
copyAuthority
}
from
'
@/api/authority
'
import
Menus
from
'
@/view/superAdmin/authority/components/menus
'
...
...
@@ -97,6 +99,7 @@ export default {
dialogTitle
:
"
新增角色
"
,
dialogFormVisible
:
false
,
apiDialogFlag
:
false
,
copyForm
:
{},
form
:
{
authorityId
:
''
,
authorityName
:
''
,
...
...
@@ -121,6 +124,17 @@ export default {
Datas
},
methods
:
{
// 拷贝角色
copyAuthority
(
row
)
{
this
.
setOptions
()
this
.
dialogTitle
=
"
拷贝角色
"
this
.
dialogType
=
"
copy
"
for
(
let
k
in
this
.
form
)
{
this
.
form
[
key
]
=
row
[
key
]
}
this
.
copyForm
=
row
this
.
dialogFormVisible
=
true
;
}
opdendrawer
(
row
)
{
this
.
drawer
=
true
this
.
activeRow
=
row
...
...
@@ -203,8 +217,30 @@ export default {
}
}
break
;
default
:
break
;
case
'
copy
'
:
{
const
data
=
{
"
authority
"
:
{
"
authorityId
"
:
"
string
"
,
"
authorityName
"
:
"
string
"
,
"
datauthorityId
"
:
[],
"
parentId
"
:
"
string
"
,
},
"
oldAuthorityId
"
:
0
}
data
.
authority
.
authorityId
=
this
.
form
.
authorityId
data
.
authority
.
authorityName
=
this
.
form
.
authorityName
data
.
authority
.
parentId
=
this
.
form
.
parentId
data
.
authority
.
dataAuthorityId
=
this
.
copyForm
.
dataAuthorityId
data
.
oldAuthorityId
=
this
.
copyForm
.
authorityId
const
res
=
await
copyAuthority
(
data
)
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
复制成功!
'
})
this
.
getTableData
()
}
}
}
this
.
initForm
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录