PepoleStatus.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <div id="pepoleStatusPage">
  3. <img src="../../assets/png/yq_background.png" class="yq_background_img" />
  4. <div class="czrk_name">常住人口</div>
  5. <div class="czrk_num">{{czrk.num}}</div>
  6. <img src="../../assets/png/yq_background.png" class="yq_background_img1" />
  7. <div class="ldrk_name">流动人口</div>
  8. <div class="ldrk_num">{{ldrk.num}}</div>
  9. <ThreeDCharts3 :tdata="dd"></ThreeDCharts3>
  10. </div>
  11. </template>
  12. <script>
  13. import ThreeDCharts3 from "../Utils/ThreeDCharts3.vue"
  14. export default {
  15. name: 'PepoleStatusPage',
  16. props: ["pdata"],
  17. components: {
  18. ThreeDCharts3
  19. },
  20. data() {
  21. return {
  22. czrk: 0,
  23. ldrk: 0,
  24. dd:{}
  25. }
  26. },
  27. watch:{
  28. pdata(newVal,oldVal) {
  29. this.init(newVal);
  30. }
  31. },
  32. mounted() {
  33. this.init(this.pdata);
  34. },
  35. methods: {
  36. init(value){
  37. let clear = setInterval(() => {
  38. if ( value) {
  39. this.dd=value
  40. console.log("this.pdata",value)
  41. // this.population = this.$store.getters.getDaZhongdata.data.population
  42. this.czrk = value.filter(result => result.name == '常住人口')[0];
  43. this.ldrk = value.filter(result => result.name == '流动人口')[0];
  44. clearInterval(clear)
  45. }
  46. }, 500);
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped>
  52. .czrk_name {
  53. position: absolute;
  54. color: rgb(4, 185, 202);
  55. font-weight: bold;
  56. left: 18%;
  57. top: 8%
  58. }
  59. .czrk_num {
  60. position: absolute;
  61. left: 18%;
  62. top: 12%;
  63. color: rgb(250, 207, 44);
  64. font-size: 25px;
  65. font-weight: bold;
  66. }
  67. .ldrk_name {
  68. position: absolute;
  69. color: rgb(4, 185, 202);
  70. font-weight: bold;
  71. left: 68%;
  72. top: 8%
  73. }
  74. .ldrk_num {
  75. position: absolute;
  76. left: 70%;
  77. top: 12%;
  78. font-size: 25px;
  79. color: rgb(250, 207, 44);
  80. font-weight: bold;
  81. }
  82. .yq_background_img {
  83. position: absolute;
  84. width: 30%;
  85. left: 10%;
  86. top: 5%
  87. }
  88. .yq_background_img1 {
  89. position: absolute;
  90. width: 30%;
  91. left: 60%;
  92. top: 5%
  93. }
  94. .font {
  95. position: absolute;
  96. font-size: 10px;
  97. }
  98. .row {
  99. display: flex;
  100. align-items: center;
  101. width: 100%;
  102. height: 5%;
  103. }
  104. #pepoleStatusPage {
  105. position: absolute;
  106. width: 100%;
  107. height: 43%;
  108. /* background-color: rgb(48,115,248,0.1); */
  109. top: 36%;
  110. z-index: 2;
  111. color: rgb(255, 255, 255);
  112. }
  113. .num1 {
  114. position: absolute;
  115. width: 5%;
  116. left: 15%;
  117. font-size: 10px;
  118. }
  119. .num2 {
  120. position: absolute;
  121. left: 42%;
  122. width: 10%;
  123. font-size: 10px;
  124. }
  125. .num3 {
  126. position: absolute;
  127. left: 84%;
  128. width: 10%;
  129. font-size: 10px;
  130. }
  131. .progress_both {
  132. left: 52%;
  133. top: 2%;
  134. /* position: absolute; */
  135. width: 30%;
  136. height: 5px;
  137. }
  138. .progress_container0 {
  139. right: 62%;
  140. position: absolute;
  141. width: 15%;
  142. height: 5px;
  143. background-color: rgb(48, 115, 248);
  144. }
  145. .progress_container1 {
  146. position: absolute;
  147. width: 30%;
  148. left: 52%;
  149. height: 5px;
  150. background-color: rgb(55, 179, 163);
  151. }
  152. .progress_container2 {
  153. position: absolute;
  154. width: 10%;
  155. height: 5px;
  156. left: 52%;
  157. background-color: rgb(245, 199, 49);
  158. }
  159. </style>