feat: notify message

pull/3/head
xingyuv 2023-03-23 15:46:18 +08:00
parent 89137c72ec
commit 294189e16b
2 changed files with 127 additions and 1 deletions

View File

@ -1,3 +1,23 @@
<template>
<div>开发中</div>
<div>
<BasicTable @register="registerTable" />
</div>
</template>
<script lang="ts" setup name="LoginLog">
import { BasicTable, useTable } from '@/components/Table'
import { getNotifyMessagePage } from '@/api/system/notify/message'
import { columns, searchFormSchema } from './message.data'
const [registerTable] = useTable({
title: '站内信记录列表',
api: getNotifyMessagePage,
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema
},
useSearchForm: true,
showTableSetting: true,
showIndexColumn: false
})
</script>

View File

@ -0,0 +1,106 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
export const columns: BasicColumn[] = [
{
title: '编号',
dataIndex: 'id',
width: 100
},
{
title: '用户编号',
dataIndex: 'userId',
width: 100
},
{
title: '用户类型',
dataIndex: 'userType',
width: 100,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.USER_TYPE)
}
},
{
title: '模板编码',
dataIndex: 'templateCode',
width: 100
},
{
title: '发送人名称',
dataIndex: 'templateNickname',
width: 120
},
{
title: '模版内容',
dataIndex: 'templateContent',
width: 240
},
{
title: '模版类型',
dataIndex: 'templateType',
width: 140,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
}
},
{
title: '是否已读',
dataIndex: 'readStatus',
width: 140,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.INFRA_BOOLEAN_STRING)
}
},
{
title: '阅读时间',
dataIndex: 'readTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
}
]
export const searchFormSchema: FormSchema[] = [
{
label: '用户编号',
field: 'userId',
component: 'Input',
colProps: { span: 8 }
},
{
label: '用户类型',
field: 'userType',
component: 'Input',
colProps: { span: 8 }
},
{
label: '模板编码',
field: 'templateCode',
component: 'Input',
colProps: { span: 8 }
},
{
label: '模版类型',
field: 'templateType',
component: 'Select',
componentProps: {
options: getIntDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
},
colProps: { span: 8 }
},
{
label: '创建时间',
field: 'createTime',
component: 'RangePicker',
colProps: { span: 8 }
}
]