移动端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2546 строки
76 KiB

  1. <template>
  2. <div class="app-container">
  3. <div style="display: none">
  4. <select id="zhen"></select>
  5. <select id="cun" autofocus></select>
  6. <input id="texiao_fang" type="button" value="特效农房" /> 
  7. <input id="texiao_di" type="button" value="特效农地" /> 
  8. <input id="qingchu" type="button" value="清除" /> 
  9. </div>
  10. <div class="map_area" id="mapWrap"></div>
  11. <!--列表 定位-->
  12. <div class="rightIcon_wrap">
  13. <div class="positioning_wrap">
  14. <div class="icon"></div>
  15. </div>
  16. <div
  17. class="selectionIcon_wrap"
  18. :style="{
  19. opacity: ishcBotton == true ? 1 : 0,
  20. }"
  21. @click="selectionPush"
  22. >
  23. <div class="icon"></div>
  24. <div class="text">列表</div>
  25. </div>
  26. </div>
  27. <!--放大缩小-->
  28. <div class="rightZoom_wrap">
  29. <div class="amplification" ref="sliderBig"></div>
  30. <div class="narrow" ref="sliderSmall"></div>
  31. </div>
  32. <!--列表拉取详情-->
  33. <div class="homesteadList_wrap">
  34. <div class="title_m">
  35. <div class="more_icon" @click="homesteadListShrink"></div>
  36. <div class="name">宅基地列表</div>
  37. </div>
  38. <div class="main_m" v-if="statusList == 0">
  39. <!--1-->
  40. <div
  41. class="flex_block"
  42. v-for="(items, index) in hcBottonHouseArr"
  43. :key="index"
  44. >
  45. <div class="name_text">{{ items.name }}</div>
  46. <div class="square_text">{{ items.mj }}㎡</div>
  47. <div class="operation_mian">
  48. <div
  49. class="describe"
  50. :class="[
  51. items.xzqk == '已盘活' ? 'yph' : '',
  52. items.xzqk == '待流转待盘活' ? 'dlzdph' : '',
  53. ]"
  54. >
  55. {{ items.xzqk }}
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="main_m" v-if="statusList == 1">
  61. <!--1-->
  62. <div
  63. class="flex_block"
  64. v-for="(items, index) in hcBottonLandArr"
  65. :key="index"
  66. >
  67. <div class="name_text">{{ items.name }}</div>
  68. <div class="square_text">{{ items.mj }}亩</div>
  69. <div class="operation_mian">
  70. <div
  71. class="describe"
  72. :class="[
  73. items.xzqk == '已盘活' ? 'yph' : '',
  74. items.xzqk == '待流转待盘活' ? 'dlzdph' : '',
  75. ]"
  76. >
  77. {{ items.xzqk }}
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <!-- //待租列表 房
  83. hcBottonHouseArr: [],
  84. //待租列表 地
  85. hcBottonLandArr: [], -->
  86. <div class="footerBtn_wrap">
  87. <div
  88. class="options"
  89. :class="{ active: statusList == 0 }"
  90. @click="housingTypes('0')"
  91. >
  92. 农房
  93. </div>
  94. <div
  95. class="options"
  96. :class="{ active: statusList == 1 }"
  97. @click="housingTypes('1')"
  98. >
  99. 农地
  100. </div>
  101. </div>
  102. </div>
  103. <!--选择地址-->
  104. <div class="address_wrap">
  105. <div class="address_item">
  106. <div class="portrait zhen" @click="townVisbileFun">镇</div>
  107. <div class="name" @click="townVisbileFun">
  108. {{ focusTownOptions[0].deptName }}
  109. </div>
  110. <div class="address_suspension" v-show="townVisbile == true">
  111. <div
  112. class="address_suspension_scroll"
  113. :style="{ height: towneOptionsHeight + 'px' }"
  114. >
  115. <div
  116. class="items"
  117. v-for="(item, index) in orderTownOptions"
  118. :key="index"
  119. @click="townDropdown(item)"
  120. >
  121. {{ item.deptName }}
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="address_item">
  127. <div class="portrait cun" @click="villageVisbileFun">村</div>
  128. <div class="name" @click="villageVisbileFun">
  129. {{ focusVillageOptions[0].deptName }}
  130. </div>
  131. <div class="address_suspension" v-show="villageVisbile == true">
  132. <div
  133. class="address_suspension_scroll"
  134. :style="{ height: villageOptionsHeight + 'px' }"
  135. >
  136. <div
  137. class="items"
  138. v-for="(item, index) in orderVillageOptions"
  139. :key="index"
  140. @click="villageDropdown(item)"
  141. >
  142. {{ item.deptName }}
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="address_item more">
  148. <div class="portrait"></div>
  149. <div class="name" @click="addressPush"></div>
  150. </div>
  151. </div>
  152. <!--搜索栏目-->
  153. <div class="searchBar_wrap">
  154. <div class="actionBar_wrap" v-if="searchBarOperVisbile">
  155. <div class="m_list">
  156. <div class="tensile active"><div class="icon"></div></div>
  157. </div>
  158. <div class="m_list">
  159. <div class="positioning">
  160. <div class="icon"></div>
  161. </div>
  162. </div>
  163. <div class="m_list">
  164. <div class="spacing">
  165. <div class="icon"></div>
  166. </div>
  167. </div>
  168. <div class="m_list">
  169. <div class="scale">
  170. <div class="icon"></div>
  171. </div>
  172. </div>
  173. <div class="m_list">
  174. <div class="closes gray" @click="searchBarOperFun('false')">
  175. <div class="icon"></div>
  176. </div>
  177. </div>
  178. <div class="m_list">
  179. <div class="correct"></div>
  180. </div>
  181. </div>
  182. <div class="searchBar_area">
  183. <div class="bar_icon"></div>
  184. <div class="bar_ipt">
  185. <input type="text" placeholder="请输入宗地或权利人信息" />
  186. </div>
  187. <div class="bar_text">搜索</div>
  188. </div>
  189. <div class="searchBar_more" @click="searchBarOperFun('true')"></div>
  190. </div>
  191. <!--点击房地-显示的搜索--->
  192. <div class="landHomestead_wrap">
  193. <div class="landHomestead_search">
  194. <div class="bar_icon"></div>
  195. <div class="bar_ipt">
  196. <input type="text" placeholder="请输入宗地或权利人信息" />
  197. </div>
  198. <div class="bar_text">搜索</div>
  199. </div>
  200. <div class="landHomestead_body">
  201. <!--1--->
  202. <div class="body_flex">
  203. <div class="attribute">
  204. <div class="names">孙全礼</div>
  205. <div class="address">南郊村东二街30号南郊村东二街30号</div>
  206. <div class="nature">性质:农村宅基地</div>
  207. </div>
  208. <div class="distance">
  209. <div class="size">103</div>
  210. <div class="probably">大约120㎡</div>
  211. </div>
  212. <div class="others">
  213. <div class="information">
  214. <div class="location"></div>
  215. <div class="status_text">已盘活</div>
  216. </div>
  217. <div class="editor">
  218. <div class="editor_icon"></div>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <!--房地全部信息展示-->
  225. <div class="landHomesteadDetails_wrap">
  226. <div class="content_mian">
  227. <!--内容-->
  228. <div class="serial_flex">
  229. <div class="number">农房编号<span>31</span></div>
  230. <div class="localhref"></div>
  231. </div>
  232. <!--1-->
  233. <div class="flex_block">
  234. <span class="describe">房屋所有人名称</span
  235. ><span class="content">孙全礼</span>
  236. </div>
  237. <!--1-->
  238. <div class="flex_block">
  239. <span class="describe">村名</span><span class="content">南郊村</span>
  240. </div>
  241. <!--1-->
  242. <div class="flex_block">
  243. <span class="describe">地址</span
  244. ><span class="content">东二街30号</span>
  245. </div>
  246. <!--1-->
  247. <div class="flex_block">
  248. <span class="describe">是否有审批手续</span
  249. ><span class="content">是</span>
  250. </div>
  251. <!--1-->
  252. <div class="flex_block">
  253. <span class="describe">房屋所有权证号</span
  254. ><span class="content">15-76-105</span>
  255. </div>
  256. <!--1-->
  257. <div class="flex_block">
  258. <span class="describe">建筑面积</span
  259. ><span class="content">大约80㎡</span>
  260. </div>
  261. <!--1-->
  262. <div class="flex_block">
  263. <span class="describe">土地证号</span
  264. ><span class="content">38718490184</span>
  265. </div>
  266. <!--1-->
  267. <div class="flex_block">
  268. <span class="describe">土地性质</span
  269. ><span class="content">农村宅基地</span>
  270. </div>
  271. <!--1-->
  272. <div class="flex_block">
  273. <span class="describe">土地面积</span
  274. ><span class="content">大约130㎡</span>
  275. </div>
  276. <!--1-->
  277. <div class="flex_block">
  278. <span class="describe">现状情况</span
  279. ><span class="content">已盘活</span>
  280. </div>
  281. <!--1-->
  282. <div class="flex_block">
  283. <span class="describe">是否有流转意向</span
  284. ><span class="content"></span>
  285. </div>
  286. <!--1-->
  287. <div class="flex_block">
  288. <span class="describe">租赁人</span
  289. ><span class="content">李福任</span>
  290. </div>
  291. <!--1-->
  292. <div class="flex_block">
  293. <span class="describe">租赁年限</span
  294. ><span class="content">10年</span>
  295. </div>
  296. <!--1-->
  297. <div class="flex_block">
  298. <span class="describe">租赁合同截止日期</span
  299. ><span class="content">2021.7.1-2031.6.30</span>
  300. </div>
  301. <!--上传图片-->
  302. <div class="uploadPictures_block">
  303. <div class="statusQuo">
  304. <div class="picture"></div>
  305. <div class="describe">现<br />状<br />图<br />片</div>
  306. </div>
  307. <div class="statusQuo">
  308. <div class="picture"></div>
  309. <div class="describe">历<br />史<br />图<br />片</div>
  310. </div>
  311. </div>
  312. <!--编辑-->
  313. <div class="editor_block">
  314. <div class="editor_icon"></div>
  315. </div>
  316. </div>
  317. </div>
  318. <!--房地全部信息编辑-->
  319. <div class="landHomesteadEdit_wrap">
  320. <div class="content_mian">
  321. <div class="info_title">录入宗地信息</div>
  322. <div class="flex_main">
  323. <!--1-->
  324. <div class="flex_block">
  325. <div class="number_s50 mr50">
  326. <div class="title_m">农房编号</div>
  327. <div class="input_m">
  328. <van-field
  329. v-model="message"
  330. placeholder="农房编号"
  331. class="landHomesteadEdit_input"
  332. />
  333. </div>
  334. </div>
  335. <div class="number_s50">
  336. <div class="title_m">房屋所有人名称</div>
  337. <div class="input_m">
  338. <van-field
  339. v-model="message"
  340. placeholder="房屋所有人名称"
  341. class="landHomesteadEdit_input"
  342. />
  343. </div>
  344. </div>
  345. </div>
  346. <!--1-->
  347. <div class="flex_block">
  348. <div class="number_s60 mr50">
  349. <div class="title_m">地址</div>
  350. <div class="input_m">
  351. <van-field
  352. v-model="message"
  353. placeholder="地址"
  354. class="landHomesteadEdit_input"
  355. />
  356. </div>
  357. </div>
  358. <div class="number_s40">
  359. <div class="title_m">农房权属</div>
  360. <div class="input_m select">
  361. <i class="dropDown_icon"></i>
  362. <van-field
  363. v-model="message"
  364. readonly
  365. clickable
  366. name="picker"
  367. placeholder="农房权属"
  368. class="landHomesteadEdit_input"
  369. @click="showPicker = true"
  370. />
  371. <van-popup v-model="showPicker" position="bottom">
  372. <van-picker
  373. show-toolbar
  374. :columns="columns"
  375. @confirm="onConfirm"
  376. @cancel="showPicker = false"
  377. />
  378. </van-popup>
  379. </div>
  380. </div>
  381. </div>
  382. <!--1-->
  383. <div class="flex_block">
  384. <div class="number_s35 mr50">
  385. <div class="title_m">是否有审批手续</div>
  386. <div class="input_m select">
  387. <i class="dropDown_icon"></i>
  388. <van-field
  389. v-model="message"
  390. readonly
  391. clickable
  392. name="picker"
  393. placeholder="审批手续"
  394. class="landHomesteadEdit_input"
  395. @click="showPicker = true"
  396. />
  397. <van-popup v-model="showPicker" position="bottom">
  398. <van-picker
  399. show-toolbar
  400. :columns="columns"
  401. @confirm="onConfirm"
  402. @cancel="showPicker = false"
  403. />
  404. </van-popup>
  405. </div>
  406. </div>
  407. <div class="number_s35 mr50">
  408. <div class="title_m">建筑面积</div>
  409. <div class="input_m about">
  410. <span class="about_symbol">≈</span>
  411. <van-field
  412. v-model="message"
  413. placeholder="建筑面积"
  414. class="landHomesteadEdit_input"
  415. />
  416. </div>
  417. </div>
  418. <div class="number_s30">
  419. <div class="title_m">现状情况</div>
  420. <div class="input_m select">
  421. <i class="dropDown_icon"></i>
  422. <van-field
  423. v-model="message"
  424. readonly
  425. clickable
  426. name="picker"
  427. placeholder="现状情况"
  428. class="landHomesteadEdit_input"
  429. @click="showPicker = true"
  430. />
  431. <van-popup v-model="showPicker" position="bottom">
  432. <van-picker
  433. show-toolbar
  434. :columns="columns"
  435. @confirm="onConfirm"
  436. @cancel="showPicker = false"
  437. />
  438. </van-popup>
  439. </div>
  440. </div>
  441. </div>
  442. <!--1-->
  443. <div class="flex_block">
  444. <div class="number_s50 mr50">
  445. <div class="title_m">房屋所有权证号</div>
  446. <div class="input_m">
  447. <van-field
  448. v-model="message"
  449. placeholder="房屋所有权证号"
  450. class="landHomesteadEdit_input"
  451. />
  452. </div>
  453. </div>
  454. <div class="number_s50">
  455. <div class="title_m">土地证号</div>
  456. <div class="input_m">
  457. <van-field
  458. v-model="message"
  459. placeholder="土地证号"
  460. class="landHomesteadEdit_input"
  461. />
  462. </div>
  463. </div>
  464. </div>
  465. <!--1-->
  466. <div class="flex_block">
  467. <div class="number_s35 mr50">
  468. <div class="title_m">土地性质</div>
  469. <div class="input_m">
  470. <van-field
  471. v-model="message"
  472. placeholder="土地性质"
  473. class="landHomesteadEdit_input"
  474. />
  475. </div>
  476. </div>
  477. <div class="number_s35 mr50">
  478. <div class="title_m">土地面积</div>
  479. <div class="input_m about">
  480. <span class="about_symbol">≈</span>
  481. <van-field
  482. v-model="message"
  483. placeholder="土地面积"
  484. class="landHomesteadEdit_input"
  485. />
  486. </div>
  487. </div>
  488. <div class="number_s30">
  489. <div class="title_m">是否有流转意向</div>
  490. <div class="input_m select">
  491. <i class="dropDown_icon"></i>
  492. <van-field
  493. v-model="message"
  494. readonly
  495. clickable
  496. name="picker"
  497. placeholder="是否有流转意向"
  498. class="landHomesteadEdit_input"
  499. @click="showPicker = true"
  500. />
  501. <van-popup v-model="showPicker" position="bottom">
  502. <van-picker
  503. show-toolbar
  504. :columns="columns"
  505. @confirm="onConfirm"
  506. @cancel="showPicker = false"
  507. />
  508. </van-popup>
  509. </div>
  510. </div>
  511. </div>
  512. <!--1-->
  513. <div class="flex_block">
  514. <div class="number_s50 mr50">
  515. <div class="title_m">租赁人</div>
  516. <div class="input_m">
  517. <van-field
  518. v-model="message"
  519. placeholder="租赁人"
  520. class="landHomesteadEdit_input"
  521. />
  522. </div>
  523. </div>
  524. <div class="number_s50">
  525. <div class="title_m">租赁年限</div>
  526. <div class="input_m">
  527. <van-field
  528. v-model="message"
  529. placeholder="租赁年限"
  530. class="landHomesteadEdit_input"
  531. />
  532. </div>
  533. </div>
  534. </div>
  535. <!--1-->
  536. <div class="flex_block">
  537. <div class="number_s100">
  538. <div class="title_m">租赁人</div>
  539. <div class="input_m">
  540. <van-field
  541. v-model="message"
  542. placeholder="租赁人"
  543. class="landHomesteadEdit_input"
  544. />
  545. </div>
  546. </div>
  547. </div>
  548. <!--2-->
  549. <div class="uploadPicturesFlex_block">
  550. <div class="title_m">上传图片</div>
  551. <div class="main_m">
  552. <van-uploader v-model="fileList" multiple :max-count="2" />
  553. </div>
  554. </div>
  555. </div>
  556. </div>
  557. <div class="footer_main">
  558. <div class="cancel">取消</div>
  559. <div class="save">保存</div>
  560. </div>
  561. </div>
  562. <!--农地农房选择-->
  563. <div class="farmlandEditSwitch_wrap">
  564. <div class="mains">
  565. <div class="close_btn"></div>
  566. <div class="farmhouse">
  567. <div class="icons"></div>
  568. <p class="names">农房</p>
  569. </div>
  570. <div class="farmland">
  571. <div class="icons"></div>
  572. <p class="names">农地</p>
  573. </div>
  574. </div>
  575. </div>
  576. </div>
  577. </template>
  578. <script>
  579. import $ from "jquery";
  580. import {
  581. bigDataHcAreaInfo,
  582. bigDataHcCountyInfo,
  583. bigDataHcVillageInfo,
  584. hcBottomSearch,
  585. } from "@/api/homestead/index";
  586. export default {
  587. name: "homesteadLogin",
  588. data() {
  589. return {
  590. //当前选择区 0 镇1 村2
  591. currentSelected: 0,
  592. //区级list
  593. hcAreaInfoOption: [],
  594. //区级id
  595. hcAreaInfoValue: "",
  596. //镇级显示隐
  597. townVisbile: false,
  598. //镇级List
  599. townOptions: [],
  600. //选中的镇级
  601. focusTownOptions: [{ orgCode: "", deptName: "全部" }],
  602. //选择的镇级
  603. orderTownOptions: [],
  604. //镇选择框高度
  605. towneOptionsHeight: 0,
  606. //村级显影
  607. villageVisbile: false,
  608. //村级list
  609. villageOptions: [],
  610. //选中的村级
  611. focusVillageOptions: [{ orgCode: "", deptName: "全部" }],
  612. //选择的村级
  613. orderVillageOptions: [],
  614. //村选择框高度
  615. villageOptionsHeight: 0,
  616. // 待租列表显示
  617. ishcBotton: false,
  618. // 待租列表 类型 0 农房 1 农地
  619. statusList: 0,
  620. //待租列表 房
  621. hcBottonHouseArr: [],
  622. //待租列表 地
  623. hcBottonLandArr: [],
  624. //搜索栏目-操作栏显隐
  625. searchBarOperVisbile: false,
  626. //以下删
  627. message: "",
  628. showPicker: false,
  629. columns: ["杭州", "宁波", "温州", "嘉兴", "湖州"],
  630. fileList: [],
  631. };
  632. },
  633. mounted() {
  634. this.initAxios();
  635. },
  636. methods: {
  637. initAxios() {
  638. //获取区
  639. this.mapAreaSelectValue();
  640. },
  641. styleSteup() {
  642. let smallTop = this.$refs.sliderSmall.getBoundingClientRect().top;
  643. let smallLeft = this.$refs.sliderSmall.getBoundingClientRect().left;
  644. console.log(smallTop);
  645. $(".ol-zoom-out").css({
  646. position: "absolute",
  647. left: smallLeft + "px",
  648. top: smallTop + "px",
  649. width: "40px",
  650. height: "26px",
  651. zIndex: "999999",
  652. cursor: "pointer",
  653. opacity: "0",
  654. });
  655. $(".ol-overlaycontainer-stopevent").css({
  656. zIndex: 9999,
  657. });
  658. let bigTop = this.$refs.sliderBig.getBoundingClientRect().top;
  659. let bigLeft = this.$refs.sliderBig.getBoundingClientRect().left;
  660. $(".ol-zoom-in").css({
  661. position: "absolute",
  662. left: bigLeft + "px",
  663. top: bigTop + "px",
  664. width: "40px",
  665. height: "26px",
  666. zIndex: "1005",
  667. cursor: "pointer",
  668. opacity: "0",
  669. });
  670. $(".ol-hidden ,.ol-collapsed").hide();
  671. },
  672. switchLoad() {
  673. let orgCode = "";
  674. if (this.currentSelected == 0) {
  675. orgCode = this.hcAreaInfoOption[0].orgCode;
  676. } else if (this.currentSelected == 1) {
  677. orgCode = this.focusTownOptions[0].orgCode;
  678. } else {
  679. orgCode = this.focusVillageOptions[0].orgCode;
  680. }
  681. let objData = {
  682. orgCode: orgCode,
  683. statusList: "1,2,3,4,5,6,7,8",
  684. };
  685. //右侧详情农房农地列表
  686. if (objData.orgCode.length == 12) {
  687. hcBottomSearch(objData).then((res) => {
  688. let content = res.data;
  689. //房
  690. let houseArr = [];
  691. let landArr = [];
  692. //地
  693. content.forEach((v, i) => {
  694. if (v.type == "house") {
  695. houseArr.push({
  696. geo: v.geo,
  697. mj: v.mj,
  698. name: v.name,
  699. type: v.type,
  700. xh: v.xh,
  701. });
  702. } else {
  703. landArr.push({
  704. geo: v.geo,
  705. mj: v.mj,
  706. name: v.name,
  707. type: v.type,
  708. xh: v.xh,
  709. });
  710. }
  711. });
  712. this.hcBottonHouseArr = houseArr;
  713. this.hcBottonLandArr = landArr;
  714. this.ishcBotton = true;
  715. });
  716. } else {
  717. this.hcBottonHouseArr = [];
  718. //待租列表 地
  719. this.hcBottonLandArr = [];
  720. this.ishcBotton = false;
  721. }
  722. // console.log();
  723. },
  724. mapAreaSelectValue() {
  725. bigDataHcAreaInfo().then((res) => {
  726. if (res.code == 200) {
  727. let content = res.data;
  728. this.hcAreaInfoOption = content;
  729. this.hcAreaInfoValue = content[0].orgCode;
  730. //获取乡镇
  731. this.headerSelectValue();
  732. this.switchLoad();
  733. //获取地图
  734. this.mapBackground();
  735. //设置缩放按钮位置
  736. this.styleSteup();
  737. }
  738. });
  739. },
  740. //镇相关
  741. headerSelectValue() {
  742. let oData = {
  743. orgCode: this.hcAreaInfoValue,
  744. };
  745. bigDataHcCountyInfo(oData).then((res) => {
  746. if (res.code == 200) {
  747. let content = res.data;
  748. let dateValue = { orgCode: "", deptName: "全部" };
  749. content.unshift(dateValue);
  750. this.townOptions = content;
  751. let oHeight = (content.length - 1) * 16;
  752. this.towneOptionsHeight = oHeight > 100 ? 100 : oHeight;
  753. this.townDealWithFun(dateValue);
  754. }
  755. });
  756. },
  757. townDealWithFun(value) {
  758. let focusTownOptions = [];
  759. let orderTownOptions = [];
  760. this.townOptions.forEach((v, i) => {
  761. if (value.deptName == v.deptName) {
  762. focusTownOptions.push({
  763. orgCode: v.orgCode,
  764. deptName: v.deptName,
  765. });
  766. } else {
  767. orderTownOptions.push({
  768. orgCode: v.orgCode,
  769. deptName: v.deptName,
  770. });
  771. }
  772. });
  773. this.focusTownOptions = focusTownOptions;
  774. this.orderTownOptions = orderTownOptions;
  775. },
  776. searchBarOperFun(statue) {
  777. if (statue == "true") {
  778. this.searchBarOperVisbile = true;
  779. } else {
  780. this.searchBarOperVisbile = false;
  781. }
  782. },
  783. townVisbileFun() {
  784. this.townVisbile = true;
  785. this.villageVisbile = false;
  786. },
  787. /*右侧列表 --展开收缩*/
  788. selectionPush() {
  789. if (this.ishcBotton == false) {
  790. return false;
  791. }
  792. $(".homesteadList_wrap").animate(
  793. {
  794. right: "0",
  795. },
  796. 300
  797. );
  798. },
  799. homesteadListShrink() {
  800. $(".homesteadList_wrap").animate(
  801. {
  802. right: "-300px",
  803. },
  804. 300
  805. );
  806. },
  807. /*点击顶部村庄--伸缩样式*/
  808. addressPush() {
  809. let addressWrapBlock = $(".address_wrap .address_item.more .name");
  810. let lefValue = 0;
  811. if (addressWrapBlock.hasClass("shrink")) {
  812. addressWrapBlock.removeClass("shrink");
  813. lefValue = "-40px";
  814. } else {
  815. addressWrapBlock.addClass("shrink");
  816. lefValue = "8px";
  817. }
  818. $(".address_wrap").animate(
  819. {
  820. left: lefValue,
  821. },
  822. 300
  823. );
  824. },
  825. townDropdown(command) {
  826. this.townDealWithFun(command);
  827. this.townVisbile = false;
  828. if (command.deptName == "全部") {
  829. this.focusVillageOptions = [{ orgCode: "", deptName: "全部" }];
  830. this.focusVillageOptions = [{ orgCode: "", deptName: "全部" }];
  831. this.orderVillageOptions = [];
  832. this.villageOptionsHeight = 0;
  833. this.currentSelected = 0;
  834. this.switchLoad();
  835. return false;
  836. }
  837. this.currentSelected = 1;
  838. this.switchLoad();
  839. this.bigDataHcVillageFun();
  840. $("#zhen").trigger("change");
  841. },
  842. bigDataHcVillageFun() {
  843. let oData = {
  844. orgCode: this.focusTownOptions[0].orgCode,
  845. };
  846. bigDataHcVillageInfo(oData).then((res) => {
  847. let content = res.data;
  848. let dateValue = { orgCode: "", deptName: "全部" };
  849. content.unshift(dateValue);
  850. this.villageOptions = content;
  851. this.villageDealWithFun(dateValue);
  852. this.selectChooseOrder = 0;
  853. });
  854. },
  855. villageDealWithFun(value) {
  856. let focusVillageOptions = [];
  857. let orderVillageOptions = [];
  858. this.villageOptions.forEach((v, i) => {
  859. if (value.deptName == v.deptName) {
  860. focusVillageOptions.push({
  861. orgCode: v.orgCode,
  862. deptName: v.deptName,
  863. });
  864. } else {
  865. orderVillageOptions.push({
  866. orgCode: v.orgCode,
  867. deptName: v.deptName,
  868. });
  869. }
  870. });
  871. this.focusVillageOptions = focusVillageOptions;
  872. this.orderVillageOptions = orderVillageOptions;
  873. let oHeight = orderVillageOptions.length * 16;
  874. this.villageOptionsHeight = oHeight > 100 ? 100 : oHeight;
  875. },
  876. villageDropdown(command) {
  877. this.villageDealWithFun(command);
  878. this.villageVisbile = false;
  879. if (command.deptName == "全部") {
  880. this.currentSelected = 1;
  881. } else {
  882. this.currentSelected = 2;
  883. }
  884. this.switchLoad();
  885. $("#cun").trigger("change");
  886. },
  887. villageVisbileFun() {
  888. if (this.orderVillageOptions.length == 0) {
  889. return false;
  890. }
  891. this.townVisbile = false;
  892. this.villageVisbile = true;
  893. },
  894. housingTypes(type) {
  895. // if (type == "0") {
  896. this.statusList = type;
  897. this.selectChooseOrder = 0;
  898. },
  899. //加载地图
  900. mapBackground() {
  901. let _this = this;
  902. var projection = new ol.proj.Projection({
  903. //地图投影类型
  904. code: "EPSG:3857",
  905. units: "degrees",
  906. //extent:extent
  907. });
  908. //影像图 -----------------------------start
  909. var attributions =
  910. '<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
  911. '<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>';
  912. var aerial = new ol.layer.Tile({
  913. source: new ol.source.XYZ({
  914. attributions: attributions,
  915. url: "http://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  916. }),
  917. isGroup: true,
  918. visible: true,
  919. name: "天地图路网-卫星影像图",
  920. });
  921. var map = new ol.Map({
  922. layers: [aerial],
  923. //layers: [newwms],
  924. projection: projection,
  925. target: "mapWrap",
  926. view: new ol.View({
  927. center: ol.proj.fromLonLat([122.145662, 37.369575]),
  928. zoom: 10.2,
  929. minZoom: 10, //地图缩小限制
  930. maxZoom: 18.9, //地图放大限制
  931. }),
  932. });
  933. var shitu = new ol.layer.Vector({
  934. title: "add Layer",
  935. source: new ol.source.Vector({
  936. projection: projection,
  937. url: "http://116.255.135.38:8081/nsgk_test/profile/geojson/huancui.json", //GeoJSON的文件路径,用户可以根据需求而改变
  938. format: new ol.format.GeoJSON(),
  939. }),
  940. style: new ol.style.Style({
  941. fill: new ol.style.Fill({
  942. //矢量图层填充颜色,以及透明度
  943. color: "rgba(0,0,0,0)",
  944. }),
  945. stroke: new ol.style.Stroke({
  946. //边界样式
  947. color: "#47c68f",
  948. width: 3,
  949. }),
  950. }),
  951. });
  952. map.addLayer(shitu);
  953. var huancui_zhen = new ol.layer.Vector({
  954. title: "add huancui_zhen",
  955. source: new ol.source.Vector({
  956. projection: projection,
  957. url: "http://116.255.135.38:8081/nsgk_test/profile/geojson/huancui_zhen.json", //GeoJSON的文件路径,用户可以根据需求而改变
  958. format: new ol.format.GeoJSON(),
  959. }),
  960. style: new ol.style.Style({
  961. fill: new ol.style.Fill({
  962. //矢量图层填充颜色,以及透明度
  963. color: "rgba(27,50,56,0.8)",
  964. }),
  965. }),
  966. });
  967. map.addLayer(huancui_zhen);
  968. ///--镇------------------------------------------------------------------------------------------------------------------
  969. //实例化矢量点要素,通过矢量图层添加到地图容器中
  970. let townVectorLayer;
  971. townDiagram();
  972. function townDiagram() {
  973. if (_this.townOptions.length == 0) {
  974. _this.hcAreaInfoOption.forEach((areaVal, areaIndex) => {
  975. let objData = {
  976. orgCode: areaVal.orgCode,
  977. };
  978. bigDataHcCountyInfo(objData).then((res) => {
  979. let content = res.data;
  980. let townMapData = [];
  981. content.forEach((townval, townIndex) => {
  982. let obj = {
  983. lat: townval.lat,
  984. lng: townval.lng,
  985. name: townval.deptName,
  986. orgCode: townval.orgCode,
  987. type: "镇",
  988. };
  989. townMapData.push(obj);
  990. });
  991. _this.townDataSet = townMapData;
  992. townDataFun(townMapData);
  993. });
  994. });
  995. } else {
  996. townDataFun(_this.townOptions);
  997. }
  998. }
  999. //数据处理
  1000. function townDataFun(townMapData) {
  1001. let arrDatas = [];
  1002. for (let i = 0; i < townMapData.length; i++) {
  1003. let varName = "iconFeature" + i;
  1004. window[varName] = new ol.Feature({
  1005. geometry: new ol.geom.Point(
  1006. ol.proj.fromLonLat([townMapData[i].lng, townMapData[i].lat])
  1007. ),
  1008. name:
  1009. townMapData[i].name == undefined
  1010. ? townMapData[i].deptName
  1011. : townMapData[i].name, //名称属性
  1012. orgCode: townMapData[i].orgCode, //人口数(万)
  1013. lat: townMapData[i].lat,
  1014. lng: townMapData[i].lng,
  1015. type: "镇",
  1016. });
  1017. window[varName].setStyle(createLabelStyle(window[varName]));
  1018. arrDatas.push(window[varName]);
  1019. }
  1020. var vectorSource = new ol.source.Vector({
  1021. features: arrDatas,
  1022. });
  1023. // //矢量标注图层
  1024. townVectorLayer = new ol.layer.Vector({
  1025. source: vectorSource,
  1026. });
  1027. map.addLayer(townVectorLayer);
  1028. }
  1029. //矢量标注样式设置函数,设置image为图标ol.style.Icon
  1030. function createLabelStyle(feature) {
  1031. return new ol.style.Style({
  1032. image: new ol.style.Icon({
  1033. //设置图标偏移
  1034. anchor: [0.5, 1],
  1035. //标注样式的起点位置
  1036. anchorOrigin: "top-right",
  1037. //X方向单位:分数
  1038. anchorXUnits: "fraction",
  1039. //Y方向单位:像素
  1040. anchorYUnits: "pixels",
  1041. //偏移起点位置的方向
  1042. offsetOrigin: "top-right",
  1043. //透明度
  1044. opacity: 0.9,
  1045. // rotation: (Math.PI / 180) * 20,
  1046. //图片路径
  1047. src: require("../../assets/images/homestead/mark.png"),
  1048. //src: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
  1049. }),
  1050. text: new ol.style.Text({
  1051. textAlign: "center", //位置
  1052. textBaseline: "bottom", //基准线
  1053. font: "normal 12px 微软雅黑", //文字样式
  1054. text: feature.get("name"), //文本内容
  1055. fill: new ol.style.Fill({
  1056. //文本填充样式(即文字颜色)
  1057. color: "#ffffff",
  1058. }),
  1059. }),
  1060. });
  1061. }
  1062. ///-----------乡---------------------------------------------------------------------------------------------------------
  1063. var villageVectorLayer; //村标记
  1064. async function villageDiagram() {
  1065. if (_this.villageOptions.length == 0) {
  1066. //镇
  1067. let townArray = [];
  1068. let villageArray = [];
  1069. function townObjFun() {
  1070. return new Promise(function (resolve, reject) {
  1071. _this.hcAreaInfoOption.forEach((areaVal, areaIndex) => {
  1072. let objData = {
  1073. orgCode: areaVal.orgCode,
  1074. };
  1075. bigDataHcCountyInfo(objData).then((res) => {
  1076. let content = res.data;
  1077. content.forEach((v, i) => {
  1078. let objDatas = {
  1079. orgCode: v.orgCode,
  1080. };
  1081. townArray.push(objDatas);
  1082. resolve();
  1083. });
  1084. });
  1085. });
  1086. });
  1087. }
  1088. function numbersAnd(num) {
  1089. let data = 0;
  1090. for (let i = 0; i < num; i++) {
  1091. data += i;
  1092. }
  1093. return data;
  1094. }
  1095. async function villageObjFun() {
  1096. return new Promise(function (resolve, reject) {
  1097. let allIndex = numbersAnd(townArray.length);
  1098. let curIndex = 0;
  1099. townArray.forEach((villageVal, villageIndex) => {
  1100. var objDataz = {
  1101. orgCode: villageVal.orgCode,
  1102. };
  1103. bigDataHcVillageInfo(objDataz).then((res) => {
  1104. curIndex = curIndex + villageIndex;
  1105. let content = res.data;
  1106. content.forEach((v, i) => {
  1107. let obj = {
  1108. lat: v.lat,
  1109. lng: v.lng,
  1110. name: v.deptName,
  1111. orgCode: v.orgCode,
  1112. type: "村",
  1113. zhenOrgCode: villageVal.orgCode,
  1114. };
  1115. villageArray.push(obj);
  1116. });
  1117. if (curIndex == allIndex) {
  1118. setTimeout(() => {
  1119. resolve();
  1120. }, 400);
  1121. }
  1122. });
  1123. });
  1124. });
  1125. }
  1126. await townObjFun();
  1127. await villageObjFun();
  1128. let villageMapData = [];
  1129. villageArray.forEach((townval, townIndex) => {
  1130. let obj = {
  1131. lat: townval.lat,
  1132. lng: townval.lng,
  1133. name: townval.name,
  1134. orgCode: townval.orgCode,
  1135. type: "村",
  1136. zhenOrgCode: townval.zhenOrgCode,
  1137. };
  1138. villageMapData.push(obj);
  1139. });
  1140. _this.allVillage = villageMapData;
  1141. villageDataFun(villageMapData);
  1142. } else {
  1143. villageDataFun(_this.allVillage);
  1144. }
  1145. }
  1146. //村数据处理
  1147. function villageDataFun(villageMapData) {
  1148. let arrDatas = [];
  1149. for (let i = 0; i < villageMapData.length; i++) {
  1150. let varName = "iconFeature" + i;
  1151. window[varName] = new ol.Feature({
  1152. geometry: new ol.geom.Point(
  1153. ol.proj.fromLonLat([villageMapData[i].lng, villageMapData[i].lat])
  1154. ),
  1155. name:
  1156. villageMapData[i].name == undefined
  1157. ? villageMapData[i].deptName
  1158. : villageMapData[i].name, //名称属性
  1159. orgCode: villageMapData[i].orgCode, //人口数(万)
  1160. lat: villageMapData[i].lat,
  1161. lng: villageMapData[i].lng,
  1162. type: "村",
  1163. zhenOrgCode: villageMapData[i].zhenOrgCode,
  1164. });
  1165. window[varName].setStyle(visCreateLabelStyle(window[varName]));
  1166. arrDatas.push(window[varName]);
  1167. }
  1168. var vectorSource = new ol.source.Vector({
  1169. features: arrDatas,
  1170. });
  1171. // //矢量标注图层
  1172. villageVectorLayer = new ol.layer.Vector({
  1173. source: vectorSource,
  1174. });
  1175. map.addLayer(villageVectorLayer);
  1176. }
  1177. //矢量标注样式设置函数,设置image为图标ol.style.Icon
  1178. function visCreateLabelStyle(feature) {
  1179. return new ol.style.Style({
  1180. image: new ol.style.Icon({
  1181. //设置图标偏移
  1182. anchor: [0.5, 1],
  1183. //标注样式的起点位置
  1184. anchorOrigin: "top-right",
  1185. //X方向单位:分数
  1186. anchorXUnits: "fraction",
  1187. //Y方向单位:像素
  1188. anchorYUnits: "pixels",
  1189. //偏移起点位置的方向
  1190. offsetOrigin: "top-right",
  1191. //透明度
  1192. opacity: 0.9,
  1193. //图片路径
  1194. //src: 'images/map.png'
  1195. src: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
  1196. }),
  1197. text: new ol.style.Text({
  1198. textAlign: "center", //位置
  1199. textBaseline: "bottom", //基准线
  1200. font: "normal 12px 微软雅黑", //文字样式
  1201. text: feature.get("name"), //文本内容
  1202. fill: new ol.style.Fill({
  1203. //文本填充样式(即文字颜色)
  1204. color: "#ffffff",
  1205. }),
  1206. }),
  1207. zIndex: 9999,
  1208. });
  1209. }
  1210. map.on("moveend", function (evt) {
  1211. var zoom = map.getView().getZoom();
  1212. if (zoom < 13) {
  1213. if (villageVectorLayer != undefined) {
  1214. map.removeLayer(villageVectorLayer);
  1215. map.removeLayer(shitu);
  1216. map.addLayer(shitu);
  1217. map.removeLayer(townVectorLayer);
  1218. townDiagram();
  1219. }
  1220. }
  1221. });
  1222. map.on("singleclick", function (evt) {
  1223. let feature = map.forEachFeatureAtPixel(
  1224. evt.pixel,
  1225. (feature) => feature
  1226. );
  1227. if (feature) {
  1228. let featureValue = feature.values_;
  1229. if (featureValue.type == "镇") {
  1230. map.getView().animate({
  1231. // 只设置需要的属性即可
  1232. center: ol.proj.fromLonLat([featureValue.lng, featureValue.lat]), // 中心点
  1233. zoom: 13, // 缩放级别
  1234. rotation: undefined, // 缩放完成view视图旋转弧度
  1235. duration: 1000, // 缩放持续时间,默认不需要设置
  1236. });
  1237. map.removeLayer(villageVectorLayer);
  1238. villageDiagram();
  1239. _this.currentSelected = 1;
  1240. let SelectOrgCode = {
  1241. orgCode: featureValue.orgCode,
  1242. deptName: featureValue.name,
  1243. };
  1244. _this.townDealWithFun(SelectOrgCode);
  1245. _this.switchLoad();
  1246. let obj = {
  1247. orgCode: featureValue.orgCode,
  1248. };
  1249. bigDataHcVillageInfo(obj).then((res) => {
  1250. if (res.code == 200) {
  1251. let content = res.data;
  1252. let dateValue = { orgCode: "", deptName: "全部" };
  1253. content.unshift(dateValue);
  1254. _this.villageOptions = content;
  1255. _this.villageDealWithFun(dateValue);
  1256. }
  1257. });
  1258. } else if (featureValue.type == "村") {
  1259. setTimeout(() => {
  1260. map.removeLayer(shitu);
  1261. }, 1000);
  1262. _this.currentSelected = 2;
  1263. _this.statusList = 0;
  1264. if (_this.focusTownOptions[0].orgCode != featureValue.zhenOrgCode) {
  1265. let zhenOrgCode = featureValue.zhenOrgCode;
  1266. let selectArr = _this.townOptions.filter((v, i) => {
  1267. return v.orgCode == zhenOrgCode;
  1268. });
  1269. _this.townDealWithFun(selectArr[0]);
  1270. let obj = {
  1271. orgCode: featureValue.zhenOrgCode,
  1272. };
  1273. bigDataHcVillageInfo(obj).then((res) => {
  1274. if (res.code == 200) {
  1275. let content = res.data;
  1276. let dateValue = { orgCode: "", deptName: "全部" };
  1277. content.unshift(dateValue);
  1278. _this.villageOptions = content;
  1279. let selecVillagetArr = content.filter((v, i) => {
  1280. return v.orgCode == featureValue.orgCode;
  1281. });
  1282. _this.villageDealWithFun(selecVillagetArr[0]);
  1283. _this.switchLoad();
  1284. $("#cun").trigger("change");
  1285. }
  1286. });
  1287. } else {
  1288. let SelectOrgCode = {
  1289. orgCode: featureValue.orgCode,
  1290. deptName: featureValue.name,
  1291. };
  1292. _this.villageDealWithFun(SelectOrgCode);
  1293. _this.switchLoad();
  1294. $("#cun").trigger("change");
  1295. }
  1296. }
  1297. }
  1298. // var zb = evt.coordinate;
  1299. // map.getView().animate({
  1300. // // 只设置需要的属性即可
  1301. // center: [zb[0], zb[1]], // 中心点
  1302. // zoom: 15, // 缩放级别
  1303. // rotation: undefined, // 缩放完成view视图旋转弧度
  1304. // duration: 1000, // 缩放持续时间,默认不需要设置
  1305. // });
  1306. // document.getElementById("info").innerHTML = "";
  1307. // var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
  1308. // var url = wmsSource.getFeatureInfoUrl(
  1309. // evt.coordinate,
  1310. // viewResolution,
  1311. // "EPSG:3857",
  1312. // { INFO_FORMAT: "text/html" }
  1313. // );
  1314. // if (url) {
  1315. // fetch(url)
  1316. // .then(function (response) {
  1317. // return response.text();
  1318. // })
  1319. // .then(function (html) {
  1320. // if (html.indexOf("<table") != -1) {
  1321. // setTimeout(() => {
  1322. // _this.hasTable = true;
  1323. // document.getElementById("info").innerHTML = html;
  1324. // if (html.indexOf("house") != -1) {
  1325. // _this.hasDateStatus = 1;
  1326. // let obj = {};
  1327. // let trs = $("#info .featureInfo").find("tr:eq(1)");
  1328. // obj.FWSYRMC = ""; //房屋所有人名称
  1329. // // obj.FWSYRMC = trs.find("td").eq(1).text(); //房屋所有人名称
  1330. // obj.XH = trs.find("td").eq(16).text(); //农房编号
  1331. // obj.TDMJ = trs.find("td").eq(10).text(); //土地面积
  1332. // obj.DZ = trs.find("td").eq(4).text(); //地址
  1333. // obj.org_code = trs.find("td").eq(20).text(); //农房编号
  1334. // obj.tel = "";
  1335. // _this.hasData = obj;
  1336. // let orgCode = {
  1337. // orgCode: obj.org_code,
  1338. // };
  1339. // hcWebsiteLxr(orgCode).then((res) => {
  1340. // if (res.code == 200) {
  1341. // let content = res.data;
  1342. // _this.hasData.FWSYRMC = content.linker;
  1343. // _this.hasData.tel = content.telephone;
  1344. // }
  1345. // });
  1346. // } else {
  1347. // _this.hasDateStatus = 0;
  1348. // let obj = {};
  1349. // let trs = $("#info .featureInfo").find("tr:eq(1)");
  1350. // obj.CBRMC = trs.find("td").eq(3).text(); //承包人名称
  1351. // obj.CBRMC = "";
  1352. // obj.XH = trs.find("td").eq(1).text(); //编号
  1353. // obj.MJ = trs.find("td").eq(6).text(); //面积
  1354. // obj.CM = trs.find("td").eq(2).text(); //村名
  1355. // obj.org_code = trs.find("td").eq(15).text(); //行政区化代码
  1356. // obj.tel = "";
  1357. // _this.hasData = obj;
  1358. // let orgCode = {
  1359. // orgCode: obj.org_code,
  1360. // };
  1361. // hcWebsiteLxr(orgCode).then((res) => {
  1362. // if (res.code == 200) {
  1363. // let content = res.data;
  1364. // _this.hasData.CBRMC = content.linker;
  1365. // _this.hasData.tel = content.telephone;
  1366. // }
  1367. // });
  1368. // }
  1369. // }, 300);
  1370. // } else {
  1371. // _this.hasTable = false;
  1372. // }
  1373. // });
  1374. // }
  1375. });
  1376. map.on("pointermove", function (evt) {
  1377. if (evt.dragging) {
  1378. return;
  1379. }
  1380. var pixel = map.getEventPixel(evt.originalEvent);
  1381. var hit = map.forEachLayerAtPixel(pixel, function () {
  1382. return true;
  1383. });
  1384. map.getTargetElement().style.cursor = hit ? "pointer" : "";
  1385. });
  1386. //属性查询结束 ------------------end
  1387. $("#zhen").on("change", function () {
  1388. /**
  1389. * @api wfs服务空间查询
  1390. * @param {*} wfsurl
  1391. * @param {*} srsName
  1392. * @param {*} typeName
  1393. * @param {*} drawType
  1394. * @param {option 可选} geometryField
  1395. */
  1396. //获取类型 测距
  1397. var zhen = _this.focusTownOptions[0].deptName;
  1398. let currObj = _this.townOptions.filter((v) => {
  1399. return v.deptName == zhen;
  1400. });
  1401. //删除之前图层 --------------------start
  1402. if (currObj.length > 0) {
  1403. let currObjNum = currObj[0];
  1404. map.getView().animate({
  1405. // 只设置需要的属性即可
  1406. center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
  1407. zoom: 13, // 缩放级别
  1408. rotation: undefined, // 缩放完成view视图旋转弧度
  1409. duration: 1000, // 缩放持续时间,默认不需要设置
  1410. });
  1411. } else {
  1412. map.getView().animate({
  1413. // 只设置需要的属性即可
  1414. center: ol.proj.fromLonLat([122.145662, 37.369575]), // 中心点
  1415. zoom: 11.2, // 缩放级别
  1416. rotation: undefined, // 缩放完成view视图旋转弧度
  1417. duration: 1000, // 缩放持续时间,默认不需要设置
  1418. });
  1419. }
  1420. map.removeLayer(villageVectorLayer);
  1421. villageDiagram();
  1422. });
  1423. //按照分类查询 村定位地图-----------------start
  1424. var nongZt;
  1425. var texiao_layer_fang;
  1426. var texiao_layer_di;
  1427. $("#cun").on("change", function () {
  1428. /**
  1429. * @api wfs服务空间查询
  1430. * @param {*} wfsurl
  1431. * @param {*} srsName
  1432. * @param {*} typeName
  1433. * @param {*} drawType
  1434. * @param {option 可选} geometryField
  1435. */
  1436. var cunmap = _this.focusVillageOptions[0].orgCode;
  1437. var cun;
  1438. let currObj = _this.villageOptions.filter((v) => {
  1439. return v.orgCode == cunmap;
  1440. });
  1441. if (currObj.length == 1) {
  1442. cun = currObj[0].deptName;
  1443. } else {
  1444. cun = "";
  1445. }
  1446. //删除之前加载的图层
  1447. if (cun != "全部") {
  1448. let currObjNum = currObj[0];
  1449. map.getView().animate({
  1450. // 只设置需要的属性即可
  1451. center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
  1452. zoom: 14.5, // 缩放级别
  1453. rotation: undefined, // 缩放完成view视图旋转弧度
  1454. duration: 1000, // 缩放持续时间,默认不需要设置
  1455. });
  1456. }
  1457. map.removeLayer(nongZt);
  1458. //村的数据判断
  1459. if (cun == "all" || cun == "") {
  1460. //删除之前图层
  1461. //定位个人地图
  1462. map.removeLayer(texiao_layer_fang);
  1463. map.removeLayer(texiao_layer_di);
  1464. //删除之前图层 -------------------end
  1465. } else {
  1466. // map.removeLayer(cunshitu);
  1467. // map.removeLayer(dishitu);
  1468. map.removeLayer(villageVectorLayer);
  1469. villageDiagram();
  1470. setTimeout(() => {
  1471. map.removeLayer(shitu);
  1472. }, 1000);
  1473. }
  1474. //查询条件
  1475. var cql_filter;
  1476. //for(var i=0; i< difang.length; i++){
  1477. //图层加载
  1478. //地的数据判断
  1479. var difang = "nsgk_hc:nsgk_hc_all";
  1480. console.log("++++++++++++" + cun);
  1481. //业务图层 wms服务
  1482. //for (var i = 0; i < difang.length; i++) {
  1483. ///if (difang[i] == "nsgk_hc:t_geo_hc_house") {
  1484. cql_filter = "CM='" + cun + "'";
  1485. //} else {
  1486. // cql_filter = "CM='" + cun + "'";
  1487. //}
  1488. nongZt = new ol.layer.Tile({
  1489. source: new ol.source.TileWMS({
  1490. //url: 'http://192.168.31.150:8888/geoserver/mywork_mysql/wms',
  1491. url: "http://116.255.135.38:8080/geoserver/nsgk_hc/wms",
  1492. //url: 'http://localhost:8888/geoserver/mywork_mysql/wms',
  1493. //url: 'http://localhost:8888/geoserver/new_shp/wms',
  1494. params: {
  1495. LAYERS: difang,
  1496. //'LAYERS': 'new_shp:new_shp_all',
  1497. TILED: true,
  1498. cql_filter: cql_filter,
  1499. SRID: 3857,
  1500. },
  1501. }),
  1502. });
  1503. //}
  1504. //定位查询位置
  1505. let param_dw = {
  1506. srsName: "EPSG:3857",
  1507. service: "WFS",
  1508. version: "1.0.0",
  1509. request: "GetFeature",
  1510. typename: difang,
  1511. //featureNS: 'nsgk_hc',//命名空间 URI
  1512. cql_filter: cql_filter,
  1513. //featurePrefix: 'nationalwater',//工作区名称
  1514. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  1515. outputFormat: "application/json",
  1516. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  1517. };
  1518. let url_dw = "http://116.255.135.38:8080/geoserver/nsgk_hc/wfs"; //wfsurl;
  1519. url_dw = url_dw + "?";
  1520. for (let key in param_dw) {
  1521. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  1522. }
  1523. url_dw = url_dw.substr(0, url_dw.length - 1);
  1524. fetch(url_dw, {
  1525. method: "POST", // *GET, POST, PUT, DELETE, etc.
  1526. })
  1527. .then((res) => {
  1528. var geojsonmap = res.json();
  1529. return geojsonmap;
  1530. })
  1531. .then((data) => {
  1532. //var datamap = data.bbox;
  1533. // var datamap = data.features[0].bbox;
  1534. // map.getView().animate({
  1535. // // 只设置需要的属性即可
  1536. // center: datamap, // 中心点
  1537. // zoom: 15, // 缩放级别
  1538. // rotation: undefined, // 缩放完成view视图旋转弧度
  1539. // duration: 1000, // 缩放持续时间,默认不需要设置
  1540. // });
  1541. })
  1542. .catch((error) => {
  1543. console.log("【异常】", error);
  1544. });
  1545. map.addLayer(nongZt);
  1546. //}
  1547. });
  1548. //村定位查询-------------------------------------end
  1549. },
  1550. /*以下删*/
  1551. onConfirm(time) {
  1552. this.message = time;
  1553. this.showPicker = false;
  1554. },
  1555. },
  1556. };
  1557. </script>
  1558. <style scoped lang="scss">
  1559. .app-container {
  1560. width: 100vw;
  1561. height: 100vh;
  1562. position: relative;
  1563. .rightIcon_wrap {
  1564. position: absolute;
  1565. right: 16px;
  1566. bottom: 160px;
  1567. .selectionIcon_wrap {
  1568. width: 74px;
  1569. background: #fff;
  1570. border-radius: 10px;
  1571. padding: 14px 0;
  1572. .icon {
  1573. width: 38px;
  1574. height: 38px;
  1575. background: url("../../assets/images/homestead/selection_icon.png")
  1576. no-repeat;
  1577. background-size: 100% 100%;
  1578. margin: 0 auto 4px;
  1579. }
  1580. .text {
  1581. font-size: 24px;
  1582. text-align: center;
  1583. }
  1584. }
  1585. .positioning_wrap {
  1586. width: 74px;
  1587. background: #fff;
  1588. margin-bottom: 16px;
  1589. border-radius: 10px;
  1590. height: 74px;
  1591. display: flex;
  1592. justify-content: center; /* 相对父元素水平居中 */
  1593. align-items: center; /* 子元素相对父元素垂直居中*/
  1594. .icon {
  1595. width: 38px;
  1596. height: 38px;
  1597. background: url("../../assets/images/homestead/positioning_icon.png")
  1598. no-repeat;
  1599. background-size: 100% 100%;
  1600. margin: 0 auto;
  1601. }
  1602. }
  1603. }
  1604. .rightZoom_wrap {
  1605. position: absolute;
  1606. right: 16px;
  1607. top: 50%;
  1608. width: 74px;
  1609. margin-top: -100px;
  1610. background: #fff;
  1611. margin-bottom: 16px;
  1612. border-radius: 10px;
  1613. height: 100px;
  1614. .amplification,
  1615. .narrow {
  1616. height: 50px;
  1617. width: 74px;
  1618. }
  1619. .amplification {
  1620. background: url("../../assets/images/homestead/jia.png") center center
  1621. no-repeat;
  1622. // background-size: 40% auto;
  1623. }
  1624. .narrow {
  1625. background: url("../../assets/images/homestead/jian.png") center center
  1626. no-repeat;
  1627. // background-size: 40% auto;
  1628. }
  1629. }
  1630. // <div class="rightZoom_wrap">
  1631. // <div class="amplification"></div>
  1632. // <div class="narrow"></div>
  1633. // </div>
  1634. .homesteadList_wrap {
  1635. // display: none;
  1636. display: flex;
  1637. position: absolute;
  1638. right: -536px;
  1639. top: 20px;
  1640. bottom: 160px;
  1641. width: 536px;
  1642. background: #fff;
  1643. z-index: 999;
  1644. border-top-left-radius: 15px;
  1645. border-bottom-left-radius: 15px;
  1646. flex-direction: column;
  1647. .title_m {
  1648. color: #333;
  1649. line-height: 36px;
  1650. padding: 20px 40px 32px;
  1651. .name {
  1652. font-size: 40px;
  1653. line-height: 42px;
  1654. height: 42px;
  1655. }
  1656. .more_icon {
  1657. width: 38px;
  1658. height: 38px;
  1659. background: url("../../assets/images/homestead/selectionNext_icon.png")
  1660. no-repeat;
  1661. float: right;
  1662. margin-top: 2px;
  1663. }
  1664. }
  1665. .main_m {
  1666. overflow-y: auto;
  1667. padding: 0 40px;
  1668. // height: 300px;
  1669. flex: 1;
  1670. .flex_block {
  1671. height: 70px;
  1672. display: flex;
  1673. // justify-content: center; /* 相对父元素水平居中 */
  1674. align-items: center; /* 子元素相对父元素垂直居中 */
  1675. .name_text {
  1676. font-size: 34px;
  1677. flex: 1;
  1678. overflow: hidden; /*超出部分隐藏*/
  1679. white-space: nowrap; /*不换行*/
  1680. text-overflow: ellipsis; /*超出部分文字以...显示*/
  1681. }
  1682. .square_text {
  1683. font-size: 34px;
  1684. flex: 0.8;
  1685. }
  1686. .operation_mian {
  1687. flex: 0 0 150px;
  1688. .describe {
  1689. font-size: 20px;
  1690. padding: 6px 12px;
  1691. float: right;
  1692. color: #fff;
  1693. &.yph {
  1694. background: #3cbf5b;
  1695. border-radius: 30px;
  1696. }
  1697. }
  1698. }
  1699. }
  1700. }
  1701. .footerBtn_wrap {
  1702. flex: 0 0 90px;
  1703. display: flex;
  1704. justify-content: center; /* 相对父元素水平居中 */
  1705. align-items: center; /* 子元素相对父元素垂直居中 */
  1706. .options {
  1707. flex: 1;
  1708. font-size: 38px;
  1709. display: flex;
  1710. justify-content: center; /* 相对父元素水平居中 */
  1711. align-items: center; /* 子元素相对父元素垂直居中 */
  1712. height: 90px;
  1713. &:first-child {
  1714. border-bottom-left-radius: 15px;
  1715. }
  1716. &.active {
  1717. background: #3cbf5b;
  1718. color: #fff;
  1719. }
  1720. }
  1721. }
  1722. }
  1723. .map_area {
  1724. width: 100vw;
  1725. height: 100vh;
  1726. background: #ddd;
  1727. position: absolute;
  1728. left: 0;
  1729. top: 0;
  1730. }
  1731. .address_wrap {
  1732. position: fixed;
  1733. z-index: 9;
  1734. top: 24px;
  1735. // left: 16px;
  1736. left: -80px;
  1737. display: flex;
  1738. .address_item {
  1739. display: flex;
  1740. flex-direction: column;
  1741. margin-right: 8px;
  1742. justify-content: center; /* 相对父元素水平居中 */
  1743. align-items: center; /* 子元素相对父元素垂直居中 */
  1744. position: relative;
  1745. .portrait {
  1746. width: 76px;
  1747. height: 76px;
  1748. background: #000;
  1749. border-radius: 50%;
  1750. margin-bottom: 20px;
  1751. font-size: 30px;
  1752. color: #fff;
  1753. text-align: center;
  1754. line-height: 65px;
  1755. color: #fff;
  1756. &.zhen,
  1757. &.cun {
  1758. border: 5px solid rgba(255, 255, 255, 0.6);
  1759. }
  1760. &.zhen {
  1761. background: url("../../assets/images/homestead/zhen.jpg") top center
  1762. no-repeat;
  1763. background-size: 100% 100%;
  1764. }
  1765. &.cun {
  1766. background: url("../../assets/images/homestead/cun.jpg") top center
  1767. no-repeat;
  1768. background-size: 100% 100%;
  1769. }
  1770. }
  1771. .name {
  1772. font-size: 14px;
  1773. background: #fff;
  1774. padding: 2px 6px;
  1775. border-radius: 8px;
  1776. }
  1777. &.more {
  1778. .portrait {
  1779. width: 40px;
  1780. background: none;
  1781. }
  1782. .name {
  1783. background: url("../../assets/images/homestead/address_more.png")
  1784. no-repeat;
  1785. background-size: 100% 100%;
  1786. width: 40px;
  1787. height: 40px;
  1788. padding: 0;
  1789. &.shrink {
  1790. transform: rotate(180deg);
  1791. }
  1792. }
  1793. }
  1794. .address_suspension {
  1795. position: absolute;
  1796. left: calc(100% + 8px);
  1797. top: 100px;
  1798. z-index: 10;
  1799. padding: 10px 8px 10px 15px;
  1800. background: #fff;
  1801. border-radius: 10px;
  1802. width: auto;
  1803. .address_suspension_scroll {
  1804. height: 200px;
  1805. overflow-y: auto;
  1806. padding-right: 8px;
  1807. }
  1808. .items {
  1809. white-space: nowrap;
  1810. }
  1811. }
  1812. }
  1813. }
  1814. .searchBar_wrap {
  1815. // display: none;
  1816. display: flex;
  1817. position: fixed;
  1818. bottom: 0;
  1819. left: 0;
  1820. width: 100%;
  1821. padding: 28px 16px 28px 13px;
  1822. background: #fff;
  1823. border-top-left-radius: 15px;
  1824. border-top-right-radius: 15px;
  1825. .actionBar_wrap {
  1826. display: flex;
  1827. position: absolute;
  1828. top: 0;
  1829. left: 0;
  1830. width: 100%;
  1831. height: 100%;
  1832. background: #fff;
  1833. border-top-left-radius: 15px;
  1834. border-top-right-radius: 15px;
  1835. .m_list {
  1836. flex: 1;
  1837. display: flex;
  1838. justify-content: center; /* 相对父元素水平居中 */
  1839. align-items: center; /* 子元素相对父元素垂直居中 */
  1840. .tensile,
  1841. .positioning,
  1842. .spacing,
  1843. .scale {
  1844. width: 76px;
  1845. height: 72px;
  1846. background: #ffffff;
  1847. border-radius: 8px;
  1848. box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.16);
  1849. .icon {
  1850. width: 76px;
  1851. height: 72px;
  1852. }
  1853. &.active {
  1854. background: #333;
  1855. &.tensile {
  1856. .icon {
  1857. background: url("../../assets/images/homestead/operation/tensile_active.png")
  1858. center center no-repeat;
  1859. background-size: 38px 50px;
  1860. }
  1861. }
  1862. &.positioning {
  1863. .icon {
  1864. background: url("../../assets/images/homestead/operation/positioning_active.png")
  1865. center center no-repeat;
  1866. background-size: 38px 48px;
  1867. }
  1868. }
  1869. &.spacing {
  1870. .icon {
  1871. background: url("../../assets/images/homestead/operation/spacing_active.png")
  1872. center center no-repeat;
  1873. background-size: 46px 46px;
  1874. }
  1875. }
  1876. &.scale {
  1877. .icon {
  1878. background: url("../../assets/images/homestead/operation/scale_active.png")
  1879. center center no-repeat;
  1880. background-size: 48px 48px;
  1881. }
  1882. }
  1883. }
  1884. }
  1885. .tensile {
  1886. .icon {
  1887. background: url("../../assets/images/homestead/operation/tensile.png")
  1888. center center no-repeat;
  1889. background-size: 38px 50px;
  1890. }
  1891. }
  1892. .positioning {
  1893. .icon {
  1894. background: url("../../assets/images/homestead/operation/positioning.png")
  1895. center center no-repeat;
  1896. background-size: 38px 48px;
  1897. }
  1898. }
  1899. .spacing {
  1900. .icon {
  1901. background: url("../../assets/images/homestead/operation/spacing.png")
  1902. center center no-repeat;
  1903. background-size: 46px 46px;
  1904. }
  1905. }
  1906. .scale {
  1907. .icon {
  1908. background: url("../../assets/images/homestead/operation/scale.png")
  1909. center center no-repeat;
  1910. background-size: 48px 48px;
  1911. }
  1912. }
  1913. .closes {
  1914. background: url("../../assets/images/homestead/searchBar_close.png")
  1915. no-repeat;
  1916. background-size: 100% 100%;
  1917. width: 72px;
  1918. height: 72px;
  1919. &.gray {
  1920. background: url("../../assets/images/homestead/searchBar_close_gray.png")
  1921. no-repeat;
  1922. background-size: 100% 100%;
  1923. }
  1924. }
  1925. .correct {
  1926. background: url("../../assets/images/homestead/searchBar_save.png")
  1927. no-repeat;
  1928. background-size: 100% 100%;
  1929. width: 72px;
  1930. height: 72px;
  1931. }
  1932. }
  1933. }
  1934. .searchBar_area {
  1935. flex: 1;
  1936. height: 80px;
  1937. background: #f1f1f1;
  1938. border: 1px solid #dfdfdf;
  1939. border-radius: 10px;
  1940. padding: 0 28px;
  1941. display: flex;
  1942. .bar_icon {
  1943. width: 50px;
  1944. height: 50px;
  1945. background: url("../../assets/images/homestead/searchBar_bar.png")
  1946. center center no-repeat;
  1947. background-size: 100% 100%;
  1948. margin-top: 14px;
  1949. margin-right: 15px;
  1950. }
  1951. .bar_ipt {
  1952. flex: 1;
  1953. input {
  1954. width: 100%;
  1955. height: 100%;
  1956. background: none;
  1957. border: 0 none;
  1958. font-size: 32px;
  1959. }
  1960. }
  1961. .bar_text {
  1962. flex: 0 0 80px;
  1963. font-size: 32px;
  1964. color: #333333;
  1965. font-family: PingFang SC, PingFang SC-Regular;
  1966. font-weight: 400;
  1967. display: flex;
  1968. justify-content: center; /* 相对父元素水平居中 */
  1969. align-items: center; /* 子元素相对父元素垂直居中 */
  1970. }
  1971. }
  1972. .searchBar_more {
  1973. flex: 0 0 80px;
  1974. background: url("../../assets/images/homestead/searchBar_add.png") center
  1975. center no-repeat;
  1976. background-size: 80% 80%;
  1977. margin-left: 15px;
  1978. }
  1979. }
  1980. .landHomestead_wrap {
  1981. display: none;
  1982. position: fixed;
  1983. bottom: 0;
  1984. left: 0;
  1985. width: 100%;
  1986. padding: 0 16px;
  1987. .landHomestead_search {
  1988. height: 80px;
  1989. background: #f1f1f1;
  1990. border: 1px solid #dfdfdf;
  1991. border-radius: 10px;
  1992. padding: 0 28px;
  1993. display: flex;
  1994. margin-bottom: 10px;
  1995. .bar_icon {
  1996. width: 50px;
  1997. height: 50px;
  1998. background: url("../../assets/images/homestead/searchBar_bar.png")
  1999. center center no-repeat;
  2000. background-size: 95% 95%;
  2001. margin-top: 14px;
  2002. margin-right: 15px;
  2003. }
  2004. .bar_ipt {
  2005. flex: 1;
  2006. input {
  2007. width: 100%;
  2008. height: 100%;
  2009. background: none;
  2010. border: 0 none;
  2011. font-size: 32px;
  2012. }
  2013. }
  2014. .bar_text {
  2015. flex: 0 0 80px;
  2016. font-size: 32px;
  2017. color: #333333;
  2018. font-family: PingFang SC, PingFang SC-Regular;
  2019. font-weight: 400;
  2020. display: flex;
  2021. justify-content: center; /* 相对父元素水平居中 */
  2022. align-items: center; /* 子元素相对父元素垂直居中 */
  2023. }
  2024. }
  2025. .landHomestead_body {
  2026. background: #fff;
  2027. padding: 30px 20px;
  2028. border-top-left-radius: 12px;
  2029. border-top-right-radius: 12px;
  2030. position: relative;
  2031. .body_flex {
  2032. display: block;
  2033. overflow: hidden;
  2034. .attribute {
  2035. width: 42%;
  2036. float: left;
  2037. .names {
  2038. height: 54px;
  2039. padding-left: 46px;
  2040. background: url("../../assets/images/homestead/landHomestead_home.png")
  2041. left center no-repeat;
  2042. background-size: 38px 36px;
  2043. font-size: 40px;
  2044. line-height: 54px;
  2045. color: #333333;
  2046. margin-bottom: 12px;
  2047. }
  2048. .address {
  2049. height: 48px;
  2050. line-height: 48px;
  2051. font-size: 28px;
  2052. white-space: nowrap;
  2053. text-overflow: ellipsis;
  2054. overflow: hidden;
  2055. word-break: break-all;
  2056. margin-right: 8px;
  2057. }
  2058. .nature {
  2059. height: 48px;
  2060. font-size: 28px;
  2061. }
  2062. }
  2063. .distance {
  2064. width: 29%;
  2065. float: left;
  2066. .size {
  2067. height: 54px;
  2068. line-height: 54px;
  2069. font-size: 40px;
  2070. color: #333333;
  2071. margin-bottom: 12px;
  2072. }
  2073. .probably {
  2074. line-height: 48px;
  2075. font-size: 28px;
  2076. height: 48px;
  2077. }
  2078. }
  2079. .others {
  2080. width: 29%;
  2081. float: left;
  2082. .information {
  2083. height: 54px;
  2084. margin-bottom: 12px;
  2085. .status_text {
  2086. color: #fff;
  2087. font-size: 24px;
  2088. background: #3cbf5b;
  2089. border-radius: 20px;
  2090. padding: 8px 15px;
  2091. float: right;
  2092. }
  2093. .location {
  2094. width: 36px;
  2095. height: 36px;
  2096. background: url("../../assets/images/homestead/others_location.png")
  2097. no-repeat;
  2098. float: right;
  2099. margin: 8px 0 0 20px;
  2100. }
  2101. }
  2102. .editor {
  2103. height: 96px;
  2104. .editor_icon {
  2105. width: 72px;
  2106. height: 72px;
  2107. float: right;
  2108. background: #000;
  2109. margin-top: 14px;
  2110. }
  2111. }
  2112. }
  2113. }
  2114. }
  2115. }
  2116. .landHomesteadDetails_wrap {
  2117. display: none;
  2118. // display: flex;
  2119. position: absolute;
  2120. left: 0;
  2121. bottom: 0;
  2122. width: 100%;
  2123. height: calc(100% - 190px);
  2124. .content_mian {
  2125. flex: 1;
  2126. margin: 0 16px;
  2127. padding: 28px 40px 28px 40px;
  2128. background: #fff;
  2129. border-top-left-radius: 15px;
  2130. border-top-right-radius: 15px;
  2131. display: flex;
  2132. flex-direction: column;
  2133. .serial_flex {
  2134. flex: 0 0 60px;
  2135. margin-bottom: 15px;
  2136. font-size: 40px;
  2137. justify-content: center; /* 相对父元素水平居中 */
  2138. align-items: center; /* 子元素相对父元素垂直居中 */
  2139. color: #333;
  2140. display: flex;
  2141. .number {
  2142. flex: 1;
  2143. span {
  2144. padding-left: 30px;
  2145. }
  2146. }
  2147. .localhref {
  2148. height: 36px;
  2149. flex: 0 0 36px;
  2150. background: url("../../assets/images/homestead/others_location.png")
  2151. no-repeat;
  2152. background-size: 100% 100%;
  2153. }
  2154. }
  2155. .flex_block {
  2156. flex: 1;
  2157. font-size: 28px;
  2158. .describe {
  2159. color: #555;
  2160. padding-right: 30px;
  2161. }
  2162. .content {
  2163. font-size: #333;
  2164. }
  2165. }
  2166. .uploadPictures_block {
  2167. flex: 0 0 160px;
  2168. display: flex;
  2169. max-width: 90%;
  2170. .statusQuo {
  2171. flex: 1;
  2172. display: flex;
  2173. &:first-child {
  2174. margin-right: 36px;
  2175. }
  2176. .picture {
  2177. flex: 1;
  2178. background: #000;
  2179. }
  2180. .describe {
  2181. flex: 0 0 32px;
  2182. display: flex;
  2183. justify-content: center; /* 相对父元素水平居中 */
  2184. align-items: center; /* 子元素相对父元素垂直居中 */
  2185. margin-left: 6px;
  2186. }
  2187. }
  2188. }
  2189. .editor_block {
  2190. flex: 0 0 72px;
  2191. margin-top: 20px;
  2192. display: flex;
  2193. justify-content: flex-end;
  2194. .editor_icon {
  2195. width: 70px;
  2196. height: 70px;
  2197. background: url("../../assets/images/homestead/edit_icon.png")
  2198. no-repeat;
  2199. background-size: 100% 100%;
  2200. }
  2201. }
  2202. // <div class="editor_block">
  2203. // <div class="editor_icon"></div>
  2204. // </div>
  2205. }
  2206. }
  2207. .landHomesteadEdit_wrap {
  2208. display: none;
  2209. // display: flex;
  2210. position: absolute;
  2211. left: 0;
  2212. bottom: 0;
  2213. width: 100%;
  2214. height: calc(100% - 190px);
  2215. flex-direction: column;
  2216. .content_mian {
  2217. flex: 1;
  2218. margin: 0 16px;
  2219. padding: 28px 25px 28px 40px;
  2220. background: #fff;
  2221. border-top-left-radius: 15px;
  2222. border-top-right-radius: 15px;
  2223. display: flex;
  2224. flex-direction: column;
  2225. .info_title {
  2226. flex: 0 0 60px;
  2227. margin-bottom: 15px;
  2228. font-size: 40px;
  2229. justify-content: center; /* 相对父元素水平居中 */
  2230. align-items: center; /* 子元素相对父元素垂直居中 */
  2231. color: #333;
  2232. }
  2233. .flex_main {
  2234. height: 890px;
  2235. padding-right: 15px;
  2236. overflow-y: auto;
  2237. }
  2238. .flex_block {
  2239. height: 100px;
  2240. margin-bottom: 20px;
  2241. .number_s50 {
  2242. width: 50%;
  2243. display: flex;
  2244. float: left;
  2245. flex-direction: column;
  2246. }
  2247. .number_s100 {
  2248. width: 100%;
  2249. float: left;
  2250. display: flex;
  2251. flex-direction: column;
  2252. }
  2253. .number_s60 {
  2254. // flex: 0.6;
  2255. width: 60%;
  2256. float: left;
  2257. display: flex;
  2258. flex-direction: column;
  2259. }
  2260. .number_s40 {
  2261. // flex: 0.4;
  2262. width: 40%;
  2263. display: flex;
  2264. flex-direction: column;
  2265. }
  2266. .number_s35 {
  2267. width: 35%;
  2268. float: left;
  2269. display: flex;
  2270. flex-direction: column;
  2271. }
  2272. .number_s30 {
  2273. width: 30%;
  2274. display: flex;
  2275. float: left;
  2276. flex-direction: column;
  2277. }
  2278. .title_m {
  2279. font-size: 28px;
  2280. flex: 0 0 50px;
  2281. white-space: nowrap;
  2282. text-overflow: ellipsis;
  2283. overflow: hidden;
  2284. word-break: break-all;
  2285. align-items: center; /* 子元素相对父元素垂直居中 */
  2286. }
  2287. .input_m {
  2288. &.select {
  2289. position: relative;
  2290. .dropDown_icon {
  2291. width: 20px;
  2292. height: 16px;
  2293. background: url("../../assets/images/homestead/drop-down.png")
  2294. no-repeat;
  2295. background-size: 100% 100%;
  2296. display: block;
  2297. position: absolute;
  2298. right: 8px;
  2299. top: 12px;
  2300. z-index: 99;
  2301. }
  2302. }
  2303. &.about {
  2304. position: relative;
  2305. .about_symbol {
  2306. position: absolute;
  2307. left: 8px;
  2308. top: 5px;
  2309. z-index: 99;
  2310. }
  2311. /deep/ {
  2312. .van-field__control {
  2313. padding-left: 38px;
  2314. }
  2315. }
  2316. }
  2317. .van-cell {
  2318. padding: 0;
  2319. /deep/ {
  2320. .van-field__control {
  2321. border-bottom: 1px solid #707070;
  2322. &:focus {
  2323. border-color: #3cbf5b;
  2324. color: #3cbf5b;
  2325. }
  2326. }
  2327. }
  2328. }
  2329. }
  2330. .mr50 {
  2331. padding-right: 50px;
  2332. }
  2333. }
  2334. .uploadPicturesFlex_block {
  2335. .title_m {
  2336. font-size: 28px;
  2337. flex: 0 0 50px;
  2338. white-space: nowrap;
  2339. text-overflow: ellipsis;
  2340. overflow: hidden;
  2341. word-break: break-all;
  2342. align-items: center; /* 子元素相对父元素垂直居中 */
  2343. margin-bottom: 20px;
  2344. }
  2345. .main_m {
  2346. }
  2347. }
  2348. }
  2349. .footer_main {
  2350. flex: 0 0 120px;
  2351. background: #fff;
  2352. display: flex;
  2353. justify-content: center; /* 相对父元素水平居中 */
  2354. align-items: center; /* 子元素相对父元素垂直居中 */
  2355. .cancel,
  2356. .save {
  2357. width: 260px;
  2358. height: 75px;
  2359. border-radius: 75px;
  2360. background: #cccccc;
  2361. font-size: 32px;
  2362. color: #fff;
  2363. display: flex;
  2364. justify-content: center; /* 相对父元素水平居中 */
  2365. align-items: center; /* 子元素相对父元素垂直居中 */
  2366. }
  2367. .save {
  2368. background: #3cbf5b;
  2369. margin-left: 50px;
  2370. }
  2371. }
  2372. }
  2373. .farmlandEditSwitch_wrap {
  2374. display: none;
  2375. width: 100vw;
  2376. height: 100vh;
  2377. background: url("../../assets/images/homestead/farmlandEditSwitch_bg.png")
  2378. no-repeat;
  2379. background-size: 100% 100%;
  2380. position: absolute;
  2381. left: 0;
  2382. top: 0;
  2383. z-index: 1001;
  2384. .mains {
  2385. width: 544px;
  2386. height: 480px;
  2387. background: #fff;
  2388. position: absolute;
  2389. left: 50%;
  2390. top: 50%;
  2391. margin: -272px 0 0 -240px;
  2392. z-index: 1002;
  2393. border-radius: 30px;
  2394. padding: 0 30px;
  2395. display: flex;
  2396. justify-content: center; /* 相对父元素水平居中 */
  2397. align-items: center; /* 子元素相对父元素垂直居中 */
  2398. .close_btn {
  2399. position: absolute;
  2400. width: 28px;
  2401. height: 28px;
  2402. background: url("../../assets/images/homestead/farmlandEditSwitch_close.png")
  2403. no-repeat;
  2404. background-size: 100% 100%;
  2405. right: 40px;
  2406. top: 40px;
  2407. }
  2408. .farmhouse {
  2409. flex: 1;
  2410. display: flex;
  2411. justify-content: center; /* 相对父元素水平居中 */
  2412. align-items: center; /* 子元素相对父元素垂直居中 */
  2413. }
  2414. .farmland {
  2415. flex: 1;
  2416. display: flex;
  2417. justify-content: center; /* 相对父元素水平居中 */
  2418. align-items: center; /* 子元素相对父元素垂直居中 */
  2419. }
  2420. .farmhouse,
  2421. .farmland {
  2422. flex-direction: column;
  2423. .icons {
  2424. width: 146px;
  2425. height: 146px;
  2426. margin-bottom: 14px;
  2427. }
  2428. .names {
  2429. font-size: 40px;
  2430. color: #3cbf5b;
  2431. }
  2432. }
  2433. .farmhouse {
  2434. .icons {
  2435. background: url("../../assets/images/homestead/nf.png") no-repeat;
  2436. background-size: 100% 100%;
  2437. }
  2438. }
  2439. .farmland {
  2440. .icons {
  2441. background: url("../../assets/images/homestead/nd.png") no-repeat;
  2442. background-size: 100% 100%;
  2443. }
  2444. }
  2445. // <div class="farmhouse">
  2446. // <div class="icons"></div>
  2447. // <p class="names">农房</p>
  2448. // </div>
  2449. // <div class="farmland">
  2450. // <div class="icons"></div>
  2451. // <p class="names">农地</p>
  2452. // </div>
  2453. }
  2454. }
  2455. }
  2456. ::-webkit-scrollbar {
  2457. -webkit-appearance: none;
  2458. }
  2459. ::-webkit-scrollbar:vertical {
  2460. width: 10px;
  2461. border-radius: 10px;
  2462. }
  2463. ::-webkit-scrollbar:horizontal {
  2464. height: 10px;
  2465. border-radius: 10px;
  2466. }
  2467. ::-webkit-scrollbar-thumb {
  2468. background-color: #eee;
  2469. border-radius: 10px;
  2470. border: 3px solid #ffffff;
  2471. }
  2472. ::-webkit-scrollbar-track {
  2473. border-radius: 10px;
  2474. background-color: #ffffff;
  2475. }
  2476. </style>