|
@@ -1,12 +1,13 @@
|
|
|
-import React, { useEffect, useState, useRef } from 'react';
|
|
|
-import { Form } from '@ant-design/compatible';
|
|
|
+import React, {useEffect, useState, useRef} from 'react';
|
|
|
+import {Form} from '@ant-design/compatible';
|
|
|
import '@ant-design/compatible/assets/index.css';
|
|
|
-import { connect } from 'dva';
|
|
|
-import { Steps, Button, Modal, Tooltip } from 'antd';
|
|
|
+import {connect} from 'dva';
|
|
|
+import {Steps, Button, Modal, Tooltip} from 'antd';
|
|
|
import styles from './Index.less';
|
|
|
-import { getCurrentUser } from '@/utils/authority';
|
|
|
+import {getCurrentUser} from '@/utils/authority';
|
|
|
+
|
|
|
+const {Step} = Steps;
|
|
|
|
|
|
-const { Step } = Steps;
|
|
|
// 时间节点
|
|
|
function TimeNode(props) {
|
|
|
const {
|
|
@@ -23,21 +24,29 @@ function TimeNode(props) {
|
|
|
stepDirection,
|
|
|
currentUser,
|
|
|
} = props;
|
|
|
- const { current, list, active } = flow;
|
|
|
+ const {current, list, active} = flow;
|
|
|
|
|
|
const getDescription = node => {
|
|
|
let str = node?.AuditRoleInfo
|
|
|
? `审批人:${node?.AuditRoleInfo.Name || '-'}`
|
|
|
: `审批人:${node?.AuditorUser.CName || '-'}`;
|
|
|
-
|
|
|
+ const date = new Date(node.audit_time)
|
|
|
+ const auditTime = date.toLocaleDateString('zh-CN', {
|
|
|
+ format: 'YYYY-MM-DD hh:mm:ss'
|
|
|
+ })
|
|
|
return (
|
|
|
<div>
|
|
|
{str}
|
|
|
<div>
|
|
|
- <span style={{ color: '#1A73E8', textDecoration: 'undeline' }}>
|
|
|
+ <span style={{color: '#1A73E8', textDecoration: 'undeline'}}>
|
|
|
审批意见:{node.desc || '-'}
|
|
|
</span>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <span>
|
|
|
+ 审批时间:{auditTime || '-'}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
);
|
|
|
|
|
@@ -53,11 +62,11 @@ function TimeNode(props) {
|
|
|
status={active == 0 ? 'error' : 'process'}
|
|
|
>
|
|
|
{list.FlowNodes.map(item => (
|
|
|
- <Step key={item.id} title={item.node} description={getDescription(item)} />
|
|
|
+ <Step key={item.id} title={item.node} description={getDescription(item)}/>
|
|
|
))}
|
|
|
</Steps>
|
|
|
{isAuditor && active != 0 && (
|
|
|
- <div className={styles.btns} style={{ margin: '40px 0' }}>
|
|
|
+ <div className={styles.btns} style={{margin: '40px 0'}}>
|
|
|
<Button type="primary" onClick={() => setAuditVisible(1)}>
|
|
|
审批通过
|
|
|
</Button>
|
|
@@ -77,7 +86,7 @@ function TimeNode(props) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
-export default connect(({ user, detail }) => ({
|
|
|
+export default connect(({user, detail}) => ({
|
|
|
currentUser: user.currentUser,
|
|
|
versionList: detail.versionList,
|
|
|
}))(TimeNode);
|