From 35fd1f14cbe260a2075f8b7df7bc927357e2b16e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 18 十月 2024 15:51:39 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/insight/agv/AgvMain.jsx | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zy-acs-flow/src/map/insight/agv/AgvMain.jsx b/zy-acs-flow/src/map/insight/agv/AgvMain.jsx index 6039dfa..5e22aff 100644 --- a/zy-acs-flow/src/map/insight/agv/AgvMain.jsx +++ b/zy-acs-flow/src/map/insight/agv/AgvMain.jsx @@ -14,7 +14,7 @@ } from '@mui/material'; import { useNotification } from '../../Notification'; import AgvThree from './AgvThree'; -import { getAgvInfo } from '../../http'; +import { handleRestoreAgvAll } from '../../http'; import BoolValueIcon from '../BoolValueIcon'; import ConfirmButton from '../../../page/components/ConfirmButton'; @@ -99,15 +99,15 @@ return endThree; }, [info]); - const handleReset = () => { - alert(1) + const handleRestoreAll = () => { + handleRestoreAgvAll({ agvNo: info.agvNo }); } - const updateStatus = (status) => { + const updateStatus = () => { dataProvider.update('agv', { id: info.agvId, data: { - status: status === 0 ? 1 : 0 + status: info.status === 0 ? 1 : 0 } }).then(({ data }) => { fetchAgvInfo(curAgvNo); @@ -199,22 +199,22 @@ }} /> <ConfirmButton - label="page.map.action.reset" + label="page.map.action.restoreALl" color="primary" variant="contained" onConfirm={() => { - handleReset(); + handleRestoreAll(); }} /> {info && ( info.status === 1 ? <Button variant="contained" color="error" fullWidth onClick={() => { - updateStatus(info.status); + updateStatus(); }}> {translate('page.map.action.disable')} </Button> : <Button variant="contained" fullWidth onClick={() => { - updateStatus(info.status); + updateStatus(); }}> {translate('page.map.action.enable')} </Button> -- Gitblit v1.9.1