| | |
| | | const [ws, setWs] = useState(null); |
| | | const [openOpera, setOpenOpera] = useState(false); |
| | | const [currentData, setCurrentData] = useState(null); |
| | | const [sourceLoc, setSourceLoc] = useState(""); |
| | | const [targetLoc, setTargetLoc] = useState(""); |
| | | const [xStart, setXStart] = useState(1); |
| | | const [xTarget, setXTarget] = useState(1); |
| | |
| | | setOpenOpera(false); |
| | | }; |
| | | |
| | | const sourceLocChange = (e) => { |
| | | setSourceLoc(e.target.value) |
| | | } |
| | | |
| | | const targetLocChange = (e) => { |
| | | setTargetLoc(e.target.value) |
| | | } |
| | |
| | | message.warning('请输入目标位置'); |
| | | return; |
| | | } |
| | | }else if(type == 'takeMove') { |
| | | if (targetLoc == '') { |
| | | message.warning('请输入目标位置'); |
| | | return; |
| | | } |
| | | |
| | | if (sourceLoc == '') { |
| | | message.warning('请输入起始位置'); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | try { |
| | | const resp = await Http.doPost('api/basShuttle/operator/shuttle', { |
| | | shuttleNo: currentData.shuttleNo, |
| | | shuttleTaskMode: type, |
| | | sourceLocNo: sourceLoc, |
| | | targetLocNo: targetLoc |
| | | }); |
| | | if (resp.code === 200) { |
| | |
| | | { |
| | | key: '6', |
| | | label: '错误码', |
| | | children: '0', |
| | | children: item.errorCode$, |
| | | }, |
| | | { |
| | | key: '7', |
| | |
| | | <div style={{ marginBottom: '15px' }}> |
| | | <Card title="移动指令" style={{ width: 300 }}> |
| | | <p> |
| | | <Input addonBefore="起始位置" onChange={sourceLocChange} /> |
| | | </p> |
| | | <p> |
| | | <Input addonBefore="目标位置" onChange={targetLocChange} /> |
| | | </p> |
| | | <p> |
| | | <Button onClick={() => shuttleOperator('moveLoc')}>移动到目标位置</Button> |
| | | </p> |
| | | <p> |
| | | </p> |
| | | <div className="commandItem"> |
| | | <Button onClick={() => shuttleOperator('moveLoc')}>移动到目标位置</Button> |
| | | <Button onClick={() => shuttleOperator('takeMove')}>取放货作业</Button> |
| | | </div> |
| | | </Card> |
| | | </div> |
| | | |