| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 | <template>  <view style="width: 100%; height: 100%">   <div class="ventilate" id="topPic">            <!-- 进风箭头 -->            <div :class="nowfengji == '2'?'arrow1':nowfengji == '1'?'arrow1-fan1':''" id="arrow1"></div>            <div :class="nowfengji == '2'?'arrow2':nowfengji == '1'?'arrow2-fan1':''" id="arrow2"></div>            <div :class="nowfengji == '2'?'arrow3':nowfengji == '1'?'arrow3-fan1':''" id="arrow3"></div>            <div :class="nowfengji == '2'?'arrow4':nowfengji == '1'?'arrow4-fan1':''" id="arrow4"></div>            <div :class="nowfengji == '2'?'arrow5':nowfengji == '1'?'arrow5-fan1':''" id="arrow5"></div>            <div :class="nowfengji == '2'?'arrow6':nowfengji == '1'?'arrow6-fan1':''" id="arrow6"></div>            <div :class="nowfengji == '2'?'arrow7':nowfengji == '1'?'arrow7-fan1':''" id="arrow7"></div>            <div :class="nowfengji == '2'?'arrow8':nowfengji == '1'?'arrow8-fan1':''" id="arrow8"></div>            <div :class="nowfengji == '2'?'arrow9':nowfengji == '1'?'arrow9-fan1':''" id="arrow9"></div>            <div :class="nowfengji == '2'?'arrow10':nowfengji == '1'?'arrow10-fan1':''" id="arrow10"></div>                     <div style="top:14%;left:18%" v-if="nowfengji == '1'" class="devfan1"></div>           <div style="top:14%;left:27.5%" v-if="nowfengji == '1'" class="devfan1"></div>           <div style="bottom:13%;left:18%" v-if="nowfengji == '2'" class="devfan1"></div>           <div style="bottom:13%;left:27.5%" v-if="nowfengji == '2'" class="devfan1"></div>            <div style="top:3%;left:9%"  class="state1" v-if="nowfengji == '1'" >运行</div>            <div style="top:3%;left:9%"  class="state2" v-else>停止</div>                        <div style="top:3%;left:34%"  class="state1" v-if="nowfengji == '1'" >运行</div>            <div style="top:3%;left:34%"  class="state2" v-else>停止</div>                        <div style="bottom:25%;left:9%"  class="state1" v-if="nowfengji == '2'" >运行</div>            <div style="bottom:25%;left:9%"  class="state2" v-else>停止</div>                        <div style="bottom:25%;left:34%"  class="state1" v-if="nowfengji == '2'" >运行</div>            <div style="bottom:25%;left:34%"  class="state2" v-else>停止</div>           <div style="top:17%;right:41%"  class="textshow">主风机</div>           <div style="bottom:15%;right:41%"  class="textshow">备风机</div>                      <div style="top:32%;left:6%"  class="textshow2">前级电机</div>           <div style="top:32%;left:34%"  class="textshow2">后级电机</div>           <div style="bottom:-2%;left:6%"  class="textshow2">前级电机</div>           <div style="bottom:-2%;left:34%"  class="textshow2">后级风机</div>    </div>  </view></template><script>export default {  data() {    return {      nowfengji: ""    };  },  props: {    mainFanText: {      type: String,      default: "主风机",    },    subFanText: {      type: String,      default: "备风机",    },	fan1State: {      type: String,      default: "",    },	fan2State: {      type: String,      default: "",    },  },  methods: {	  	      setnowfengji(val) {	        if (this.nowfengji != val) {	          this.nowfengji = val;	          this.setFengjiDonghua();	        }	      },	      setFengjiDonghua() {	        if (this.nowfengji == "2") {	        } else if (this.nowfengji == "1") {	        } else {	        }	      },		  setNowStart(){			  		  if(this.fan1State=="1"){			  			  this.nowfengji = "1"			  		  }			  		  else if(this.fan2State=="1"){			  			  this.nowfengji = "2"			  		  }			  		  else{			  			  this.nowfengji = ""			  		  }		  }  },  watch:{	  fan1State(val){		  this.setNowStart()	  },	  fan2State(val){		  this.setNowStart()	  }  },  onLoad(query) {    this.setFengjiDonghua();	},};</script><style scoped>div.ventilate {  width: 100%;  height:200px;  min-height: 200px;  min-width: 300px;  background-image: url(/static/fan/fan.png);  background-size: 100% 100%;  perspective: 800px;}.state1{  position: absolute;  z-index: 2;  width:8%;  height: 14px;  padding-bottom: 5px;  padding-left: 3px;  background-color: rgba(78, 155, 1, 0.438);  border:none;  color: rgb(255, 255, 255);  font-size: 12px;}.state2{  position: absolute;  z-index: 2;  width:8%;  height: 14px;  padding-bottom: 5px;  padding-left: 3px;  background-color: rgba(167, 42, 11, 0.5);  border:none;  color: rgb(206, 206, 212);  font-size: 12px;}.textshow{  position: absolute;  z-index: 2;  color: rgb(20, 19, 19);  font-size: 16px;}.textshow2{  position: absolute;  z-index: 2;  color: rgb(100, 106, 136);  font-size: 14px;}.devfan1,.devfan2{  position: absolute !important;  z-index: 2;  min-width: 20px;  min-height: 20px;  height: 22px;  width:22px;  background-image: url(/static/fan/devFan.png);  background-size: 100% 100%;}.devfan1 {  position: relative;  animation: rotate1 3s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: rotate1 3s infinite linear;}@keyframes rotate1 {  0% {    -webkit-transform: rotate(0deg);    opacity:1;  }  100% {    -webkit-transform: rotate(360deg);    opacity: 1;  }}div.arrow1,div.arrow2,div.arrow3,div.arrow4,div.arrow5,div.arrow6,div.arrow7,div.arrow8,div.arrow9,div.arrow10,div.arrow1-fan1,div.arrow2-fan1,div.arrow3-fan1,div.arrow4-fan1,div.arrow5-fan1,div.arrow6-fan1,div.arrow7-fan1,div.arrow8-fan1,div.arrow9-fan1,div.arrow10-fan1 {  position: absolute;  right: 40px;  opacity: 0;  top: 96px;  width: 30px;  height: 15px;  box-sizing: border-box;  float: right;  z-index: 1;  transition: all 2s ease;  background-image: url(/static/fan/arrow-in.png);  background-size: 100% 100%;}</style><style scoped>.arrow1 {  position: relative;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;}@keyframes myfirst1 {  0% {    left: -5%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 0;  }  3% {    left: 0%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  71% {    left: 75%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  72% {    left: 76%;    top: 78%;    -webkit-transform: rotate(135deg);    opacity: 1;  }  85% {    left: 85%;    top: 53%;    -webkit-transform: rotate(135deg);    opacity: 1;  }  86% {    left: 86%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  99% {    left: 99%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  100% {    left: 100%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 0;  }}@-webkit-keyframes myfirst1 /* Safari 和 Chrome */ {  0% {    left: -5%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 0;  }  3% {    left: 0%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  71% {    left: 75%;    top: 80%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  72% {    left: 76%;    top: 78%;    -webkit-transform: rotate(135deg);    opacity: 1;  }  85% {    left: 85%;    top: 53%;    -webkit-transform: rotate(135deg);    opacity: 1;  }  86% {    left: 86%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  99% {    left: 99%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  100% {    left: 100%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 0;  }}.arrow2 {  position: relative;  animation-delay: -18s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -18s;}.arrow3 {  position: relative;  animation-delay: -16s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -16s;}.arrow4 {  position: relative;  animation-delay: -14s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -14s;}.arrow5 {  position: relative;  animation-delay: -12s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -12s;}.arrow6 {  position: relative;  animation-delay: -10s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -10s;}.arrow7 {  position: relative;  animation-delay: -8s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -8s;}.arrow8 {  position: relative;  animation-delay: -6s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -6s;}.arrow9 {  position: relative;  animation-delay: -4s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -4s;}.arrow10 {  position: relative;  animation-delay: -2s;  animation: myfirst1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1 20s infinite linear;  -webkit-animation-delay: -2s;}</style><style scoped>.arrow1-fan1 {  position: relative;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;}@keyframes myfirst1-fan1 {  0% {    left: -5%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 0;  }  3% {    left: 0%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  71% {    left: 75%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  72% {    left: 76%;    top: 22%;    -webkit-transform: rotate(225deg);    opacity: 1;  }  85% {    left: 85%;    top: 47%;    -webkit-transform: rotate(225deg);    opacity: 1;  }  86% {    left: 86%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  99% {    left: 99%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  100% {    left: 100%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 0;  }}@-webkit-keyframes myfirst1-fan1 /* Safari 和 Chrome */ {  0% {    left: -5%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 0;  }  3% {    left: 0%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  71% {    left: 75%;    top: 20%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  72% {    left: 76%;    top: 22%;    -webkit-transform: rotate(225deg);    opacity: 1;  }  85% {    left: 85%;    top: 47%;    -webkit-transform: rotate(225deg);    opacity: 1;  }  86% {    left: 86%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  99% {    left: 99%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 1;  }  100% {    left: 100%;    top: 50%;    -webkit-transform: rotate(180deg);    opacity: 0;  }}.arrow2-fan1 {  position: relative;  animation-delay: -18s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -18s;}.arrow3-fan1 {  position: relative;  animation-delay: -16s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -16s;}.arrow4-fan1 {  position: relative;  animation-delay: -14s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -14s;}.arrow5-fan1 {  position: relative;  animation-delay: -12s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -12s;}.arrow6-fan1 {  position: relative;  animation-delay: -10s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -10s;}.arrow7-fan1 {  position: relative;  animation-delay: -8s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -8s;}.arrow8-fan1 {  position: relative;  animation-delay: -6s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -6s;}.arrow9-fan1 {  position: relative;  animation-delay: -4s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -4s;}.arrow10-fan1 {  position: relative;  animation-delay: -2s;  animation: myfirst1-fan1 20s infinite linear;  /* Safari 和 Chrome */  -webkit-animation: myfirst1-fan1 20s infinite linear;  -webkit-animation-delay: -2s;}</style>
 |