| | |
| | | />, |
| | | ] |
| | | |
| | | const TaskList = () => { |
| | | const TaskList = (props) => { |
| | | const translate = useTranslate(); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | return ( |
| | |
| | | * 完成操作 |
| | | * @returns |
| | | */ |
| | | const DoneButton = () => { |
| | | const DoneButton = (props) => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const clickComplete = (event) => { |
| | | event.stopPropagation(); |
| | | completeTask([record]) |
| | | completeTask(record) |
| | | }; |
| | | //完成任务 |
| | | const completeTask = async (row) => { |
| | | console.log(row.id); |
| | | const { data: { code, data, msg } } = await request.post(`task/complete/` + row.id); |
| | | if (code === 200) { |
| | | notify(msg); |