crm:code review 成员
This commit is contained in:
parent
c322959c40
commit
661dc2ff67
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* 数据字典工具类
|
* 数据字典工具类
|
||||||
*/
|
*/
|
||||||
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()
|
||||||
|
|
||||||
|
@ -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="handleEdit">
|
<el-button @click="handleUpdate">
|
||||||
<Icon class="mr-5px" icon="ep:edit" />
|
<Icon class="mr-5px" icon="ep:edit" />
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -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[]) => {
|
|||||||
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)
|
||||||
permissionFormRef.value?.open('update', props.bizType, props.bizId, ids)
|
formRef.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 () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加团队成员 */
|
||||||
* 添加团队成员
|
|
||||||
*/
|
|
||||||
const openForm = () => {
|
const openForm = () => {
|
||||||
permissionFormRef.value?.open('create', props.bizType, props.bizId)
|
formRef.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
|
||||||
|
Loading…
Reference in New Issue
Block a user