移动端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

606 řádky
20 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;height:2rem;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:30px 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. maxlength="50"
  64. autocomplete="off"
  65. :rules="[{ required: true }]"
  66. required
  67. />
  68. <van-field v-model="form.nhdm" label="农户姓名" placeholder="农户" input-align="right" label-width="auto" :rules="[{ required: true }]" required @input="remoteTransfereeMethod" />
  69. <div id="dropList" v-show="showDropList" style="width: 92vw; position: absolute; z-index: 99; left: 50%; margin-left: -46vw; border: 1px solid #E2E0E0;" >
  70. <van-cell id="vanCell" v-for="(item, index) in nhdmDictionaries" :key="index" @click="shyqrdmxmChange(item)" style="position: relative; z-index: 999;">
  71. {{item.hzxm}}-{{item.nhdm}}
  72. </van-cell>
  73. </div>
  74. <van-field
  75. input-align="right"
  76. v-model="form.sjcs"
  77. name="实际层数"
  78. label="实际层数"
  79. maxlength="50"
  80. autocomplete="off"
  81. type="number"
  82. />
  83. <van-field
  84. input-align="right"
  85. v-model="form.hh"
  86. name="户号"
  87. label="户号"
  88. maxlength="50"
  89. autocomplete="off"
  90. />
  91. <field-select
  92. v-model="form.hx"
  93. label="户型"
  94. value-key="dictLabel"
  95. data-key="dictValue"
  96. placeholder="请选择户型"
  97. remote-url="/system/dict/data/type/nmfwhx"
  98. :on-remote-response="'data'"
  99. />
  100. <field-select
  101. v-model="form.hxjg"
  102. label="户型结构"
  103. value-key="dictLabel"
  104. data-key="dictValue"
  105. placeholder="请选择户型结构"
  106. remote-url="/system/dict/data/type/nmfwhxjg"
  107. :on-remote-response="'data'"
  108. />
  109. <van-field
  110. v-model="form.nmfwmj"
  111. label="房屋面积(m²)"
  112. placeholder="请输入房屋面积"
  113. input-align="right"
  114. label-width="auto"
  115. :rules="[{ required: true }]"
  116. required
  117. type="number"/>
  118. <van-field
  119. v-model="form.fjzdmj"
  120. label="房基占地面积(m²)"
  121. placeholder="请输入房基占地面积"
  122. input-align="right"
  123. label-width="auto"
  124. type="number"/>
  125. <van-field
  126. v-model="form.jzmj"
  127. label="建筑面积(m²)"
  128. placeholder="请输入建筑面积"
  129. input-align="right"
  130. label-width="auto"
  131. type="number"/>
  132. <field-select
  133. v-model="form.fwlx"
  134. label="房屋类型"
  135. value-key="dictLabel"
  136. data-key="dictValue"
  137. placeholder="请选择房屋类型"
  138. remote-url="/system/dict/data/type/fwlx"
  139. :on-remote-response="'data'"
  140. />
  141. <field-select
  142. v-model="form.fwxz"
  143. label="房屋性质"
  144. value-key="dictLabel"
  145. data-key="dictValue"
  146. placeholder="请选择房屋性质"
  147. remote-url="/system/dict/data/type/fwxz"
  148. :on-remote-response="'data'"
  149. />
  150. <field-select
  151. v-model="form.fwjg"
  152. label="房屋结构"
  153. value-key="dictLabel"
  154. data-key="dictValue"
  155. placeholder="请选择房屋结构"
  156. remote-url="/system/dict/data/type/housing_structure"
  157. :on-remote-response="'data'"
  158. />
  159. <van-field
  160. input-align="right"
  161. v-model="form.zl"
  162. name="坐落"
  163. label="坐落"
  164. maxlength="50"
  165. autocomplete="off"
  166. :rules="[{ required: true }]"
  167. required
  168. />
  169. <field-select
  170. v-model="form.sjly"
  171. label="数据来源"
  172. value-key="dictLabel"
  173. data-key="dictValue"
  174. placeholder="请选择数据来源"
  175. remote-url="/system/dict/data/type/sjly"
  176. :on-remote-response="'data'"
  177. />
  178. <van-field
  179. input-align="right"
  180. v-model="form.bz"
  181. name="备注"
  182. label="备注"
  183. maxlength="50"
  184. autocomplete="off"
  185. />
  186. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">不动产信息</p>
  187. <van-field
  188. input-align="right"
  189. v-model="form.bdcdyh"
  190. name="不动产单元号"
  191. label="不动产单元号"
  192. maxlength="50"
  193. autocomplete="off"
  194. />
  195. <van-field
  196. input-align="right"
  197. v-model="form.fwbm"
  198. name="房屋编码"
  199. label="房屋编码"
  200. maxlength="50"
  201. autocomplete="off"
  202. />
  203. <van-field
  204. input-align="right"
  205. v-model="form.zrzh"
  206. name="自然幢号"
  207. label="自然幢号"
  208. maxlength="50"
  209. autocomplete="off"
  210. />
  211. <van-field
  212. input-align="right"
  213. v-model="form.ch"
  214. name="层号"
  215. label="层号"
  216. maxlength="50"
  217. autocomplete="off"
  218. />
  219. <van-field
  220. input-align="right"
  221. v-model="form.sjc"
  222. name="实际层"
  223. label="实际层"
  224. maxlength="50"
  225. autocomplete="off"
  226. />
  227. <van-field
  228. input-align="right"
  229. v-model="form.myc"
  230. name="名义层"
  231. label="名义层"
  232. maxlength="50"
  233. autocomplete="off"
  234. />
  235. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">证书信息</p>
  236. <FieldRadio
  237. v-model="form.sffz"
  238. label="是否发证"
  239. value-key="dictLabel"
  240. data-key="dictValue"
  241. remote-url="/system/dict/data/type/house_yes_no"
  242. :on-remote-response="'data'"
  243. />
  244. <FieldRadio
  245. v-model="form.sfjf"
  246. label="是否纠纷"
  247. value-key="dictLabel"
  248. data-key="dictValue"
  249. remote-url="/system/dict/data/type/house_yes_no"
  250. :on-remote-response="'data'"
  251. />
  252. <FieldRadio
  253. v-model="form.sfcf"
  254. label="是否查封"
  255. value-key="dictLabel"
  256. data-key="dictValue"
  257. remote-url="/system/dict/data/type/house_yes_no"
  258. :on-remote-response="'data'"
  259. />
  260. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">利用情况</p>
  261. <field-select
  262. v-model="form.lyzk"
  263. label="房屋利用状况"
  264. value-key="dictLabel"
  265. data-key="dictValue"
  266. placeholder="请选择房屋利用状况"
  267. remote-url="/system/dict/data/type/nmfwlyzk"
  268. :on-remote-response="'data'"
  269. />
  270. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">抵押情况</p>
  271. <FieldRadio
  272. v-model="form.sfdy"
  273. label="是否抵押"
  274. value-key="dictLabel"
  275. data-key="dictValue"
  276. remote-url="/system/dict/data/type/house_yes_no"
  277. :on-remote-response="'data'"
  278. />
  279. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">其他信息</p>
  280. <van-field
  281. input-align="right"
  282. v-model="form.jznd"
  283. name="建筑年代"
  284. label="建筑年代"
  285. maxlength="50"
  286. autocomplete="off"
  287. />
  288. <field-select
  289. v-model="form.fwaqxjddj"
  290. label="房屋安全性鉴定等级"
  291. value-key="dictLabel"
  292. data-key="dictValue"
  293. placeholder="请选择房屋安全性鉴定等级"
  294. remote-url="/system/dict/data/type/fwaqxjddj"
  295. :on-remote-response="'data'"
  296. />
  297. <field-select
  298. v-model="form.fwzt"
  299. label="房屋状态"
  300. value-key="dictLabel"
  301. data-key="dictValue"
  302. placeholder="请选择房房屋状态"
  303. remote-url="/system/dict/data/type/fwzt"
  304. :on-remote-response="'data'"
  305. />
  306. <field-select
  307. v-model="form.fwyt"
  308. label="房屋用途"
  309. value-key="dictLabel"
  310. data-key="dictValue"
  311. placeholder="请选择房房屋状态"
  312. remote-url="/system/dict/data/type/fwyt"
  313. :on-remote-response="'data'"
  314. />
  315. <FieldRadio
  316. v-model="form.sfytrgy"
  317. label="与其他人共有"
  318. value-key="dictLabel"
  319. data-key="dictValue"
  320. remote-url="/system/dict/data/type/house_yes_no"
  321. :on-remote-response="'data'"
  322. />
  323. </div>
  324. <div style="margin: 16px;display: flex;justify-content: space-around;">
  325. <van-button round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
  326. <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
  327. </div>
  328. <div style="height: 50px;"></div>
  329. </van-form>
  330. </div>
  331. </template>
  332. <script>
  333. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  334. import FieldSelect from "@/components/form/FieldSelect";
  335. import FieldRadio from "@/components/form/FieldRadio";
  336. import CommonMap from "@/components/house/CommonMap";
  337. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  338. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  339. import { Notify, Dialog, Toast } from 'vant';
  340. import axios from "axios";
  341. export default {
  342. components: {FieldSelect, FieldRadio,CommonMap},
  343. name: "zrzAdd",
  344. data() {
  345. return {
  346. active:3,
  347. // 使用权人列表
  348. syqrlist:[
  349. {
  350. shyqrdbxm :'测试测试',
  351. shyqrdbzjhm :'12324648564',
  352. nhdm :'777888999',
  353. }
  354. ],
  355. // 地图绘制
  356. drawInsert: null,
  357. showDropList:false,
  358. nhdmDictionaries:[],
  359. // 当前位置信息
  360. tGeoOrganizationLat: null,
  361. tGeoOrganizationLng: null,
  362. minDate: new Date(),
  363. maxDate: new Date(2025, 10, 1),
  364. showZgqrzrq:false,
  365. form:{}
  366. };
  367. },
  368. created(){
  369. let data = this.$route.query;
  370. console.info(data)
  371. this.form = data;
  372. if(this.form.id == null){
  373. this.$set(this.form, 'hx', "01");
  374. this.$set(this.form, 'hxjg', "01");
  375. this.$set(this.form, 'fwlx', "01");
  376. this.$set(this.form, 'fwxz', "6");
  377. this.$set(this.form, 'fwjg', "01");
  378. this.$set(this.form, 'sjly', "01");
  379. this.$set(this.form, 'sffz', "1");
  380. this.$set(this.form, 'sfjf', "0");
  381. this.$set(this.form, 'sfcf', "0");
  382. this.$set(this.form, 'lyzk', "10");
  383. this.$set(this.form, 'sfdy', "0");
  384. this.$set(this.form, 'fwaqxjddj', "01");
  385. this.$set(this.form, 'fwzt', "01");
  386. this.$set(this.form, 'fwyt', "10");
  387. this.$set(this.form, 'sfytrgy', "0");
  388. }
  389. },
  390. mounted(){
  391. },
  392. methods: {
  393. submitzjd(){
  394. this.$refs.form.validate().then(() => {
  395. if(this.form.id == null){
  396. addNmfw(this.form).then(response => {
  397. let _this =this
  398. this.$toast({
  399. icon: 'success', // 找到自己需要的图标
  400. message: '保存成功',
  401. duration:"1000",
  402. onClose:function(){
  403. _this.$router.push({path:'/homesteadSurvey/add3',query: {zjddm: _this.form.zjddm}});
  404. }
  405. })
  406. });
  407. }else{
  408. updateNmfw(this.form).then(response => {
  409. let _this =this
  410. this.$toast({
  411. icon: 'success', // 找到自己需要的图标
  412. message: '保存成功',
  413. duration:"1000",
  414. onClose:function(){
  415. _this.$router.push({path:'/homesteadSurvey/add3',query: {zjddm: _this.form.zjddm}});
  416. }
  417. })
  418. });
  419. }
  420. }).catch((e) => {
  421. Dialog({ type: 'danger', message: '请填写完整的表单项' });
  422. });
  423. },
  424. /** 模糊查询人员信息 */
  425. remoteTransfereeMethod(query) {
  426. if (query !== "") {
  427. listNh({hzxm:query}).then((response) => {
  428. if (response.code == 200) {
  429. this.nhdmDictionaries = response.rows.map(function (item) {
  430. return {
  431. hzxm:item.hzxm,
  432. sqrxb:item.xb,
  433. hzzjhm:item.hzzjhm,
  434. nhdm:item.nhdm,
  435. hzzjlx:item.hzzjlx,
  436. lxdh:item.lxdh,
  437. deptId:item.deptId,
  438. deptName:item.deptName,
  439. }
  440. })
  441. //设置模糊查询的下拉框和滚动条
  442. if (this.nhdmDictionaries.length > 0) {
  443. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  444. //设置模糊查询的和滚动条
  445. this.$nextTick(() => {
  446. if (this.nhdmDictionaries.length > 4) {
  447. let height = document.getElementById("vanCell").offsetHeight * 4;
  448. document.getElementById("dropList").style.height = height + "px";
  449. document.getElementById("dropList").style.overflow = "scroll";
  450. } else {
  451. document.getElementById("dropList").style.height = "";
  452. document.getElementById("dropList").style.overflow = "visible";
  453. }
  454. });
  455. } else {
  456. this.showDropList = false;
  457. }
  458. }
  459. });
  460. } else {
  461. this.nhdmDictionaries = [];
  462. this.showDropList = false;
  463. }
  464. },
  465. shyqrdmxmChange(val){
  466. this.$set(this.form, "nhdm", val.nhdm);
  467. this.showDropList = false;
  468. },
  469. // 绘制申请地图
  470. pointDarw(data) {
  471. this.$nextTick(() => {
  472. let map = this.$refs.pointDarwMap;
  473. if(data === null)
  474. data = this.form.theGeomJson;
  475. this.setMapData(map, data);
  476. });
  477. },
  478. // 通用设置地图数据函数
  479. setMapData(map, data) {
  480. //console.log(map, data ? true : false);
  481. if(!map) return;
  482. if(data)
  483. {
  484. map.setLayer('pointDarwLayer', data);
  485. }
  486. else {
  487. this.getLandCoord((lng, lat) => {
  488. map.setCoord(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  489. });
  490. }
  491. },
  492. // 当地图绘制完成时
  493. onMapDrawFinished(data) {
  494. console.info(data);
  495. this.drawInsert = data;
  496. this.form.theGeomJson = JSON.stringify(this.drawInsert);
  497. },
  498. // 当申请地图被重置时
  499. onMapDrawReseted() {
  500. this.drawInsert = null;
  501. if(this.form.theGeomJson)
  502. {
  503. let lastData = JSON.parse(this.form.theGeomJson);
  504. if(lastData.hasOwnProperty('coordinates')) // 从后台获取的
  505. this.drawInsert = lastData.coordinates;
  506. }
  507. },
  508. cancel(){
  509. this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: this.form.zjddm}});
  510. },
  511. // 获取登录人位置坐标
  512. getLandCoord(func) {
  513. if (func
  514. && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== ''
  515. && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') {
  516. this.$nextTick(() => {
  517. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  518. })
  519. }
  520. else {
  521. console.info(this.deptId);
  522. getQueryLand(this.deptId).then((response) => {
  523. if (response.code == 200) {
  524. let InsertCode = response.data;
  525. this.form.orgCode = InsertCode.orgCode;
  526. this.tGeoOrganizationLat = InsertCode.lat;
  527. this.tGeoOrganizationLng = InsertCode.lng;
  528. if(func)
  529. {
  530. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  531. }
  532. }
  533. });
  534. }
  535. },
  536. guidProduct(){
  537. return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  538. var r = Math.random() * 16 | 0,
  539. v = c == 'x' ? r : (r & 0x3 | 0x8);
  540. return v.toString(16);
  541. });
  542. },
  543. /** 查找地图中定位点 */
  544. MapTag: function (data) {
  545. this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
  546. },
  547. onConfirmZgqrzrq(data){
  548. this.form.jgrq = this.getNowFormatDate(data).substr(0,10);
  549. this.showZgqrzrq = false;
  550. },
  551. goBack(){
  552. if(this.ztMap && this.enterMap ==1){
  553. if(this.form.id == null){
  554. this.backMap.backMapZjdAData.theGeom= "";
  555. }else{
  556. this.backMap.backMapZjdAData = this.form;
  557. }
  558. this.$cookies.set("search",this.backMap);
  559. } else {
  560. this.$cookies.set("search","");
  561. }
  562. this.$router.push({name: this.$router.back(-1)});
  563. // }
  564. },
  565. }
  566. }
  567. </script>
  568. <style scoped>
  569. >>> .bannerBg{
  570. width: 100%;
  571. color:#fff;
  572. padding:10px;
  573. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  574. }
  575. >>> .van-hairline--bottom::after {
  576. border-bottom-width: 0;
  577. }
  578. >>> .title:before
  579. {
  580. content:"";
  581. width: 6px;
  582. height: 20PX;
  583. background: #7ac943;
  584. border-radius: 3px;
  585. position:absolute;
  586. left:0;
  587. bottom:0;
  588. }
  589. >>> .delete-button {
  590. height: 100%;
  591. }
  592. >>> .van-swipe-cell__wrapper{
  593. margin-right:-3px;
  594. }
  595. >>> .label-class .van-collapse-item__title--expanded{
  596. font-weight: bold;
  597. }
  598. </style>