Files
xk-admin/apps/web-antd/src/views/system/store/config/table.ts

133 lines
2.9 KiB
TypeScript
Raw Normal View History

2025-04-01 19:13:44 +08:00
import type { VxeGridProps } from '#/adapter/vxe-table';
import { getStoreList } from '../api';
interface RowType {
id: string;
name: string;
logo: string;
introduce: string;
created_at: string;
}
export const gridOptions: VxeGridProps<RowType> = {
checkboxConfig: {
highlight: true,
labelField: '',
},
columnConfig: {
useKey: true,
},
rowConfig: {
useKey: true,
},
columns: [
{ type: 'checkbox', width: 60 },
2026-02-04 08:53:52 +08:00
{
2026-06-18 13:24:58 +08:00
field: 'store_basic_info',
2026-02-04 08:53:52 +08:00
align: 'left',
2026-06-18 13:24:58 +08:00
title: '基础信息',
width: 280,
slots: { default: 'store_basic_info' },
2026-02-04 08:53:52 +08:00
},
2025-12-25 11:18:18 +08:00
{
2026-08-04 14:53:11 +08:00
field: 'vip',
align: 'left',
title: 'VIP会员',
minWidth: 200,
width: 240,
2026-08-04 14:53:11 +08:00
slots: { default: 'vip' },
},
{
2025-12-25 11:18:18 +08:00
field: 'online_consultation_config',
align: 'left',
title: '在线复诊配置',
width: 160,
slots: { default: 'online_consultation_config' },
},
2026-07-02 16:21:09 +08:00
{
field: 'special_prescription_config',
align: 'left',
title: '特色方配置',
2026-07-03 10:41:52 +08:00
width: 180,
2026-07-02 16:21:09 +08:00
slots: { default: 'special_prescription_config' },
},
2026-08-05 16:22:46 +08:00
{
field: 'prescription_types_config',
align: 'left',
title: '开方种类',
width: 200,
slots: { default: 'prescription_types_config' },
},
2025-12-17 10:12:54 +08:00
{
2026-06-18 13:24:58 +08:00
field: 'store_config_1',
2025-12-17 10:12:54 +08:00
align: 'left',
2026-06-18 13:24:58 +08:00
title: '开关配置',
width: 330,
slots: { default: 'store_config_1' },
2025-12-17 10:12:54 +08:00
},
2026-06-12 15:07:14 +08:00
{
2026-06-18 13:24:58 +08:00
field: 'store_config_2',
2026-06-12 15:07:14 +08:00
align: 'left',
2026-06-18 13:24:58 +08:00
title: '业务配置',
width: 330,
slots: { default: 'store_config_2' },
2026-06-09 14:54:52 +08:00
},
2025-04-01 19:13:44 +08:00
{
field: 'qr_code',
align: 'left',
title: '诊所二维码',
slots: { default: 'qr_code' },
width: 130,
},
2026-05-19 09:52:55 +08:00
{ field: 'position', title: '详细地址', width: 140 },
2026-06-18 13:24:58 +08:00
{ field: 'new_admin.nick_name', title: '业务员', slots: { default: 'sales_admin' }, width: 160 },
2026-05-19 09:52:55 +08:00
{ field: 'mobile', title: '联系人、电话', slots: { default: 'mobile' }, width: 140 },
{
field: 'start_time',
title: '营业时间',
slots: { default: 'start-time' },
2026-05-19 09:52:55 +08:00
width: 140,
},
2026-05-19 09:52:55 +08:00
{ field: 'created_at', title: '注册时间', width: 140 },
{
type: 'html',
title: '操作',
2026-05-19 09:52:55 +08:00
fixed: 'right',
width: 200,
slots: { default: 'action' },
},
2025-04-01 19:13:44 +08:00
],
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
return await getStoreList({
page: page.currentPage,
pageSize: page.pageSize,
2026-06-18 13:24:58 +08:00
type: 0,
2025-04-01 19:13:44 +08:00
...formValues,
});
},
},
},
height: 'auto',
border: false,
toolbarConfig: {
// @ts-ignore 正式环境时有完整的类型声明
search: true,
2026-06-18 13:24:58 +08:00
refresh: true,
print: false,
export: false,
zoom: true,
2025-04-01 19:13:44 +08:00
slots: {
buttons: 'toolbar-actions',
2025-04-01 19:13:44 +08:00
},
custom: {
icon: 'vxe-icon-menu',
},
},
showOverflow: false,
};