SanHQin 1 week geleden
bovenliggende
commit
d2af5796df

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.64ad646327e0ba8307ff23f58a130470.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.1e6ce7c3eb7cfecbdff0.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.bc02da90b49ba29f49bfab3ef29e21e4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.f9f0ce428cc530d7f06a.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.bc02da90b49ba29f49bfab3ef29e21e4.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.bc02da90b49ba29f49bfab3ef29e21e4.css.map


File diff suppressed because it is too large
+ 8 - 0
dist/static/img/rt-ch_echarts2.5e1c441.svg


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.f9f0ce428cc530d7f06a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.f9f0ce428cc530d7f06a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


File diff suppressed because it is too large
+ 8 - 0
src/assets/icon/classroomObservation/rt-ch_echarts2.svg


+ 16 - 11
src/components/pages/classroomObservation/components/echartsRTCH.vue

@@ -35,26 +35,31 @@ export default {
       ctx.imageSmoothingEnabled = false;
       ctx.lineWidth = 1;
       const img = new Image();
-      img.src = require("../../../../assets/icon/classroomObservation/rt-ch_echarts.png");
+      img.src = require("../../../../assets/icon/classroomObservation/rt-ch_echarts2.svg");
       img.onload = () => {
-        ctx.drawImage(img, 25, 25, 250, 250);
+        ctx.drawImage(img, 0, 0, canvasWidth, canvasWidth);
         ctx.beginPath();
-        ctx.arc((250*parseFloat(this.data.RT))+25,(250-(250*parseFloat(this.data.CH))+25), 4, 0, 2 * Math.PI);
+        let _showWidth = canvasWidth-((canvasWidth/8.8)*2)
+        ctx.arc((canvasWidth/8.8)+(_showWidth*parseFloat(this.data.RT)),(canvasWidth/8.8)+_showWidth-(_showWidth*parseFloat(this.data.CH)),4,0,2*Math.PI);
+        ctx.lineWidth = 0.5; // 设置边框大小
+        // ctx.arc((canvasWidth*parseFloat(this.data.RT))+(canvasWidth/8.8),(canvasWidth-(canvasWidth*parseFloat(this.data.CH))+(canvasWidth/8.8)), 4, 0, 2 * Math.PI);
         ctx.fill();
         ctx.stroke();
       };
 
-      ctx.fillStyle = "black";
-      ctx.font = `20px serif`;
-      ctx.fillText("1", 10, 40);
-      ctx.fillText("Ch", 0, 150);
-      ctx.fillText("0", 10, 290);
-      ctx.fillText("Rt", 140, 295);
-      ctx.fillText("1", 280, 275);
+      // ctx.fillStyle = "black";
+      // ctx.font = `20px serif`;
+      // ctx.fillText("1", 10, 40);
+      // ctx.fillText("Ch", 0, 150);
+      // ctx.fillText("0", 10, 290);
+      // ctx.fillText("Rt", 140, 295);
+      // ctx.fillText("1", 280, 275);
 
       ctx.fillStyle = fontColor;
       ctx.font = "italic bold 24px Arial";
-      ctx.fillText(`RT=${this.data.RT}    CH=${this.data.CH}`, 40, 330);
+      const text = `RT=${this.data.RT}    CH=${this.data.CH}`;
+      const textWidth = ctx.measureText(text).width;
+      ctx.fillText(text, (canvasWidth - textWidth) / 2, canvasHeight - canvasWidth / 12);
     },
     drawRoundedRect(ctx, x, y, width, height, radius) {
       // 限制 radius 的最大值,防止它超过矩形的宽度或高度的一半

Some files were not shown because too many files changed in this diff