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 147a61d1
authored
Sep 18, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
role菜单选项
1 parent
5100a810
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
src/components/RoleCreate/src/main.vue
src/components/RoleCreate/src/main.vue
View file @
147a61d
...
@@ -17,7 +17,14 @@
...
@@ -17,7 +17,14 @@
<gl-option
label=
"运营平台"
value=
"运营平台"
></gl-option>
<gl-option
label=
"运营平台"
value=
"运营平台"
></gl-option>
</gl-select>
</gl-select>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"菜单选项:"
></gl-form-item>
<gl-form-item
label=
"菜单选项:"
>
<tree
ref=
'tree'
:show-checkbox=
"show_checkbox"
:defaultExpandAll=
"defaultExpandAll"
@
input=
"input"
></tree>
</gl-form-item>
</gl-form>
</gl-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
type=
"primary"
@
click=
"handleCreateSubmit('createRuleForm')"
>
提交
</gl-button>
<gl-button
type=
"primary"
@
click=
"handleCreateSubmit('createRuleForm')"
>
提交
</gl-button>
...
@@ -49,6 +56,8 @@ export default {
...
@@ -49,6 +56,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
createRuleForm
:
roleCreateStructure
,
createRuleForm
:
roleCreateStructure
,
show_checkbox
:
true
,
defaultExpandAll
:
true
,
createRules
:
{
createRules
:
{
roleName
:
[
roleName
:
[
{
required
:
true
,
message
:
'请输入角色名称!'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入角色名称!'
,
trigger
:
'blur'
}
...
@@ -64,6 +73,11 @@ export default {
...
@@ -64,6 +73,11 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// tree-strat
input
(
params
)
{
return
params
},
// tree-end
getParams
()
{
getParams
()
{
return
this
.
$deep_clone
(
this
.
createRuleForm
)
return
this
.
$deep_clone
(
this
.
createRuleForm
)
},
},
...
@@ -87,11 +101,11 @@ export default {
...
@@ -87,11 +101,11 @@ export default {
const
editData
=
this
.
getParams
()
const
editData
=
this
.
getParams
()
// eidt:true;create:false
// eidt:true;create:false
const
flagEOrC
=
editData
.
id
===
Number
const
flagEOrC
=
editData
.
id
===
Number
console
.
log
(
flagEOrC
)
// console.log(flagEOrC)
flagEOrC
&&
this
.
addRole
()
!
flagEOrC
&&
this
.
updateRoleInfo
()
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
flagEOrC
&&
this
.
addRole
()
!
flagEOrC
&&
this
.
updateRoleInfo
()
this
.
$emit
(
'createClose'
,
flagEOrC
,
editData
)
this
.
$emit
(
'createClose'
,
flagEOrC
,
editData
)
}
else
{
}
else
{
return
false
return
false
...
...
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