This commit is contained in:
parent
2b7b455f40
commit
65b13aced2
@ -0,0 +1,32 @@
|
||||
import type { FormSchemaGetter } from "#/adapter/form";
|
||||
import type { VxeGridProps } from "@vben/plugins/vxe-table";
|
||||
|
||||
export const querySchema:FormSchemaGetter=()=>[
|
||||
{
|
||||
component:'Input',
|
||||
fieldName:'',
|
||||
label:'回复者'
|
||||
}
|
||||
];
|
||||
export const columns:VxeGridProps['columns'] = [
|
||||
{
|
||||
title:'序号',
|
||||
field:'',
|
||||
width:'auto',
|
||||
},
|
||||
{
|
||||
title:'回复者',
|
||||
field:'',
|
||||
|
||||
},
|
||||
{
|
||||
title:'提交时间',
|
||||
field:''
|
||||
},
|
||||
{
|
||||
title:'操作',
|
||||
field:'action',
|
||||
slots:{default:'action'},
|
||||
|
||||
}
|
||||
]
|
@ -1,8 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { useVbenVxeGrid, type VxeGridProps } from '@vben/plugins/vxe-table';
|
||||
|
||||
import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { querySchema,columns } from './data';
|
||||
|
||||
const [BasicModal,modalApi] = useVbenModal({
|
||||
fullscreenButton:false,
|
||||
@ -24,10 +23,32 @@ const formOptions:VbenFormProps={
|
||||
allowClear:true,
|
||||
}
|
||||
},
|
||||
schema:querySchema(),
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||
|
||||
}
|
||||
const gridOptions:VxeGridProps={
|
||||
|
||||
}
|
||||
const gridOptions: VxeGridProps = {
|
||||
checkboxConfig: {
|
||||
// 高亮
|
||||
highlight: true,
|
||||
// 翻页时保留选中状态
|
||||
reserve: true,
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
pagerConfig: {},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
// 表格全局唯一表示 保存列配置需要用到
|
||||
id: 'questionnaire-table-modal'
|
||||
};
|
||||
|
||||
const [BasicTable,tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
gridOptions,
|
||||
@ -37,9 +58,24 @@ async function handleClose() {
|
||||
}
|
||||
async function handleComfirm() {
|
||||
|
||||
}
|
||||
async function handleEdit() {
|
||||
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<BasicModal>
|
||||
<BasicTable table-title="回复列表">
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:attendanceArea:edit']"
|
||||
@click.stop="handleEdit()"
|
||||
>
|
||||
查看
|
||||
</ghost-button>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user