Commit 169a5eba by zhaochengxiang

流程

parent 5e5fb155
......@@ -37,16 +37,16 @@ export const AuditProgress = ({ task }) => {
const hightBackgroundColor = '#2E90F1';
const stateCompleted = (state) => {
const index = task?.contents?.findIndex(item => item.title.indexOf(state)!==-1);
const index = task?.contents?.filter(item => item.status==='1').findIndex(item => item.title.indexOf(state)!==-1);
return (index !== -1);
}
const stateContent = (state) => {
return task?.contents?.find(item => item.title.indexOf(state)!==-1);
return task?.contents?.filter(item => item.status==='1').find(item => item.title.indexOf(state)!==-1);
}
const leftLineColor = (state) => {
const index = task?.contents?.findIndex(item => item.title.indexOf(state)!==-1);
const index = task?.contents?.filter(item => item.status==='1').findIndex(item => item.title.indexOf(state)!==-1);
return (index !== -1) ? hightBackgroundColor : backgroundColor;
}
......@@ -66,7 +66,7 @@ export const AuditProgress = ({ task }) => {
{
auditStatus.map((item, index) => {
return (
<Col span={8} key={index} style={{ height: 6 }} >
<Col span={24/auditStatus.length} key={index} style={{ height: 6 }} >
{
<Row align='middle'>
<Col span={11} style={{ backgroundColor: leftLineColor(item), height: 4, visibility: (index===0?'hidden':'visible') }}></Col>
......@@ -87,7 +87,7 @@ export const AuditProgress = ({ task }) => {
const currentContent = stateContent(item);
return (
<Col span={8} key={index} >
<Col span={24/auditStatus.length} key={index} >
<div style={{ textAlign: 'center' }}>
<div>{item}</div>
{
......
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