LoadingDemo.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <script setup>
  2. import { QingXiCheAndQvMyThreeWorldStore } from "./store/QingXiCheAndQvMyThreeWorldStore.js";
  3. </script>
  4. <template>
  5. <div class="LoadingDemo">
  6. <div class="bgDiv"></div>
  7. <div class="main">
  8. <!-- 加载进度 {{ QingXiCheAndQvMyThreeWorldStore().loadPercentage }} % -->
  9. <!-- <img class="logo" src="../../assets/res/img/main/loading/logo.svg" /> -->
  10. <img class="logo" src="../../assets/res/img/main/loading/logo_2.svg" />
  11. <!-- <div class="logoTxt">市政供水仿真平台</div> -->
  12. <!-- <div class="logoTxt">市政供水仿真平台</div> -->
  13. <div class="loadTxt" >数据加载中Loading...</div>
  14. <div class="loading">
  15. <img class="progressImg" src="../../assets/res/img/main/loading/progress.webp" />
  16. <div class="loadDiv" :style="'width:' + QingXiCheAndQvMyThreeWorldStore().loadPercentage + '%;'" >
  17. <img
  18. :style="
  19. 'width:' + (100 / QingXiCheAndQvMyThreeWorldStore().loadPercentage * 95 )
  20. + '%;left:' + (100 / QingXiCheAndQvMyThreeWorldStore().loadPercentage * 2.5 ) + '%;'
  21. "
  22. class="loadingImg" src="../../assets/res/img/main/loading/loading.webp" />
  23. </div>
  24. <div class="progressTxt" > {{
  25. (
  26. (QingXiCheAndQvMyThreeWorldStore().loadPercentage == "" || QingXiCheAndQvMyThreeWorldStore().loadPercentage == undefined || QingXiCheAndQvMyThreeWorldStore().loadPercentage == 0)
  27. ? "0" : QingXiCheAndQvMyThreeWorldStore().loadPercentage
  28. )
  29. }} % </div>
  30. </div>
  31. </div>
  32. </div>
  33. </template>
  34. <style lang="less" scoped>
  35. .LoadingDemo * {
  36. -moz-user-select: none;
  37. -webkit-user-select: none;
  38. -ms-user-select: none;
  39. -khtml-user-select: none;
  40. user-select: none;
  41. }
  42. .LoadingDemo {
  43. position: fixed;
  44. top: 0px;
  45. left: 0px;
  46. width: 100%;
  47. height: 100%;
  48. z-index: 9;
  49. color: #ffffff;
  50. font-size: 2.1428rem;
  51. // background-image: url("../../assets/res/img/bg.png");
  52. // background-position: center;
  53. // background-size: 100% 100%;
  54. .bgDiv {
  55. position: fixed;
  56. z-index: 0;
  57. width: 100%;
  58. height: 100%;
  59. top: 0px;
  60. left: 0px;
  61. background-color: #061f51;
  62. }
  63. .main {
  64. position: fixed;
  65. z-index: 1;
  66. width: 100%;
  67. height: 100%;
  68. top: 0px;
  69. left: 0px;
  70. // display: flex;
  71. // flex-direction: column;
  72. // justify-content: center;
  73. // align-items: center;
  74. // background: linear-gradient( 164deg, #3A7DC1 0%, rgba(70,148,229,0.61) 39%, rgba(58,125,193,0) 100%), linear-gradient( 197deg, #3A7DC1 0%, rgba(70,148,229,0.63) 63%, rgba(58,125,193,0) 100%);
  75. .logo {
  76. width: 9.7857rem;
  77. left: 50%;
  78. top: 50%;
  79. margin: -10rem 0px 0px -4.89285rem;
  80. position: fixed;
  81. }
  82. .logoTxt {
  83. position: fixed;
  84. width: 100%;
  85. font-size: 2.1rem;
  86. color: #98BDDD;
  87. text-align: center;
  88. top: 50%;
  89. margin: 0.5rem 0px 0px 0px;
  90. }
  91. .loadTxt {
  92. position: fixed;
  93. width: 100%;
  94. text-align: center;
  95. top: 50%;
  96. margin: 9.5rem 0px 0px 0px;
  97. color: #9BC0F6;
  98. font-size: 1.8rem;
  99. font-weight: 400;
  100. }
  101. .loading {
  102. width: 46%;
  103. // height: 1.2857rem;
  104. height: 3.6rem;
  105. position: fixed;
  106. top: 50%;
  107. left: 27%;
  108. margin: 13.5rem 0px 0px 0px;
  109. .progressImg {
  110. position: absolute;
  111. top: 0px;
  112. left: 0px;
  113. width: 100%;
  114. height: 100%;
  115. z-index: 0;
  116. }
  117. // background-image: url("../../assets/res/img/main/loading/progress.svg");
  118. // background-position: center;
  119. // background-size: 100% 100%;
  120. .loadDiv {
  121. position: absolute;
  122. // width: 100%;
  123. width: 0%;
  124. top: 0px;
  125. left: 0px;
  126. height: 100%;
  127. overflow: hidden;
  128. .loadingImg {
  129. position: absolute;
  130. width: 95%;
  131. left: 2.5%;
  132. top: 50%;
  133. height: 0.8rem;
  134. margin: -0.38rem 0px 0px 0px;
  135. }
  136. }
  137. .progressTxt {
  138. color: #9BC0F6;
  139. font-size: 1.5714rem;
  140. position: absolute;
  141. right: 1rem;
  142. top: 3rem;
  143. }
  144. }
  145. }
  146. }
  147. </style>