管理系统PC端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

895 linhas
32 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. title="土地列表管理"
  5. left-arrow
  6. placeholder
  7. safe-area-inset-top
  8. @click-left="onClickLeft"
  9. />
  10. <div class="search_box">
  11. <div class="left">
  12. <van-field v-model="value" left-icon="search" placeholder="请输入用户名" />
  13. </div>
  14. <van-button type="primary" round >搜索</van-button>
  15. </div>
  16. <div class="location">
  17. <img src="../../assets/images/app/location.png" alt="">
  18. </div>
  19. <div id="full-screen-acceptance" style="width: 100%;height:100vh;">
  20. <!--<div id="landMapDiv"></div>-->
  21. <div id="landMapBox"></div>
  22. <!-- <div id='land-btn-wrap'>-->
  23. <!-- <el-row>-->
  24. <!-- <input id="drawPolygon" class="ant-btn ant-btn-red" type="button" value="画图"/>&nbsp;&nbsp;-->
  25. <!-- &lt;!&ndash; <input id="drawRemove" type="button" class="ant-btn ant-btn-red" value="取消画图"/>&nbsp;&nbsp; &ndash;&gt;-->
  26. <!-- <input id="drawReset" type="button" class="ant-btn ant-btn-red" value="还原"/>-->
  27. <!-- </el-row>-->
  28. <!-- </div>-->
  29. </div>
  30. <!-- <van-popup v-model="open" position="bottom" round >-->
  31. <!-- <div class="landPopup">-->
  32. <!-- <p class="landPopup_title">属性数据 <img src="../../assets/images/app/edit.png" width="25" alt=""></p>-->
  33. <!-- <van-form ref="landForm">-->
  34. <!-- <van-field v-model="form.dkbm" label="地块代码:" placeholder="<自动生成>" :border="false" input-align="right" label-width="auto" maxlength="19" :disabled="true" >-->
  35. <!-- &lt;!&ndash; <template #button v-if="!isDisabled">-->
  36. <!-- <van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button>-->
  37. <!-- </template> &ndash;&gt;-->
  38. <!-- </van-field>-->
  39. <!-- <van-field v-model="form.dkmc" label="地块名称:" placeholder="请输入地块名称" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
  40. <!-- <van-field v-model="syqxzText" label="所有权性质:"-->
  41. <!-- placeholder="请选择所有权性质"-->
  42. <!-- required-->
  43. <!-- :rules="[{ required: true }]"-->
  44. <!-- :border="false"-->
  45. <!-- input-align="right"-->
  46. <!-- right-icon="arrow-down"-->
  47. <!-- readonly-->
  48. <!-- clickable-->
  49. <!-- @click="showOwnership = true"-->
  50. <!-- />-->
  51. <!-- <van-popup v-model="showOwnership" position="bottom" get-container=".app-container">-->
  52. <!-- <van-picker-->
  53. <!-- show-toolbar-->
  54. <!-- :columns="syqxzOptions"-->
  55. <!-- value-key="dictLabel"-->
  56. <!-- @confirm="onConfirmOwnershipOptions"-->
  57. <!-- @cancel="showOwnership = false"-->
  58. <!-- />-->
  59. <!-- </van-popup>-->
  60. <!-- <van-field v-model="dklbText" label="地块类别:"-->
  61. <!-- placeholder="请选择地块类别"-->
  62. <!-- required-->
  63. <!-- :rules="[{ required: true }]"-->
  64. <!-- :border="false"-->
  65. <!-- input-align="right"-->
  66. <!-- right-icon="arrow-down"-->
  67. <!-- readonly-->
  68. <!-- clickable-->
  69. <!-- @click="openLandCategoryPopup"-->
  70. <!-- />-->
  71. <!-- <van-popup v-model="showLandCategory" position="bottom" get-container=".app-container">-->
  72. <!-- <van-picker-->
  73. <!-- show-toolbar-->
  74. <!-- :columns="dklbOptions"-->
  75. <!-- value-key="dictLabel"-->
  76. <!-- @confirm="onConfirmLandCategoryOptions"-->
  77. <!-- @cancel="showLandCategory = false"-->
  78. <!-- />-->
  79. <!-- </van-popup>-->
  80. <!-- <van-field v-model="tdlylxText" label="土地利用类型:"-->
  81. <!-- placeholder="请选择土地利用类型"-->
  82. <!-- required-->
  83. <!-- :rules="[{ required: true }]"-->
  84. <!-- :border="false"-->
  85. <!-- input-align="right"-->
  86. <!-- right-icon="arrow-down"-->
  87. <!-- readonly-->
  88. <!-- clickable-->
  89. <!-- @click="showLandType = true"-->
  90. <!-- />-->
  91. <!-- <van-popup v-model="showLandType" position="bottom" get-container=".app-container">-->
  92. <!-- <van-picker-->
  93. <!-- show-toolbar-->
  94. <!-- :columns="tdlylxOptions"-->
  95. <!-- value-key="dictLabel"-->
  96. <!-- @confirm="onConfirmLandTypeOptions"-->
  97. <!-- @cancel="showLandType = false"-->
  98. <!-- />-->
  99. <!-- </van-popup>-->
  100. <!-- <van-field v-model="dldjText" label="地力等级:"-->
  101. <!-- placeholder="请选择地力等级"-->
  102. <!-- required-->
  103. <!-- :rules="[{ required: true }]"-->
  104. <!-- :border="false"-->
  105. <!-- input-align="right"-->
  106. <!-- right-icon="arrow-down"-->
  107. <!-- readonly-->
  108. <!-- clickable-->
  109. <!-- @click="showLandGrade = true"-->
  110. <!-- />-->
  111. <!-- <van-popup v-model="showLandGrade" position="bottom" get-container=".app-container">-->
  112. <!-- <van-picker-->
  113. <!-- show-toolbar-->
  114. <!-- :columns="dldjOptions"-->
  115. <!-- value-key="dictLabel"-->
  116. <!-- @confirm="onConfirmLandGradeOptions"-->
  117. <!-- @cancel="showLandGrade = false"-->
  118. <!-- />-->
  119. <!-- </van-popup>-->
  120. <!-- <van-field v-model="tdytText" label="土地用途:"-->
  121. <!-- placeholder="请选择土地用途"-->
  122. <!-- required-->
  123. <!-- :rules="[{ required: true }]"-->
  124. <!-- :border="false"-->
  125. <!-- input-align="right"-->
  126. <!-- right-icon="arrow-down"-->
  127. <!-- readonly-->
  128. <!-- clickable-->
  129. <!-- @click="showLandPurpose = true"-->
  130. <!-- />-->
  131. <!-- <van-popup v-model="showLandPurpose" position="bottom" get-container=".app-container">-->
  132. <!-- <van-picker-->
  133. <!-- show-toolbar-->
  134. <!-- :columns="tdytOptions"-->
  135. <!-- value-key="dictLabel"-->
  136. <!-- @confirm="onConfirmLandPurposeOptions"-->
  137. <!-- @cancel="showLandPurpose = false"-->
  138. <!-- />-->
  139. <!-- </van-popup>-->
  140. <!-- <van-field v-model="form.sfjbnt" label="基本农田:" required :rules="[{ required: true }]" :border="false" input-align="right" >-->
  141. <!-- <template #input>-->
  142. <!-- <van-radio-group v-model="form.sfjbnt" direction="horizontal">-->
  143. <!-- &lt;!&ndash; <van-radio name="1">是</van-radio>-->
  144. <!-- <van-radio name="2">否</van-radio> &ndash;&gt;-->
  145. <!-- <van-radio v-for="dict in sfjbntOptions" :ke="dict.dictValue" :name="dict.dictValue">{{ dict.dictLabel }}</van-radio>-->
  146. <!-- </van-radio-group>-->
  147. <!-- </template>-->
  148. <!-- </van-field>-->
  149. <!-- <van-field v-model="form.scmjm" type="number" label="实测面积(亩):" placeholder="请输入实测面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="right" />-->
  150. <!-- <van-field v-model="form.zjrxm" label="指界人姓名:" placeholder="请输入指界人姓名" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="100" />-->
  151. <!-- <van-field v-model="form.dkdz" label="地块东至:" placeholder="请输入地块东至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
  152. <!-- <van-field v-model="form.dkxz" label="地块西至:" placeholder="请输入地块西至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
  153. <!-- <van-field v-model="form.dknz" label="地块南至:" placeholder="请输入地块南至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
  154. <!-- <van-field v-model="form.dkbz" label="地块北至:" placeholder="请输入地块北至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
  155. <!-- <van-field v-model="form.dkbzxx" label="地块备注信息:" placeholder="请输入地块备注信息" type="textarea" rows="3" :border="false" input-align="right" maxlength="250" />-->
  156. <!-- </van-form>-->
  157. <!-- <div class="footer_main">-->
  158. <!-- <van-button type="default" hairline size="large">关闭弹窗</van-button>-->
  159. <!-- <van-button type="danger" hairline size="large">删除地块</van-button>-->
  160. <!-- <van-button type="info" hairline size="large">保存信息</van-button>-->
  161. <!-- </div>-->
  162. <!-- </div>-->
  163. <!-- </van-popup>-->
  164. </div>
  165. </template>
  166. <script>
  167. import { listLand, listLandQuery,getLand, getLandDetail, getLandDetailByDkbm, delLand, addLand, updateLand, printLand } from "@/api/resource/land"
  168. import { areaSavePri, cleanSavePri } from "@/api/gis/map"
  169. import { getToken } from "@/utils/auth"
  170. import Treeselect from "@riophae/vue-treeselect";
  171. import { Splitpanes, Pane } from "splitpanes"
  172. import "@riophae/vue-treeselect/dist/vue-treeselect.css"
  173. import "splitpanes/dist/splitpanes.css"
  174. import { deptTreeSelect } from "@/api/system/user"
  175. import {getConfigKey} from "@/api/system/config";
  176. import {getDept,getInfoByImportCode} from "@/api/system/dept";
  177. import MapField from "@/components/house/MapField";
  178. import $ from "jquery";
  179. export default {
  180. name: "contractedVillageContractor",
  181. components: { Treeselect, Splitpanes, Pane,MapField },
  182. data() {
  183. return {
  184. fform: {}, // 地块信息表单参数
  185. map: "", // 地图
  186. mapGeoServerUrl: "", // geoserver地址
  187. mapCenterLocation: [], // 地图中心坐标
  188. landLayerName: "", // 地块图层名称
  189. landLayer: "", // 地块图层
  190. mapBorder: "", // 地图边界
  191. villageBorderLayerName: "", // 乡镇边界图层名称
  192. vectorLayer: "", // 绘制的矢量图层
  193. title: "", // 弹出层标题
  194. open: false, // 是否显示地块弹出层
  195. syqxzOptions: [], // 所有权性质字典
  196. syqxzText: null, // 所有权性质标签名
  197. showOwnership: false, // 控制所有权性质字典弹出层的显示和隐藏
  198. dklbOptions: [], // 地块类别字典
  199. dklbText: null, // 地块类别标签名
  200. showLandCategory: false, // 控制的地块类别字典弹出层的显示和隐藏
  201. dldjOptions: [], // 地力等级字典
  202. dldjText: null, // 地力等级标签名
  203. showLandGrade: false, // 控制地力等级字典弹出层的显示和隐藏
  204. tdytOptions: [], // 土地用途字典
  205. tdytText: null, // 土地用途标签名
  206. showLandPurpose: false, // 控制土地用途字典弹出层的显示和隐藏
  207. tdlylxOptions: [], // 土地利用类型
  208. tdlylxText: null, // 土地利用类型标签名
  209. showLandType: false, // 控制土地利用类型字典弹出层的显示和隐藏
  210. sfjbntOptions: [], // 是否基本农田字典
  211. showSaveBtn: false, // 控制保存按钮的显示隐藏
  212. showDeleteBtn: false, // 控制删除按钮的显示隐藏
  213. // isDisabled: false, // 是否禁用
  214. taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成
  215. landCategory: ['10'], // 地块类别
  216. showLegend:true,
  217. value:'',
  218. deptId:100,
  219. importCode:'',
  220. };
  221. },
  222. created() {
  223. console.log(this.$store.getters.user.user.dept.deptId)
  224. this.deptId = this.$store.getters.user.user.dept.deptId;
  225. this.importCode = this.$store.getters.user.user.dept.importCode;
  226. // 获取geoserver的地址
  227. this.getGeoServerUrl();
  228. // 获取地块图层名称
  229. this.getLandLayerName();
  230. // 获取村边界的图层名称
  231. this.getVillageBorderLayerName();
  232. },
  233. mounted() {
  234. // 初始化地图
  235. setTimeout(() => {
  236. this.initMap();
  237. }, 500);
  238. },
  239. methods: {
  240. onClickLeft(){
  241. history.back(-1);
  242. },
  243. // 获取geoserver的地址
  244. getGeoServerUrl() {
  245. getConfigKey("system.geoServer.url").then(response => {
  246. this.mapGeoServerUrl = response.msg;
  247. });
  248. },
  249. // 获取地块图层名称
  250. getLandLayerName() {
  251. getConfigKey("geoserver.layer.resourceLand").then(response => {
  252. this.landLayerName = response.msg;
  253. });
  254. },
  255. // 获取村边界的图层名称
  256. getVillageBorderLayerName() {
  257. getConfigKey("geoserver.layer.villageBorder").then(response => {
  258. this.villageBorderLayerName = response.msg;
  259. });
  260. },
  261. // 初始化地图
  262. initMap() {
  263. getDept(this.deptId).then(response => {
  264. let dept = response.data;
  265. if (dept.longitude && dept.latitude) {
  266. this.mapCenterLocation = [dept.longitude, dept.latitude];
  267. } else {
  268. this.mapCenterLocation = [116.391458, 39.902377];
  269. }
  270. document.getElementById("landMapBox").innerHTML = "";
  271. // 定义地图投影
  272. let projection = new ol.proj.Projection({
  273. code: "EPSG:3857",
  274. units: "degrees",
  275. });
  276. // 定义地图图层
  277. let aerial = new ol.layer.Tile({
  278. source: new ol.source.XYZ({
  279. url: "http://t{0-7}.tianditu.com/img_w/wmts?" +
  280. "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  281. "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  282. }),
  283. isGroup: true,
  284. name: "卫星影像图",
  285. });
  286. let yingxzi = new ol.layer.Tile({
  287. source: new ol.source.XYZ({
  288. url: "http://t{0-7}.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067",
  289. }),
  290. isGroup: true,
  291. name: "天地图文字标注--卫星影像图",
  292. });
  293. //加载地图
  294. this.map = new ol.Map({
  295. controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]),
  296. layers: [aerial, yingxzi],
  297. projection: projection,
  298. target: "landMapBox",
  299. view: new ol.View({
  300. center: ol.proj.fromLonLat(this.mapCenterLocation), // 地图中心坐标
  301. zoom: 15.5,
  302. minZoom: 1, //地图缩小限制
  303. maxZoom: 18, //地图放大限制
  304. // extent: [13481224.75161,5667110.83528,13811063.06278,5880284.11416]
  305. }),
  306. });
  307. // // 添加村边界
  308. this.addVillageBorder();
  309. // 添加地块图层
  310. this.addLandLayer();
  311. // 绘制地块
  312. $("#drawLandPolygon").click(() => {
  313. // 创建矢量数据源
  314. let vectorSource = new ol.source.Vector({
  315. wrapX: false,
  316. });
  317. // 创建矢量图层
  318. this.vectorLayer = new ol.layer.Vector({
  319. source: vectorSource,
  320. });
  321. // 添加图层
  322. this.map.addLayer(this.vectorLayer);
  323. // 地图交互-绘制图形
  324. let drawInteraction = new ol.interaction.Draw({
  325. source: vectorSource,
  326. type: "Polygon",
  327. });
  328. // 添加交互
  329. this.map.addInteraction(drawInteraction);
  330. drawInteraction.on('drawend', (evt) => {
  331. // 移除交互
  332. this.map.removeInteraction(drawInteraction);
  333. let coordinates = evt.feature.getGeometry().getCoordinates();
  334. this.reset();
  335. this.form.theGeom = JSON.stringify(coordinates);
  336. this.title = "添加地块信息";
  337. this.showSaveBtn = true;
  338. this.showDeleteBtn = false;
  339. // this.isDisabled = false;
  340. setTimeout(() => {
  341. this.open = true;
  342. }, 10);
  343. });
  344. });
  345. // 地图点击事件
  346. this.map.on("click", (evt) => {
  347. // 点击宅基地查看详情
  348. if (this.landLayer) {
  349. const viewResolution = this.map.getView().getResolution();
  350. const url = this.landLayer.getSource()
  351. .getFeatureInfoUrl(evt.coordinate, viewResolution, 'EPSG:3857', {'INFO_FORMAT': 'application/json'});
  352. if (url) {
  353. fetch(url)
  354. .then(response => response.json())
  355. .then(data => {
  356. if (data.features.length > 0) {
  357. let id = data.features[0].id.split(".")[1];
  358. getDk(id).then(response => {
  359. const data = response.data;
  360. this.reset();
  361. this.form = data;
  362. this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz);
  363. if (data.dklb === '10') {
  364. this.dklbText = '承包地块';
  365. } else {
  366. this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb);
  367. }
  368. this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj);
  369. this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt);
  370. this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx);
  371. this.title = "查看地块信息";
  372. this.showSaveBtn = false;
  373. this.showDeleteBtn = true;
  374. // this.isDisabled = true;
  375. setTimeout(() => {
  376. this.open = true;
  377. }, 10);
  378. });
  379. /* if (this.selectedHomesteadLayer) {
  380. this.map.removeLayer(this.selectedHomesteadLayer);
  381. this.selectedHomesteadLayer = "";
  382. }
  383. this.selectedHomesteadLayer = new ol.layer.Vector({
  384. source: new ol.source.Vector({
  385. features: new ol.format.GeoJSON().readFeatures(data)
  386. }),
  387. name: 'selectedHomesteadLayer',
  388. style: new ol.style.Style({
  389. fill: new ol.style.Fill({
  390. //矢量图层填充颜色,以及透明度
  391. color: "rgba(255, 84, 87, 0.3)",
  392. }),
  393. stroke: new ol.style.Stroke({
  394. //边界样式
  395. color: "#ff5457",
  396. width: 3,
  397. }),
  398. })
  399. });
  400. // this.map.addLayer(this.selectedHomesteadLayer);
  401. this.map.getLayers().insertAt(4, this.selectedHomesteadLayer);*/
  402. }
  403. });
  404. }
  405. }
  406. });
  407. });
  408. },
  409. filterLandLayer() {
  410. if (this.landLayer) {
  411. this.map.removeLayer(this.landLayer);
  412. this.landLayer = "";
  413. }
  414. this.addLandLayer();
  415. },
  416. // 添加地块图层
  417. addLandLayer() {
  418. this.landLayer = new ol.layer.Image({
  419. source: new ol.source.ImageWMS({
  420. url: this.mapGeoServerUrl + '/wms',
  421. params: {
  422. LAYERS: this.landLayerName,
  423. cql_filter: "import_code = '" + this.importCode + "'",
  424. SRID: 3857,
  425. abc: Math.random() // 无效参数,保证每次发送的请求都不一样
  426. }
  427. }),
  428. name: 'landLayer'
  429. });
  430. this.map.getLayers().insertAt(3, this.landLayer);
  431. // this.map.addLayer(this.landLayer);
  432. },
  433. // 添加村边界
  434. addVillageBorder() {
  435. this.mapBorder = new ol.layer.Image({
  436. source: new ol.source.ImageWMS({
  437. url: this.mapGeoServerUrl + '/wms',
  438. params: {
  439. LAYERS: this.villageBorderLayerName,
  440. cql_filter: "import_code = '" + this.importCode + "'",
  441. SRID: 3857,
  442. },
  443. }),
  444. name: 'villageBorderLayer'
  445. });
  446. this.map.getLayers().insertAt(2, this.mapBorder);
  447. },
  448. saveLand() {
  449. this.$refs.landForm.validate().then(() => {
  450. if (this.form.id) {
  451. this.showSaveBtn = false;
  452. updateDk(this.form).then(response => {
  453. if (response.code == 200) {
  454. this.$toast({
  455. icon: 'success',
  456. message: '保存成功',
  457. duration:"1000",
  458. onClose: () => {
  459. this.open = false;
  460. this.showSaveBtn = true;
  461. }
  462. });
  463. }
  464. });
  465. } else {
  466. this.form.deptId = this.deptId;
  467. this.showSaveBtn = false;
  468. addDk(this.form).then(response => {
  469. if (response.code == 200) {
  470. this.$toast({
  471. icon: 'success',
  472. message: '保存成功',
  473. duration:"1000",
  474. onClose: () => {
  475. this.open = false;
  476. this.showSaveBtn = true;
  477. // 移除矢量图层
  478. this.map.removeLayer(this.vectorLayer);
  479. this.vectorLayer = "";
  480. // 移除地块图层重新加载
  481. this.map.removeLayer(this.landLayer);
  482. this.landLayer = "";
  483. this.addLandLayer();
  484. }
  485. });
  486. }
  487. });
  488. }
  489. }).catch(() => {
  490. this.$notify({ type: 'danger', message: '请填写完整的表单项' });
  491. });
  492. },
  493. deleteLand(id) {
  494. this.$dialog.confirm({
  495. message: '是否确认删除此地块?',
  496. }).then(() => {
  497. // on confirm
  498. this.showDeleteBtn = false;
  499. deleteDk(id).then(res => {
  500. if (res.code == 200) {
  501. this.$toast({
  502. icon: 'success',
  503. message: '删除成功',
  504. duration: "1000",
  505. onClose: () => {
  506. this.open = false;
  507. this.showDeleteBtn = true;
  508. // 移除地块图层重新加载
  509. this.map.removeLayer(this.landLayer);
  510. this.landLayer = "";
  511. this.addLandLayer();
  512. }
  513. });
  514. }
  515. });
  516. }).catch(() => {
  517. // on cancel
  518. });
  519. },
  520. onConfirmOwnershipOptions(value){
  521. this.form.syqxz = value.dictValue;
  522. this.syqxzText = value.dictLabel;
  523. this.showOwnership = false;
  524. },
  525. onConfirmLandCategoryOptions(value){
  526. this.form.dklb = value.dictValue;
  527. this.dklbText = value.dictLabel;
  528. this.showLandCategory = false;
  529. },
  530. onConfirmLandTypeOptions(value) {
  531. this.form.tdlylx = value.dictValue;
  532. this.tdlylxText = value.dictLabel;
  533. this.showLandType = false;
  534. },
  535. onConfirmLandGradeOptions(value) {
  536. this.form.dldj = value.dictValue
  537. this.dldjText = value.dictLabel;
  538. this.showLandGrade = false;
  539. },
  540. onConfirmLandPurposeOptions(value){
  541. this.form.tdyt = value.dictValue;
  542. this.tdytText = value.dictLabel;
  543. this.showLandPurpose = false;
  544. },
  545. generateCode() {
  546. generateLandCode({deptId: this.deptId}).then(response => {
  547. this.$set(this.form, 'dkbm', response.data);
  548. });
  549. },
  550. closePopup() {
  551. // 移除矢量图层
  552. if (this.vectorLayer) {
  553. this.map.removeLayer(this.vectorLayer);
  554. this.vectorLayer = "";
  555. }
  556. this.open = false;
  557. this.reset();
  558. },
  559. reset() {
  560. this.form = {
  561. deptId: null,
  562. dkbm: null,
  563. dkmc: null,
  564. syqxz: '30',
  565. dklb: '99',
  566. tdlylx: '01',
  567. dldj: '01',
  568. tdyt: '1',
  569. sfjbnt: '1',
  570. scmjm: null,
  571. zjrxm: null,
  572. dkdz: null,
  573. dkxz: null,
  574. dknz: null,
  575. dkbz: null,
  576. dkbzxx: null,
  577. theGeom: null
  578. };
  579. this.syqxzText = '集体土地所有权';
  580. this.dklbText = '其他集体土地';
  581. this.tdlylxText = '【1】耕地';
  582. this.dldjText = '一等地';
  583. this.tdytText = '种植业';
  584. },
  585. openLandCategoryPopup() {
  586. // 修改时 && 地块类别为承包地块 不允许打开地块类别弹出层
  587. if (this.form.id && this.form.dklb === '10') {
  588. this.$toast({
  589. icon: 'fail',
  590. message: '当前地块为承包地块,不能更改地块类别',
  591. duration: '2000'
  592. })
  593. return ;
  594. }
  595. this.showLandCategory = true;
  596. }
  597. },
  598. };
  599. </script>
  600. <style scoped lang="scss">
  601. ::v-deep .van-nav-bar{
  602. background: linear-gradient( 173deg, #91E2D3 0%, #CDFCF0 100%);
  603. ::v-deep.van-icon{
  604. color: #000000;
  605. }
  606. }
  607. .location{
  608. display: flex;
  609. align-items: center;
  610. justify-content: center;
  611. width: 50px;
  612. height: 50px;
  613. margin: 2vh;
  614. position: absolute;
  615. top: 12vh;
  616. right: 0vw;
  617. z-index: 9;
  618. background-color: rgba(0,0,0,0.5);
  619. border-radius: 10px;
  620. img{
  621. width: 30px;
  622. height: 30px;
  623. border: 1px dashed #ffffff;
  624. }
  625. }
  626. .van-popup{
  627. background: linear-gradient( 180deg, #E5FFF4 0%, #ffffff 100%);
  628. .landPopup{
  629. width: 94%;
  630. margin: 0 auto;
  631. .landPopup_title{
  632. color: #29D2AF;
  633. font-size: 20px;
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-between;
  637. }
  638. }
  639. }
  640. .app-container{
  641. /*background: #fff url("../../../../../static/images/contracted/contracted_index_bg.png") no-repeat center;*/
  642. background-size: 100% 100%;
  643. height: 100vh;
  644. padding: 0;
  645. overflow: hidden;
  646. }
  647. ::v-deep .van-hairline--bottom::after{
  648. border: none;
  649. }
  650. ::v-deep .van-field--disabled .van-field__label {
  651. color: #646566;
  652. }
  653. ::v-deep .landPopup .van-dialog {
  654. width: 90%;
  655. height: 85%;
  656. overflow-y: auto;
  657. }
  658. ::v-deep .landPopup .van-field__label {
  659. width: 7em;
  660. }
  661. .head{
  662. padding: 0 4vw;
  663. }
  664. .tap_block{
  665. width: 100%;
  666. display: flex;
  667. justify-content: space-between;
  668. background: #ebfaf2;
  669. padding: 2PX 4PX;
  670. border-radius: 10PX;
  671. margin-top: 1vh;
  672. .active{
  673. background-image: linear-gradient(to right,#c6fe8b,#48e5a2);
  674. box-shadow: 0 0 10PX #cccccc;
  675. color: #333333;
  676. }
  677. p{
  678. width: 25%;
  679. text-align: center;
  680. padding: 5PX 0;
  681. border-radius: 10PX;
  682. color: #666666;
  683. }
  684. }
  685. .legend_main{
  686. position: absolute;
  687. top: 2vh;
  688. right: 2vw;
  689. }
  690. .openLegend{
  691. position: absolute;
  692. top: 2vh;
  693. right: 0vw;
  694. background-color: rgba(255,255,255,.5);
  695. width: 20PX;
  696. height: 70PX;
  697. display: flex;
  698. align-items: center;
  699. justify-content: center;
  700. border-top-left-radius: 10PX;
  701. border-bottom-left-radius: 10PX;
  702. .sanjiao-left {
  703. display: inline-block;
  704. border-right: 8PX solid #999999;
  705. border-right-color: initial;
  706. border-top: 5PX solid transparent;
  707. border-bottom: 5PX solid transparent;
  708. }
  709. }
  710. .legend_second{
  711. background: rgba(255,255,255,.5);
  712. padding: 2vh;
  713. border-radius: 10PX;
  714. margin-top: 2vh;
  715. }
  716. .legend_tt{
  717. font-size: 16PX;
  718. display: flex;
  719. align-items: center;
  720. justify-content: space-between;
  721. img{
  722. width: 20PX;
  723. }
  724. }
  725. .legend{
  726. background: rgba(255,255,255,.5);
  727. padding: 2vh;
  728. border-radius: 10PX;
  729. .van-checkbox{
  730. margin-top: 2vh;
  731. &:nth-child(1){
  732. ::v-deep .van-checkbox__icon .van-icon{
  733. /*border-color: rgba(22,233,15,1);*/
  734. border: 4px solid #16E90F;
  735. }
  736. }
  737. &:nth-child(2){
  738. ::v-deep .van-checkbox__icon .van-icon{
  739. /*border-color: rgba(1,198,222,1);*/
  740. border: 4px solid #01C6DE;
  741. }
  742. }
  743. &:nth-child(3){
  744. ::v-deep .van-checkbox__icon .van-icon{
  745. /*border-color: rgba(238,238,0,1);*/
  746. border: 4px solid #EEEE00;
  747. }
  748. }
  749. &:nth-child(4){
  750. ::v-deep .van-checkbox__icon .van-icon{
  751. /*border-color: rgba(238,60,60,1);*/
  752. border: 4px solid #EE3C3C;
  753. }
  754. }
  755. &:nth-child(5){
  756. ::v-deep .van-checkbox__icon .van-icon{
  757. /*border-color: rgba(235,134,0,1);*/
  758. border: 4px solid #EB8600;
  759. }
  760. }
  761. }
  762. .van-checkbox-group {
  763. .van-checkbox__label{
  764. i{
  765. display: block;
  766. width: 15PX;
  767. height: 15PX;
  768. border: 1px solid;
  769. border-radius: 3PX;
  770. margin-left: 10PX;
  771. }
  772. .i1{
  773. background: rgba(22,233,15,.7);
  774. border-color: rgba(22,233,15,1);
  775. }
  776. .i2{
  777. background: rgba(1,198,222,.7);
  778. border-color: rgba(1,198,222,1);
  779. }
  780. .i3{
  781. background: rgba(238,238,0,.7);
  782. border-color: rgba(238,238,0,1);
  783. }
  784. .i4{
  785. background: rgba(238,60,60,.7);
  786. border-color: rgba(238,60,60,1);
  787. }
  788. .i5{
  789. background: rgba(235,134,0,.7);
  790. border-color: rgba(235,134,0,1);
  791. }
  792. div{
  793. display: flex;
  794. align-items: center;
  795. }
  796. }
  797. }
  798. }
  799. .mapBox{
  800. height: 100vh;
  801. width: 100%;
  802. }
  803. .footer_main {
  804. flex: 0 0 120px;
  805. background: #ccc;
  806. display: flex;
  807. justify-content: center; /* 相对父元素水平居中 */
  808. align-items: center; /* 子元素相对父元素垂直居中 */
  809. }
  810. .search_box{
  811. display: flex;
  812. align-items: center;
  813. justify-content: space-between;
  814. width: 94%;
  815. margin: 2vh auto;
  816. position: absolute;
  817. left: 3vw;
  818. z-index: 9;
  819. .left{
  820. display: flex;
  821. align-items: center;
  822. flex: 1;
  823. background-color: #ffffff;
  824. border-radius: 50vh;
  825. overflow: hidden;
  826. margin-right: 3vw;
  827. }
  828. p{
  829. flex-shrink: 0;
  830. }
  831. button{
  832. flex-shrink: 0;
  833. background: linear-gradient( 271deg, #53E4A5 0%, #24DBDB 100%);
  834. border: none;
  835. width: 20vw;
  836. }
  837. }
  838. #land-btn-wrap {
  839. position: relative;
  840. width: 40%;
  841. left: 60%;
  842. bottom: 95%;
  843. z-index: 2000;
  844. }
  845. #landMapBox {
  846. width: 100%;
  847. height: 100%;
  848. }
  849. .ant-btn-red {
  850. position: relative;
  851. display: inline-block;
  852. background: #D0EEFF;
  853. border: 1px solid #99D3F5;
  854. border-radius: 4px;
  855. padding: 4px 12px;
  856. overflow: hidden;
  857. color: #1E88C7;
  858. text-decoration: none;
  859. text-indent: 0;
  860. line-height: 20px;
  861. right: -36%;
  862. }
  863. </style>