|
@@ -350,43 +350,39 @@
|
|
|
(parseFloat(coordinateB.y) - parseFloat(coordinateA.y))
|
|
|
);
|
|
|
}
|
|
|
- function update(newV) {
|
|
|
- if (newV.btTriBlast) {
|
|
|
- maxY1.value = parseFloat(newV.o2val);
|
|
|
- maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
|
|
|
- let btTriBlasts = JSON.parse(newV.btTriBlast);
|
|
|
- coordinateA.x = btTriBlasts.A_x;
|
|
|
- coordinateA.y = btTriBlasts.A_y;
|
|
|
- coordinateB.x = btTriBlasts.B_x;
|
|
|
- coordinateB.y = btTriBlasts.B_y;
|
|
|
- coordinateE.x = btTriBlasts.E_x;
|
|
|
- coordinateE.y = btTriBlasts.E_y;
|
|
|
- coordinateF.x = btTriBlasts.F_x;
|
|
|
- coordinateF.y = btTriBlasts.F_y;
|
|
|
- coordinateG.x = btTriBlasts.G_x;
|
|
|
- coordinateG.y = btTriBlasts.G_y;
|
|
|
- if (
|
|
|
- !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
|
|
|
- (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
|
|
|
- ) {
|
|
|
- getUnblast();
|
|
|
- } else {
|
|
|
- getBlast();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
watch(
|
|
|
() => props.posMonitor,
|
|
|
(newV, oldV) => {
|
|
|
- update(newV);
|
|
|
+ if (newV.btTriBlast) {
|
|
|
+ maxY1.value = parseFloat(newV.o2val);
|
|
|
+ maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
|
|
|
+ let btTriBlasts = JSON.parse(newV.btTriBlast);
|
|
|
+ coordinateA.x = btTriBlasts.A_x;
|
|
|
+ coordinateA.y = btTriBlasts.A_y;
|
|
|
+ coordinateB.x = btTriBlasts.B_x;
|
|
|
+ coordinateB.y = btTriBlasts.B_y;
|
|
|
+ coordinateE.x = btTriBlasts.E_x;
|
|
|
+ coordinateE.y = btTriBlasts.E_y;
|
|
|
+ coordinateF.x = btTriBlasts.F_x;
|
|
|
+ coordinateF.y = btTriBlasts.F_y;
|
|
|
+ coordinateG.x = btTriBlasts.G_x;
|
|
|
+ coordinateG.y = btTriBlasts.G_y;
|
|
|
+ if (
|
|
|
+ !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
|
|
|
+ (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
|
|
|
+ ) {
|
|
|
+ getUnblast();
|
|
|
+ } else {
|
|
|
+ getBlast();
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{ deep: true }
|
|
|
);
|
|
|
|
|
|
onMounted(() => {
|
|
|
getAreas();
|
|
|
- update(props.posMonitor);
|
|
|
});
|
|
|
</script>
|
|
|
|