newRecord.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <el-dialog title="" :visible.sync="toperInfo.dialogVisible" :close-on-click-modal="false">
  3. <div class="eggContainer">
  4. <div class="eggBg">
  5. <div class="toper">
  6. <img :src="toperInfo.toper.Head" alt="" v-if="toperInfo.toper.Head"
  7. :class="[{'boy':toperInfo.toper.Sex == 1},{'girl':toperInfo.toper.Sex == 2}]">
  8. <img src="../static/img/people/flyhead.png" alt="" v-if="!toperInfo.toper.Head"
  9. :class="[{'boy':toperInfo.toper.Sex == 1},{'girl':toperInfo.toper.Sex == 2}]">
  10. <span class="names">{{ toperInfo.toper.UserName }}</span>
  11. </div>
  12. <div class="info">
  13. <div class="type">
  14. CK
  15. </div>
  16. <div class="detail">
  17. <em>{{ toperInfo.toper.Ck|fmtFloat }}</em>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </el-dialog>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. dialogTableVisible: true,
  29. dialogFormVisible: false,
  30. };
  31. },
  32. props: ['toperInfo'],
  33. filters: {
  34. fmtNum(val) {
  35. if (val == 0) {
  36. return '--'
  37. } else {
  38. if (parseInt(val) < 0) return 0;
  39. if (parseInt(val) > 0) return val
  40. }
  41. },
  42. fmtFloat(val) {
  43. if (val == 0) {
  44. return '0'
  45. } else {
  46. return parseFloat(val).toFixed(1);
  47. }
  48. },
  49. fmtInt(val) {
  50. if (val == 0) {
  51. return '0'
  52. } else {
  53. return parseInt(val);
  54. }
  55. },
  56. },
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. @mixin cube {
  61. width: 100%;
  62. overflow: hidden;
  63. display: block;
  64. margin: 0 auto;
  65. }
  66. /*成就彩蛋*/
  67. /deep/ .el-dialog {
  68. @include cube;
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. right: 0;
  73. bottom: 0;
  74. width: 6.5rem;
  75. //background: url("../assets/imgs/newRecord/bg.svg");
  76. background: url("../assets/imgs/newRecord/newRecordBg.svg");
  77. background-position: top center;
  78. background-repeat: no-repeat;
  79. background-size: 100% 100%;
  80. box-shadow: none;
  81. background-color: transparent;
  82. margin-top: 0 !important;
  83. }
  84. .eggContainer {
  85. @include cube;
  86. .eggBg {
  87. @include cube;
  88. //background: url("../assets/imgs/newRecord/bg.svg");
  89. padding-left: 5%;
  90. background-position: top center;
  91. background-repeat: no-repeat;
  92. background-size: 100%;
  93. margin-top: 30%;
  94. overflow: visible;
  95. .toper {
  96. @include cube;
  97. position: relative;
  98. top: -50%;
  99. img {
  100. @include cube;
  101. width: 2.5rem;
  102. border-radius: 250rem;
  103. &.girl {
  104. border: 2px solid #EA26EA;
  105. }
  106. &.boy {
  107. border: 2px solid #39B6FF;
  108. }
  109. }
  110. .names {
  111. @include cube;
  112. width: 2rem;
  113. height: 0.4rem;
  114. background: rgba(0, 0, 0, 0.7);
  115. font-size: 0.3rem;
  116. text-align: center;
  117. border-radius: 250rem;
  118. position: relative;
  119. bottom: 0.4rem;
  120. color: #fff;
  121. line-height: 0.4rem;
  122. }
  123. }
  124. }
  125. .type {
  126. height: 2rem;
  127. color: white;
  128. font-weight: bold;
  129. font-size: 0.8rem;
  130. line-height: 2rem;
  131. margin-top: 0.6rem;
  132. }
  133. .info {
  134. @include cube;
  135. em {
  136. @include cube;
  137. font-weight: bold;
  138. font-size: 1.1rem;
  139. text-align: center;
  140. font-family: "Arial";
  141. color: #b5000f;
  142. text-shadow: 0px 4px 8px #fff;
  143. font-style: normal !important;
  144. text-decoration: none;
  145. margin-top: 0;
  146. }
  147. }
  148. }
  149. </style>