|
@@ -3,31 +3,33 @@
|
|
|
<div ref="coord" class="coords" :style="{ width: widthV, height: heightV }">
|
|
|
<div class="triangle-x"></div>
|
|
|
<div class="triangle-y"></div>
|
|
|
+ <div class="name-x" >时间</div>
|
|
|
+ <div class="name-y" >温度(℃)</div>
|
|
|
<div class="coord-dw">
|
|
|
- <div class="dw-item" :style="{ bottom: `${coordDw[0]}px` }">30~40℃</div>
|
|
|
- <div class="dw-item" :style="{ bottom: `${coordDw[1]}px` }">50~60℃</div>
|
|
|
- <div class="dw-item" :style="{ bottom: `${coordDw[2]}px` }">70~80℃</div>
|
|
|
+ <div class="dw-item" :style="{ bottom: `${coordDw[0]}px` }">120℃</div>
|
|
|
+ <div class="dw-item" :style="{ bottom: `${coordDw[1]}px` }">200℃</div>
|
|
|
+ <!-- <div class="dw-item" :style="{ bottom: `${coordDw[2]}px` }">70~80℃</div>
|
|
|
<div class="dw-item" :style="{ bottom: `${coordDw[3]}px` }">90~110℃</div>
|
|
|
<div class="dw-item" :style="{ bottom: `${coordDw[4]}px` }">130~160℃</div>
|
|
|
- <div class="dw-item" :style="{ bottom: `${coordDw[5]}px` }">210~350℃</div>
|
|
|
+ <div class="dw-item" :style="{ bottom: `${coordDw[5]}px` }">210~350℃</div> -->
|
|
|
</div>
|
|
|
<div class="coord-bj">
|
|
|
<div class="bj-qfq" :style="{ width: widthCanvas < 600 ? '180px' : '401px' }">
|
|
|
<div class="left-jt"></div>
|
|
|
<div class="line"></div>
|
|
|
<div class="right-jt"></div>
|
|
|
- <div class="text">潜伏期</div>
|
|
|
+ <div class="text">缓慢氧化阶段</div>
|
|
|
</div>
|
|
|
- <div class="bj-zrq" :style="{ width: widthCanvas < 600 ? '360px' : '699px' }">
|
|
|
+ <div class="bj-zrq" :style="{ width: widthCanvas < 600 ? '121px' : '250px' }">
|
|
|
<div class="left-jt"></div>
|
|
|
<div class="line"></div>
|
|
|
<div class="right-jt"></div>
|
|
|
- <div class="text">自热期</div>
|
|
|
+ <div class="text">加速氧化阶段</div>
|
|
|
</div>
|
|
|
- <div class="bj-rsq" :style="{ width: widthCanvas < 600 ? '90px' : '305px' }">
|
|
|
+ <div class="bj-rsq" :style="{ width: widthCanvas < 600 ? '180px' : '570px' }">
|
|
|
<div class="left-jt"></div>
|
|
|
<div class="line"></div>
|
|
|
- <div class="text">燃烧期</div>
|
|
|
+ <div class="text">剧烈氧化阶段</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="coord-area" :style="{ width: 'calc(100% - 10px)', height: 'calc(100% - 10px)',overflow:'hidden' }">
|
|
@@ -110,212 +112,217 @@ function getCanvas() {
|
|
|
ctx.moveTo(xValues[0], yValues[0]);
|
|
|
for (var i = 1; i < xValues.length; i++) {
|
|
|
ctx.lineTo(xValues[i], yValues[i]);
|
|
|
- if(props.warnLevel=='1'){
|
|
|
+ if(props.warnLevel=='绿色预警'){
|
|
|
ctx.fillStyle = 'rgba(145, 230, 9)'; // 设置填充颜色
|
|
|
- if(props.widthCanvas < 600 && i<=4500){
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }else if(i<=4000) {
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }
|
|
|
- }else if(props.warnLevel=='2'){
|
|
|
- ctx.fillStyle = 'rgba(0, 242, 255)'; // 设置填充颜色
|
|
|
if(props.widthCanvas < 600 && i<=9000){
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
}else if(i<=8000) {
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
}
|
|
|
- }else if(props.warnLevel=='3'){
|
|
|
+ }else if(props.warnLevel=='黄色预警'){
|
|
|
ctx.fillStyle = 'rgba(255, 255, 53)'; // 设置填充颜色
|
|
|
- if(props.widthCanvas < 600 && i<=13500){
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }else if(i<=12000) {
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }
|
|
|
- }else if(props.warnLevel=='4'){
|
|
|
- ctx.fillStyle = 'rgba(255, 190, 105)'; // 设置填充颜色
|
|
|
- if(props.widthCanvas < 600 && i<=18000){
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }else if(i<=16000) {
|
|
|
- ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }
|
|
|
- }else if(props.warnLevel=='5'){
|
|
|
- ctx.fillStyle = 'rgba(255, 111, 0)'; // 设置填充颜色
|
|
|
- if(props.widthCanvas < 600 && i<=22500){
|
|
|
+ if(props.widthCanvas < 600 && i<=15000){
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }else if(i<=20000) {
|
|
|
+ }else if(i<=13000) {
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
}
|
|
|
- }else if(props.warnLevel=='6'){
|
|
|
+ }else if(props.warnLevel=='红色预警'){
|
|
|
ctx.fillStyle = 'rgba(255, 0, 0)'; // 设置填充颜色
|
|
|
- if(props.widthCanvas < 600 && i<=27000){
|
|
|
+ if(props.widthCanvas < 600 && i>15000){
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
- }else if(i<=22000) {
|
|
|
+ }else if(i>13000) {
|
|
|
ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
}
|
|
|
}
|
|
|
+ // else if(props.warnLevel=='4'){
|
|
|
+ // ctx.fillStyle = 'rgba(255, 190, 105)'; // 设置填充颜色
|
|
|
+ // if(props.widthCanvas < 600 && i<=18000){
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }else if(i<=16000) {
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }
|
|
|
+ // }else if(props.warnLevel=='5'){
|
|
|
+ // ctx.fillStyle = 'rgba(255, 111, 0)'; // 设置填充颜色
|
|
|
+ // if(props.widthCanvas < 600 && i<=22500){
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }else if(i<=20000) {
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }
|
|
|
+ // }else if(props.warnLevel=='6'){
|
|
|
+ // ctx.fillStyle = 'rgba(255, 0, 0)'; // 设置填充颜色
|
|
|
+ // if(props.widthCanvas < 600 && i<=27000){
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }else if(i<=22000) {
|
|
|
+ // ctx.fillRect(xValues[i], yValues[i], step, canvas.height - yValues[i]);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
}
|
|
|
ctx.stroke();
|
|
|
|
|
|
//标记点1
|
|
|
- ctx.beginPath();
|
|
|
- ctx.arc(xValues[props.widthCanvas < 600 ? 4500 : 4000], yValues[props.widthCanvas < 600 ? 4500 : 4000], 6, 0, 2 * Math.PI);
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fill();
|
|
|
- //标记点2
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.arc(xValues[props.widthCanvas < 600 ? 4500 : 4000], yValues[props.widthCanvas < 600 ? 4500 : 4000], 6, 0, 2 * Math.PI);
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fill();
|
|
|
ctx.beginPath();
|
|
|
ctx.arc(xValues[props.widthCanvas < 600 ? 9000 : 8000], yValues[props.widthCanvas < 600 ? 9000 : 8000], 6, 0, 2 * Math.PI);
|
|
|
ctx.fillStyle = '#ff6363';
|
|
|
ctx.fill();
|
|
|
- //标记点3
|
|
|
- ctx.beginPath();
|
|
|
- ctx.arc(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000], 6, 0, 2 * Math.PI);
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fill();
|
|
|
- // 在点附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fillText('临界', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 10, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- //标记点4
|
|
|
- ctx.beginPath();
|
|
|
- ctx.arc(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000], 6, 0, 2 * Math.PI);
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fill();
|
|
|
- //标记点5
|
|
|
- ctx.beginPath();
|
|
|
- ctx.arc(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000], 6, 0, 2 * Math.PI);
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fill();
|
|
|
- // 在点附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fillText('征兆', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 10, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- //标记点5
|
|
|
+ //标记点2
|
|
|
ctx.beginPath();
|
|
|
- ctx.arc(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000], 6, 0, 2 * Math.PI);
|
|
|
+ ctx.arc(xValues[props.widthCanvas < 600 ? 15000 : 13000], yValues[props.widthCanvas < 600 ? 15000 : 13000], 6, 0, 2 * Math.PI);
|
|
|
ctx.fillStyle = '#ff6363';
|
|
|
ctx.fill();
|
|
|
- // 在点附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#ff6363';
|
|
|
- ctx.fillText('火灾', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 10, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // //标记点3
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.arc(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000], 6, 0, 2 * Math.PI);
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fill();
|
|
|
+ // // 在点附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fillText('临界', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 10, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // //标记点4
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.arc(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000], 6, 0, 2 * Math.PI);
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fill();
|
|
|
+ // //标记点5
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.arc(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000], 6, 0, 2 * Math.PI);
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fill();
|
|
|
+ // // 在点附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fillText('征兆', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 10, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // //标记点5
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.arc(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000], 6, 0, 2 * Math.PI);
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fill();
|
|
|
+ // // 在点附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#ff6363';
|
|
|
+ // ctx.fillText('火灾', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 10, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
|
|
|
// 设置线条样式(颜色、宽度等)
|
|
|
- ctx.strokeStyle = '#0d2973';
|
|
|
+ ctx.strokeStyle = 'rgba(36, 74, 148,.8)';
|
|
|
ctx.lineWidth = 1;
|
|
|
ctx.lineCap = 'round';
|
|
|
// 定义虚线模式:[线段长度, 间隔长度]
|
|
|
ctx.setLineDash([5, 5]);
|
|
|
//绘制标记点1线条-x
|
|
|
ctx.beginPath();
|
|
|
- ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 4500 : 4000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 4500 : 4000], yValues[props.widthCanvas < 600 ? 4500 : 4000]); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点1线条-y
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(xValues[props.widthCanvas < 600 ? 4500 : 4000], yValues[props.widthCanvas < 600 ? 4500 : 4000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 4500 : 4000], canvas.height); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('潜伏阶段', xValues[props.widthCanvas < 600 ? 4500 : 4000] - 70, yValues[props.widthCanvas < 600 ? 4500 : 4000] + 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- ctx.fillText('氧化阶段', xValues[props.widthCanvas < 600 ? 4500 : 4000] - 70, yValues[props.widthCanvas < 600 ? 4500 : 4000] - 5); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('潜伏阶段', xValues[props.widthCanvas < 600 ? 4500 : 4000] - 120, yValues[props.widthCanvas < 600 ? 4500 : 4000] + 18); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- ctx.fillText('氧化阶段', xValues[props.widthCanvas < 600 ? 4500 : 4000] - 120, yValues[props.widthCanvas < 600 ? 4500 : 4000] - 5); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
- //绘制标记点2线条-x
|
|
|
- ctx.beginPath();
|
|
|
ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 9000 : 8000]); // 开始绘制的点
|
|
|
ctx.lineTo(xValues[props.widthCanvas < 600 ? 9000 : 8000], yValues[props.widthCanvas < 600 ? 9000 : 8000]); // 结束绘制的点
|
|
|
ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点2线条-y
|
|
|
+ //绘制标记点1线条-y
|
|
|
ctx.beginPath();
|
|
|
ctx.moveTo(xValues[props.widthCanvas < 600 ? 9000 : 8000], yValues[props.widthCanvas < 600 ? 9000 : 8000]); // 开始绘制的点
|
|
|
ctx.lineTo(xValues[props.widthCanvas < 600 ? 9000 : 8000], canvas.height); // 结束绘制的点
|
|
|
ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('自热阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 160, yValues[props.widthCanvas < 600 ? 9000 : 8000] - 12); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('自热阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 320, yValues[props.widthCanvas < 600 ? 9000 : 8000] - 12); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
- //绘制标记点3线条-x
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点3线条-y
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], canvas.height); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('临界阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 250, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 20); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('临界阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 520, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 20); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
- //绘制标记点4线条-x
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点4线条-y
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], canvas.height); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('热解阶段', xValues[props.widthCanvas < 600 ? 18000 : 16000] - 340, yValues[props.widthCanvas < 600 ? 18000 : 16000] - 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('热解阶段', xValues[props.widthCanvas < 600 ? 18000 : 16000] - 720, yValues[props.widthCanvas < 600 ? 18000 : 16000] - 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
- //绘制标记点5线条-x
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点5线条-y
|
|
|
- ctx.beginPath();
|
|
|
- ctx.moveTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], canvas.height); // 结束绘制的点
|
|
|
- ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('裂变阶段', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 430, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 30); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('裂变阶段', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 920, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
- //绘制标记点6线条-x
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('潜伏阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 70, yValues[props.widthCanvas < 600 ? 9000 : 8000] + 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // ctx.fillText('氧化阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 70, yValues[props.widthCanvas < 600 ? 9000 : 8000] - 5); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('潜伏阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 120, yValues[props.widthCanvas < 600 ? 9000 : 8000] + 18); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // ctx.fillText('氧化阶段', xValues[props.widthCanvas < 600 ? 9000 : 8000] - 120, yValues[props.widthCanvas < 600 ? 9000 : 8000] - 5); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
+ //绘制标记点2线条-x
|
|
|
ctx.beginPath();
|
|
|
- ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 结束绘制的点
|
|
|
+ ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 15000 : 13000]); // 开始绘制的点
|
|
|
+ ctx.lineTo(xValues[props.widthCanvas < 600 ? 15000 : 13000], yValues[props.widthCanvas < 600 ? 15000 : 13000]); // 结束绘制的点
|
|
|
ctx.stroke(); // 进行绘制
|
|
|
- //绘制标记点6线条-y
|
|
|
+ //绘制标记点2线条-y
|
|
|
ctx.beginPath();
|
|
|
- ctx.moveTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 开始绘制的点
|
|
|
- ctx.lineTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], canvas.height); // 结束绘制的点
|
|
|
+ ctx.moveTo(xValues[props.widthCanvas < 600 ? 15000 : 13000], yValues[props.widthCanvas < 600 ? 15000 : 13000]); // 开始绘制的点
|
|
|
+ ctx.lineTo(xValues[props.widthCanvas < 600 ? 15000 : 13000], canvas.height); // 结束绘制的点
|
|
|
ctx.stroke(); // 进行绘制
|
|
|
- // 在线条附近添加文字
|
|
|
- ctx.font = '12px Arial';
|
|
|
- ctx.fillStyle = '#2aadf3';
|
|
|
- if (props.widthCanvas < 600) {
|
|
|
- ctx.fillText('燃烧阶段', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 520, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- } else {
|
|
|
- ctx.fillText('燃烧阶段', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 1020, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
- }
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('自热阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 160, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 12); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('自热阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 320, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 12); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
+ // //绘制标记点3线条-x
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // //绘制标记点3线条-y
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], yValues[props.widthCanvas < 600 ? 13500 : 12000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 13500 : 12000], canvas.height); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('临界阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 250, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 20); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('临界阶段', xValues[props.widthCanvas < 600 ? 13500 : 12000] - 520, yValues[props.widthCanvas < 600 ? 13500 : 12000] - 20); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
+ // //绘制标记点4线条-x
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // //绘制标记点4线条-y
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], yValues[props.widthCanvas < 600 ? 18000 : 16000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 18000 : 16000], canvas.height); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('热解阶段', xValues[props.widthCanvas < 600 ? 18000 : 16000] - 340, yValues[props.widthCanvas < 600 ? 18000 : 16000] - 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('热解阶段', xValues[props.widthCanvas < 600 ? 18000 : 16000] - 720, yValues[props.widthCanvas < 600 ? 18000 : 16000] - 25); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
+ // //绘制标记点5线条-x
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // //绘制标记点5线条-y
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], yValues[props.widthCanvas < 600 ? 22500 : 20000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 22500 : 20000], canvas.height); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('裂变阶段', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 430, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 30); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('裂变阶段', xValues[props.widthCanvas < 600 ? 22500 : 20000] - 920, yValues[props.widthCanvas < 600 ? 22500 : 20000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
+ // //绘制标记点6线条-x
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(0, yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // //绘制标记点6线条-y
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.moveTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], yValues[props.widthCanvas < 600 ? 27000 : 22000]); // 开始绘制的点
|
|
|
+ // ctx.lineTo(xValues[props.widthCanvas < 600 ? 27000 : 22000], canvas.height); // 结束绘制的点
|
|
|
+ // ctx.stroke(); // 进行绘制
|
|
|
+ // // 在线条附近添加文字
|
|
|
+ // ctx.font = '12px Arial';
|
|
|
+ // ctx.fillStyle = '#2aadf3';
|
|
|
+ // if (props.widthCanvas < 600) {
|
|
|
+ // ctx.fillText('燃烧阶段', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 520, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // } else {
|
|
|
+ // ctx.fillText('燃烧阶段', xValues[props.widthCanvas < 600 ? 27000 : 22000] - 1020, yValues[props.widthCanvas < 600 ? 27000 : 22000] - 15); // 文字位置略微偏上,以便于文字与点对齐
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -372,11 +379,28 @@ onMounted(() => {
|
|
|
border-bottom: 5px solid transparent;
|
|
|
}
|
|
|
|
|
|
+ .name-x{
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: -35px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .name-y{
|
|
|
+ width: 20px;
|
|
|
+ position: absolute;
|
|
|
+ left: -40px;
|
|
|
+ top: 0px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
.coord-dw {
|
|
|
position: absolute;
|
|
|
- left: -100px;
|
|
|
+ left: -75px;
|
|
|
top: 0;
|
|
|
- width: 100px;
|
|
|
+ width: 75px;
|
|
|
height: 100%;
|
|
|
|
|
|
.dw-item {
|
|
@@ -422,12 +446,14 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
+ width: 90%;
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
top: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
|
font-size: 14px;
|
|
|
color: #db9753;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.line {
|