123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <template>
- <div class="emulsion common-card">
- <h4>乳液自动化配比</h4>
- <div class="equipment">
- <div class="enter">
- <span>纯水入口</span>
- <div class="block"></div>
- </div>
- <div class="water-box common-box">
- <span class="title">纯水箱</span>
- <div class="box-wrap">
- <span>120</span>
- <span>90</span>
- <span>60</span>
- <span>30</span>
- <div class="box" :style="{height: `${waterLevel.water / 1.5}%`}"></div>
- </div>
- </div>
- <div class="enter" style="position: absolute; width: 350px; bottom: 0; left: 184px">
- <span>水泵</span>
- <div class="block"></div>
- </div>
- <div class="oil-box common-box">
- <span class="title">油箱</span>
- <div class="box-wrap">
- <span>120</span>
- <span>90</span>
- <span>60</span>
- <span>30</span>
- <div class="box" :style="{height: `${waterLevel.oil / 1.5}%`}"></div>
- </div>
- </div>
- <div class="enter" style="width: 200px; justify-content: center;">
- <div class="block"></div>
- </div>
- <div class="liquid-box common-box">
- <span class="title">液箱</span>
- <div class="box-wrap">
- <span>120</span>
- <span>90</span>
- <span>60</span>
- <span>30</span>
- <div class="box" :style="{height: `${waterLevel.liquid / 1.5}%`}"></div>
- </div>
- </div>
- <img class="first fan" src="~@/assets/img/fan.png" alt="">
- <img class="second fan" src="~@/assets/img/fan.png" alt="">
- </div>
- <div class="data">
- <span>水箱水位<span style="color: orange;">{{ waterLevel.water }}</span>cm</span>
- <span>油箱油位<span style="color: orange;">{{ waterLevel.oil }}</span>cm</span>
- <span>液总用量 ? cm</span>
- <span>液流量 ? cm</span>
- <span>液位<span style="color: orange;">{{ waterLevel.liquid }}</span>cm</span>
- <span>液流量 ? cm</span>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- waterLevel: {
- water: 150,
- oil: 30,
- liquid: 70
- }
- }
- },
- created() {
- this.getdata()
- },
- methods: {
- getdata(){
- this.axios
- .get(
- "http://10.170.51.43:8082/hbase/getMpInfoByHbaseTablename/?hbasetablename=end"
- )
- .then((res) => {
-
- this.waterLevel.water = res.data[0].shuiwei;
- this.waterLevel.oil = res.data[0].youxiang;
- this.waterLevel.liquid = res.data[0].yexiang;
- console.log(this.waterLevel)
-
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .emulsion {
- color: rgb(0, 0, 0);
- margin: 10px;
- position: relative;
- h4 {
- margin: 10px 0;
- }
- .equipment {
- display: flex;
- position: relative;
- .enter {
- display: flex;
- flex-flow: column;
- justify-content: flex-end;
- span {
- padding: 0 10px;
- }
- .block {
- background-color: rgba(105, 90, 205, 0.466);
- height: 20px;
- width: 100%;
- }
- }
- .common-box {
- display: flex;
- flex-flow: column nowrap;
- .title {
- text-align: center;
- }
- .box-wrap {
- background-image: linear-gradient(to right, #ffffff50, #0000005e, #ffffff50);
- width: 100px;
- display: flex;
- flex-flow: column;
- justify-content: space-evenly;
- position: relative;
- height: 150px;
- span {
- margin-left: 10px;
- }
- .box {
- position: absolute;
- width: 100%;
- height: 20px;
- background-color: rgba($color: blue, $alpha: .5);
- bottom: 0;
- }
- }
- }
- .water-box {
- .box-wrap {
- height: 150px;
- .box {
- background-color: rgba($color: blue, $alpha: .5);
- }
- }
- }
- .oil-box {
- margin-left: 50px;
- .box-wrap {
- height: 100px;
- .box {
- background-color: rgba($color: yellow, $alpha: .5);
- }
- }
- }
- .liquid-box {
- .box-wrap {
- height: 150px;
- .box {
- background-color: rgba($color: yellow, $alpha: .5);
- }
- }
- }
- .fan {
- position: absolute;
- height: 40px;
- background-color: rgb(255, 255, 255);
- border-radius: 50%;
- left: 300px;
- animation: turn 3s linear infinite;
- }
- .fan.first {
- left: 300px;
- bottom: -10px;
- }
- .fan.second {
- left: 420px;
- top: 65px;
- }
- }
- .data {
- display: flex;
- justify-content: space-between;
- font-size: 12px;
- margin-top: 20px;
- }
- }
- @keyframes turn {
- 0% {
- transform: rotate(0);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- </style>
|