import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Timeline } from 'antd'; import React from 'react'; import { useRequest } from 'ahooks'; import { dateFormatter, formatImageUrl } from '@component/utils'; import { PreviewFile, Tag } from '@component/ui'; export default function ({ service, params, file }) { const { data } = useRequest(service, { defaultParams: params, }); return (_jsx("div", Object.assign({ className: "page-content-detail-tabs" }, { children: _jsx(Timeline, Object.assign({ style: { width: '40%', paddingTop: '20px' }, mode: "left" }, { children: data === null || data === void 0 ? void 0 : data.map((item, index) => { const fileList = item.files; return (_jsxs(Timeline.Item, Object.assign({ label: dateFormatter(item.operateAt) }, { children: [_jsx(Tag, { styleCss: { width: 120 }, status: item.operateActionType == 'success' ? 'green' : item.operateActionType == 'reject' ? 'red' : item.operateActionType == 'edit' ? 'yellow' : 'blue', text: item.operateAction }), _jsx("p", Object.assign({ style: { width: '300%', marginTop: 8 } }, { children: item.description })), (item === null || item === void 0 ? void 0 : item.auditOpinion) && (_jsxs("p", Object.assign({ style: { width: '300%' } }, { children: ["\u5BA1\u6838\u610F\u89C1\uFF1A", item === null || item === void 0 ? void 0 : item.auditOpinion] }))), file && (_jsx(PreviewFile, { disabled: true, listType: "picture-card", fileList: formatImageUrl(fileList) }))] }), index)); }) })) }))); }