feat(im):合并 im 最新版本到 master 分支

master
YunaiV 2026-05-31 22:56:55 +08:00
parent 2f7ec5b78f
commit b46b1647eb
3 changed files with 297 additions and 222 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,6 @@ export interface UserVO {
remark: string
loginDate: Date
createTime: Date
disabled?: boolean // TODO @AI是不是可以去掉。。。
}
// 获取用户精简信息列表
@ -47,22 +46,6 @@ export const getUserList = (ids: number[]) => {
return request.get({ url: '/system/user/list', params: { ids: ids.join(',') } })
}
// TODO @AI是不是可以去掉
// 查询所有用户列表
export const getAllUser = () => {
return request.get({ url: '/system/user/simple-list' })
}
// TODO @AI是不是可以去掉
/**
*
* @param id
* @returns
*/
export const getDeptUser = (deptId: number): Promise<UserVO[]> => {
return request.get({ url: '/system/user/simple-list?deptId=' + deptId })
}
// 查询用户详情
export const getUser = (id: number) => {
return request.get({ url: '/system/user/get?id=' + id })

View File

@ -159,6 +159,10 @@ import { dateFormatter } from '@/utils/formatTime'
defineOptions({ name: 'UserSelectDialogV2' })
type UserSelectRow = UserApi.UserVO & {
disabled?: boolean
}
const props = withDefaults(
defineProps<{
title?: string
@ -178,7 +182,7 @@ const emit = defineEmits<{
const dialogVisible = ref(false) //
const loading = ref(false) //
const list = ref<UserApi.UserVO[]>([]) //
const list = ref<UserSelectRow[]>([]) //
const total = ref(0) //
const activityId = ref()
@ -193,31 +197,31 @@ const handleDeptNodeClick = (deptId: number | undefined) => {
// ==================== ====================
const tableRef = ref() // Ref
const selectedRows = ref<UserApi.UserVO[]>([]) //
const selectedRows = ref<UserSelectRow[]>([]) //
const selectedRadioId = ref<number>() // ID
const currentRadioRow = ref<UserApi.UserVO>() //
const currentRadioRow = ref<UserSelectRow>() //
const preSelectedIds = ref<number[]>([]) // ID
const preDisabledIds = ref<number[]>([]) // ID
/** 多选:是否可以选中 */
const selectable = (row: UserApi.UserVO) => {
const selectable = (row: UserSelectRow) => {
return !preDisabledIds.value.includes(row.id)
}
/** 多选checkbox 变化 */
const handleSelectionChange = (rows: UserApi.UserVO[]) => {
const handleSelectionChange = (rows: UserSelectRow[]) => {
if (props.multiple) {
selectedRows.value = rows
}
}
/** 单选radio 变化 */
const handleRadioChange = (row: UserApi.UserVO) => {
const handleRadioChange = (row: UserSelectRow) => {
currentRadioRow.value = row
}
/** 单击行:单选模式下点击整行即选中(降低操作成本),多选不处理(避免和 dblclick 冲突) */
const handleRowClick = (row: UserApi.UserVO) => {
const handleRowClick = (row: UserSelectRow) => {
if (row.disabled) {
return
}
@ -229,7 +233,7 @@ const handleRowClick = (row: UserApi.UserVO) => {
}
/** 双击行:多选模式切换勾选,单选模式直接确认 */
const handleRowDblClick = (row: UserApi.UserVO) => {
const handleRowDblClick = (row: UserSelectRow) => {
if (row.disabled) {
return
}