|
|
@ -94,15 +94,15 @@ export default function Measure() { |
|
|
|
// } else {
|
|
|
|
// console.log("当前环境不支持 React Native WebView");
|
|
|
|
// }
|
|
|
|
if (!contextState.device.connected) { |
|
|
|
Dialog.alert({ |
|
|
|
content: '蓝牙未连接,请先连接蓝牙', |
|
|
|
onConfirm: () => { |
|
|
|
navigate("/home/bluetooth"); |
|
|
|
}, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (!contextState.device.connected) { |
|
|
|
Dialog.alert({ |
|
|
|
content: '蓝牙未连接,请先连接蓝牙', |
|
|
|
onConfirm: () => { |
|
|
|
navigate('/home/bluetooth'); |
|
|
|
}, |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
Bridge.startMeasure().then((res) => { |
|
|
|
if (res.success) { |
|
|
|
dispatch(updateTaskState('START_RECORD_SIG')); |
|
|
@ -219,9 +219,13 @@ export default function Measure() { |
|
|
|
<div className="btn-contained rounded-md text-sm h-10 flex-1" onClick={onStartClick}> |
|
|
|
{measureState.leftPoints.length > 0 ? '重新测量' : '开始测量'} |
|
|
|
</div> |
|
|
|
<div className="btn-contained rounded-md text-sm h-10 flex-1" onClick={onSaveClick}> |
|
|
|
<button |
|
|
|
className="btn-contained rounded-md text-sm h-10 flex-1" |
|
|
|
disabled={measureState.taskState !== 'FINISH_RECORD_RIGHT'} |
|
|
|
onClick={onSaveClick} |
|
|
|
> |
|
|
|
保存 |
|
|
|
</div> |
|
|
|
</button> |
|
|
|
</section> |
|
|
|
|
|
|
|
<section className="grid grid-cols-2 gap-[10px] px-3"> |
|
|
|