|
@@ -8,7 +8,6 @@ import { CloseOne, SmilingFaceWithSquintingEyes } from '@icon-park/react'
|
|
|
import { MinusCircleOutlined, DownOutlined } from '@ant-design/icons'
|
|
import { MinusCircleOutlined, DownOutlined } from '@ant-design/icons'
|
|
|
|
|
|
|
|
const Step = ({ id, statusId, groupStatus = [] }) => {
|
|
const Step = ({ id, statusId, groupStatus = [] }) => {
|
|
|
- console.log(groupStatus)
|
|
|
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
|
const { run: tryChangeStatus } = useRequest(params => changeGroupStatus(params), {
|
|
const { run: tryChangeStatus } = useRequest(params => changeGroupStatus(params), {
|
|
|
manual: true,
|
|
manual: true,
|
|
@@ -47,6 +46,7 @@ const Step = ({ id, statusId, groupStatus = [] }) => {
|
|
|
if (curr.selected) return idx
|
|
if (curr.selected) return idx
|
|
|
return prev
|
|
return prev
|
|
|
}, -1)
|
|
}, -1)
|
|
|
|
|
+
|
|
|
const endItemIdx = otherItems.findIndex(item => item.id === statusId)
|
|
const endItemIdx = otherItems.findIndex(item => item.id === statusId)
|
|
|
const isSelected = mainItems.findIndex(item => item.selected) !== -1
|
|
const isSelected = mainItems.findIndex(item => item.selected) !== -1
|
|
|
const isEnd = otherItems.findIndex(item => item.id === statusId) !== -1
|
|
const isEnd = otherItems.findIndex(item => item.id === statusId) !== -1
|
|
@@ -139,13 +139,13 @@ const Step = ({ id, statusId, groupStatus = [] }) => {
|
|
|
))}
|
|
))}
|
|
|
<div
|
|
<div
|
|
|
className={`busi-state-item ${
|
|
className={`busi-state-item ${
|
|
|
- op.isEnd ? stateMap[op.otherItems[op.endItemIdx].endProcess].class : 'state-undo'
|
|
|
|
|
|
|
+ op.isEnd ? stateMap[op.otherItems[op.endItemIdx].key].class : 'state-undo'
|
|
|
}`}>
|
|
}`}>
|
|
|
<span className="title">
|
|
<span className="title">
|
|
|
{op.isEnd ? (
|
|
{op.isEnd ? (
|
|
|
<>
|
|
<>
|
|
|
- {stateMap[op.otherItems[op.endItemIdx].endProcess].icon}
|
|
|
|
|
- {stateMap[op.otherItems[op.endItemIdx].endProcess].text}
|
|
|
|
|
|
|
+ {stateMap[op.otherItems[op.endItemIdx].key].icon}
|
|
|
|
|
+ {stateMap[op.otherItems[op.endItemIdx].key].text}
|
|
|
</>
|
|
</>
|
|
|
) : (
|
|
) : (
|
|
|
<Dropdown overlay={menu}>
|
|
<Dropdown overlay={menu}>
|