From 721f0f47db74d425940e0727035eefa0f72748f8 Mon Sep 17 00:00:00 2001
From: whyczyk <525500596@qq.com>
Date: 星期五, 25 六月 2021 13:59:21 +0800
Subject: [PATCH] 空载试验及负载试验优化

---
 src/pages/test/js/noLoadTestDiagram.js |   48 +++++++++++++++++++++---------------------------
 1 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/src/pages/test/js/noLoadTestDiagram.js b/src/pages/test/js/noLoadTestDiagram.js
index 5e0885c..91400e7 100644
--- a/src/pages/test/js/noLoadTestDiagram.js
+++ b/src/pages/test/js/noLoadTestDiagram.js
@@ -74,9 +74,9 @@
     let Image2 = diagram.drawImage({
         id: 'img2',
         url: testedmotor,
-        point: [line3[1][0], line3[1][1] - 289*270/395/2],
-        width: 270/395*395,
-        height: 289*270/395,
+        point: [line3[1][0], line3[1][1] - 289 * 270 / 395 / 2],
+        width: 270 / 395 * 395,
+        height: 289 * 270 / 395,
     })
 
     let line4 = diagram.line({
@@ -107,42 +107,36 @@
         ]
     })
 
-    let line6 = diagram.line({
-        id: 'line6',
-        strokeStyle: '#d9001b',
-        lineWidth: lineWidth,
-        points: [
-            [line5[1][0], line5[1][1] - 15],
-            [line5[1][0], line5[1][1] + 15]
-        ]
-    })
-
-    let line7 = diagram.line({
-        id: 'line7',
-        strokeStyle: '#d9001b',
-        lineWidth: lineWidth,
-        points: [
-            [line5[1][0] + 30, line5[1][1] - 15],
-            [line5[1][0] + 30, line5[1][1] + 15]
-        ]
-    })
+    let onOff5 = diagram.onOff({
+        id: 'km5',
+        point: line5[1],
+        direction: 'left',
+        color: '#c0becf',
+        onOffBase: {
+            radius: 6,
+            width: 32,
+            lineWidth: 4,
+        },
+        state: true,
+        flush: true,
+    });
 
     let line8 = diagram.line({
         id: 'line8',
         strokeStyle: lineStrokeColor,
         lineWidth: lineWidth,
         points: [
-            [line7[1][0], line5[1][1]],
-            [line7[1][0] + 40, line5[1][1]]
+            onOff5.arc2.right,
+            [onOff5.arc2.right[0] + 40, onOff5.arc2.right[1]]
         ]
     })
 
     let Image4 = diagram.drawImage({
         id: 'img4',
         url: dynamometry,
-        point: [line8[1][0]-4, line8[1][1] - 229*180/347/2+10],
+        point: [line8[1][0] - 4, line8[1][1] - 229 * 180 / 347 / 2 + 10],
         width: 180,
-        height: 229*180/347,
+        height: 229 * 180 / 347,
     })
 
     let line9 = diagram.line({
@@ -314,7 +308,7 @@
         fillStyle: "#ffffff",
         fontSize: 28,
         fontWidth: 1,
-        point: [Image2.bottom[0]-80, Image2.bottom[1] + 20],
+        point: [Image2.bottom[0] - 80, Image2.bottom[1] + 20],
         showPanel: false,
     });
 

--
Gitblit v1.9.1