HighLimitAnalysis.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <div
  3. class="ZTGlobal"
  4. style="width: 100%; padding: 1rem 1rem 0rem 1rem; color: white"
  5. >
  6. <el-row :gutter="10">
  7. <el-col :span="24">
  8. <div class="titleHeader">
  9. <span>控规建筑高度:≤{{ info.JZXGD }}米。</span>
  10. <br />
  11. <span v-if="TableData.length > 0"
  12. >结论:有超高建筑,建筑高度不符合控规要求。</span
  13. >
  14. <span v-else>结论:无超高建筑,建筑高度符合控规要求。</span>
  15. </div>
  16. </el-col>
  17. </el-row>
  18. <el-row :gutter="10">
  19. <el-col :span="24">
  20. <el-table
  21. ref="table"
  22. :data="TableData"
  23. :highlight-current-row="true"
  24. @current-change="handleCurrentChange"
  25. style="width: 100%"
  26. >
  27. <el-table-column label="超高楼号" align="center">
  28. <template #default="{ row }">
  29. {{ row.data.find((c) => c.label == "BUILDNO").value }}
  30. </template>
  31. </el-table-column>
  32. <el-table-column label="楼高(米)" align="center">
  33. <template #default="{ row }">
  34. {{ row.data.find((c) => c.label == "HEIGHT").value }}
  35. </template>
  36. </el-table-column>
  37. <el-table-column label="超高(米)" align="center">
  38. <template #default="{ row }">
  39. {{ row.cg }}
  40. </template>
  41. </el-table-column>
  42. </el-table>
  43. </el-col>
  44. </el-row>
  45. </div>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. TableData: [],
  52. };
  53. },
  54. props: {
  55. info: {
  56. type: Object,
  57. default: () => {
  58. return {};
  59. },
  60. },
  61. layerid: {
  62. type: String,
  63. default: "",
  64. },
  65. lydata: {
  66. type: Object,
  67. default: () => {
  68. return {};
  69. },
  70. },
  71. lyoption: {
  72. type: Object,
  73. default: () => {
  74. return {};
  75. },
  76. },
  77. },
  78. computed: {},
  79. mounted() {
  80. this.init();
  81. },
  82. methods: {
  83. init() {
  84. let that = this;
  85. debugger;
  86. that.info.layerDataList.forEach((layerData) => {
  87. let LANDNO = layerData.data.find((c) => c.label == "LANDNO");
  88. if (LANDNO && LANDNO.value) {
  89. let isdkbm = that.info.DKBM.find((c) => c == LANDNO.value);
  90. if (isdkbm) {
  91. let HEIGHT = layerData.data.find((c) => c.label == "HEIGHT").value;
  92. layerData.cg = that.calculateHighLimit(HEIGHT, that.info.JZXGD);
  93. if (layerData.cg > 0) {
  94. that.TableData.push(layerData);
  95. }
  96. }
  97. }
  98. });
  99. },
  100. /**
  101. * // 计算超高距离
  102. * @param Height 建筑高度
  103. * @param JZXGD 限高上限
  104. */
  105. calculateHighLimit(Height, JZXGD) {
  106. let sd = Height - JZXGD;
  107. return sd.toFixed(2);
  108. },
  109. //选中
  110. handleCurrentChange(row) {
  111. var center = Cesium.Cartesian3.fromDegrees(
  112. row.geometry.position.x,
  113. row.geometry.position.y
  114. ); //camera视野中心点坐标
  115. var heading = Cesium.Math.toRadians(0.0);
  116. var pitch = Cesium.Math.toRadians(-55.0);
  117. var range = row.geometry.boundingBox.upper.z + 300;
  118. viewer.camera.lookAt(
  119. center,
  120. new Cesium.HeadingPitchRange(heading, pitch, range)
  121. );
  122. viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
  123. },
  124. },
  125. beforeDestroy() {},
  126. };
  127. </script>
  128. <style lang="scss">
  129. @import "@/../../zt.scss";
  130. </style>
  131. <style lang="scss" scoped>
  132. .el-card {
  133. border: 0px solid #02a7f0;
  134. }
  135. .el-form-item {
  136. margin-bottom: 0;
  137. }
  138. </style>