windrectAnimate.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view style="width: 100%; height: 100%">
  3. <div class="checkwind-echarts-div" v-if="type == 'windrect_rect'">
  4. <div class="checkwind">
  5. <div class="sub_line" v-bind:class="state == '0'? 'top_state' : state == '1' ? 'middle_state' : state == '2' ? 'bottom_state' : 'bottom_state' " id="subline">
  6. </div>
  7. </div>
  8. <span>{{title}}</span>
  9. </div>
  10. <div class="checkwind-echarts-div" v-if="type == 'windrect_ds'">
  11. <div class="checkwind_ds">
  12. <div
  13. class="sub_line"
  14. v-bind:class="
  15. state == '0'
  16. ? 'top_state'
  17. : state == '1'
  18. ? 'middle_state'
  19. : state == '2'
  20. ? 'bottom_state'
  21. : 'bottom_state'
  22. "
  23. id="subline"
  24. ></div>
  25. <div
  26. class="sub_line1"
  27. v-bind:class="
  28. state == '0'
  29. ? 'top_state1'
  30. : state == '1'
  31. ? 'middle_state1'
  32. : state == '2'
  33. ? 'bottom_state1'
  34. : 'bottom_state1'
  35. "
  36. id="subline1"
  37. ></div>
  38. <div
  39. class="sub_line2"
  40. v-bind:class="
  41. state == '0'
  42. ? 'top_state2'
  43. : state == '1'
  44. ? 'middle_state2'
  45. : state == '2'
  46. ? 'bottom_state2'
  47. : 'bottom_state2'
  48. "
  49. id="subline2"
  50. ></div>
  51. </div>
  52. <span>{{ title }}</span>
  53. </div>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. height: "200px",
  61. };
  62. },
  63. props: [
  64. "state",
  65. "title",
  66. "height",
  67. "type",
  68. ],
  69. methods: {},
  70. onLoad(query) {},
  71. };
  72. </script>
  73. <style scoped>
  74. /*门里面*/
  75. div.checkwind{
  76. width: 160px;
  77. height: 160px;
  78. background-image: url(../../../../static/wind.png);
  79. background-size:100% 100%;
  80. perspective: 800px;
  81. }
  82. /*左门/右门*/
  83. div.checkwind .sub_line{
  84. margin-top: 10px;
  85. margin-left: 10px;
  86. width:142px;
  87. height:30px;
  88. box-sizing:border-box;
  89. float:left;
  90. z-index: 1;
  91. transition:all 2s ease;
  92. background-image: url(../../../../static/line.png) ;
  93. background-size:100% 100%;
  94. }
  95. div.checkwind .sub_line{
  96. transform-origin:left center;
  97. border-right:1px solid rgb(8, 8, 8);
  98. }
  99. .checkwind .top_state{
  100. transform: translateY(5px);
  101. }
  102. .checkwind .middle_state{
  103. transform: translateY(45px);
  104. }
  105. .checkwind .bottom_state{
  106. transform: translateY(90px);
  107. }
  108. </style>
  109. <style scoped>
  110. /*门里面*/
  111. div.checkwind_ds {
  112. width: 160px;
  113. height: 160px;
  114. background-image: url(../../../../static/wind.png);
  115. background-size: 100% 100%;
  116. perspective: 800px;
  117. }
  118. /*左门/右门*/
  119. div.checkwind_ds .sub_line {
  120. margin-top: 10px;
  121. margin-left: 8px;
  122. width: 180px;
  123. height: 25px;
  124. box-sizing: border-box;
  125. float: left;
  126. z-index: 1;
  127. transition: all 2s ease;
  128. background-image: url(../../../../static/line_ds.png);
  129. background-size: 100% 100%;
  130. }
  131. div.checkwind_ds .sub_line1 {
  132. position: absolute;
  133. top: 20px;
  134. left: 12px;
  135. width: 30px;
  136. height: 35px;
  137. box-sizing: border-box;
  138. z-index: 4;
  139. transition: all 2s ease;
  140. background-image: url(../../../../static/wind_ds1.png);
  141. background-size: 100% 100%;
  142. }
  143. div.checkwind_ds .sub_line2 {
  144. position: absolute;
  145. top: 12px;
  146. right: 12px;
  147. width: 33px;
  148. height: 38px;
  149. box-sizing: border-box;
  150. z-index: 4;
  151. transition: all 2s ease;
  152. background-image: url(../../../../static/wind_ds2.png);
  153. background-size: 100% 100%;
  154. }
  155. div.checkwind_ds .sub_line {
  156. transform-origin: left center;
  157. border-right: 1px solid rgb(8, 8, 8);
  158. }
  159. .checkwind_ds .top_state {
  160. transform: translateY(15px) rotateY(-40deg);
  161. /* transform: rotateY(-20deg) */
  162. }
  163. .checkwind_ds .middle_state {
  164. transform: translateY(45px) rotateY(0deg) scaleX(0.83);
  165. }
  166. .checkwind_ds .bottom_state {
  167. transform: translateY(80px);
  168. }
  169. .checkwind_ds .top_state1 {
  170. transform: translateY(0px);
  171. /* transform: rotateY(-20deg) */
  172. }
  173. .checkwind_ds .middle_state1 {
  174. transform: translateY(30px);
  175. }
  176. .checkwind_ds .bottom_state1 {
  177. transform: translateY(65px);
  178. }
  179. .checkwind_ds .top_state2 {
  180. transform: translateY(0px);
  181. /* transform: rotateY(-20deg) */
  182. }
  183. .checkwind_ds .middle_state2 {
  184. transform: translateY(35px);
  185. }
  186. .checkwind_ds .bottom_state2 {
  187. transform: translateY(72px);
  188. }
  189. </style>