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 347ce23f
authored
Aug 17, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/glsx-web/glsx-oss-account
2 parents
1a209124
9f0b4bde
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
src/views/customer/account/add/index.vue
src/views/customer/account/add/index.vue
View file @
347ce23
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
class=
"w-300"
class=
"w-300"
v-model=
"accountRuleForm.accounttypeName"
v-model=
"accountRuleForm.accounttypeName"
:size=
"btn_size"
:size=
"btn_size"
maxlength=
"1
0
"
maxlength=
"1
5
"
show-word-limit
show-word-limit
></el-input>
></el-input>
</el-form-item>
</el-form-item>
...
@@ -259,14 +259,14 @@ export default {
...
@@ -259,14 +259,14 @@ export default {
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
// this.changeList = arr
// this.changeList = arr
this
.
treeData
.
push
(
_
.
cloneDeep
(
res
.
data
[
0
]))
this
.
treeData
.
push
(
_
.
cloneDeep
(
res
.
data
[
0
]))
if
(
this
.
responseList
.
length
!=
0
)
{
//
if (this.responseList.length != 0) {
// 新增默认全选
// 新增默认全选
const
len
=
this
.
treeData
.
length
-
1
const
len
=
this
.
treeData
.
length
-
1
console
.
log
(
len
,
this
.
$refs
[
`tree
${
len
}
`
],
this
.
treeData
[
len
].
children
)
console
.
log
(
len
,
this
.
$refs
[
`tree
${
len
}
`
],
this
.
treeData
[
len
].
children
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
`tree
${
len
}
`
][
0
].
setCheckedNodes
(
this
.
treeData
[
len
].
children
)
this
.
$refs
[
`tree
${
len
}
`
][
0
].
setCheckedNodes
(
this
.
treeData
[
len
].
children
)
})
})
}
//
}
}
}
})
})
}
else
{
}
else
{
...
@@ -349,12 +349,13 @@ export default {
...
@@ -349,12 +349,13 @@ export default {
params
.
id
=
this
.
accountParams
.
id
params
.
id
=
this
.
accountParams
.
id
api
=
'update'
api
=
'update'
}
}
console
.
log
(
params
)
accountApi
[
api
](
params
).
then
(
res
=>
{
accountApi
[
api
](
params
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
const
{
code
,
data
}
=
res
if
(
code
==
'0'
&&
data
)
{
if
(
code
==
'0'
&&
data
)
{
this
.
notice
.
okTips
()
this
.
notice
.
okTips
()
// this.$root.close()
// this.$root.close()
window
.
history
.
go
(
-
1
)
//
window.history.go(-1)
}
else
{
}
else
{
this
.
notice
.
errorTips
()
this
.
notice
.
errorTips
()
}
}
...
@@ -376,11 +377,13 @@ export default {
...
@@ -376,11 +377,13 @@ export default {
const
halfCheckedNodes
=
this
.
$refs
[
`tree
${
index
}
`
][
0
].
getHalfCheckedNodes
()
const
halfCheckedNodes
=
this
.
$refs
[
`tree
${
index
}
`
][
0
].
getHalfCheckedNodes
()
const
nodes
=
checkedNodes
.
concat
(
halfCheckedNodes
)
const
nodes
=
checkedNodes
.
concat
(
halfCheckedNodes
)
console
.
log
(
nodes
)
console
.
log
(
nodes
)
const
menuIdList
=
checkedNodes
.
filter
(
item
=>
item
.
logo
!==
'neglect'
).
map
(
i
=>
i
.
id
)
// 全选菜单idlist
const
menuIdList
=
checkedNodes
.
filter
(
item
=>
item
.
logo
===
'menu'
).
map
(
i
=>
i
.
id
)
// 全选菜单idlist
const
partSelectList
=
halfCheckedNodes
.
filter
(
item
=>
item
.
logo
!==
'neglect'
).
map
(
i
=>
i
.
id
)
// 半选菜单idlist
const
partSelectList
=
halfCheckedNodes
.
filter
(
item
=>
item
.
logo
===
'menu'
).
map
(
i
=>
i
.
id
)
// 半选菜单idlist
const
functionIdList
=
nodes
.
filter
(
item
=>
item
.
logo
===
'function'
)
const
functionValueIdLists
=
nodes
.
filter
(
item
=>
item
.
logo
===
'functionValue'
)
const
functionValueIdLists
=
nodes
.
filter
(
item
=>
item
.
logo
===
'functionValue'
)
var
list
=
[]
var
list
=
[]
/** { menuId, id, functionValue} */
/** { menuId, id, functionValue} */
if
(
functionValueIdLists
.
length
!==
0
)
{
functionValueIdLists
.
forEach
((
j
,
index
)
=>
{
functionValueIdLists
.
forEach
((
j
,
index
)
=>
{
if
(
list
.
map
(
item
=>
item
.
id
).
includes
(
j
.
parentId
))
{
if
(
list
.
map
(
item
=>
item
.
id
).
includes
(
j
.
parentId
))
{
const
obj
=
list
.
find
(
k
=>
k
.
id
===
j
.
parentId
)
const
obj
=
list
.
find
(
k
=>
k
.
id
===
j
.
parentId
)
...
@@ -393,6 +396,16 @@ export default {
...
@@ -393,6 +396,16 @@ export default {
})
})
}
}
})
})
}
console
.
log
(
functionIdList
)
if
(
functionIdList
.
length
!==
0
)
{
functionIdList
.
forEach
(
m
=>
{
list
.
push
({
id
:
m
.
parentId
,
menuId
:
m
.
superParentId
})
})
}
const
obj
=
{
const
obj
=
{
productId
:
item
.
dictValue
,
productId
:
item
.
dictValue
,
menuIdList
:
menuIdList
,
menuIdList
:
menuIdList
,
...
...
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