移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  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. type="number"
  227. />
  228. <van-field
  229. input-align="right"
  230. v-model="form.myc"
  231. name="名义层"
  232. label="名义层"
  233. maxlength="50"
  234. autocomplete="off"
  235. type="number"
  236. />
  237. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">证书信息</p>
  238. <FieldRadio
  239. v-model="form.sffz"
  240. label="是否发证"
  241. value-key="dictLabel"
  242. data-key="dictValue"
  243. remote-url="/system/dict/data/type/house_yes_no"
  244. :on-remote-response="'data'"
  245. />
  246. <FieldRadio
  247. v-model="form.sfjf"
  248. label="是否纠纷"
  249. value-key="dictLabel"
  250. data-key="dictValue"
  251. remote-url="/system/dict/data/type/house_yes_no"
  252. :on-remote-response="'data'"
  253. />
  254. <FieldRadio
  255. v-model="form.sfcf"
  256. label="是否查封"
  257. value-key="dictLabel"
  258. data-key="dictValue"
  259. remote-url="/system/dict/data/type/house_yes_no"
  260. :on-remote-response="'data'"
  261. />
  262. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">利用情况</p>
  263. <field-select
  264. v-model="form.lyzk"
  265. label="房屋利用状况"
  266. value-key="dictLabel"
  267. data-key="dictValue"
  268. placeholder="请选择房屋利用状况"
  269. remote-url="/system/dict/data/type/nmfwlyzk"
  270. :on-remote-response="'data'"
  271. />
  272. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">抵押情况</p>
  273. <FieldRadio
  274. v-model="form.sfdy"
  275. label="是否抵押"
  276. value-key="dictLabel"
  277. data-key="dictValue"
  278. remote-url="/system/dict/data/type/house_yes_no"
  279. :on-remote-response="'data'"
  280. />
  281. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">其他信息</p>
  282. <van-field
  283. input-align="right"
  284. v-model="form.jznd"
  285. name="建筑年代"
  286. label="建筑年代"
  287. maxlength="50"
  288. autocomplete="off"
  289. />
  290. <field-select
  291. v-model="form.fwaqxjddj"
  292. label="房屋安全性鉴定等级"
  293. value-key="dictLabel"
  294. data-key="dictValue"
  295. placeholder="请选择房屋安全性鉴定等级"
  296. remote-url="/system/dict/data/type/fwaqxjddj"
  297. :on-remote-response="'data'"
  298. />
  299. <field-select
  300. v-model="form.fwzt"
  301. label="房屋状态"
  302. value-key="dictLabel"
  303. data-key="dictValue"
  304. placeholder="请选择房房屋状态"
  305. remote-url="/system/dict/data/type/fwzt"
  306. :on-remote-response="'data'"
  307. />
  308. <field-select
  309. v-model="form.fwyt"
  310. label="房屋用途"
  311. value-key="dictLabel"
  312. data-key="dictValue"
  313. placeholder="请选择房房屋状态"
  314. remote-url="/system/dict/data/type/fwyt"
  315. :on-remote-response="'data'"
  316. />
  317. <FieldRadio
  318. v-model="form.sfytrgy"
  319. label="与其他人共有"
  320. value-key="dictLabel"
  321. data-key="dictValue"
  322. remote-url="/system/dict/data/type/house_yes_no"
  323. :on-remote-response="'data'"
  324. />
  325. </div>
  326. <div style="margin: 16px;display: flex;justify-content: space-around;">
  327. <van-button v-if="permission == 'true'" round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
  328. <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
  329. </div>
  330. <div style="height: 50px;"></div>
  331. </van-form>
  332. </div>
  333. </template>
  334. <script>
  335. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  336. import FieldSelect from "@/components/form/FieldSelect";
  337. import FieldRadio from "@/components/form/FieldRadio";
  338. import CommonMap from "@/components/house/CommonMap";
  339. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  340. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  341. import { Notify, Dialog, Toast } from 'vant';
  342. import axios from "axios";
  343. export default {
  344. components: {FieldSelect, FieldRadio,CommonMap},
  345. name: "zrzAdd",
  346. data() {
  347. return {
  348. active:3,
  349. // 使用权人列表
  350. permission:false,
  351. syqrlist:[
  352. {
  353. shyqrdbxm :'测试测试',
  354. shyqrdbzjhm :'12324648564',
  355. nhdm :'777888999',
  356. }
  357. ],
  358. // 地图绘制
  359. drawInsert: null,
  360. showDropList:false,
  361. nhdmDictionaries:[],
  362. // 当前位置信息
  363. tGeoOrganizationLat: null,
  364. tGeoOrganizationLng: null,
  365. minDate: new Date(),
  366. maxDate: new Date(2025, 10, 1),
  367. showZgqrzrq:false,
  368. form:{}
  369. };
  370. },
  371. created(){
  372. let data = this.$route.query;
  373. this.form = data;
  374. this.permission = localStorage.getItem("executePermission");
  375. if(this.form.id == null){
  376. this.$set(this.form, 'hx', "01");
  377. this.$set(this.form, 'hxjg', "01");
  378. this.$set(this.form, 'fwlx', "01");
  379. this.$set(this.form, 'fwxz', "6");
  380. this.$set(this.form, 'fwjg', "01");
  381. this.$set(this.form, 'sjly', "01");
  382. this.$set(this.form, 'sffz', "1");
  383. this.$set(this.form, 'sfjf', "0");
  384. this.$set(this.form, 'sfcf', "0");
  385. this.$set(this.form, 'lyzk', "11");
  386. this.$set(this.form, 'sfdy', "0");
  387. this.$set(this.form, 'fwaqxjddj', "01");
  388. this.$set(this.form, 'fwzt', "01");
  389. this.$set(this.form, 'fwyt', "10");
  390. this.$set(this.form, 'sfytrgy', "0");
  391. }
  392. },
  393. mounted(){
  394. },
  395. methods: {
  396. submitzjd(){
  397. this.$refs.form.validate().then(() => {
  398. if(this.form.id == null){
  399. addNmfw(this.form).then(response => {
  400. let _this =this
  401. this.$toast({
  402. icon: 'success', // 找到自己需要的图标
  403. message: '保存成功',
  404. duration:"1000",
  405. onClose:function(){
  406. _this.$router.push({path:'/homesteadSurvey/add3',query: {zjddm: _this.form.zjddm}});
  407. }
  408. })
  409. });
  410. }else{
  411. updateNmfw(this.form).then(response => {
  412. let _this =this
  413. this.$toast({
  414. icon: 'success', // 找到自己需要的图标
  415. message: '保存成功',
  416. duration:"1000",
  417. onClose:function(){
  418. _this.$router.push({path:'/homesteadSurvey/add3',query: {zjddm: _this.form.zjddm}});
  419. }
  420. })
  421. });
  422. }
  423. }).catch((e) => {
  424. Dialog({ type: 'danger', message: '请填写完整的表单项' });
  425. });
  426. },
  427. /** 模糊查询人员信息 */
  428. remoteTransfereeMethod(query) {
  429. if (query !== "") {
  430. listNh({hzxm:query}).then((response) => {
  431. if (response.code == 200) {
  432. this.nhdmDictionaries = response.rows.map(function (item) {
  433. return {
  434. hzxm:item.hzxm,
  435. sqrxb:item.xb,
  436. hzzjhm:item.hzzjhm,
  437. nhdm:item.nhdm,
  438. hzzjlx:item.hzzjlx,
  439. lxdh:item.lxdh,
  440. deptId:item.deptId,
  441. deptName:item.deptName,
  442. }
  443. })
  444. //设置模糊查询的下拉框和滚动条
  445. if (this.nhdmDictionaries.length > 0) {
  446. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  447. //设置模糊查询的和滚动条
  448. this.$nextTick(() => {
  449. if (this.nhdmDictionaries.length > 4) {
  450. let height = document.getElementById("vanCell").offsetHeight * 4;
  451. document.getElementById("dropList").style.height = height + "px";
  452. document.getElementById("dropList").style.overflow = "scroll";
  453. } else {
  454. document.getElementById("dropList").style.height = "";
  455. document.getElementById("dropList").style.overflow = "visible";
  456. }
  457. });
  458. } else {
  459. this.showDropList = false;
  460. }
  461. }
  462. });
  463. } else {
  464. this.nhdmDictionaries = [];
  465. this.showDropList = false;
  466. }
  467. },
  468. shyqrdmxmChange(val){
  469. this.$set(this.form, "nhdm", val.nhdm);
  470. this.showDropList = false;
  471. },
  472. // 绘制申请地图
  473. pointDarw(data) {
  474. this.$nextTick(() => {
  475. let map = this.$refs.pointDarwMap;
  476. if(data === null)
  477. data = this.form.theGeomJson;
  478. this.setMapData(map, data);
  479. });
  480. },
  481. // 通用设置地图数据函数
  482. setMapData(map, data) {
  483. //console.log(map, data ? true : false);
  484. if(!map) return;
  485. if(data)
  486. {
  487. map.setLayer('pointDarwLayer', data);
  488. }
  489. else {
  490. this.getLandCoord((lng, lat) => {
  491. map.setCoord(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  492. });
  493. }
  494. },
  495. // 当地图绘制完成时
  496. onMapDrawFinished(data) {
  497. console.info(data);
  498. this.drawInsert = data;
  499. this.form.theGeomJson = JSON.stringify(this.drawInsert);
  500. },
  501. // 当申请地图被重置时
  502. onMapDrawReseted() {
  503. this.drawInsert = null;
  504. if(this.form.theGeomJson)
  505. {
  506. let lastData = JSON.parse(this.form.theGeomJson);
  507. if(lastData.hasOwnProperty('coordinates')) // 从后台获取的
  508. this.drawInsert = lastData.coordinates;
  509. }
  510. },
  511. cancel(){
  512. this.$router.push({path:'/homesteadSurvey/nmfwList',query: {zjddm: this.form.zjddm}});
  513. },
  514. // 获取登录人位置坐标
  515. getLandCoord(func) {
  516. if (func
  517. && this.tGeoOrganizationLng !== null && this.tGeoOrganizationLng !== ''
  518. && this.tGeoOrganizationLat !== null && this.tGeoOrganizationLat !== '') {
  519. this.$nextTick(() => {
  520. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  521. })
  522. }
  523. else {
  524. console.info(this.deptId);
  525. getQueryLand(this.deptId).then((response) => {
  526. if (response.code == 200) {
  527. let InsertCode = response.data;
  528. this.form.orgCode = InsertCode.orgCode;
  529. this.tGeoOrganizationLat = InsertCode.lat;
  530. this.tGeoOrganizationLng = InsertCode.lng;
  531. if(func)
  532. {
  533. func(this.tGeoOrganizationLng, this.tGeoOrganizationLat);
  534. }
  535. }
  536. });
  537. }
  538. },
  539. guidProduct(){
  540. return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  541. var r = Math.random() * 16 | 0,
  542. v = c == 'x' ? r : (r & 0x3 | 0x8);
  543. return v.toString(16);
  544. });
  545. },
  546. /** 查找地图中定位点 */
  547. MapTag: function (data) {
  548. this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
  549. },
  550. onConfirmZgqrzrq(data){
  551. this.form.jgrq = this.getNowFormatDate(data).substr(0,10);
  552. this.showZgqrzrq = false;
  553. },
  554. goBack(){
  555. if(this.ztMap && this.enterMap ==1){
  556. if(this.form.id == null){
  557. this.backMap.backMapZjdAData.theGeom= "";
  558. }else{
  559. this.backMap.backMapZjdAData = this.form;
  560. }
  561. this.$cookies.set("search",this.backMap);
  562. } else {
  563. this.$cookies.set("search","");
  564. }
  565. this.$router.push({name: this.$router.back(-1)});
  566. // }
  567. },
  568. }
  569. }
  570. </script>
  571. <style scoped>
  572. >>> .bannerBg{
  573. width: 100%;
  574. color:#fff;
  575. padding:10px;
  576. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  577. }
  578. >>> .van-hairline--bottom::after {
  579. border-bottom-width: 0;
  580. }
  581. >>> .title:before
  582. {
  583. content:"";
  584. width: 6px;
  585. height: 20PX;
  586. background: #7ac943;
  587. border-radius: 3px;
  588. position:absolute;
  589. left:0;
  590. bottom:0;
  591. }
  592. >>> .delete-button {
  593. height: 100%;
  594. }
  595. >>> .van-swipe-cell__wrapper{
  596. margin-right:-3px;
  597. }
  598. >>> .label-class .van-collapse-item__title--expanded{
  599. font-weight: bold;
  600. }
  601. </style>