index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!--闲置土地-->
  2. <template>
  3. <div class="ghzc Idleland">
  4. <i
  5. class="cesiumbtn"
  6. :class="store.state.viewer_flag ? 'el-icon-aim' : 'el-icon-rank'"
  7. :title="isbig ? '缩小' : '放大'"
  8. @click="bigViewerChange"
  9. ></i>
  10. <div class="innerContainer leftPane" v-drag>
  11. <h2 class="Pangetitle darg-div el-col">
  12. <span class="pange_text">闲置土地 </span>
  13. <div class="region">
  14. <!-- clearable -->
  15. <el-cascader
  16. v-model="xzqh"
  17. :show-all-levels="false"
  18. :options="store.state.region_tree"
  19. @change="regionChange"
  20. placeholder="行政区"
  21. size="mini"
  22. :props="{
  23. checkStrictly: true,
  24. expandTrigger: 'hover',
  25. emitPath: false,
  26. }"
  27. ></el-cascader>
  28. </div>
  29. <span class="clearBtn" @click="cockpit">
  30. <i class="el-icon-thumb"></i>
  31. 图斑详情查询
  32. </span>
  33. </h2>
  34. <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
  35. <el-tab-pane label="统计总览" name="tjzl">
  36. <Tjzl
  37. v-loading="loading"
  38. @updateParent="changeData"
  39. ref="tjzl"
  40. ></Tjzl>
  41. </el-tab-pane>
  42. <el-tab-pane label="闲置管理" name="xzgl">
  43. <Xzgl
  44. v-loading="loading"
  45. @updateParent="changeData"
  46. ref="xzgl"
  47. ></Xzgl>
  48. </el-tab-pane>
  49. </el-tabs>
  50. </div>
  51. <Details ref="detailModal"></Details>
  52. </div>
  53. </template>
  54. <script>
  55. import Tjzl from "./components/tjzl.vue";
  56. import Xzgl from "./components/xzgl.vue";
  57. import Details from "./components/details.vue";
  58. // import TabelView from "./components/tabelView.vue";
  59. import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
  60. export default {
  61. name: "Idleland",
  62. components: {
  63. Tjzl,
  64. Xzgl,
  65. Details,
  66. // TabelView,
  67. },
  68. data() {
  69. return {
  70. loading: false,
  71. activeTabs: "tjzl",
  72. xzqh: "",
  73. };
  74. },
  75. computed: {
  76. computed_vectorData() {
  77. return store.state.vectorData;
  78. },
  79. },
  80. created() {
  81. store.setCockpitDate(sessionStorage.getItem("cockpitDate").split(","));
  82. },
  83. mounted() {
  84. this.xzqh = store.state.cockpit_region.id;
  85. this.regionChange();
  86. this.bus.$on("handleView", this.handleView);
  87. },
  88. methods: {
  89. bigViewerChange() {
  90. this.$router.push({ path: "/overview" });
  91. store.setViewerFlagb(true);
  92. },
  93. changeData(name, updata) {
  94. this[name] = updata;
  95. },
  96. handleView(row, type) {
  97. this.$refs.detailModal.handleView(row, type);
  98. },
  99. regionChange() {
  100. this.$refs.tjzl.regionChange(this.xzqh);
  101. this.$refs.xzgl.regionChange(this.xzqh);
  102. },
  103. cockpit() {
  104. console.log("----");
  105. //驾驶舱矢量数据点选查询
  106. pick_cockpit_vector.init_handler();
  107. },
  108. },
  109. watch: {
  110. activeTabs(newValue) {
  111. if (newValue != "xzgl") this.$refs.xzgl.reset();
  112. if (newValue == "tjzl") this.$refs.tjzl.getData();
  113. // if (newValue == "xzgl") this.$refs.xzgl.changeForm();
  114. },
  115. computed_vectorData(newVal) {
  116. console.log(newVal, "newVal");
  117. newVal.forEach((res) => {
  118. if (res.name == "id") {
  119. this.handleView({ id: res.value }, this.$refs.xzgl.getType());
  120. // const TableRows = this.$refs.singleTable.bodyWrapper.querySelectorAll(
  121. // ".el-table__body tbody .el-table__row"
  122. // );
  123. // let scrollTop = 0;
  124. // for (let i = 0; i < TableRows.length; i++) {
  125. // if (i === res.value) {
  126. // break;
  127. // }
  128. // scrollTop += TableRows[i].offsetHeight;
  129. // }
  130. // this.$refs.singleTable.bodyWrapper.scrollTop = scrollTop;
  131. // this.scrollTop_index = res.value;
  132. }
  133. });
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="scss" scoped>
  139. .Idleland {
  140. .xz_box {
  141. padding-bottom: 0;
  142. }
  143. .clearBtn {
  144. cursor: pointer;
  145. z-index: 200;
  146. }
  147. }
  148. </style>
  149. <style lang="scss">
  150. .Idleland {
  151. .region {
  152. width: 100px !important;
  153. margin: 0 20px;
  154. }
  155. .el-cascader--mini {
  156. top: 0px;
  157. background: transparent;
  158. }
  159. }
  160. @import "../complianceAnalysis/ghzc.scss";
  161. </style>