Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8e0cf5c1
authored
Nov 14, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm-团队成员:新增获得权限级别名称函数 getLevelName
parent
ba702d03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
src/api/crm/permission/index.ts
+1
-0
src/views/crm/components/CrmTeamList.vue
+35
-3
No files found.
src/api/crm/permission/index.ts
View file @
8e0cf5c1
...
@@ -9,6 +9,7 @@ export interface PermissionVO {
...
@@ -9,6 +9,7 @@ export interface PermissionVO {
deptName
?:
string
// 部门名称
deptName
?:
string
// 部门名称
nickname
?:
string
// 用户昵称
nickname
?:
string
// 用户昵称
postNames
?:
string
// 岗位名称数组
postNames
?:
string
// 岗位名称数组
createTime
?:
Date
}
}
// 查询团队成员列表
// 查询团队成员列表
...
...
src/views/crm/components/CrmTeamList.vue
View file @
8e0cf5c1
...
@@ -28,7 +28,11 @@
...
@@ -28,7 +28,11 @@
<el-table-column
align=
"center"
label=
"姓名"
prop=
"nickname"
/>
<el-table-column
align=
"center"
label=
"姓名"
prop=
"nickname"
/>
<el-table-column
align=
"center"
label=
"部门"
prop=
"deptName"
/>
<el-table-column
align=
"center"
label=
"部门"
prop=
"deptName"
/>
<el-table-column
align=
"center"
label=
"岗位"
prop=
"postNames"
/>
<el-table-column
align=
"center"
label=
"岗位"
prop=
"postNames"
/>
<el-table-column
align=
"center"
label=
"权限级别"
prop=
"level"
/>
<el-table-column
align=
"center"
label=
"权限级别"
prop=
"level"
>
<template
#
default=
"
{ row }">
<el-tag>
{{
getLevelName
(
row
.
level
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
label=
"加入时间"
prop=
"createTime"
/>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
label=
"加入时间"
prop=
"createTime"
/>
</el-table>
</el-table>
<CrmPermissionForm
ref=
"crmPermissionFormRef"
/>
<CrmPermissionForm
ref=
"crmPermissionFormRef"
/>
...
@@ -47,7 +51,20 @@ const props = defineProps<{
...
@@ -47,7 +51,20 @@ const props = defineProps<{
bizId
:
number
bizId
:
number
}
>
()
}
>
()
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
list
=
ref
<
PermissionApi
.
PermissionVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
PermissionApi
.
PermissionVO
[]
>
([
// TODO 测试数据
{
id
:
1
,
// 数据权限编号
userId
:
1
,
// 用户编号
bizType
:
1
,
// Crm 类型
bizId
:
1
,
// Crm 类型数据编号
level
:
1
,
// 权限级别
deptName
:
'研发部门'
,
// 部门名称
nickname
:
'芋道源码'
,
// 用户昵称
postNames
:
'全栈开发工程师'
,
// 岗位名称数组
createTime
:
new
Date
()
}
])
// 列表的数据
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
...
@@ -60,7 +77,22 @@ const getList = async () => {
...
@@ -60,7 +77,22 @@ const getList = async () => {
loading
.
value
=
false
loading
.
value
=
false
}
}
}
}
/**
* 获得权限级别名称
* @param level 权限级别
*/
const
getLevelName
=
computed
(()
=>
(
level
:
number
)
=>
{
switch
(
level
)
{
case
CrmPermissionLevelEnum
.
OWNER
:
return
'负责人'
case
CrmPermissionLevelEnum
.
READ
:
return
'只读'
case
CrmPermissionLevelEnum
.
WRITE
:
return
'读写'
default
:
break
}
})
const
multipleSelection
=
ref
<
PermissionApi
.
PermissionVO
[]
>
([])
const
multipleSelection
=
ref
<
PermissionApi
.
PermissionVO
[]
>
([])
const
handleSelectionChange
=
(
val
:
PermissionApi
.
PermissionVO
[])
=>
{
const
handleSelectionChange
=
(
val
:
PermissionApi
.
PermissionVO
[])
=>
{
multipleSelection
.
value
=
val
multipleSelection
.
value
=
val
...
...
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