|
@@ -5,7 +5,7 @@
|
|
|
<el-button @click="clear">清空</el-button>
|
|
|
<el-button @click="save">保存</el-button>
|
|
|
</div>
|
|
|
- <div style="height: 1700px; height:900px;display: flex;justify-content: center">
|
|
|
+ <div style="height: 1700px; height: 900px;display: flex;justify-content: center">
|
|
|
<canvas width="1700" height="900" style="border: 1px solid blue; background-color: white;" id="can"></canvas>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -15,6 +15,9 @@
|
|
|
import * as echarts from "echarts";
|
|
|
import html2canvas from 'html2canvas';
|
|
|
|
|
|
+ const backgroundImage = new Image();
|
|
|
+ backgroundImage.src = 'http://192.168.3.100/screenshot.png'; // 替换为你的背景图片路径
|
|
|
+
|
|
|
let CENTER_X = 850;
|
|
|
let CENTER_Y = 900;
|
|
|
let startMouse = { x: 0, y: 0 };
|
|
@@ -185,6 +188,9 @@
|
|
|
function init(){
|
|
|
can = document.getElementById('can');
|
|
|
context = can.getContext('2d');
|
|
|
+ backgroundImage.onload = function() {
|
|
|
+ context.drawImage(backgroundImage, 0, 0, can.width, can.height);
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
function arc(num){
|