index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <!--全域土地综合整治专题-->
  2. <template>
  3. <div class="ghzc LandConsolidation">
  4. <div class="headerCheck">
  5. <ul>
  6. <li
  7. :class="{ liActive: i == activeIndex }"
  8. v-for="(item, i) in checkList"
  9. :key="i"
  10. @click="onClick(i)"
  11. >
  12. {{ item.title }}
  13. </li>
  14. </ul>
  15. </div>
  16. <div class="innerContainer leftPane" v-drag>
  17. <h2 class="Pangetitle darg-div el-col">
  18. <span class="pange_text">全域土地综合整治专题 </span>
  19. <div class="region">
  20. <!-- clearable -->
  21. <el-cascader
  22. v-model="xzqh"
  23. :show-all-levels="false"
  24. :options="store.state.region_tree"
  25. @change="regionChange"
  26. placeholder="行政区"
  27. size="mini"
  28. :props="{
  29. checkStrictly: true,
  30. expandTrigger: 'hover',
  31. emitPath: false,
  32. }"
  33. ></el-cascader>
  34. </div>
  35. </h2>
  36. <div class="xz_box">
  37. <Sdgk
  38. v-loading="loading"
  39. @updateParent="changeData"
  40. ref="sdgk"
  41. v-show="activeIndex == 0"
  42. ></Sdgk>
  43. <List
  44. v-loading="loading"
  45. @updateParent="changeData"
  46. @contrast="contrast"
  47. ref="list"
  48. v-show="activeIndex == 1"
  49. ></List>
  50. <preCheck
  51. v-loading="loading"
  52. @updateParent="changeData"
  53. ref="preCheck"
  54. v-show="activeIndex == 3"
  55. ></preCheck>
  56. </div>
  57. </div>
  58. <div class="innerContainer bottomPane" v-drag v-show="activeIndex == 0">
  59. <div class="xz_box">
  60. <Qhdb
  61. v-loading="loading"
  62. @updateParent="changeData"
  63. @contrast="contrast"
  64. ref="qhdb"
  65. ></Qhdb>
  66. </div>
  67. </div>
  68. <div class="innerContainer legendPane" v-drag>
  69. <div class="xz_box">
  70. 图例
  71. <div v-for="(litem, li) in legends" :key="litem.label">
  72. <span :class="`legend${li}`" class="lcolor"></span>
  73. <span class="legLabel">{{ litem }}</span>
  74. </div>
  75. </div>
  76. </div>
  77. <Details ref="detailModal"></Details>
  78. <div class="innerContainer rightPane newContainer" v-show="activeIndex == 0">
  79. <Organize></Organize>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. import Organize from "./components/organize.vue";
  85. import Sdgk from "./components/sdgk.vue";
  86. import Qhdb from "./components/qhdb.vue";
  87. import List from "./components/list.vue";
  88. import preCheck from "./components/preCheck.vue";
  89. import Details from "./components/details.vue";
  90. import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
  91. export default {
  92. name: "LandConsolidation",
  93. components: {
  94. Sdgk,
  95. Qhdb,
  96. List,
  97. preCheck,
  98. Details,
  99. // Details,
  100. Organize
  101. },
  102. data() {
  103. return {
  104. loading: false,
  105. xzqh: "",
  106. checkList: [
  107. {
  108. title: "试点总揽",
  109. },
  110. {
  111. title: "整治项目",
  112. },
  113. {
  114. title: "新增耕地",
  115. },
  116. {
  117. title: "整治预检",
  118. },
  119. ],
  120. activeIndex: 1,
  121. legends: ["试点区域", "整治区域", "整治项目"],
  122. };
  123. },
  124. computed: {
  125. computed_vectorData() {
  126. return store.state.vectorData;
  127. },
  128. },
  129. created() {
  130. store.setCockpitDate(sessionStorage.getItem("cockpitDate").split(","));
  131. },
  132. mounted() {
  133. this.xzqh = store.state.cockpit_region.id;
  134. this.regionChange();
  135. this.bus.$on("handleView", this.handleView);
  136. },
  137. methods: {
  138. changeData(name, updata) {
  139. this[name] = updata;
  140. },
  141. handleView(row, type) {
  142. this.$refs.detailModal.handleView(row, type);
  143. },
  144. regionChange() {
  145. this.$refs.sdgk.regionChange(this.xzqh);
  146. this.$refs.qhdb.regionChange(this.xzqh);
  147. },
  148. cockpit() {
  149. //驾驶舱矢量数据点选查询
  150. pick_cockpit_vector.init_handler();
  151. },
  152. onClick(val) {
  153. this.activeIndex = val;
  154. },
  155. },
  156. watch: {
  157. activeIndex(newValue) {
  158. // if (newValue != "qhdb") this.$refs.qhdb.reset();
  159. // if (newValue == "sdgk") this.$refs.sdgk.getData();
  160. // if (newValue == "qhdb") this.$refs.qhdb.changeForm();
  161. // if (newValue == 0) this.$refs.list.searchFun();
  162. },
  163. computed_vectorData(newVal) {
  164. console.log(newVal, "newVal");
  165. newVal.forEach((res) => {
  166. if (res.name == "id") {
  167. this.handleView({ id: res.value }, this.$refs.qhdb.getType());
  168. }
  169. });
  170. },
  171. },
  172. };
  173. </script>
  174. <style lang="scss" scoped>
  175. .LandConsolidation {
  176. .xz_box {
  177. padding-bottom: 0;
  178. }
  179. .clearBtn {
  180. cursor: pointer;
  181. z-index: 200;
  182. }
  183. .headerCheck {
  184. width: 520px;
  185. height: 50px;
  186. // background: rgba(255, 192, 203, 0.379);
  187. position: absolute;
  188. left: 38%;
  189. top: 10px;
  190. z-index: 99;
  191. pointer-events: none;
  192. ul {
  193. list-style: none;
  194. display: flex;
  195. justify-content: space-between;
  196. align-items: center;
  197. height: 100%;
  198. li {
  199. width: 114px;
  200. height: 36px;
  201. background: inherit;
  202. // background-color: rgba(128, 255, 255, 0.39);
  203. box-sizing: border-box;
  204. border-width: 2px;
  205. border-style: solid;
  206. border-color: #64daff;
  207. border-radius: 9px;
  208. border-top-right-radius: 0px;
  209. border-bottom-left-radius: 0px;
  210. color: #64daff;
  211. text-align: center;
  212. line-height: 36px;
  213. pointer-events: all;
  214. cursor: pointer;
  215. }
  216. li:active,
  217. li:focus {
  218. background-color: rgba(128, 255, 255, 0.39) !important;
  219. }
  220. }
  221. .liActive {
  222. background-color: rgba(128, 255, 255, 0.39) !important;
  223. }
  224. .liItem {
  225. background-color: transparent !important;
  226. }
  227. }
  228. .bottomPane {
  229. width: 45%;
  230. height: 330px;
  231. top: calc(100% - 500px);
  232. left: 480px;
  233. }
  234. .legendPane {
  235. width: 150px;
  236. height: 120px;
  237. // top: calc(100% - 500px);
  238. top: calc(100% - 150px);
  239. left: 480px;
  240. .lcolor {
  241. display: inline-block;
  242. width: 16px;
  243. height: 16px;
  244. margin-left: 10px;
  245. }
  246. .legend0 {
  247. background: #caf982;
  248. }
  249. .legend1 {
  250. background: #80ffff;
  251. }
  252. .legend2 {
  253. background: #facd91;
  254. }
  255. }
  256. }
  257. .newContainer{
  258. height: 758px !important;
  259. top: 70px !important;
  260. }
  261. </style>
  262. <style lang="scss">
  263. .LandConsolidation {
  264. .region {
  265. width: 100px !important;
  266. margin: 0 20px;
  267. }
  268. .tdTitle {
  269. color: #64daff;
  270. font-size: 18px;
  271. font-weight: bold;
  272. display: inline-block;
  273. margin-right: 5px;
  274. }
  275. .el-cascader--mini {
  276. top: 0px;
  277. background: transparent;
  278. }
  279. }
  280. @import "../complianceAnalysis/ghzc.scss";
  281. </style>