Commit eb28d5f3 authored by Bill's avatar Bill

fix: 修改进度条样式以及考评必填项

parent a630d757
.steps {
padding-top: 2px;
overflow: auto;
}
\ No newline at end of file
.steps {
padding-top: 2px;
overflow: auto;
:global {
.ant-steps-item-title {
margin-right: 16px;
// &:last-child {
// margin-right: 0px;
// }
}
}
}
......@@ -8,6 +8,7 @@
import React, { useState, useEffect } from 'react';
import {
Steps,
Tooltip,
} from 'antd';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import ButtonSwitch from '@/components/ButtonSwitch';
......@@ -102,6 +103,17 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
),
].filter(Boolean);
const titleRender = (stepTitle: string, stepLength: number) => {
if(stepLength <= 6) {
return <span>{stepTitle}</span>
}
return (
<Tooltip placement="top" title={stepTitle}>
<span style={{maxWidth: '100px', marginRight: '8px', textAlign: 'center'}}>{`${stepTitle}`}</span>
</Tooltip>
)
}
return (
<MellowCard
title="流转进度"
......@@ -120,7 +132,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
{outerVerifySteps && outerVerifySteps.map(item => (
<Steps.Step
key={customKey ? item[customKey] : item.step}
title={customTitleKey ? item[customTitleKey] : item.stepName}
title={titleRender(customTitleKey ? item[customTitleKey] : item.stepName, outerVerifySteps.length)}
description={item.roleName}
status={item.status}
/>
......@@ -134,7 +146,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
{innerVerifySteps && innerVerifySteps.map(item => (
<Steps.Step
key={customKey ? item[customKey] : item.step}
title={customTitleKey ? item[customTitleKey] : item.stepName}
title={titleRender(customTitleKey ? item[customTitleKey] : item.stepName, innerVerifySteps.length)}
description={item.roleName}
status={item.status}
/>
......
......@@ -192,6 +192,10 @@ export const complaintAddSchema: ISchema = {
{
limitByte: true, // 自定义校验规则
maxByte: 60
},
{
required: true,
message: "请填写事件描述"
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment