Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9a22957b
authored
Aug 09, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
菜单管理
1 parent
a1950f62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
src/views/productManage/menuList/index.vue
src/views/productManage/menuList/index.vue
View file @
9a22957
...
@@ -413,22 +413,27 @@ export default {
...
@@ -413,22 +413,27 @@ export default {
fn
&&
fn
()
fn
&&
fn
()
})
})
},
},
isMenuSpecial
(
flag
=
true
)
{
isMenuSpecial
(
isSpecial
=
true
)
{
this
.
editForm
.
ownedCusgroupType
=
''
if
(
!
isSpecial
)
{
this
.
editForm
.
ownedCusgroupValue
=
[]
this
.
editForm
.
ownedCusgroupType
=
''
this
.
editForm
.
ownedMerchant
=
''
this
.
editForm
.
ownedCusgroupValue
=
[]
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupType'
)].
isHide
=
!
flag
this
.
editForm
.
ownedMerchant
=
''
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isHide
=
!
flag
}
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedMerchant'
)].
isHide
=
!
flag
this
.
baseData
.
cusGroupList
=
isSpecial
?
this
.
baseData
[
this
.
attrToList
[
this
.
editForm
.
ownedCusgroupType
]]
:
[]
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
flag
this
.
getOptionsList
(
'editFormData'
,
false
)
this
.
editRule
.
ownedCusgroupType
[
0
].
required
=
flag
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupType'
)].
isHide
=
!
isSpecial
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isHide
=
!
isSpecial
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedMerchant'
)].
isHide
=
!
isSpecial
this
.
editRule
.
ownedCusgroupValue
[
0
].
required
=
isSpecial
&&
(
this
.
editForm
.
ownedCusgroupType
!==
3
)
this
.
editRule
.
ownedCusgroupType
[
0
].
required
=
isSpecial
},
},
editDisable
()
{
editDisable
()
{
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'产品'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'产品'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'父级菜单'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
label
===
'父级菜单'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'isSpecial'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'isSpecial'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
this
.
editFormData
[
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
===
'ownedCusgroupValue'
)].
isDisabled
=
!!
this
.
editForm
.
menuCode
&&
!
(
this
.
editForm
.
ownedCusgroupType
!==
3
)
},
},
handleAdd
(
isEdit
)
{
handleAdd
(
isEdit
=
false
)
{
this
.
editVisible
=
!
this
.
editVisible
this
.
editVisible
=
!
this
.
editVisible
this
.
editDisable
()
this
.
editDisable
()
!
isEdit
&&
this
.
isMenuSpecial
(
false
)
!
isEdit
&&
this
.
isMenuSpecial
(
false
)
...
@@ -479,10 +484,13 @@ export default {
...
@@ -479,10 +484,13 @@ export default {
this
.
editForm
.
parentId
=
' '
this
.
editForm
.
parentId
=
' '
this
.
editForm
.
parentName
=
'无(表示顶级菜单)'
this
.
editForm
.
parentName
=
'无(表示顶级菜单)'
}
}
if
(
this
.
editForm
.
isSpecial
)
{
this
.
editForm
.
ownedCusgroupValue
&&
(
this
.
editForm
.
ownedCusgroupValue
=
this
.
editForm
.
ownedCusgroupValue
.
split
(
','
).
map
(
item
=>
+
item
))
this
.
isMenuSpecial
(
true
)
}
this
.
getMenuTree
(
this
.
editForm
.
productId
,
()
=>
{
this
.
getMenuTree
(
this
.
editForm
.
productId
,
()
=>
{
this
.
handleAdd
(
true
)
this
.
handleAdd
(
true
)
})
})
this
.
editForm
.
isSpecial
&&
this
.
isMenuSpecial
(
true
)
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
this
.
$confirm
(
'是否删除菜单?'
,
'提示'
,
{
this
.
$confirm
(
'是否删除菜单?'
,
'提示'
,
{
...
...
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