浏览代码

feat 决策

sys5923812@126.com 1 周之前
父节点
当前提交
c64ded0852
共有 1 个文件被更改,包括 5 次插入10 次删除
  1. 5 10
      src/views/xjc-integratedmachine/wakeup/rainbow/index.vue

+ 5 - 10
src/views/xjc-integratedmachine/wakeup/rainbow/index.vue

@@ -120,10 +120,8 @@
 
     const chartDivs = ref([])
 
-    const out_width = ref(1832)
+    const out_width = ref(1920)
     const out_height = ref(1023)
-    const out_top = ref(113)
-    const out_total = out_height.value + out_top.value
     const centerPoint = ref({})
 
 
@@ -132,10 +130,9 @@
         centerPoint.value.y = out_height.value
         console.log("圆心x:", centerPoint.value.x, "圆心y:", centerPoint.value.y)
         let cc = document.getElementById("cc")
-        // cc.style.left = centerPoint.value.x + "px"
-        // cc.style.top = centerPoint.value.y + "px"
-        cc.style.left = "916px"
-        cc.style.top = "1023px"
+        cc.style.left = centerPoint.value.x + "px"
+        cc.style.top = centerPoint.value.y + "px"
+
 
         chartDivs.value = [
             document.getElementById("ring-chart1"),
@@ -165,11 +162,9 @@
         let mouse_y = event.targetTouches[0].pageY;
         console.log("touchX:", mouse_x, "touchY:", mouse_y)
         let distance = Math.sqrt((Math.pow((centerPoint.value.x - mouse_x), 2) + Math.pow((centerPoint.value.y - mouse_y), 2)))
-        console.log("total :", out_total, " r1 :", raduis_half[0], " r2:", raduis_half[1])
-        console.log("半径1:", out_total - raduis_half[0], "半径2:", out_total - raduis_half[1])
 
         console.log("dis:", distance)
-        if (distance <= out_total - raduis_half[0] && distance > out_total - raduis_half[1]) {
+        if (distance <= out_height.value - raduis_half[0] && distance > out_height.value - raduis_half[1]) {
             console.log("t1")
         }