| 对比新文件 |
| | |
| | | <script lang="ts" setup> |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { ImManagerGroupRequestApi } from '#/api/im/manager/group/request'; |
| | | |
| | | import { Page } from '#/packages/effects/common-ui/src'; |
| | | |
| | | import { useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getManagerGroupRequestPage } from '#/api/im/manager/group/request'; |
| | | import { |
| | | formatGroupLabel, |
| | | formatUserLabel, |
| | | } from '#/views/im/manager/utils/format'; |
| | | |
| | | import { |
| | | useGroupRequestGridColumns, |
| | | useGroupRequestGridFormSchema, |
| | | } from '../data'; |
| | | |
| | | defineOptions({ name: 'ImManagerGroupRequest' }); |
| | | |
| | | const [Grid] = useVbenVxeGrid({ |
| | | formOptions: { |
| | | schema: useGroupRequestGridFormSchema(), |
| | | }, |
| | | gridOptions: { |
| | | columns: useGroupRequestGridColumns(), |
| | | height: 'auto', |
| | | keepSource: true, |
| | | proxyConfig: { |
| | | ajax: { |
| | | query: async ({ page }, formValues) => { |
| | | return await getManagerGroupRequestPage({ |
| | | pageNo: page.currentPage, |
| | | pageSize: page.pageSize, |
| | | ...formValues, |
| | | }); |
| | | }, |
| | | }, |
| | | }, |
| | | rowConfig: { |
| | | keyField: 'id', |
| | | isHover: true, |
| | | }, |
| | | toolbarConfig: { |
| | | refresh: true, |
| | | search: true, |
| | | }, |
| | | } as VxeTableGridOptions<ImManagerGroupRequestApi.GroupRequest>, |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height> |
| | | <Grid table-title="鍔犵兢鐢宠鍒楄〃"> |
| | | <template #group="{ row }"> |
| | | {{ formatGroupLabel(row.groupName, row.groupId) }} |
| | | </template> |
| | | <template #user="{ row }"> |
| | | {{ formatUserLabel(row.userNickname, row.userId) }} |
| | | </template> |
| | | <template #inviter="{ row }"> |
| | | <template v-if="row.inviterUserId"> |
| | | {{ formatUserLabel(row.inviterNickname, row.inviterUserId) }} |
| | | </template> |
| | | <span v-else>涓诲姩鐢宠</span> |
| | | </template> |
| | | <template #handler="{ row }"> |
| | | <template v-if="row.handleUserId"> |
| | | {{ formatUserLabel(row.handleNickname, row.handleUserId) }} |
| | | </template> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </Grid> |
| | | </Page> |
| | | </template> |