Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
authority
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cc0d14bd
authored
Sep 25, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
创建组件-角色描述优化
1 parent
8b36465e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
20 deletions
src/components/RoleCreate/src/main.vue
src/components/UserDetail/src/main.vue
src/config/common.conf.js
src/components/RoleCreate/src/main.vue
View file @
cc0d14b
...
...
@@ -9,7 +9,7 @@
<gl-input
v-model=
"createRuleForm.description"
type=
"textarea"
:rows=
"3"
clearable
></gl-input>
</gl-form-item>
<gl-form-item>
<span
style=
"position:absolute; right:35px; top:-20px;"
>
{{
createRuleForm
.
description
.
length
}}
</span>
<span
:class=
"numberErr? 'err': false"
style=
"position:absolute; right:35px; top:-20px;"
>
{{
createRuleForm
.
description
.
length
}}
</span>
<span
style=
"position:absolute; right:5px; top:-20px;"
>
/200
</span>
</gl-form-item>
<gl-form-item
label=
"所属部门:"
prop=
"departName"
>
...
...
@@ -49,6 +49,9 @@ export default {
flagCOrE
(
val
)
{
this
.
title
=
val
?
'新建角色'
:
'角色列表'
// this.createRuleForm.rights = this.roleMenuTree
},
'createRuleForm.description.length'
(
val
)
{
this
.
numberErr
=
val
>
200
?
1
:
0
}
},
data
()
{
...
...
@@ -57,6 +60,7 @@ export default {
show_checkbox
:
true
,
defaultExpandAll
:
true
,
departName
:
[],
numberErr
:
false
,
title
:
''
,
createRules
:
{
roleName
:
[
...
...
@@ -119,4 +123,7 @@ export default {
}
</
script
>
<
style
scoped
>
.err
{
color
:
red
;
}
</
style
>
src/components/UserDetail/src/main.vue
View file @
cc0d14b
...
...
@@ -56,13 +56,6 @@ export default {
roleId
:
this
.
id
}
},
// getUserParams() {
// return {
// pageSize: this.pageSize,
// pageNum: this.pageNum,
// userId: this.id
// }
// },
// 获取角色的相关用户详细信息
selectUser
()
{
const
params
=
this
.
getRoleParams
()
...
...
@@ -73,16 +66,6 @@ export default {
console
.
log
(
err
)
})
},
// 获取用户详情,包括角色
// getUserRoles() {
// const params = this.getUserParams()
// getWithRoles.req(params).then(res => {
// this.total = 1
// this.tableParam.data = [res]
// }).catch(err => {
// console.log(err)
// })
// },
callApi
()
{
this
.
flagRoleOrUser
&&
this
.
selectUser
()
!
this
.
flagRoleOrUser
&&
(
this
.
tableParam
.
data
=
[
this
.
apiParam
])
...
...
src/config/common.conf.js
View file @
cc0d14b
export
default
{
axios
:
{
baseURL
:
'http://cas.dev.glsx.net/admin-operating-auth/'
,
//
baseURL: 'http://192.168.3.171:7300/mock/5b91805391b67469b43e2921/subsystem/',
//
baseURL: 'http://cas.dev.glsx.net/admin-operating-auth/',
baseURL
:
'http://192.168.3.171:7300/mock/5b91805391b67469b43e2921/subsystem/'
,
whiteList
:
[
'role/deleteRoleById'
,
'role/deleteUserRoleById'
,
'role/getRoleDetail'
,
'role/getRoleDetail'
,
'role/getRoleList'
,
'role/isRoleNameExit'
,
'role/saveRoleList'
,
'role/selectMenuTreeRoleId'
,
'role/selectUserRoleByRoleId'
,
'role/updateRole'
,
'user/batcheDel'
,
'user/findAll'
,
'user/get'
,
'user/getWithRoles'
,
'user/operatUser'
,
'user/updateUser'
,
'department/del'
,
'department/findTree'
,
'department/getPName'
,
'department/getTreeNode'
,
'department/updateDepartment'
,
'menu/add'
,
'menu/del'
,
'menu/edit'
,
'menu/findById'
,
'menu/findTree'
,
'menu/getByUserId'
,
'menu/getPName'
],
timeout
:
15000
,
result
:
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment