windrectAnimate.vue 4.3 KB

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