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
661dc2ff
authored
Nov 25, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm:code review 成员
parent
c322959c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
20 deletions
+14
-20
src/utils/dict.ts
+2
-2
src/views/crm/components/CrmPermissionList.vue
+12
-18
No files found.
src/utils/dict.ts
View file @
661dc2ff
/**
/**
* 数据字典工具类
* 数据字典工具类
*/
*/
import
{
useDictStoreWithOut
}
from
'@/store/modules/dict'
import
{
useDictStoreWithOut
}
from
'@/store/modules/dict'
import
{
ElementPlusInfoType
}
from
'@/types/elementPlus'
import
{
ElementPlusInfoType
}
from
'@/types/elementPlus'
const
dictStore
=
useDictStoreWithOut
()
const
dictStore
=
useDictStoreWithOut
()
...
...
src/views/crm/components/CrmPermissionList.vue
View file @
661dc2ff
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
新增
新增
</el-button>
</el-button>
<el-button
@
click=
"handle
Edit
"
>
<el-button
@
click=
"handle
Update
"
>
<Icon
class=
"mr-5px"
icon=
"ep:edit"
/>
<Icon
class=
"mr-5px"
icon=
"ep:edit"
/>
编辑
编辑
</el-button>
</el-button>
...
@@ -35,7 +35,9 @@
...
@@ -35,7 +35,9 @@
</el-table-column>
</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=
"permissionFormRef"
@
success=
"getList"
/>
<!-- 表单弹窗:添加/修改 -->
<CrmPermissionForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
...
@@ -75,22 +77,18 @@ const handleSelectionChange = (val: PermissionApi.PermissionVO[]) => {
...
@@ -75,22 +77,18 @@ const handleSelectionChange = (val: PermissionApi.PermissionVO[]) => {
multipleSelection
.
value
=
val
multipleSelection
.
value
=
val
}
}
const
permissionFormRef
=
ref
<
InstanceType
<
typeof
CrmPermissionForm
>>
()
// 权限表单 Ref
/** 编辑团队成员 */
/**
const
formRef
=
ref
<
InstanceType
<
typeof
CrmPermissionForm
>>
()
// 权限表单 Ref
* 编辑团队成员
const
handleUpdate
=
()
=>
{
*/
const
handleEdit
=
()
=>
{
if
(
multipleSelection
.
value
?.
length
===
0
)
{
if
(
multipleSelection
.
value
?.
length
===
0
)
{
message
.
warning
(
'请先选择团队成员后操作!'
)
message
.
warning
(
'请先选择团队成员后操作!'
)
return
return
}
}
const
ids
=
multipleSelection
.
value
?.
map
((
item
)
=>
item
.
id
)
const
ids
=
multipleSelection
.
value
?.
map
((
item
)
=>
item
.
id
)
permissionF
ormRef
.
value
?.
open
(
'update'
,
props
.
bizType
,
props
.
bizId
,
ids
)
f
ormRef
.
value
?.
open
(
'update'
,
props
.
bizType
,
props
.
bizId
,
ids
)
}
}
/**
/** 移除团队成员 */
* 移除团队成员
*/
const
handleDelete
=
async
()
=>
{
const
handleDelete
=
async
()
=>
{
if
(
multipleSelection
.
value
?.
length
===
0
)
{
if
(
multipleSelection
.
value
?.
length
===
0
)
{
message
.
warning
(
'请先选择团队成员后操作!'
)
message
.
warning
(
'请先选择团队成员后操作!'
)
...
@@ -105,17 +103,13 @@ const handleDelete = async () => {
...
@@ -105,17 +103,13 @@ const handleDelete = async () => {
})
})
}
}
/**
/** 添加团队成员 */
* 添加团队成员
*/
const
openForm
=
()
=>
{
const
openForm
=
()
=>
{
permissionF
ormRef
.
value
?.
open
(
'create'
,
props
.
bizType
,
props
.
bizId
)
f
ormRef
.
value
?.
open
(
'create'
,
props
.
bizType
,
props
.
bizId
)
}
}
/** 退出团队 */
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
/**
* 退出团队
*/
const
handleQuit
=
async
()
=>
{
const
handleQuit
=
async
()
=>
{
const
permission
=
list
.
value
.
find
(
const
permission
=
list
.
value
.
find
(
(
item
)
=>
item
.
userId
===
userStore
.
getUser
.
id
&&
item
.
level
===
CrmPermissionLevelEnum
.
OWNER
(
item
)
=>
item
.
userId
===
userStore
.
getUser
.
id
&&
item
.
level
===
CrmPermissionLevelEnum
.
OWNER
...
...
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