Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OKR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
OKR
Commits
ad4af5ba
Commit
ad4af5ba
authored
Sep 08, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6ef451c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
+21
-13
add-department.vue
src/views/team/add-department.vue
+1
-1
member-selector.vue
src/views/team/components/member-selector.vue
+1
-1
department-management.vue
src/views/team/department-management.vue
+18
-10
team-frame.vue
src/views/team/team-frame.vue
+1
-1
No files found.
src/views/team/add-department.vue
View file @
ad4af5ba
...
...
@@ -3,7 +3,7 @@
<main-page
left-arrow
:loading=
"loading"
@
click-left=
"$router.push('/team/team
/
frame')"
@
click-left=
"$router.push('/team/team
-
frame')"
>
<member-selector
:show
.
sync=
"showMemberSelector"
...
...
src/views/team/components/member-selector.vue
View file @
ad4af5ba
...
...
@@ -190,7 +190,7 @@ export default Vue.extend({
parentId
:
this
.
parentId
,
entId
:
this
.
entId
,
hasStaff
:
true
,
isDirect
:
!
this
.
ifContainChildDep
isDirect
:
this
.
ifContainChildDep
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
this
.
loading
=
false
...
...
src/views/team/department-management.vue
View file @
ad4af5ba
...
...
@@ -40,7 +40,7 @@
<c-cell
dot
title=
"上级部门"
content=
"产品设计部
"
:content=
"parentDepName
"
/>
<!--
<switch-cell
title=
"该部门包含子部门成员"
:checked
.
sync=
"check"
/>
-->
<c-cell
...
...
@@ -110,27 +110,35 @@ export default Vue.extend({
leaders
:
[]
as
Array
<
Staff
>
,
showContactSelector
:
false
,
contactSelectorTitle
:
''
,
actionType
:
'add'
actionType
:
'add'
,
parentDepName
:
''
}
},
created
()
{
async
created
()
{
this
.
depId
=
this
.
$route
.
params
.
id
this
.
entId
=
JSON
.
parse
(
localStorage
.
getItem
(
'ENT_INFO'
)
||
'{}'
).
id
this
.
getDepInfo
()
const
dep
=
await
this
.
getDepInfo
(
this
.
depId
)
this
.
depInfo
=
dep
this
.
selectedMemberId
=
[
this
.
depInfo
.
leaderId
]
if
(
this
.
depInfo
.
parentId
===
'-1'
)
{
this
.
parentDepName
=
JSON
.
parse
(
localStorage
.
getItem
(
'ENT_INFO'
)
as
string
).
name
}
else
{
const
parentDep
=
await
this
.
getDepInfo
(
this
.
depInfo
.
parentId
)
this
.
parentDepName
=
parentDep
.
name
}
this
.
getStaffInfo
(
this
.
depInfo
.
leaderId
)
},
methods
:
{
getDepInfo
()
{
getDepInfo
(
id
:
string
)
{
this
.
loading
=
true
this
.
$service
.
department
.
getDep
({
return
this
.
$service
.
department
.
getDep
({
entId
:
this
.
entId
,
id
:
this
.
depId
id
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
this
.
loading
=
false
if
(
data
.
code
===
this
.
$global
.
success
)
{
this
.
depInfo
=
data
.
data
this
.
selectedMemberId
=
[
this
.
depInfo
.
leaderId
]
this
.
getStaffInfo
(
this
.
depInfo
.
leaderId
)
return
data
.
data
}
else
{
this
.
$toast
(
data
.
msg
)
}
...
...
src/views/team/team-frame.vue
View file @
ad4af5ba
...
...
@@ -103,7 +103,7 @@ export default Vue.extend({
const
res
=
JSON
.
parse
(
getUserInfo
()
||
"{}"
)
console
.
log
(
res
,
typeof
res
,
'哈哈哈'
);
this
.
entId
=
process
.
env
.
NODE_ENV
===
'production'
?
res
.
entId
:
'16
6961152260050944
'
this
.
entId
=
process
.
env
.
NODE_ENV
===
'production'
?
res
.
entId
:
'16
8309072074903552
'
console
.
log
(
'这里出来了么?'
,
this
.
entId
,
getUserInfo
(),
'这里呢'
);
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
getUserInfo
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment