PersonStatusPage.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <div id="personStatusPage" >
  3. <!-- <div id="head">
  4. <div class="font">流动人口</div>
  5. <div class="font">户数</div>
  6. <div class="font">人数</div>
  7. <div></div>
  8. <div></div>
  9. <div></div>
  10. </div> -->
  11. <div id="row" v-for="(floatPeople,name,household,people) in population">
  12. <td id="num1">{{floatPeople}}</td>
  13. <td>
  14. <div id="progress_container0">
  15. </div>
  16. </td>
  17. <td id="num2">
  18. {{name}}
  19. </td>
  20. <td>
  21. <div id="progress_both">
  22. <div id="progress_container1">
  23. </div>
  24. <div id="progress_container2"></div>
  25. </div>
  26. </td>
  27. <td id="num3">
  28. {{household}}/{{people}}
  29. </td>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. export default {
  35. name: 'PersonStatusPage',
  36. components:{
  37. },
  38. data () {
  39. return {
  40.   population:[ // -- 人口情况
  41.             {
  42.                 name:"大中社区", //社区名称
  43.                 floatPeople:501, //流动人口
  44.                 household:893, //户数
  45.                 people:2200 //人数
  46.             },
  47.         ],
  48. str:""
  49. }
  50. },
  51. mounted(){
  52. this.str=this.population[0].household+"/"+this.population[0].people;
  53. let clear= setInterval(() => {
  54. if(this.$store.getters.getSzdata.code===10000) {
  55. this.population=this.$store.getters.getSzdata.data.population
  56. console.log(this.population)
  57. clearInterval(clear)
  58. }
  59. }, 500);
  60. },
  61. methods:{
  62. }
  63. }
  64. </script>
  65. <style scoped>
  66. .font{
  67. position: absolute;
  68. font-size: 10px;
  69. }
  70. #row{
  71. position: absolute;
  72. width: 100%;
  73. height: 100%;
  74. }
  75. #personStatusPage{
  76. position: absolute;
  77. width: 100%;
  78. height: 43%;
  79. /* background-color: rgb(48,115,248,0.1); */
  80. top:36%
  81. }
  82. #num1{
  83. position: absolute;
  84. width: 5%;
  85. left: 15%;
  86. font-size: 10px;
  87. }
  88. #num2{
  89. position: absolute;
  90. left: 42%;
  91. width: 10%;
  92. font-size: 10px;
  93. }
  94. #num3{
  95. position: absolute;
  96. left: 84%;
  97. width: 10%;
  98. font-size: 10px;
  99. }
  100. #progress_both{
  101. left: 52%;
  102. top:2%;
  103. position: absolute;
  104. width: 30%;
  105. height: 5px;
  106. }
  107. #progress_container0{
  108. left: 25%;
  109. top:2%;
  110. position: absolute;
  111. width: 15%;
  112. height: 5px;
  113. background-color: rgb(48,115,248);
  114. }
  115. #progress_container1{
  116. position: absolute;
  117. width: 100%;
  118. height: 5px;
  119. background-color: rgb(55,179,163);
  120. }
  121. #progress_container2{
  122. position: absolute;
  123. width: 10%;
  124. height: 5px;
  125. background-color: rgb(245,199,49);
  126. }
  127. </style>