You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
2.3 KiB
37 lines
2.3 KiB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; |
|
import { Timeline, Upload } from 'antd'; |
|
import React from 'react'; |
|
import { useRequest } from 'ahooks'; |
|
import { dateFormatter, formatImageUrl } from '@component/utils'; |
|
import themeColor from 'theme.less'; |
|
import { PreviewFile, Tag } from '@component/ui'; |
|
export default function Process({ service, params }) { |
|
const { data } = useRequest(service, { |
|
defaultParams: params, |
|
}); |
|
// 空白div |
|
const blockStyle = { width: '50px', height: '50px' }; |
|
const timelineItemStyle = (item) => { |
|
return item.operateActionType == 'success' |
|
? 'green' |
|
: item.operateActionType == 'reject' |
|
? 'red' |
|
: themeColor.blackStatus; |
|
}; |
|
const timelineH3Style = (item) => ({ |
|
color: item.operateActionType == 'success' |
|
? 'green' |
|
: item.operateActionType == 'reject' |
|
? 'red' |
|
: themeColor.blackStatus, |
|
}); |
|
return (_jsx("div", Object.assign({ className: "page-content-detail-tabs" }, { children: _jsx(Timeline, Object.assign({ style: { width: '50%', paddingTop: '20px' }, mode: "left" }, { children: data === null || data === void 0 ? void 0 : data.map((item, index) => { |
|
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", { children: item === null || item === void 0 ? void 0 : 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] }))), _jsx(PreviewFile, { disabled: true, listType: "picture-card", fileList: formatImageUrl(item.files) }), item.fileList ? null : _jsx("div", { style: blockStyle })] }), index)); |
|
}) })) }))); |
|
}
|
|
|