Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
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 7fbdd4d0
authored
Nov 01, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新基本信息代码
1 parent
503b59cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
src/views/baseInfo/index.vue
src/views/baseInfo/relevance.vue
src/views/baseInfo/index.vue
View file @
7fbdd4d
...
...
@@ -45,19 +45,18 @@ export default {
},
created
()
{
//this.$globalState.accountLevel
//
const { session } = this.$globalState
//
this.platform = session.merchantModel
//
this.loginInfo = session
//
this.accountLevel = session.accountLevel
const
{
session
}
=
this
.
$globalState
this
.
platform
=
session
.
merchantModel
this
.
loginInfo
=
session
this
.
accountLevel
=
session
.
accountLevel
this
.
getBlocData
()
},
methods
:
{
getBlocData
()
{
// let para = {
// merchantId: this.loginInfo.merchantId,
// sessionId: this.loginInfo.sessionId
// }
this
.
$apis
.
baseInfo
.
merchantInfo
({}).
then
(
res
=>
{
let
para
=
{
merchantId
:
this
.
loginInfo
.
merchantId
,
}
this
.
$apis
.
baseInfo
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
blocInfo
=
res
this
.
storesList
=
res
.
stores
.
map
(
item
=>
{
item
.
date
=
`
${
this
.
dateFormat
(
item
.
starttime
,
'YYYY.MM.DD'
)}
--
${
this
.
dateFormat
(
item
.
endtime
,
'YYYY.MM.DD'
)}
`
...
...
src/views/baseInfo/relevance.vue
View file @
7fbdd4d
...
...
@@ -126,12 +126,12 @@ export default {
},
getDepartmentList
()
{
this
.
$apis
.
baseInfo
.
getDepartment
({
id
:
1
}).
then
(
res
=>
{
this
.
departmentList
=
this
.
traverse
(
res
,
'relevanceMerchant'
)
this
.
departmentList
=
this
.
traverse
(
1
,
res
,
'relevanceMerchant'
)
})
},
getMerchantList
()
{
this
.
$apis
.
baseInfo
.
getMerchantTree
({}).
then
(
res
=>
{
this
.
shopList
=
this
.
traverse
(
res
,
'entmicroName'
,
'merchantAccountLevel'
)
this
.
shopList
=
this
.
traverse
(
2
,
res
,
'entmicroName'
,
'merchantAccountLevel'
)
})
},
// 关联当前选择的
...
...
@@ -255,15 +255,15 @@ export default {
})
},
// 递归:处理层级数组
traverse
(
arr
,
string1
,
string2
,
arr1
=
[])
{
traverse
(
type
,
arr
,
string1
,
string2
,
arr1
=
[])
{
arr
.
map
(
item
=>
{
if
(
item
[
string1
]
||
item
[
string2
]
!=
4
)
{
if
(
item
[
string1
]
||
(
item
[
string2
]
!=
4
&&
type
==
2
)
)
{
item
.
disabled
=
true
}
else
{
item
.
disabled
=
false
}
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
)
})
...
...
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