| | |
| | | />, |
| | | ] |
| | | |
| | | const TaskList = () => { |
| | | const TaskList = (props) => { |
| | | const translate = useTranslate(); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | return ( |
| | |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | </> |
| | | } |
| | | rowClick={false} |
| | | rowClick={'edit'} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'sort']} |
| | |
| | | * 完成操作 |
| | | * @returns |
| | | */ |
| | | const DoneButton = () => { |
| | | const DoneButton = (props) => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const clickComplete = () => { |
| | | console.log('------->'); |
| | | completeTask([record]) |
| | | const clickComplete = (event) => { |
| | | event.stopPropagation(); |
| | | 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); |
| | |
| | | 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) { |