| | |
| | | */ |
| | | const DoneButton = (props) => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const clickComplete = (event) => { |
| | | event.stopPropagation(); |
| | |
| | | cancleTask(record) |
| | | }; |
| | | //取消任务 |
| | | const cancleTask = async (row) => { |
| | | const cancleTask = async (row) => { |
| | | console.log(row); |
| | | const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id); |
| | | if (code === 200) { |
| | |
| | | } |
| | | } |
| | | return ( |
| | | <Button |
| | | onClick={clickCancel} |
| | | label="toolbar.cancel"> |
| | | <CancelIcon /> |
| | | </Button> |
| | | record.taskStatus === 1 ? |
| | | <Button |
| | | onClick={clickCancel} |
| | | label="toolbar.cancel"> |
| | | <CancelIcon /> |
| | | </Button> |
| | | : |
| | | <></> |
| | | ) |
| | | } |
| | | /** |