import { jsx as _jsx } from "react/jsx-runtime"; import { ProTable } from '@ant-design/pro-components'; import { getServicePageList } from './action'; import React, { useMemo } from 'react'; import { urlEncodeParams, useRoutes } from '@component/utils'; import { Link } from 'react-router-dom'; export default function ({ serviceUrl }) { const { paramsParse } = useRoutes(); const columns = useMemo(() => [ { title: '服务编号', dataIndex: 'serviceNumber', ellipsis: true, search: false, }, { title: '服务名称', dataIndex: 'serviceName', ellipsis: true, search: false, }, { title: '被服务对象', dataIndex: 'customerName', ellipsis: true, search: false, }, { title: '保单号', dataIndex: 'policyNumber', ellipsis: true, search: false, }, { title: '服务分类', dataIndex: 'aqServiceName', ellipsis: true, search: false, }, { title: '服务类型', dataIndex: 'serviceTypeName', ellipsis: true, search: false, }, { title: '服务机构', dataIndex: 'executedOrganName', ellipsis: true, search: false, }, { title: '预计执行时间', dataIndex: 'executedAt', ellipsis: true, search: false, }, { title: '完成时间', dataIndex: 'completedAt', ellipsis: true, search: false, }, { title: '操作', valueType: 'option', ellipsis: true, search: false, fixed: 'right', render: (text, record) => [ _jsx(Link, Object.assign({ to: `${serviceUrl}${urlEncodeParams({ serviceId: record === null || record === void 0 ? void 0 : record.serviceId, })}` }, { children: "\u8BE6\u60C5" })), ], }, ]); return (_jsx(ProTable, { columns: columns, request: getServicePageList, rowKey: "userId", toolBarRender: false, search: false, params: paramsParse, pagination: { pageSize: 10, showSizeChanger: false, } })); }