| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import type { VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | |
| | | import { markRaw } from 'vue'; |
| | | |
| | | import { DICT_TYPE } from '#/packages/constants/src'; |
| | | import { getDictOptions } from '#/packages/effects/hooks/src'; |
| | | |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { UserSelect } from '#/views/system/user/components'; |
| | | |
| | | /** éè¯è®°å½æç´¢è¡¨å */ |
| | | export function useRtcGridFormSchema(): VbenFormSchema[] { |
| | | return [ |
| | | { |
| | | fieldName: 'inviterUserId', |
| | | label: 'å起人', |
| | | component: markRaw(UserSelect), |
| | | componentProps: { |
| | | placeholder: 'è¯·éæ©å起人', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'conversationType', |
| | | label: 'ä¼è¯ç±»å', |
| | | component: 'Select', |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.IM_RTC_CALL_CONVERSATION_TYPE, 'number'), |
| | | placeholder: 'è¯·éæ©ä¼è¯ç±»å', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'mediaType', |
| | | label: 'åªä½ç±»å', |
| | | component: 'Select', |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.IM_RTC_CALL_MEDIA_TYPE, 'number'), |
| | | placeholder: 'è¯·éæ©åªä½ç±»å', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'status', |
| | | label: 'éè¯ç¶æ', |
| | | component: 'Select', |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.IM_RTC_CALL_STATUS, 'number'), |
| | | placeholder: 'è¯·éæ©éè¯ç¶æ', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'endReason', |
| | | label: 'ç»æåå ', |
| | | component: 'Select', |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.IM_RTC_CALL_END_REASON, 'number'), |
| | | placeholder: 'è¯·éæ©ç»æåå ', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'startTime', |
| | | label: 'åèµ·æ¶é´', |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | | /** éè¯è®°å½å段 */ |
| | | export function useRtcGridColumns(): VxeTableGridOptions['columns'] { |
| | | return [ |
| | | { |
| | | field: 'id', |
| | | title: 'ç¼å·', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å起人', |
| | | minWidth: 160, |
| | | slots: { default: 'inviter' }, |
| | | }, |
| | | { |
| | | field: 'conversationType', |
| | | title: 'ä¼è¯ç±»å', |
| | | width: 110, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.IM_RTC_CALL_CONVERSATION_TYPE }, |
| | | }, |
| | | }, |
| | | { |
| | | title: '群', |
| | | minWidth: 160, |
| | | slots: { default: 'group' }, |
| | | }, |
| | | { |
| | | field: 'mediaType', |
| | | title: 'åªä½ç±»å', |
| | | width: 110, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.IM_RTC_CALL_MEDIA_TYPE }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'status', |
| | | title: 'éè¯ç¶æ', |
| | | width: 110, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.IM_RTC_CALL_STATUS }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'endReason', |
| | | title: 'ç»æåå ', |
| | | width: 120, |
| | | slots: { default: 'endReason' }, |
| | | }, |
| | | { |
| | | title: 'éè¯æ¶é¿', |
| | | width: 120, |
| | | slots: { default: 'duration' }, |
| | | }, |
| | | { |
| | | field: 'startTime', |
| | | title: 'åèµ·æ¶é´', |
| | | minWidth: 180, |
| | | formatter: 'formatDateTime', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | width: 100, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | | ]; |
| | | } |