message.vue 1.81 KB
Newer Older
1
<template>
shuiluo's avatar
shuiluo committed
2 3 4
    <Table url="/api/v1/messages/notices" noMargin>
        <template #search="{ query }">
            <MoreItem :label="$t('select.startTime')">
水落(YangLei)'s avatar
水落(YangLei) committed
5 6 7 8 9 10
                <a-date-picker
                    class="tw-w-full"
                    show-time
                    v-model="query.startTime"
                    valueFormat="YYYY-MM-DD HH:mm:ss"
                />
shuiluo's avatar
shuiluo committed
11 12
            </MoreItem>
            <MoreItem :label="$t('select.endTime')">
水落(YangLei)'s avatar
水落(YangLei) committed
13 14 15 16 17 18
                <a-date-picker
                    class="tw-w-full"
                    show-time
                    v-model="query.endTime"
                    valueFormat="YYYY-MM-DD HH:mm:ss"
                />
shuiluo's avatar
shuiluo committed
19 20 21 22 23
            </MoreItem>
            <MoreItem :label="$t('table.hasRead')">
                <a-select v-model="query.isRead" allowClear :placeholder="$t('input.placeholder')">
                    <a-select-option :value="1">{{ $t('table.read') }}</a-select-option>
                    <a-select-option :value="0">{{ $t('table.unread') }}</a-select-option>
水落(YangLei)'s avatar
水落(YangLei) committed
24
                </a-select>
shuiluo's avatar
shuiluo committed
25
            </MoreItem>
水落(YangLei)'s avatar
水落(YangLei) committed
26 27
        </template>

shuiluo's avatar
shuiluo committed
28 29 30 31 32 33 34 35
        <a-table-column :title="$t('title')" data-index="noticeTitle" />
        <a-table-column :title="$t('content')" data-index="noticeContent" />
        <a-table-column :title="$t('table.createTime')" data-index="createTime" />
        <a-table-column :title="$t('sender')" data-index="noticeSenderName" />
        <a-table-column :title="$t('recipient')" data-index="noticeReceiverName" />
        <a-table-column :title="$t('user.read')" data-index="isReadName" />
        <a-table-column :title="$t('user.readTime')" data-index="readTime" />
    </Table>
36
</template>
shuiluo's avatar
shuiluo committed
37 38 39 40 41 42 43 44 45

<script>
import MoreItem from '@/components/table/more_item.vue';
import Table from '@/components/table/table.vue';

export default {
    components: { MoreItem, Table },
};
</script>