Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-main
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 fda651dc
authored
May 29, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
725e3966
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
15 deletions
src/config/env.development.js
src/views/workbench/index.vue
src/config/env.development.js
View file @
fda651d
...
@@ -58,6 +58,9 @@ module.exports = {
...
@@ -58,6 +58,9 @@ module.exports = {
clew
:
{
clew
:
{
path
:
'/dj-scrm-wx-work-attachment-clew/#/'
path
:
'/dj-scrm-wx-work-attachment-clew/#/'
},
},
assistance
:
{
path
:
'/dj-scrm-wx-work-attachment-assistance/#/'
},
psd
:
{
psd
:
{
path
:
'/dj-scrm-wx-work-attachment-psd/#/'
path
:
'/dj-scrm-wx-work-attachment-psd/#/'
}
}
...
@@ -67,8 +70,10 @@ module.exports = {
...
@@ -67,8 +70,10 @@ module.exports = {
{
{
label
:
'喜报早报记录'
,
label
:
'喜报早报记录'
,
menuUrl
:
encodeURIComponent
(
'chat/paper@psd|https://img01.glsx.com.cn/weapp/resource/scrm-mobile/main/paper.png'
),
menuUrl
:
encodeURIComponent
(
'chat/paper@psd|https://img01.glsx.com.cn/weapp/resource/scrm-mobile/main/paper.png'
),
// corpIds: [],
corpIds
:
[
'ww7d1c6fb5709cc884'
,
'wwa55ffac1225eb25e'
],
corpIds
:
[
'ww7d1c6fb5709cc884'
,
'wwa55ffac1225eb25e'
],
parentLabel
:
'工作台'
,
parentLabel
:
'工作台'
,
parentIndex
:
0
}
}
],
],
...
...
src/views/workbench/index.vue
View file @
fda651d
...
@@ -49,18 +49,30 @@ export default {
...
@@ -49,18 +49,30 @@ export default {
},
},
activated
()
{
activated
()
{
ssoApi
.
getPermission
().
then
(
data
=>
{
ssoApi
.
getPermission
().
then
(
data
=>
{
const
{
entmicroId
}
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
)
if
(
data
&&
data
.
length
)
{
if
(
data
&&
data
.
length
)
{
let
[
merchantProTreeResponses
]
=
data
[
0
].
products
[
0
].
merchantProTreeResponses
let
[
merchantProTreeResponses
]
=
data
[
0
].
products
[
0
].
merchantProTreeResponses
if
(
merchantProTreeResponses
)
{
if
(
merchantProTreeResponses
)
{
let
list
=
merchantProTreeResponses
.
children
let
list
=
merchantProTreeResponses
.
children
||
[]
if
(
list
&&
list
.
length
)
{
this
.
setMenuData
(
list
)
}
else
this
.
setMenuData
()
}
this
.
flag
=
true
})
},
mounted
()
{
// setInterval(() => {
// window.location.reload()
// }, 60e3)
},
methods
:
{
setMenuData
(
list
=
[])
{
const
{
entmicroId
}
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
)
this
.
setSpecialMenuList
(
list
)
list
.
map
(
e
=>
{
list
.
map
(
e
=>
{
if
(
e
.
children
)
{
specialMenuList
.
map
(
m
=>
{
specialMenuList
.
map
(
m
=>
{
if
(
e
.
label
==
m
.
parentLabel
&&
m
.
corpIds
.
includes
(
entmicroId
))
e
.
children
.
push
(
m
)
if
(
e
.
label
==
m
.
parentLabel
&&
m
.
corpIds
.
includes
(
entmicroId
))
e
.
children
.
push
(
m
)
})
})
e
.
children
.
map
(
i
=>
{
if
(
e
.
children
)
e
.
children
.
map
(
i
=>
{
let
[
url
,
item
]
=
decodeURIComponent
(
i
.
menuUrl
).
split
(
'@'
)
let
[
url
,
item
]
=
decodeURIComponent
(
i
.
menuUrl
).
split
(
'@'
)
let
[
target
,
icon
]
=
item
.
split
(
'|'
)
let
[
target
,
icon
]
=
item
.
split
(
'|'
)
let
[
link
,
query
]
=
url
.
split
(
'?'
)
let
[
link
,
query
]
=
url
.
split
(
'?'
)
...
@@ -69,20 +81,23 @@ export default {
...
@@ -69,20 +81,23 @@ export default {
i
.
target
=
target
i
.
target
=
target
i
.
query
=
query
i
.
query
=
query
})
})
}
})
})
this
.
list
=
list
this
.
list
=
list
},
setSpecialMenuList
(
list
)
{
const
{
entmicroId
}
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
)
const
titleItems
=
list
.
map
(
e
=>
e
.
label
)
||
[]
specialMenuList
.
map
(
m
=>
{
if
(
m
.
corpIds
.
includes
(
entmicroId
)
&&
!
titleItems
.
includes
(
m
.
parentLabel
))
{
titleItems
.
push
(
m
.
parentLabel
)
list
.
splice
(
m
.
parentIndex
,
0
,
{
label
:
m
.
parentLabel
,
children
:
[]
})
}
}
}
}
this
.
flag
=
true
})
})
return
list
},
},
mounted
()
{
},
methods
:
{
jump
(
e
)
{
jump
(
e
)
{
let
sessionId
=
this
.
getSessionId
()
let
sessionId
=
this
.
getSessionId
()
let
{
corpId
}
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
)
let
{
corpId
}
=
this
.
getLocalStorage
(
'dj_scrm_corpId'
)
...
@@ -90,7 +105,8 @@ export default {
...
@@ -90,7 +105,8 @@ export default {
let
{
path
}
=
subsystemInfo
[
target
]
let
{
path
}
=
subsystemInfo
[
target
]
let
url
=
`
${
path
}${
link
}
?sessionId=
${
sessionId
}
&corpId=
${
corpId
}
`
let
url
=
`
${
path
}${
link
}
?sessionId=
${
sessionId
}
&corpId=
${
corpId
}
`
if
(
query
)
url
=
`
${
url
}
&
${
query
}
`
if
(
query
)
url
=
`
${
url
}
&
${
query
}
`
window
.
location
.
href
=
url
console
.
log
(
url
)
// window.location.href = url
}
}
}
}
}
}
...
...
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