|
@@ -33,6 +33,7 @@ function AuditFlow(props) {
|
|
|
formComponentValues,
|
|
|
activityId,
|
|
|
direction,
|
|
|
+ status,
|
|
|
} = props;
|
|
|
console.log('------------------------------', props);
|
|
|
const [flow, setFlow] = useState({ workflowActivityRules: [] });
|
|
@@ -51,7 +52,27 @@ function AuditFlow(props) {
|
|
|
const renderDesc = item => {
|
|
|
return <></>;
|
|
|
};
|
|
|
+ const renderAlert = () => {
|
|
|
+ // const audit_comment = history.list[0]?.audit_comment;
|
|
|
+ let item = '';
|
|
|
+ switch (status) {
|
|
|
+ case 0:
|
|
|
+ if (!flow.list || flow.list.FlowNodes?.length == 0) return;
|
|
|
+ item = <Alert message="审批拒绝" type="error" />;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ item = <Alert message="等待审核中" type="info" />;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ item = <Alert message={`审批被拒绝`} type="error" />;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ item = <Alert message="审批通过" type="success" />;
|
|
|
+ break;
|
|
|
+ }
|
|
|
|
|
|
+ return <div style={{ marginTop: 20 }}>{item}</div>;
|
|
|
+ };
|
|
|
const customDot = (dot, { status, index }) => {
|
|
|
let item = flow.workflowActivityRules[index];
|
|
|
|
|
@@ -113,6 +134,7 @@ function AuditFlow(props) {
|
|
|
))}
|
|
|
{/* <Step key={item.activityId} title={item?.activityName} description={renderDesc(item)} /> */}
|
|
|
</Steps>
|
|
|
+ {status !== undefined && renderAlert()}
|
|
|
</div>
|
|
|
);
|
|
|
}
|