|
|
@ -115,36 +115,25 @@ export default function MeasureAction() { |
|
|
|
rightPoints.current = []; |
|
|
|
canvasRef.current?.clearShapes(); |
|
|
|
canvasRef.current?.resetCanvas(); |
|
|
|
// if (startBtnText === "重新测量") {
|
|
|
|
// let list = [...initialStatusList]
|
|
|
|
// list.forEach((item, index) => {
|
|
|
|
// if(index === 0){
|
|
|
|
// item.color = STEP_COLOR_BLUE;
|
|
|
|
// }else{
|
|
|
|
// item.color = STEP_COLOR_GREY;
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// setStatusList(list);
|
|
|
|
// }
|
|
|
|
if (startBtnText === "重新测量") { |
|
|
|
let list = [...initialStatusList] |
|
|
|
list.forEach((item, index) => { |
|
|
|
if(index === 0){ |
|
|
|
item.color = STEP_COLOR_BLUE; |
|
|
|
}else{ |
|
|
|
item.color = STEP_COLOR_GREY; |
|
|
|
} |
|
|
|
}) |
|
|
|
setStatusList(list); |
|
|
|
} |
|
|
|
startMeasurement().then(res => { |
|
|
|
if (res.status !== 0) { |
|
|
|
message.error(res.data.info); |
|
|
|
// setTaskStatusName(taskStatusDescMap["IDLE"]);
|
|
|
|
} else { |
|
|
|
|
|
|
|
let list = [...initialStatusList] |
|
|
|
list.forEach((item, index) => { |
|
|
|
if(index === 0){ |
|
|
|
item.color = STEP_COLOR_BLUE; |
|
|
|
}else{ |
|
|
|
item.color = STEP_COLOR_GREY; |
|
|
|
} |
|
|
|
}) |
|
|
|
setStatusList(list); |
|
|
|
|
|
|
|
// const newStatusList = [...initialStatusList];
|
|
|
|
// newStatusList[0].color = STEP_COLOR_BLUE;
|
|
|
|
// setStatusList(newStatusList);
|
|
|
|
const newStatusList = [...initialStatusList]; |
|
|
|
newStatusList[0].color = STEP_COLOR_BLUE; |
|
|
|
setStatusList(newStatusList); |
|
|
|
message.success("已通知设备开始测量"); |
|
|
|
// setTaskStatusName(taskStatusDescMap["IDLE"]);
|
|
|
|
setStartBtnText("重新测量"); |
|
|
|