indexNew.vue 6.4 KB

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