Browse Source

对接蒸汽采暖运行监测页面

gh_ers
selia-zx 2 months ago
parent
commit
9c44565d0f
  1. BIN
      src/assets/images/steamHeating.png
  2. 120
      src/views/boilerSys/steamHeating/components/lineChildren.vue
  3. 1154
      src/views/boilerSys/steamHeating/steamHeatingDetails.vue

BIN
src/assets/images/steamHeating.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 MiB

120
src/views/boilerSys/steamHeating/components/lineChildren.vue

@ -0,0 +1,120 @@
<template>
<div class="line-container">
<!-- 第一个圆点 -->
<div class="dot dot-start"></div>
<!-- 第一条直线 -->
<div
class="line line1"
:style="{
transform: `rotate(${angle1}deg)`,
width: lineWidth1Rem + 'rem'
}"
></div>
<!-- 中间圆点 -->
<div
class="dot dot-mid"
:style="{
top: (1 + Math.sin((angle1 * Math.PI) / 180) * lineWidth1Rem - 0.025) + 'rem',
left: (1 + Math.cos((angle1 * Math.PI) / 180) * lineWidth1Rem - 0.025) + 'rem'
}"
></div>
<!-- 第二条直线 -->
<div
class="line line2"
:style="{
top: (1 + Math.sin((angle1 * Math.PI) / 180) * lineWidth1Rem) + 'rem',
left: (1 + Math.cos((angle1 * Math.PI) / 180) * lineWidth1Rem) + 'rem',
transform: `rotate(${angle2}deg)`,
width: lineWidth2Rem + 'rem'
}"
></div>
<!-- 最后一个圆点 -->
<div
class="dot dot-end"
:style="{
top: endDotTop + 'rem',
left: endDotLeft + 'rem'
}"
></div>
</div>
</template>
<script>
export default {
props: {
// 线
angle1: {
type: Number,
default: 0
},
// 线
angle2: {
type: Number,
default: 0
},
// 线px
lineWidth1: {
type: Number,
default: 100
},
// 线px
lineWidth2: {
type: Number,
default: 100
}
},
computed: {
lineWidth1Rem() {
return this.lineWidth1 / 100;
},
lineWidth2Rem() {
return this.lineWidth2 / 100;
},
endDotTop() {
// 线 y
const firstLineEndY = 1 + Math.sin((this.angle1 * Math.PI) / 180) * this.lineWidth1Rem;
// 线线 y
const secondLineYOffset = Math.sin((this.angle2 * Math.PI) / 180) * this.lineWidth2Rem;
return firstLineEndY + secondLineYOffset - 0.025;
},
endDotLeft() {
// 线 x
const firstLineEndX = 1 + Math.cos((this.angle1 * Math.PI) / 180) * this.lineWidth1Rem;
// 线线 x
const secondLineXOffset = Math.cos((this.angle2 * Math.PI) / 180) * this.lineWidth2Rem;
return firstLineEndX + secondLineXOffset - 0.025;
}
}
};
</script>
<style scoped>
.line-container {
position: relative;
}
.line {
position: absolute;
height: 1px;
background-color: rgba(0, 255, 255, 0.5);
transform-origin: left center;
}
.line1 {
top: 1rem;
left: 1rem;
}
.dot {
position: absolute;
width: 0.05rem;
height: 0.05rem;
background-color: aqua;
border-radius: 50%;
}
.dot-start {
top: 0.97rem;
left: 0.97rem;
}
</style>

1154
src/views/boilerSys/steamHeating/steamHeatingDetails.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save