detailedInfo.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <div
  3. class="ZTGlobal"
  4. style="
  5. width: 100%;
  6. height: 100%;
  7. padding: 1rem 1rem 0rem 1rem;
  8. color: white;
  9. "
  10. >
  11. <el-container style="height: 100%">
  12. <el-header style="height: 4rem">
  13. <el-descriptions v-if="tableData" border size="mini" :column="3">
  14. <el-descriptions-item label="地块编码">{{
  15. tableData.landNo
  16. }}</el-descriptions-item>
  17. <el-descriptions-item label="建筑面积"
  18. >{{ Number(tableData.mj).toFixed(2) }}m<sup
  19. >2</sup
  20. ></el-descriptions-item
  21. >
  22. <el-descriptions-item label="计容面积"
  23. >{{ Number(tableData.jrmj).toFixed(2) }}m<sup
  24. >2</sup
  25. ></el-descriptions-item
  26. >
  27. <el-descriptions-item label="楼栋数量">{{
  28. tableData.buildNum
  29. }}</el-descriptions-item>
  30. <el-descriptions-item label="计算书面积"
  31. >{{ Number(tableData.famj).toFixed(2) }}m<sup
  32. >2</sup
  33. ></el-descriptions-item
  34. >
  35. <el-descriptions-item label="计算书计容面积"
  36. >{{ Number(tableData.fajrmj).toFixed(2) }}m<sup
  37. >2</sup
  38. ></el-descriptions-item
  39. >
  40. <!-- <el-descriptions-item label="机动车位">
  41. {{ ParkData ? ParkData.jdcCount : 0 }}
  42. </el-descriptions-item>
  43. <el-descriptions-item label="非机动车位">{{
  44. ParkData ? ParkData.fjdcCount : 0
  45. }}</el-descriptions-item> -->
  46. </el-descriptions>
  47. <el-empty image="/static/images/ghzc/empty.png" v-if="!tableData" description="未查询到数据"></el-empty>
  48. </el-header>
  49. <el-main>
  50. <el-row :gutter="10" style="height: 100%">
  51. <el-col :span="24" style="height: 100%">
  52. <el-table
  53. v-if="tableData"
  54. :data="tableData.builds"
  55. style="width: 100%; border: 1px solid rgba(15, 122, 200, 0.4)"
  56. height="100%"
  57. size="mini"
  58. >
  59. <el-table-column type="expand">
  60. <template slot-scope="props">
  61. <el-row
  62. :gutter="10"
  63. style="
  64. height: 100%;
  65. margin: 0.5rem;
  66. background-color: rgba(4, 28, 50, 0.6);
  67. "
  68. >
  69. <el-col :span="24" style="height: 100%">
  70. <el-table
  71. :data="props.row.floors"
  72. style="width: 100%"
  73. size="mini"
  74. >
  75. <el-table-column label="楼层" prop="layer">
  76. </el-table-column>
  77. <el-table-column label="计算书计容面积" prop="fajrmj">
  78. <template slot-scope="scope">
  79. {{ Number(scope.row.fajrmj).toFixed(2) }}m<sup
  80. >2</sup
  81. >
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="计算书面积" prop="famj">
  85. <template slot-scope="scope">
  86. {{ Number(scope.row.famj).toFixed(2) }}m<sup>2</sup>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="核算计容面积" prop="jrmj">
  90. <template slot-scope="scope">
  91. {{ Number(scope.row.jrmj).toFixed(2) }}m<sup>2</sup>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="核算建筑面积" prop="mj">
  95. <template slot-scope="scope">
  96. {{ Number(scope.row.mj).toFixed(2) }}m<sup>2</sup>
  97. </template>
  98. </el-table-column>
  99. </el-table>
  100. </el-col>
  101. </el-row>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="楼号" prop="buildNo"> </el-table-column>
  105. <el-table-column label="计算书计容面积" prop="fajrmj">
  106. <template slot-scope="scope">
  107. {{ Number(scope.row.fajrmj).toFixed(2) }}m<sup>2</sup>
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="计算书面积" prop="famj">
  111. <template slot-scope="scope">
  112. {{ Number(scope.row.famj).toFixed(2) }}m<sup>2</sup>
  113. </template>
  114. </el-table-column>
  115. <el-table-column label="楼层数" prop="floorCount">
  116. </el-table-column>
  117. <el-table-column label="核算计容面积" prop="jrmj">
  118. <template slot-scope="scope">
  119. {{ Number(scope.row.jrmj).toFixed(2) }}m<sup>2</sup>
  120. </template>
  121. </el-table-column>
  122. <el-table-column label="核算建筑面积" prop="mj">
  123. <template slot-scope="scope">
  124. {{ Number(scope.row.mj).toFixed(2) }}m<sup>2</sup>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. </el-col>
  129. </el-row>
  130. </el-main>
  131. </el-container>
  132. </div>
  133. </template>
  134. <script>
  135. export default {
  136. data() {
  137. return {
  138. tableData: [],
  139. ParkData: [],
  140. };
  141. },
  142. props: {
  143. info: {
  144. type: Object,
  145. default: () => {
  146. return {};
  147. },
  148. },
  149. layerid: {
  150. type: String,
  151. default: "",
  152. },
  153. lydata: {
  154. type: Object,
  155. default: () => {
  156. return {};
  157. },
  158. },
  159. lyoption: {
  160. type: Object,
  161. default: () => {
  162. return {};
  163. },
  164. },
  165. },
  166. computed: {},
  167. mounted() {
  168. this.init();
  169. },
  170. methods: {
  171. init() {
  172. this.tableData = this.info.infoData;
  173. this.tableData.builds.forEach((item, i) => {
  174. // 1. 分离不同类型的楼层
  175. const rfFloor = item.floors.find((floor) => floor.layer === "RF");
  176. const fFloors = item.floors.filter((floor) =>
  177. floor.layer.startsWith("F")
  178. );
  179. const bFloors = item.floors.filter((floor) =>
  180. floor.layer.startsWith("B")
  181. );
  182. // 2. 对 F 楼层按数字降序排序(F13 → F12 → ... → F1)
  183. const sortedFFloors = fFloors.sort((a, b) => {
  184. const aNum = parseInt(a.layer.substring(1));
  185. const bNum = parseInt(b.layer.substring(1));
  186. return bNum - aNum; // 降序
  187. });
  188. // 3. 对 B 楼层按数字升序排序(B1 → B2)
  189. const sortedBFloors = bFloors.sort((a, b) => {
  190. const aNum = parseInt(a.layer.substring(1));
  191. const bNum = parseInt(b.layer.substring(1));
  192. return aNum - bNum; // 升序
  193. });
  194. // 4. 合并所有楼层(RF + F + B)
  195. const sortedFloors = [];
  196. if (rfFloor) sortedFloors.push(rfFloor); // 添加 RF
  197. sortedFloors.push(...sortedFFloors); // 添加 F13 → F1
  198. sortedFloors.push(...sortedBFloors); // 添加 B1 → B2
  199. item.floors = sortedFloors;
  200. });
  201. this.ParkData = this.info.ParkData;
  202. },
  203. },
  204. beforeDestroy() {},
  205. };
  206. </script>
  207. <style lang="scss">
  208. @import "@/../../zt.scss";
  209. </style>
  210. <style scoped>
  211. .el-card {
  212. border: 0px solid #02a7f0;
  213. }
  214. .el-form-item {
  215. margin-bottom: 0;
  216. }
  217. .el-table >>> .el-table__expand-icon {
  218. color: white;
  219. }
  220. </style>