feat: 在签到页面添加签到类型过滤功能
This commit is contained in:
@@ -49,7 +49,7 @@ function handleConfirm() {
|
||||
<template>
|
||||
<div class="rounded-lg bg-white p-5 dark:bg-container">
|
||||
<NForm :label-width="80" label-align="left" label-placement="left" :show-feedback="false">
|
||||
<NGrid x-gap="20" :cols="filterColumnsCount || 4">
|
||||
<NGrid x-gap="20" y-gap="10" :cols="filterColumnsCount || 4">
|
||||
<NGi v-for="col in columns" :key="col.key">
|
||||
<NFormItem :label="col.title" :path="col.key">
|
||||
<component
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useTemplateRef } from 'vue';
|
||||
import { NDatePicker } from 'naive-ui';
|
||||
import { NDatePicker, NSelect } from 'naive-ui';
|
||||
import dayjs from 'dayjs';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import type { TableBaseColumns, TableFetchData, TableFilterColumns, TableInst } from '@/components/table';
|
||||
@@ -25,6 +25,13 @@ const columns: TableBaseColumns = [
|
||||
key: 'user.name',
|
||||
title: '用户'
|
||||
},
|
||||
{
|
||||
key: 'checkInType',
|
||||
title: '签到类型',
|
||||
render: (row: any) => {
|
||||
return row.checkInType === 'meeting' ? '会议签到' : '应用签到';
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'checkInAt',
|
||||
title: '签到时间',
|
||||
@@ -40,6 +47,17 @@ const filterColumns: TableFilterColumns = [
|
||||
title: '用户',
|
||||
component: UserSelect
|
||||
},
|
||||
{
|
||||
key: 'checkInType',
|
||||
title: '签到类型',
|
||||
component: NSelect,
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '会议签到', value: 'meeting' },
|
||||
{ label: '应用签到', value: 'app' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'startDate',
|
||||
title: '开始日期',
|
||||
|
||||
Reference in New Issue
Block a user