|
@@ -1,26 +1,28 @@
|
|
<template>
|
|
<template>
|
|
- <div style="display: flex;justify-content: center;">
|
|
|
|
- <div style="position: absolute;top:10px;right: 4px">
|
|
|
|
- <el-button @click="changePaintState">{{paintStateFlagText}}</el-button>
|
|
|
|
- <el-button @click="clear">清空</el-button>
|
|
|
|
- <el-button @click="save">保存</el-button>
|
|
|
|
- </div>
|
|
|
|
- <div style="display: flex;justify-content: center;">
|
|
|
|
- <canvas width="1700" height="900" style="border: 1px solid blue; background: #000000;"
|
|
|
|
|
|
+ <div id="outerDiv" class="development_stage">
|
|
|
|
+ <head-component :headinfo=headinfo></head-component>
|
|
|
|
+ <div class="page-content">
|
|
|
|
+ <canvas width="1700" height="900" style="border: 1px solid blue; background-color: #000000;"
|
|
id="can"></canvas>
|
|
id="can"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+ import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
|
|
|
|
+
|
|
|
|
+ const headinfo = ref({})
|
|
|
|
+
|
|
import {onMounted} from 'vue'
|
|
import {onMounted} from 'vue'
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
import html2canvas from 'html2canvas';
|
|
import html2canvas from 'html2canvas';
|
|
- import { ElMessage} from 'element-plus'
|
|
|
|
|
|
+ import {ElMessage} from 'element-plus'
|
|
|
|
|
|
const backgroundImage = new Image();
|
|
const backgroundImage = new Image();
|
|
// backgroundImage.src = 'http://192.168.3.100/screenshot.png'; // 替换为你的背景图片路径
|
|
// backgroundImage.src = 'http://192.168.3.100/screenshot.png'; // 替换为你的背景图片路径
|
|
|
|
|
|
- let CENTER_X = 850;
|
|
|
|
|
|
+ let CENTER_X = 910;
|
|
let CENTER_Y = 900;
|
|
let CENTER_Y = 900;
|
|
let startMouse = {x: 0, y: 0};
|
|
let startMouse = {x: 0, y: 0};
|
|
let moveMouse = {x: 0, y: 0};
|
|
let moveMouse = {x: 0, y: 0};
|
|
@@ -223,9 +225,9 @@
|
|
// 第二个职业
|
|
// 第二个职业
|
|
else if (sum < Math.pow(185, 2) && sum > Math.pow(145, 2)) {
|
|
else if (sum < Math.pow(185, 2) && sum > Math.pow(145, 2)) {
|
|
if (paintFlagList[3]) {
|
|
if (paintFlagList[3]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#f72585", 165, startAngle21, ret);
|
|
paint("#f72585", 165, startAngle21, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 165, startAngle21, ret);
|
|
paint("#000000", 165, startAngle21, ret);
|
|
paint("#000000", 205, startAngle21, ret);
|
|
paint("#000000", 205, startAngle21, ret);
|
|
paint("#000000", 245, startAngle21, ret);
|
|
paint("#000000", 245, startAngle21, ret);
|
|
@@ -233,21 +235,21 @@
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(225, 2) && sum > Math.pow(185, 2)) {
|
|
} else if (sum < Math.pow(225, 2) && sum > Math.pow(185, 2)) {
|
|
if (paintFlagList[4]) {
|
|
if (paintFlagList[4]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#f72585", 165, startAngle22, ret);
|
|
paint("#f72585", 165, startAngle22, ret);
|
|
paint("#f72585", 205, startAngle22, ret);
|
|
paint("#f72585", 205, startAngle22, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 205, startAngle22, ret);
|
|
paint("#000000", 205, startAngle22, ret);
|
|
paint("#000000", 245, startAngle22, ret);
|
|
paint("#000000", 245, startAngle22, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(265, 2) && sum > Math.pow(225, 2)) {
|
|
} else if (sum < Math.pow(265, 2) && sum > Math.pow(225, 2)) {
|
|
if (paintFlagList[5]) {
|
|
if (paintFlagList[5]) {
|
|
- if(paintStateFlag){
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#f72585", 165, startAngle23, ret);
|
|
paint("#f72585", 165, startAngle23, ret);
|
|
paint("#f72585", 205, startAngle23, ret);
|
|
paint("#f72585", 205, startAngle23, ret);
|
|
paint("#f72585", 245, startAngle23, ret);
|
|
paint("#f72585", 245, startAngle23, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 245, startAngle23, ret);
|
|
paint("#000000", 245, startAngle23, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -255,9 +257,9 @@
|
|
//第三个职业
|
|
//第三个职业
|
|
else if (sum < Math.pow(320, 2) && sum > Math.pow(280, 2)) {
|
|
else if (sum < Math.pow(320, 2) && sum > Math.pow(280, 2)) {
|
|
if (paintFlagList[6]) {
|
|
if (paintFlagList[6]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#4cc9f0", 300, startAngle31, ret);
|
|
paint("#4cc9f0", 300, startAngle31, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 300, startAngle31, ret);
|
|
paint("#000000", 300, startAngle31, ret);
|
|
paint("#000000", 340, startAngle31, ret);
|
|
paint("#000000", 340, startAngle31, ret);
|
|
paint("#000000", 380, startAngle31, ret);
|
|
paint("#000000", 380, startAngle31, ret);
|
|
@@ -265,21 +267,21 @@
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(360, 2) && sum > Math.pow(320, 2)) {
|
|
} else if (sum < Math.pow(360, 2) && sum > Math.pow(320, 2)) {
|
|
if (paintFlagList[7]) {
|
|
if (paintFlagList[7]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#4cc9f0", 300, startAngle31, ret);
|
|
paint("#4cc9f0", 300, startAngle31, ret);
|
|
paint("#4cc9f0", 340, startAngle31, ret);
|
|
paint("#4cc9f0", 340, startAngle31, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 340, startAngle32, ret);
|
|
paint("#000000", 340, startAngle32, ret);
|
|
paint("#000000", 380, startAngle32, ret);
|
|
paint("#000000", 380, startAngle32, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(400, 2) && sum > Math.pow(360, 2)) {
|
|
} else if (sum < Math.pow(400, 2) && sum > Math.pow(360, 2)) {
|
|
if (paintFlagList[8]) {
|
|
if (paintFlagList[8]) {
|
|
- if(paintStateFlag){
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#4cc9f0", 300, startAngle33, ret);
|
|
paint("#4cc9f0", 300, startAngle33, ret);
|
|
paint("#4cc9f0", 340, startAngle33, ret);
|
|
paint("#4cc9f0", 340, startAngle33, ret);
|
|
paint("#4cc9f0", 380, startAngle33, ret);
|
|
paint("#4cc9f0", 380, startAngle33, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 380, startAngle33, ret);
|
|
paint("#000000", 380, startAngle33, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -287,9 +289,9 @@
|
|
//第四个职业
|
|
//第四个职业
|
|
else if (sum < Math.pow(455, 2) && sum > Math.pow(415, 2)) {
|
|
else if (sum < Math.pow(455, 2) && sum > Math.pow(415, 2)) {
|
|
if (paintFlagList[9]) {
|
|
if (paintFlagList[9]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#a000ff", 435, startAngle41, ret);
|
|
paint("#a000ff", 435, startAngle41, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 435, startAngle41, ret);
|
|
paint("#000000", 435, startAngle41, ret);
|
|
paint("#000000", 475, startAngle41, ret);
|
|
paint("#000000", 475, startAngle41, ret);
|
|
paint("#000000", 515, startAngle41, ret);
|
|
paint("#000000", 515, startAngle41, ret);
|
|
@@ -297,21 +299,21 @@
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(495, 2) && sum > Math.pow(455, 2)) {
|
|
} else if (sum < Math.pow(495, 2) && sum > Math.pow(455, 2)) {
|
|
if (paintFlagList[10]) {
|
|
if (paintFlagList[10]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#a000ff", 435, startAngle42, ret);
|
|
paint("#a000ff", 435, startAngle42, ret);
|
|
paint("#a000ff", 475, startAngle42, ret);
|
|
paint("#a000ff", 475, startAngle42, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 475, startAngle42, ret);
|
|
paint("#000000", 475, startAngle42, ret);
|
|
paint("#000000", 515, startAngle42, ret);
|
|
paint("#000000", 515, startAngle42, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(535, 2) && sum > Math.pow(495, 2)) {
|
|
} else if (sum < Math.pow(535, 2) && sum > Math.pow(495, 2)) {
|
|
if (paintFlagList[11]) {
|
|
if (paintFlagList[11]) {
|
|
- if(paintStateFlag){
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#a000ff", 435, startAngle43, ret);
|
|
paint("#a000ff", 435, startAngle43, ret);
|
|
paint("#a000ff", 475, startAngle43, ret);
|
|
paint("#a000ff", 475, startAngle43, ret);
|
|
paint("#a000ff", 515, startAngle43, ret);
|
|
paint("#a000ff", 515, startAngle43, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 515, startAngle43, ret);
|
|
paint("#000000", 515, startAngle43, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -320,9 +322,9 @@
|
|
//第五个职业
|
|
//第五个职业
|
|
else if (sum < Math.pow(590, 2) && sum > Math.pow(550, 2)) {
|
|
else if (sum < Math.pow(590, 2) && sum > Math.pow(550, 2)) {
|
|
if (paintFlagList[12]) {
|
|
if (paintFlagList[12]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#ffc9f6", 570, startAngle51, ret);
|
|
paint("#ffc9f6", 570, startAngle51, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 570, startAngle51, ret);
|
|
paint("#000000", 570, startAngle51, ret);
|
|
paint("#000000", 610, startAngle51, ret);
|
|
paint("#000000", 610, startAngle51, ret);
|
|
paint("#000000", 650, startAngle51, ret);
|
|
paint("#000000", 650, startAngle51, ret);
|
|
@@ -330,21 +332,21 @@
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(630, 2) && sum > Math.pow(590, 2)) {
|
|
} else if (sum < Math.pow(630, 2) && sum > Math.pow(590, 2)) {
|
|
if (paintFlagList[13]) {
|
|
if (paintFlagList[13]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#ffc9f6", 570, startAngle52, ret);
|
|
paint("#ffc9f6", 570, startAngle52, ret);
|
|
paint("#ffc9f6", 610, startAngle52, ret);
|
|
paint("#ffc9f6", 610, startAngle52, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 610, startAngle52, ret);
|
|
paint("#000000", 610, startAngle52, ret);
|
|
paint("#000000", 650, startAngle52, ret);
|
|
paint("#000000", 650, startAngle52, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(670, 2) && sum > Math.pow(630, 2)) {
|
|
} else if (sum < Math.pow(670, 2) && sum > Math.pow(630, 2)) {
|
|
if (paintFlagList[14]) {
|
|
if (paintFlagList[14]) {
|
|
- if(paintStateFlag){
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#ffc9f6", 570, startAngle53, ret);
|
|
paint("#ffc9f6", 570, startAngle53, ret);
|
|
paint("#ffc9f6", 610, startAngle53, ret);
|
|
paint("#ffc9f6", 610, startAngle53, ret);
|
|
paint("#ffc9f6", 650, startAngle53, ret);
|
|
paint("#ffc9f6", 650, startAngle53, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 650, startAngle53, ret);
|
|
paint("#000000", 650, startAngle53, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -353,9 +355,9 @@
|
|
//第六个职业
|
|
//第六个职业
|
|
else if (sum < Math.pow(725, 2) && sum > Math.pow(685, 2)) {
|
|
else if (sum < Math.pow(725, 2) && sum > Math.pow(685, 2)) {
|
|
if (paintFlagList[15]) {
|
|
if (paintFlagList[15]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#9de617", 705, startAngle61, ret);
|
|
paint("#9de617", 705, startAngle61, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 705, startAngle61, ret);
|
|
paint("#000000", 705, startAngle61, ret);
|
|
paint("#000000", 745, startAngle61, ret);
|
|
paint("#000000", 745, startAngle61, ret);
|
|
paint("#000000", 785, startAngle61, ret);
|
|
paint("#000000", 785, startAngle61, ret);
|
|
@@ -363,21 +365,21 @@
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(765, 2) && sum > Math.pow(725, 2)) {
|
|
} else if (sum < Math.pow(765, 2) && sum > Math.pow(725, 2)) {
|
|
if (paintFlagList[16]) {
|
|
if (paintFlagList[16]) {
|
|
- if(paintStateFlag) {
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#9de617", 705, startAngle62, ret);
|
|
paint("#9de617", 705, startAngle62, ret);
|
|
paint("#9de617", 745, startAngle62, ret);
|
|
paint("#9de617", 745, startAngle62, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 745, startAngle62, ret);
|
|
paint("#000000", 745, startAngle62, ret);
|
|
paint("#000000", 785, startAngle62, ret);
|
|
paint("#000000", 785, startAngle62, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (sum < Math.pow(805, 2) && sum > Math.pow(765, 2)) {
|
|
} else if (sum < Math.pow(805, 2) && sum > Math.pow(765, 2)) {
|
|
if (paintFlagList[17]) {
|
|
if (paintFlagList[17]) {
|
|
- if(paintStateFlag){
|
|
|
|
|
|
+ if (paintStateFlag) {
|
|
paint("#9de617", 705, startAngle63, ret);
|
|
paint("#9de617", 705, startAngle63, ret);
|
|
paint("#9de617", 745, startAngle63, ret);
|
|
paint("#9de617", 745, startAngle63, ret);
|
|
paint("#9de617", 785, startAngle63, ret);
|
|
paint("#9de617", 785, startAngle63, ret);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
paint("#000000", 785, startAngle63, ret);
|
|
paint("#000000", 785, startAngle63, ret);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -406,9 +408,6 @@
|
|
function init() {
|
|
function init() {
|
|
can = document.getElementById('can');
|
|
can = document.getElementById('can');
|
|
context = can.getContext('2d');
|
|
context = can.getContext('2d');
|
|
- // backgroundImage.onload = function() {
|
|
|
|
- // context.drawImage(backgroundImage, 0, 0, can.width, can.height);
|
|
|
|
- // };
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function arc(num) {
|
|
function arc(num) {
|
|
@@ -423,7 +422,7 @@
|
|
function paint(color, radius, startAngle, endAngle) {
|
|
function paint(color, radius, startAngle, endAngle) {
|
|
// 结束角度不能小于起始角度
|
|
// 结束角度不能小于起始角度
|
|
if (endAngle <= startAngle) {
|
|
if (endAngle <= startAngle) {
|
|
- ElMessage.error("只能顺时针画")
|
|
|
|
|
|
+ // ElMessage.error("只能顺时针画")
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
context.lineWidth = 37;
|
|
context.lineWidth = 37;
|
|
@@ -502,11 +501,35 @@
|
|
console.log("mmmmm")
|
|
console.log("mmmmm")
|
|
drawBackground();
|
|
drawBackground();
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
- #chart3 {
|
|
|
|
- width: 500px;
|
|
|
|
- height: 400px;
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+ //body,html{
|
|
|
|
+ // overflow: hidden;
|
|
|
|
+ //}
|
|
|
|
+ p {
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .development_stage {
|
|
|
|
+ background: url('@/assets/images/login/login-home-background.png') no-repeat;
|
|
|
|
+ background-size: 1920px 1080px;
|
|
|
|
+ z-index: 10;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 1080px;
|
|
|
|
+ }
|
|
|
|
+ .page-content {
|
|
|
|
+ display:flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ padding-top: 113px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ .bg-color-style1 {
|
|
|
|
+ background: #FFFFFF;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|