Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
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 64fc4fea
authored
Nov 04, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:saas/scrm-micro-settings
2 parents
3ee1417f
962a2a59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
src/views/baseInfo/relevance.vue
src/views/baseInfo/relevance.vue
View file @
64fc4fe
...
@@ -127,12 +127,12 @@ export default {
...
@@ -127,12 +127,12 @@ export default {
},
},
getDepartmentList
()
{
getDepartmentList
()
{
getDepartment
({
id
:
1
}).
then
(
res
=>
{
getDepartment
({
id
:
1
}).
then
(
res
=>
{
this
.
departmentList
=
this
.
traverse
(
res
,
'relevanceMerchant'
)
this
.
departmentList
=
this
.
traverse
(
1
,
res
,
'relevanceMerchant'
)
})
})
},
},
getMerchantList
()
{
getMerchantList
()
{
getMerchantTree
().
then
(
res
=>
{
getMerchantTree
().
then
(
res
=>
{
this
.
shopList
=
this
.
traverse
(
res
,
'entmicroName'
,
'merchantAccountLevel'
)
this
.
shopList
=
this
.
traverse
(
2
,
res
,
'entmicroName'
,
'merchantAccountLevel'
)
})
})
},
},
// 关联当前选择的
// 关联当前选择的
...
@@ -157,13 +157,13 @@ export default {
...
@@ -157,13 +157,13 @@ export default {
}
}
let
flag
=
false
let
flag
=
false
this
.
dataList
.
forEach
(
item
=>
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
departmentId
==
this
.
curGLData
.
departmentId
&&
item
.
merchantId
==
this
.
curGLData
.
merchantId
)
{
if
(
item
.
departmentId
==
this
.
curGLData
.
departmentId
||
item
.
merchantId
==
this
.
curGLData
.
merchantId
)
{
flag
=
true
flag
=
true
}
}
})
})
if
(
flag
)
{
if
(
flag
)
{
this
.
$message
({
this
.
$message
({
message
:
'
该关联已在列表当中
'
,
message
:
'
此商户已经绑定,请勿重复绑定
'
,
type
:
'warning'
type
:
'warning'
})
})
return
return
...
@@ -249,22 +249,22 @@ export default {
...
@@ -249,22 +249,22 @@ export default {
})
})
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$message
({
//
this.$message({
type
:
'info'
,
//
type: 'info',
message
:
'已取消删除'
//
message: '已取消删除'
})
//
})
})
})
},
},
// 递归:处理层级数组
// 递归:处理层级数组
traverse
(
arr
,
string1
,
string2
,
arr1
=
[])
{
traverse
(
type
,
arr
,
string1
,
string2
,
arr1
=
[])
{
arr
.
map
(
item
=>
{
arr
.
map
(
item
=>
{
if
(
item
[
string1
]
||
item
[
string2
]
!=
4
)
{
if
(
item
[
string1
]
||
(
item
[
string2
]
!=
4
&&
type
==
2
)
)
{
item
.
disabled
=
true
item
.
disabled
=
true
}
else
{
}
else
{
item
.
disabled
=
false
item
.
disabled
=
false
}
}
if
(
item
.
children
&&
item
.
children
instanceof
Array
)
{
if
(
item
.
children
&&
item
.
children
instanceof
Array
)
{
this
.
traverse
(
item
.
children
,
string1
,
string2
,
(
arr1
=
[]))
this
.
traverse
(
type
,
item
.
children
,
string1
,
string2
,
(
arr1
=
[]))
}
}
return
arr1
.
push
(
item
)
return
arr1
.
push
(
item
)
})
})
...
...
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