移动端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

906 行
29 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-sticky style="position:relative;">
  4. <div class="bannerBg">
  5. <van-nav-bar
  6. style="background:transparent;border-bottom-width:0;margin-bottom:.5rem;"
  7. @click-left="goBack()"
  8. >
  9. <template #left>
  10. <van-icon name="arrow-left" size="18" color="#fff" />
  11. </template>
  12. <template #title>
  13. <p style="color:#fff">入户调查</p>
  14. </template>
  15. </van-nav-bar>
  16. </div>
  17. <div style="width:95%;left:2.5%;position:absolute;background:#fff;border-radius:15px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: .3rem;top:1.2rem">
  18. <van-row>
  19. <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
  20. <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  21. <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
  22. </van-col>
  23. <van-col span="2">
  24. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  25. </van-col>
  26. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
  27. <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  28. <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
  29. </van-col>
  30. <van-col span="2">
  31. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  32. </van-col>
  33. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
  34. <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  35. <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
  36. </van-col>
  37. <van-col span="2">
  38. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  39. </van-col>
  40. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
  41. <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  42. <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
  43. </van-col>
  44. </van-row>
  45. </div>
  46. </van-sticky>
  47. <van-form ref = "form">
  48. <div style="margin:1.6rem auto;background: #ffffff;width: 95%;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);border-radius:15px;padding-top: 20px;">
  49. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">农民房屋信息</p>
  50. <!--<van-field
  51. v-model="form.deptId"
  52. name="行政区划名称"
  53. label="行政区划名称"
  54. placeholder="行政区划名称"
  55. :rules="[{ required: true, message: '' }]"
  56. />-->
  57. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">基本信息</p>
  58. <van-field
  59. input-align="right"
  60. v-model="form.nmfwzh"
  61. name="房屋幢号"
  62. label="房屋幢号"
  63. placeholder="房屋幢号"
  64. maxlength="50"
  65. autocomplete="off"
  66. :rules="[{ required: true }]"
  67. required
  68. />
  69. <van-field
  70. readonly
  71. clickable
  72. :rules="[{ required: true }]"
  73. required
  74. label="农户代码"
  75. placeholder="请选择"
  76. v-model="form.nhdm"
  77. @click="shownhdm = true"
  78. input-align="right"
  79. right-icon="arrow-down"
  80. />
  81. <van-popup v-model="shownhdm" position="bottom">
  82. <van-search v-model="nhdmSearch" placeholder="请输入搜索关键词" @input="onSearch"/>
  83. <van-picker
  84. show-toolbar
  85. :columns="newList"
  86. value-key="shyqrdbxm"
  87. @confirm="shyqrdmxmChange"
  88. @cancel="shownhdm = false"
  89. />
  90. </van-popup>
  91. <van-field
  92. input-align="right"
  93. v-model="form.sjcs"
  94. name="实际层数"
  95. label="实际层数"
  96. placeholder="实际层数"
  97. maxlength="50"
  98. autocomplete="off"
  99. type="number"
  100. />
  101. <van-field
  102. input-align="right"
  103. v-model="form.hh"
  104. name="户号"
  105. label="户号"
  106. placeholder="户号"
  107. maxlength="50"
  108. autocomplete="off"
  109. />
  110. <field-select
  111. v-model="form.hx"
  112. label="户型"
  113. value-key="dictLabel"
  114. data-key="dictValue"
  115. placeholder="请选择户型"
  116. remote-url="/open/zdzh/list/nmfwhx"
  117. :on-remote-response="'data'"
  118. />
  119. <field-select
  120. v-model="form.hxjg"
  121. label="户型结构"
  122. value-key="dictLabel"
  123. data-key="dictValue"
  124. placeholder="请选择户型结构"
  125. remote-url="/open/zdzh/list/nmfwhxjg"
  126. :on-remote-response="'data'"
  127. />
  128. <van-field
  129. v-model="form.nmfwmj"
  130. label="房屋面积(m²)"
  131. placeholder="请输入房屋面积"
  132. input-align="right"
  133. label-width="auto"
  134. :rules="[{ required: true }]"
  135. required
  136. type="number"/>
  137. <van-field
  138. v-model="form.fjzdmj"
  139. label="房基占地面积(m²)"
  140. placeholder="请输入房基占地面积"
  141. input-align="right"
  142. label-width="auto"
  143. type="number"/>
  144. <van-field
  145. v-model="form.jzmj"
  146. label="建筑面积(m²)"
  147. placeholder="请输入建筑面积"
  148. input-align="right"
  149. label-width="auto"
  150. type="number"/>
  151. <field-select
  152. v-model="form.fwlx"
  153. label="房屋类型"
  154. value-key="dictLabel"
  155. data-key="dictValue"
  156. placeholder="请选择房屋类型"
  157. remote-url="/open/zdzh/list/fwlx"
  158. :on-remote-response="'data'"
  159. />
  160. <field-select
  161. v-model="form.fwxz"
  162. label="房屋性质"
  163. value-key="dictLabel"
  164. data-key="dictValue"
  165. placeholder="请选择房屋性质"
  166. remote-url="/open/zdzh/list/fwxz"
  167. :on-remote-response="'data'"
  168. />
  169. <field-select
  170. v-model="form.fwjg"
  171. label="房屋结构"
  172. value-key="dictLabel"
  173. data-key="dictValue"
  174. placeholder="请选择房屋结构"
  175. remote-url="/open/zdzh/list/housing_structure"
  176. :on-remote-response="'data'"
  177. />
  178. <van-field
  179. input-align="right"
  180. v-model="form.zl"
  181. name="坐落"
  182. label="坐落"
  183. placeholder="坐落"
  184. maxlength="50"
  185. autocomplete="off"
  186. :rules="[{ required: true }]"
  187. required
  188. />
  189. <field-select
  190. v-model="form.sjly"
  191. label="数据来源"
  192. value-key="dictLabel"
  193. data-key="dictValue"
  194. placeholder="请选择数据来源"
  195. remote-url="/open/zdzh/list/sjly"
  196. :on-remote-response="'data'"
  197. />
  198. <van-field
  199. input-align="right"
  200. v-model="form.bz"
  201. name="备注"
  202. label="备注"
  203. placeholder="备注"
  204. maxlength="50"
  205. autocomplete="off"
  206. />
  207. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">不动产信息</p>
  208. <van-field
  209. input-align="right"
  210. v-model="form.bdcdyh"
  211. name="不动产单元号"
  212. label="不动产单元号"
  213. placeholder="不动产单元号"
  214. maxlength="50"
  215. autocomplete="off"
  216. />
  217. <van-field
  218. input-align="right"
  219. v-model="form.fwbm"
  220. name="房屋编码"
  221. label="房屋编码"
  222. placeholder="房屋编码"
  223. maxlength="50"
  224. autocomplete="off"
  225. />
  226. <van-field
  227. input-align="right"
  228. v-model="form.zrzh"
  229. name="自然幢号"
  230. label="自然幢号"
  231. placeholder="自然幢号"
  232. maxlength="50"
  233. autocomplete="off"
  234. />
  235. <van-field
  236. input-align="right"
  237. v-model="form.ch"
  238. name="层号"
  239. label="层号"
  240. placeholder="层号"
  241. maxlength="50"
  242. autocomplete="off"
  243. />
  244. <van-field
  245. input-align="right"
  246. v-model="form.sjc"
  247. name="实际层"
  248. label="实际层"
  249. placeholder="实际层"
  250. maxlength="50"
  251. autocomplete="off"
  252. type="number"
  253. />
  254. <van-field
  255. input-align="right"
  256. v-model="form.myc"
  257. name="名义层"
  258. label="名义层"
  259. placeholder="名义层"
  260. maxlength="50"
  261. autocomplete="off"
  262. type="number"
  263. />
  264. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">证书信息</p>
  265. <FieldRadio
  266. v-model="form.sffz"
  267. label="是否发证"
  268. value-key="dictLabel"
  269. data-key="dictValue"
  270. remote-url="/open/zdzh/list/house_yes_no"
  271. @change="onSffzChanged"
  272. :on-remote-response="'data'"
  273. />
  274. <van-field
  275. v-if="showFzxx"
  276. input-align="right"
  277. v-model="form.zsh"
  278. name="证书号"
  279. label="证书号"
  280. placeholder="证书号"
  281. maxlength="150"
  282. required
  283. :rules="[{ required: true, message: '' }]"
  284. />
  285. <van-field
  286. v-if="showFzxx"
  287. input-align="right"
  288. v-model="form.djjg"
  289. name="登记机构"
  290. label="登记机构"
  291. placeholder="登记机构"
  292. maxlength="50"
  293. autocomplete="off"
  294. required
  295. :rules="[{ required: true, message: '' }]"
  296. />
  297. <van-field
  298. v-if="showFzxx"
  299. autocomplete="off"
  300. input-align="right"
  301. v-model="form.djsj"
  302. name="登记时间"
  303. label="登记时间"
  304. placeholder="登记时间"
  305. required
  306. :rules="[{ required: true, message: '' }]"
  307. readonly
  308. @click="showDjsj = true"
  309. />
  310. <van-popup v-model:show="showDjsj" position="bottom">
  311. <van-datetime-picker
  312. :value="new Date"
  313. type="date"
  314. title="选择年月日"
  315. @confirm="onConfirmDjsj"
  316. @cancel="showDjsj = false"
  317. />
  318. </van-popup>
  319. <FieldRadio
  320. v-model="form.sfjf"
  321. label="是否纠纷"
  322. value-key="dictLabel"
  323. data-key="dictValue"
  324. remote-url="/open/zdzh/list/house_yes_no"
  325. :on-remote-response="'data'"
  326. />
  327. <FieldRadio
  328. v-model="form.sfcf"
  329. label="是否查封"
  330. value-key="dictLabel"
  331. data-key="dictValue"
  332. remote-url="/open/zdzh/list/house_yes_no"
  333. :on-remote-response="'data'"
  334. @change="onSfcfChanged"
  335. />
  336. <van-field
  337. v-if="showCfxx"
  338. autocomplete="off"
  339. input-align="right"
  340. v-model="form.cfqssj"
  341. name="查封起始时间"
  342. label="查封起始时间"
  343. placeholder="查封起始时间"
  344. required
  345. :rules="[{ required: true, message: '' }]"
  346. readonly
  347. @click="showCfqssj = true"
  348. />
  349. <van-popup v-model:show="showCfqssj" position="bottom">
  350. <van-datetime-picker
  351. :value="new Date"
  352. type="date"
  353. title="选择年月日"
  354. @confirm="onConfirmCfqssj"
  355. @cancel="showCfqssj = false"
  356. />
  357. </van-popup>
  358. <van-field
  359. v-if="showCfxx"
  360. autocomplete="off"
  361. input-align="right"
  362. v-model="form.cfjssj"
  363. name="查封结束时间"
  364. label="查封结束时间"
  365. placeholder="查封结束时间"
  366. required
  367. :rules="[{ required: true, message: '' }]"
  368. readonly
  369. @click="showCfjssj = true"
  370. />
  371. <van-popup v-model:show="showCfjssj" position="bottom">
  372. <van-datetime-picker
  373. :value="new Date"
  374. type="date"
  375. title="选择年月日"
  376. @confirm="onConfirmCfjssj"
  377. @cancel="showCfjssj = false"
  378. />
  379. </van-popup>
  380. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">利用情况</p>
  381. <field-select
  382. v-model="form.lyzk"
  383. label="房屋利用状况"
  384. value-key="dictLabel"
  385. data-key="dictValue"
  386. placeholder="请选择房屋利用状况"
  387. remote-url="/open/zdzh/list/nmfwlyzk"
  388. :on-remote-response="'data'"
  389. />
  390. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">抵押情况</p>
  391. <FieldRadio
  392. v-model="form.sfdy"
  393. label="是否抵押"
  394. value-key="dictLabel"
  395. data-key="dictValue"
  396. remote-url="/open/zdzh/list/house_yes_no"
  397. :on-remote-response="'data'"
  398. @change="onSfdyChanged"
  399. />
  400. <van-field
  401. v-if="showDyxx"
  402. input-align="right"
  403. v-model="form.dyqlr"
  404. name="抵押权利人"
  405. label="抵押权利人"
  406. placeholder="抵押权利人"
  407. maxlength="50"
  408. autocomplete="off"
  409. required
  410. :rules="[{ required: true, message: '' }]"
  411. />
  412. <van-field
  413. v-if="showDyxx"
  414. input-align="right"
  415. v-model="form.dyje"
  416. name="抵押金额"
  417. label="抵押金额"
  418. placeholder="抵押金额"
  419. maxlength="50"
  420. autocomplete="off"
  421. type="number"
  422. required
  423. :rules="[{ required: true, message: '' }]"
  424. />
  425. <van-field
  426. v-if="showDyxx"
  427. autocomplete="off"
  428. input-align="right"
  429. v-model="form.zwlxsjStart"
  430. name="债务履行开始时间"
  431. label="债务履行开始时间"
  432. placeholder="债务履行开始时间"
  433. required
  434. :rules="[{ required: true, message: '' }]"
  435. readonly
  436. @click="showZwlvqssj = true"
  437. />
  438. <van-popup v-model:show="showZwlvqssj" position="bottom">
  439. <van-datetime-picker
  440. :value="new Date"
  441. type="date"
  442. title="选择年月日"
  443. @confirm="onConfirmZwlvqssj"
  444. @cancel="showZwlvqssj = false"
  445. />
  446. </van-popup>
  447. <van-field
  448. v-if="showDyxx"
  449. autocomplete="off"
  450. input-align="right"
  451. v-model="form.zwlxsjEnd"
  452. name="债务履行结束时间"
  453. label="债务履行结束时间"
  454. placeholder="债务履行结束时间"
  455. required
  456. :rules="[{ required: true, message: '' }]"
  457. readonly
  458. @click="showZwlvjssj = true"
  459. />
  460. <van-popup v-model:show="showZwlvjssj" position="bottom">
  461. <van-datetime-picker
  462. :value="new Date"
  463. type="date"
  464. title="选择年月日"
  465. @confirm="onConfirmZwlvjssj"
  466. @cancel="showZwlvjssj = false"
  467. />
  468. </van-popup>
  469. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">其他信息</p>
  470. <van-field
  471. input-align="right"
  472. v-model="form.jznd"
  473. name="建筑年代"
  474. label="建筑年代"
  475. placeholder="建筑年代"
  476. maxlength="50"
  477. autocomplete="off"
  478. />
  479. <field-select
  480. v-model="form.fwaqxjddj"
  481. label="房屋安全性鉴定等级"
  482. value-key="dictLabel"
  483. data-key="dictValue"
  484. placeholder="请选择房屋安全性鉴定等级"
  485. remote-url="/open/zdzh/list/fwaqxjddj"
  486. :on-remote-response="'data'"
  487. />
  488. <field-select
  489. v-model="form.fwzt"
  490. label="房屋状态"
  491. value-key="dictLabel"
  492. data-key="dictValue"
  493. placeholder="请选择房房屋状态"
  494. remote-url="/open/zdzh/list/fwzt"
  495. :on-remote-response="'data'"
  496. />
  497. <field-select
  498. v-model="form.fwyt"
  499. label="房屋用途"
  500. value-key="dictLabel"
  501. data-key="dictValue"
  502. placeholder="请选择房房屋状态"
  503. remote-url="/open/zdzh/list/fwyt"
  504. :on-remote-response="'data'"
  505. />
  506. <FieldRadio
  507. v-model="form.sfytrgy"
  508. label="与其他人共有"
  509. value-key="dictLabel"
  510. data-key="dictValue"
  511. remote-url="/open/zdzh/list/house_yes_no"
  512. :on-remote-response="'data'"
  513. />
  514. </div>
  515. <div style="margin: 16px;display: flex;justify-content: space-around;">
  516. <van-button v-if="permission == 'true'" round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
  517. <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
  518. </div>
  519. <div style="height: 50px;"></div>
  520. </van-form>
  521. </div>
  522. </template>
  523. <script>
  524. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  525. import FieldSelect from "@/components/form/FieldSelect";
  526. import FieldRadio from "@/components/form/FieldRadio";
  527. import CommonMap from "@/components/house/CommonMap";
  528. import {getShyqrs} from "@/api/homesteadSurvey/shyqr";
  529. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  530. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  531. import { Notify, Dialog, Toast } from 'vant';
  532. import axios from "axios";
  533. export default {
  534. components: {FieldSelect, FieldRadio,CommonMap},
  535. name: "zrzAdd",
  536. data() {
  537. return {
  538. active:3,
  539. // 使用权人列表
  540. permission:false,
  541. shownhdm:false,
  542. showDjsj:false,
  543. syqrlist:[
  544. {
  545. shyqrdbxm :'测试测试',
  546. shyqrdbzjhm :'12324648564',
  547. nhdm :'777888999',
  548. }
  549. ],
  550. showDyxx:false,
  551. showFzxx:false,
  552. showCfxx:false,
  553. showCfqssj:false,
  554. showCfjssj:false,
  555. showZwlvqssj:false,
  556. showZwlvjssj:false,
  557. zjdzdxxItem:{},
  558. // 地图绘制
  559. drawInsert: null,
  560. nhdmSearch:null,
  561. showDropList:false,
  562. nhdmDictionaries:[],
  563. newList:[],
  564. // 当前位置信息
  565. tGeoOrganizationLat: null,
  566. tGeoOrganizationLng: null,
  567. minDate: new Date(),
  568. maxDate: new Date(2025, 10, 1),
  569. showZgqrzrq:false,
  570. form:{}
  571. };
  572. },
  573. created(){
  574. let data = this.$route.query;
  575. this.form = data;
  576. this.permission = localStorage.getItem("executePermission");
  577. this.zjdzdxxItem = JSON.parse(localStorage.getItem("zjdzdxxItem"));
  578. if(this.form.id == null){
  579. this.$set(this.form, 'hx', "01");
  580. this.$set(this.form, 'hxjg', "01");
  581. this.$set(this.form, 'fwlx', "01");
  582. this.$set(this.form, 'fwxz', "6");
  583. this.$set(this.form, 'fwjg', "01");
  584. this.$set(this.form, 'sjly', "01");
  585. this.$set(this.form, 'sffz', "0");
  586. this.$set(this.form, 'sfjf', "0");
  587. this.$set(this.form, 'sfcf', "0");
  588. this.$set(this.form, 'lyzk', "11");
  589. this.$set(this.form, 'sfdy', "0");
  590. this.$set(this.form, 'fwaqxjddj', "01");
  591. this.$set(this.form, 'fwzt', "01");
  592. this.$set(this.form, 'fwyt', "10");
  593. this.$set(this.form, 'sfytrgy', "0");
  594. }else{
  595. if(this.form.sffz === "1"){
  596. this.showFzxx = true;
  597. }else{
  598. this.showWbzyy = true;
  599. }
  600. if(this.form.sfcf === "1"){
  601. this.showCfxx = true;
  602. }
  603. if(this.form.sfdy === "1"){
  604. this.showDyxx = true;
  605. }
  606. if(this.form.jznd != null){
  607. this.form.jznd = this.form.jznd.substr(0,10);
  608. }
  609. }
  610. this.getList();
  611. },
  612. mounted(){
  613. },
  614. methods: {
  615. getList(){
  616. getShyqrs({zjddm:this.form.zjddm}).then(response => {
  617. this.nhdmDictionaries = response.rows.map(function(item){
  618. item.shyqrdbxm = item.shyqrdbxm + item.nhdm;
  619. return {
  620. shyqrdbxm:item.shyqrdbxm,
  621. nhdm:item.nhdm,
  622. };
  623. });
  624. this.newList = this.nhdmDictionaries;
  625. });
  626. },
  627. submitzjd(){
  628. this.$refs.form.validate().then(() => {
  629. if(this.form.id == null){
  630. addNmfw(this.form).then(response => {
  631. let _this =this
  632. this.$toast({
  633. icon: 'success', // 找到自己需要的图标
  634. message: '保存成功',
  635. duration:"1000",
  636. onClose:function(){
  637. _this.$router.push({path:'/homesteadSurvey/nmfwList',query: {nmfwzh:_this.form.nmfwzh}});
  638. }
  639. })
  640. })
  641. }else{
  642. updateNmfw(this.form).then(response => {
  643. let _this =this
  644. this.$toast({
  645. icon: 'success', // 找到自己需要的图标
  646. message: '保存成功',
  647. duration:"1000",
  648. onClose:function(){
  649. _this.$router.push({path:'/homesteadSurvey/nmfwList',query: {nmfwzh:_this.form.nmfwzh}});
  650. }
  651. })
  652. });
  653. }
  654. }).catch((e) => {
  655. Dialog({ type: 'danger', message: '请填写完整的表单项' });
  656. });
  657. },
  658. /**是否发证*/
  659. onSffzChanged(val){
  660. if(val === '1'){
  661. this.showFzxx = true;
  662. this.$set(this.form, 'zsh', this.zjdzdxxItem.zsh);
  663. }else{
  664. this.showFzxx = false;
  665. this.$set(this.form, 'zsh', null);
  666. this.$set(this.form, 'djjg', null);
  667. this.$set(this.form, 'djsj', null);
  668. }
  669. },
  670. /**是否查封*/
  671. onSfcfChanged(val){
  672. if(val === '1'){
  673. this.showCfxx = true;
  674. }else{
  675. this.showCfxx = false;
  676. this.$set(this.form, 'cfqssj', null);
  677. this.$set(this.form, 'cfjssj', null);
  678. }
  679. },
  680. /**是否抵押*/
  681. onSfdyChanged(val){
  682. if(val === '1'){
  683. this.showDyxx = true;
  684. }else{
  685. this.showDyxx = false;
  686. this.$set(this.form, 'dyqlr', null);
  687. this.$set(this.form, 'dyje', null);
  688. this.$set(this.form, 'zwlxsjStart', null);
  689. this.$set(this.form, 'zwlxsjEnd', null);
  690. }
  691. },
  692. onConfirmDjsj(data){
  693. this.form.djsj = this.getNowFormatDate(data).substr(0,10);
  694. this.showDjsj = false;
  695. },
  696. onConfirmCfqssj(data){
  697. this.form.cfqssj = this.getNowFormatDate(data).substr(0,10);
  698. this.showCfqssj = false;
  699. },
  700. onConfirmCfjssj(data){
  701. this.form.cfjssj = this.getNowFormatDate(data).substr(0,10);
  702. this.showCfjssj = false;
  703. },
  704. onConfirmZwlvqssj(data){
  705. this.form.zwlxsjStart = this.getNowFormatDate(data).substr(0,10);
  706. this.showZwlvqssj = false;
  707. },
  708. onConfirmZwlvjssj(data){
  709. this.form.zwlxsjEnd = this.getNowFormatDate(data).substr(0,10);
  710. this.showZwlvjssj = false;
  711. },
  712. onSearch(val) {
  713. console.info(val);
  714. if(this.nhdmDictionaries.length>0){
  715. this.newList = []
  716. for(let j = 0 ;j<this.nhdmDictionaries.length;j++){
  717. if(this.nhdmDictionaries[j].shyqrdbxm.indexOf(val)>-1){
  718. this.newList.push(this.nhdmDictionaries[j]);
  719. }
  720. }
  721. }
  722. if(val==""){
  723. this.getList()
  724. }
  725. },
  726. /** 模糊查询人员信息 */
  727. remoteTransfereeMethod(query) {
  728. if (query !== "") {
  729. console.info(this.form.zjddm);
  730. getShyqrs({zjddm:this.form.zjddm,shyqrdbxm:query,}).then((response) => {
  731. if (response.code == 200) {
  732. if(response.rows.length === 0){
  733. this.form.nhdm = null;
  734. }
  735. this.nhdmDictionaries = response.rows.map(function (item) {
  736. return {
  737. shyqrdbxm:item.shyqrdbxm,
  738. nhdm:item.nhdm
  739. }
  740. })
  741. //设置模糊查询的下拉框和滚动条
  742. if (this.nhdmDictionaries.length > 0) {
  743. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  744. //设置模糊查询的和滚动条
  745. this.$nextTick(() => {
  746. if (this.nhdmDictionaries.length > 4) {
  747. let height = document.getElementById("vanCell").offsetHeight * 4;
  748. document.getElementById("dropList").style.height = height + "px";
  749. document.getElementById("dropList").style.overflow = "scroll";
  750. } else {
  751. document.getElementById("dropList").style.height = "";
  752. document.getElementById("dropList").style.overflow = "visible";
  753. }
  754. });
  755. } else {
  756. this.showDropList = false;
  757. }
  758. }
  759. });
  760. } else {
  761. this.nhdmDictionaries = [];
  762. this.showDropList = false;
  763. }
  764. },
  765. shyqrdmxmChange(val){
  766. this.$set(this.form, "nhdm", val.nhdm);
  767. this.shownhdm = false;
  768. },
  769. // 绘制申请地图
  770. pointDarw(data) {
  771. this.$nextTick(() => {
  772. let map = this.$refs.pointDarwMap;
  773. if(data === null)
  774. data = this.form.theGeomJson;
  775. this.setMapData(map, data);
  776. });
  777. },
  778. // 通用设置地图数据函数
  779. setMapData(map, data) {
  780. //console.log(map, data ? true : false);
  781. if(!map) return;
  782. if(data)
  783. {
  784. map.setLayer('pointDarwLayer', data);
  785. }
  786. else {
  787. this.getLandCoord((lng, lat) => {
  788. map.setCoord(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  789. });
  790. }
  791. },
  792. // 当地图绘制完成时
  793. onMapDrawFinished(data) {
  794. console.info(data);
  795. this.drawInsert = data;
  796. this.form.theGeomJson = JSON.stringify(this.drawInsert);
  797. },
  798. // 当申请地图被重置时
  799. onMapDrawReseted() {
  800. this.drawInsert = null;
  801. if(this.form.theGeomJson)
  802. {
  803. let lastData = JSON.parse(this.form.theGeomJson);
  804. if(lastData.hasOwnProperty('coordinates')) // 从后台获取的
  805. this.drawInsert = lastData.coordinates;
  806. }
  807. },
  808. cancel(){
  809. this.$router.push({path:'/homesteadSurvey/nmfwList',query: {nmfwzh:this.form.nmfwzh}});
  810. },
  811. // 获取登录人位置坐标
  812. getLandCoord(func) {
  813. if (func
  814. && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== ''
  815. && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') {
  816. this.$nextTick(() => {
  817. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  818. })
  819. }
  820. else {
  821. console.info(this.deptId);
  822. getQueryLand(this.deptId).then((response) => {
  823. if (response.code == 200) {
  824. let InsertCode = response.data;
  825. this.form.orgCode = InsertCode.orgCode;
  826. this.tGeoOrganizationLat = InsertCode.lat;
  827. this.tGeoOrganizationLng = InsertCode.lng;
  828. if(func)
  829. {
  830. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  831. }
  832. }
  833. });
  834. }
  835. },
  836. guidProduct(){
  837. return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  838. var r = Math.random() * 16 | 0,
  839. v = c == 'x' ? r : (r & 0x3 | 0x8);
  840. return v.toString(16);
  841. });
  842. },
  843. /** 查找地图中定位点 */
  844. MapTag: function (data) {
  845. this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
  846. },
  847. onConfirmZgqrzrq(data){
  848. this.form.jgrq = this.getNowFormatDate(data).substr(0,10);
  849. this.showZgqrzrq = false;
  850. },
  851. goBack(){
  852. if(this.ztMap && this.enterMap ==1){
  853. if(this.form.id == null){
  854. this.backMap.backMapZjdAData.theGeom= "";
  855. }else{
  856. this.backMap.backMapZjdAData = this.form;
  857. }
  858. this.$cookies.set("search",this.backMap);
  859. } else {
  860. this.$cookies.set("search","");
  861. }
  862. this.$router.push({name: this.$router.back(-1)});
  863. // }
  864. },
  865. }
  866. }
  867. </script>
  868. <style scoped>
  869. >>> .bannerBg{
  870. width: 100%;
  871. color:#fff;
  872. padding:10px;
  873. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  874. }
  875. >>> .van-hairline--bottom::after {
  876. border-bottom-width: 0;
  877. }
  878. >>> .title:before
  879. {
  880. content:"";
  881. width: 6px;
  882. height: 20PX;
  883. background: #7ac943;
  884. border-radius: 3px;
  885. position:absolute;
  886. left:0;
  887. bottom:0;
  888. }
  889. >>> .delete-button {
  890. height: 100%;
  891. }
  892. >>> .van-swipe-cell__wrapper{
  893. margin-right:-3px;
  894. }
  895. >>> .label-class .van-collapse-item__title--expanded{
  896. font-weight: bold;
  897. }
  898. </style>