1
0

index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <div style="padding: 0px 35px; display: flex; justify-content: space-between">
  3. <div>
  4. <border-panel height="310px" style="margin-bottom: 6px" title="高层建筑统计" @click="openBasicModal">
  5. <BuildNum :list="gcjztjList" :qy="qy" v-if="gcjztjList && gcjztjList.length > 0" />
  6. </border-panel>
  7. <border-panel height="320px" style="margin-bottom: 6px" title="年代分布统计">
  8. <ChronologicDistributionStatistics :list="NdfbtjList" v-if="NdfbtjList && NdfbtjList.length > 0" />
  9. </border-panel>
  10. <border-panel height="310px" title="高度分布统计">
  11. <HeightDistribution :list="gdfbtjList" v-if="gdfbtjList && gdfbtjList.length > 0" />
  12. </border-panel>
  13. </div>
  14. <div>
  15. <div style="
  16. width: 900px;
  17. height: 1000px;
  18. position: relative;
  19. display: flex;
  20. padding-top: 150px;
  21. "
  22. >
  23. <MapCharts :qx="qy" @selectArea="area => qy = area" />
  24. <div style="position: absolute; width: 500px; top: 10px; left: -20px">
  25. <SearchBox :area.sync="qy"/>
  26. </div>
  27. </div>
  28. </div>
  29. <div>
  30. <border-panel height="521px" style="margin-bottom: 6px" title="区域分布">
  31. <Regional :list="qyfbList" :qx="qy" v-if="qyfbList && qyfbList.length > 0" />
  32. </border-panel>
  33. <border-panel height="421px" style="margin-bottom: 6px" title="建筑统计">
  34. <BuildingStatistics
  35. :list="jztjList"
  36. v-if="jztjList && jztjList.length > 0"
  37. />
  38. </border-panel>
  39. </div>
  40. <basic-modal top="120px" ref="basicInfoModal" name="高层基础信息">
  41. <jcxxCont :qy="qy" />
  42. </basic-modal>
  43. </div>
  44. </template>
  45. <script>
  46. import BuildNum from "./components/BuildNum.vue";
  47. import Regional from "./components/Regional.vue";
  48. import BuildingStatistics from "./components/BuildingStatistics.vue";
  49. import HeightDistribution from "./components/HeightDistribution.vue";
  50. import ChronologicDistributionStatistics from "./components/ChronologicDistributionStatistics.vue";
  51. import MapCharts from "../Home/components/MapCharts.vue";
  52. import SearchBox from "@/components/SearchBox.vue";
  53. import jcxxCont from "./components/jcxxCont.vue";
  54. import {
  55. toFirst
  56. } from '../../utils'
  57. import {
  58. getJztj,
  59. getQyfbList,
  60. getNdfbtj,
  61. getGcjztj,
  62. getGdfbtj,
  63. } from "@/api/basicInfor.js";
  64. // import { getQyfbList } from "@/api/basicInfor.js";
  65. // import { getNdfbtj } from "@/api/basicInfor.js";
  66. // import { getGcjztj } from "@/api/basicInfor.js";
  67. // import { getGdfbtj } from "@/api/basicInfor.js";
  68. export default {
  69. name: "BasicPage",
  70. components: {
  71. BuildNum,
  72. Regional,
  73. BuildingStatistics,
  74. HeightDistribution,
  75. ChronologicDistributionStatistics,
  76. MapCharts,
  77. SearchBox,
  78. jcxxCont
  79. },
  80. data() {
  81. return {
  82. qy: "重庆市",
  83. params: {
  84. pageSize: 100,
  85. pageNum: 1,
  86. },
  87. jztjList: [],
  88. qyfbList: [],
  89. NdfbtjList: [],
  90. gcjztjList: [],
  91. gdfbtjList: [],
  92. };
  93. },
  94. watch: {
  95. qy() {
  96. this.getList();
  97. },
  98. },
  99. methods: {
  100. openBasicModal() {
  101. this.showModal("basicInfoModal");
  102. },
  103. getList() {
  104. getJztj({
  105. ...this.params,
  106. qx: this.qy === "重庆市" ? "" : this.qy
  107. }).then(
  108. (res) => {
  109. this.jztjList = res.data.rows;
  110. }
  111. );
  112. getQyfbList({
  113. ...this.params,
  114. }).then((res) => {
  115. const data = res.data.rows.map(item => ({
  116. ...item,
  117. isActive: item.qx === this.qy
  118. }));
  119. this.qyfbList = toFirst(data, this.qy, 'qx')
  120. });
  121. getNdfbtj({
  122. ...this.params,
  123. qx: this.qy === "重庆市" ? "" : this.qy,
  124. }).then((res) => {
  125. this.NdfbtjList = res.data.rows;
  126. });
  127. getGcjztj({
  128. ...this.params,
  129. qx: this.qy === "重庆市" ? "" : this.qy,
  130. }).then((res) => {
  131. this.gcjztjList = res.data.rows;
  132. });
  133. getGdfbtj({
  134. ...this.params,
  135. pageSize: 1000,
  136. qx: this.qy === "重庆市" ? "" : this.qy,
  137. }).then((res) => {
  138. this.gdfbtjList = res.data.rows;
  139. });
  140. },
  141. },
  142. created() {
  143. this.getList();
  144. },
  145. };
  146. </script>
  147. <style scoped lang="less"></style>