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
00b4867a
Commit
00b4867a
authored
Sep 14, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7d26ad2e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
24 deletions
+76
-24
Department.ts
src/service/moudles/Department.ts
+3
-3
service.dto.ts
src/service/moudles/service.dto.ts
+0
-1
add-department.vue
src/views/team/add-department.vue
+0
-1
contact-selector.vue
src/views/team/components/contact-selector.vue
+14
-1
member-selector.vue
src/views/team/components/member-selector.vue
+16
-2
department-management.vue
src/views/team/department-management.vue
+0
-1
team-frame.vue
src/views/team/team-frame.vue
+18
-6
team-management.vue
src/views/team/team-management.vue
+25
-9
No files found.
src/service/moudles/Department.ts
View file @
00b4867a
import
BaseService
from
'../base'
import
{
AddSubDTO
,
DeleteSubDTO
,
GetALLStaffDTO
,
Get
StaffInfo
DTO
,
GetSub
,
UpdateDepDTO
}
from
'./service.dto'
import
{
AddSubDTO
,
DeleteSubDTO
,
GetALLStaffDTO
,
Get
Dep
DTO
,
GetSub
,
UpdateDepDTO
}
from
'./service.dto'
export
default
class
Department
extends
BaseService
{
router
=
{
...
...
@@ -52,10 +52,10 @@ export default class Department extends BaseService {
/**
* 获取部门基本信息
* @param { Get
StaffInfoDTO } data {GetStaffInfo
DTO}
* @param { Get
DepDTO } data {GetDep
DTO}
* @returns
*/
async
getDep
(
data
:
Get
StaffInfo
DTO
)
{
async
getDep
(
data
:
Get
Dep
DTO
)
{
return
await
this
.
useService
(
this
.
router
.
getDep
,
data
)
}
...
...
src/service/moudles/service.dto.ts
View file @
00b4867a
...
...
@@ -107,7 +107,6 @@ export interface GetRroupDTO {
}
export
interface
GetStaffInfoDTO
{
"entId"
:
string
,
"id"
:
string
}
...
...
src/views/team/add-department.vue
View file @
00b4867a
...
...
@@ -159,7 +159,6 @@ export default Vue.extend({
getStaffInfo
(
id
:
string
)
{
this
.
loading
=
true
this
.
$service
.
staff
.
getInfo
({
entId
:
this
.
entId
,
id
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
...
...
src/views/team/components/contact-selector.vue
View file @
00b4867a
...
...
@@ -15,7 +15,7 @@
<!-- 通讯录 -->
<div
class=
"py-2 font-medium"
>
{{
contactTitle
?
contactTitle
:
dep
.
name
}}
</div>
<div
class=
"pb-16"
>
<
div
class=
"text-text-secondary py-1"
>
成员
</div
>
<
!--
<div
class=
"text-text-secondary py-1"
>
成员
</div>
--
>
<team-contacts
container-id=
"contact-selector"
:leader=
"leader"
...
...
@@ -129,6 +129,10 @@ export default Vue.extend({
this
.
$toast
(
'移除成功'
)
this
.
$emit
(
'update:show'
,
false
)
this
.
$emit
(
'update:checkedMemberId'
,
this
.
checkedMember
)
const
usrId
=
JSON
.
parse
(
localStorage
.
getItem
(
'USR_INFO'
)
as
string
).
id
if
(
this
.
checkedMember
.
indexOf
(
usrId
)
>
-
1
)
{
this
.
getStaffInfo
(
usrId
)
}
this
.
checkedMember
=
[]
}
}
else
{
...
...
@@ -138,6 +142,15 @@ export default Vue.extend({
}).
catch
(()
=>
{})
}
},
getStaffInfo
(
id
:
string
)
{
this
.
$service
.
staff
.
getInfo
({
id
})
.
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
if
(
data
.
code
===
this
.
$global
.
success
)
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
data
.
data
))
}
})
},
goBack
(){
this
.
$emit
(
'update:show'
,
false
)
}
...
...
src/views/team/components/member-selector.vue
View file @
00b4867a
...
...
@@ -149,16 +149,20 @@ export default Vue.extend({
// confirmButtonText: '解散'
}).
then
(()
=>
{
this
.
loading
=
true
const
data
=
{
const
params
=
{
entId
:
this
.
entId
,
depId
:
this
.
depId
,
ids
:
this
.
checkedMember
as
Array
<
string
>
}
this
.
$service
.
staff
.
changeDep
(
data
).
then
((
res
:
any
)
=>
{
this
.
$service
.
staff
.
changeDep
(
params
).
then
((
res
:
any
)
=>
{
this
.
loading
=
false
const
{
data
}
=
res
if
(
data
.
code
===
this
.
$global
.
success
)
{
this
.
$toast
(
'添加成功'
)
const
usrId
=
JSON
.
parse
(
localStorage
.
getItem
(
'USR_INFO'
)
as
string
).
id
if
(
params
.
ids
.
indexOf
(
usrId
)
>
-
1
)
{
this
.
getStaffInfo
(
usrId
)
}
}
else
{
this
.
$toast
(
data
.
msg
)
}
...
...
@@ -166,6 +170,16 @@ export default Vue.extend({
}).
catch
(()
=>
{})
}
},
getStaffInfo
(
id
:
string
)
{
this
.
$service
.
staff
.
getInfo
({
id
,
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
if
(
data
.
code
===
this
.
$global
.
success
)
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
res
.
data
.
data
))
}
})
},
goBack
(){
this
.
$emit
(
'update:show'
,
false
)
},
...
...
src/views/team/department-management.vue
View file @
00b4867a
...
...
@@ -152,7 +152,6 @@ export default Vue.extend({
getStaffInfo
(
id
:
string
)
{
this
.
loading
=
true
this
.
$service
.
staff
.
getInfo
({
entId
:
this
.
entId
,
id
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
...
...
src/views/team/team-frame.vue
View file @
00b4867a
...
...
@@ -134,15 +134,13 @@ export default Vue.extend({
name
:
'徐丹'
,
role
:
0
}
let
usrId
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
localStorage
.
setItem
(
'USR_INFO'
,
getUserInfo
())
usrId
=
JSON
.
parse
(
getUserInfo
()
as
string
).
id
}
else
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
userInfoDev
))
usrId
=
userInfoDev
.
id
}
const
usrInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'USR_INFO'
)
as
string
)
this
.
role
=
usrInfo
.
role
this
.
entId
=
usrInfo
.
entId
this
.
getEntInfo
()
this
.
getStaffInfo
(
usrId
)
},
computed
:
{
isNotDepRoot
():
boolean
{
...
...
@@ -163,6 +161,20 @@ export default Vue.extend({
}
},
methods
:
{
getStaffInfo
(
id
:
string
)
{
this
.
loading
=
true
this
.
$service
.
staff
.
getInfo
({
id
})
.
then
((
res
:
any
)
=>
{
this
.
loading
=
false
const
{
data
}
=
res
if
(
data
.
code
===
this
.
$global
.
success
)
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
data
.
data
))
this
.
role
=
data
.
data
.
role
this
.
entId
=
data
.
data
.
entId
this
.
getEntInfo
()
}
}).
catch
(()
=>
this
.
loading
=
false
)
},
handleBack
()
{
this
.
close
()
},
...
...
src/views/team/team-management.vue
View file @
00b4867a
...
...
@@ -109,6 +109,7 @@ export default Vue.extend({
multiple
:
false
,
selectedLeaderId
:
[]
as
string
[],
fromFrame
:
true
,
role
:
0
,
// 企业id,跟部门id
entId
:
''
}
...
...
@@ -122,24 +123,39 @@ export default Vue.extend({
name
:
'徐丹'
,
role
:
0
}
let
usrId
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
localStorage
.
setItem
(
'USR_INFO'
,
getUserInfo
())
usrId
=
JSON
.
parse
(
getUserInfo
()
as
string
).
id
this
.
entId
=
JSON
.
parse
(
getUserInfo
()
as
string
).
entId
}
else
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
userInfoDev
))
usrId
=
userInfoDev
.
id
this
.
entId
=
userInfoDev
.
entId
}
const
usrInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'USR_INFO'
)
as
string
)
this
.
entId
=
usrInfo
.
entId
this
.
getEntInfo
()
// this.enterpriseInfo = JSON.parse(localStorage.getItem('ENT_INFO') as string)
// this.getSub()
this
.
getStaff
(
usrId
)
},
computed
:
{
isLeader
()
{
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
"USR_INFO"
)
as
string
)
return
userInfo
?.
role
===
Role
.
LEADER
isLeader
():
boolean
{
return
this
.
role
===
Role
.
LEADER
}
},
methods
:
{
getStaff
(
id
:
string
)
{
this
.
loading
=
true
this
.
$service
.
staff
.
getInfo
({
id
}).
then
((
res
:
any
)
=>
{
const
{
data
}
=
res
this
.
loading
=
false
if
(
data
.
code
===
this
.
$global
.
success
)
{
localStorage
.
setItem
(
'USR_INFO'
,
JSON
.
stringify
(
data
.
data
))
this
.
role
=
data
.
data
.
role
this
.
entId
=
data
.
data
.
entId
}
else
{
this
.
$toast
(
data
.
msg
)
}
}).
catch
(()
=>
this
.
loading
=
false
)
},
goBack
()
{
if
(
this
.
fromFrame
)
{
this
.
$router
.
push
(
'/team/team-frame'
)
...
...
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