移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
10 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. right-text ="首页"
  9. @click-right="goRightBack()"
  10. >
  11. <template #left>
  12. <van-icon name="arrow-left" size="18" color="#fff" />
  13. </template>
  14. <!-- <template #right>
  15. <van-icon name="map-marked" size="18" color="#fff" />
  16. </template>-->
  17. <template #title>
  18. <p style="color:#fff">入户调查</p>
  19. </template>
  20. </van-nav-bar>
  21. </div>
  22. <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">
  23. <van-row>
  24. <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
  25. <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  26. <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
  27. </van-col>
  28. <van-col span="2">
  29. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  30. </van-col>
  31. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
  32. <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  33. <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
  34. </van-col>
  35. <van-col span="2">
  36. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  37. </van-col>
  38. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
  39. <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  40. <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
  41. </van-col>
  42. <van-col span="2">
  43. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  44. </van-col>
  45. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
  46. <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  47. <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
  48. </van-col>
  49. </van-row>
  50. </div>
  51. </van-sticky>
  52. <div style="margin:30px auto 0;width: 95%;">
  53. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-bottom: 5px;">自然幢</p>
  54. </div>
  55. <van-list
  56. v-model:loading="loading"
  57. :finished="finished"
  58. finished-text="没有更多了"
  59. :immediate-check="false"
  60. @load="onRefreshZrz"
  61. >
  62. <van-swipe-cell v-for="(item,index) in zrzlist" :key="'zrz'+index" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:15px auto 0;background:#fff;">
  63. <div style="padding:15px;">
  64. <p style="display: flex;align-items: center;">
  65. <img src="../../assets/images/housesteadSurvey/add03.png" alt="" style="margin-right: 5px;">
  66. <span style="line-height: 1;font-size: 16px;">第{{index+1}}号</span>
  67. </p>
  68. <div style="display:flex;line-height:20px;margin-top: 15px;font-size: 14px;color: #999999;">
  69. <p style="flex:1;text-align:left;">自然幢号:</p>
  70. <p style="flex:1;text-align:right;">{{item.zrzh}}</p>
  71. </div>
  72. <div style="display:flex;line-height:20px;margin-top: 5px;font-size: 14px;color: #999999;">
  73. <p style="flex:1;text-align:left;">总层数:</p>
  74. <p style="flex:1;text-align:right;">{{item.zcs}}</p>
  75. </div>
  76. <div style="text-align:center;overflow:auto;display: flex;justify-content: space-between;margin-top: 10px;">
  77. <p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupzrz(item)">
  78. <img src="../../assets/images/housesteadSurvey/add01.png" alt="">
  79. <span style="font-size: 14px;color: #fff;margin-left: 5px;">自然幢信息</span>
  80. </p>
  81. <p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="shownmfwlist(item)">
  82. <img src="../../assets/images/housesteadSurvey/add02.png" alt="">
  83. <span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">房屋列表</span>
  84. </p>
  85. </div>
  86. </div>
  87. <template #right>
  88. <van-button v-if="permission == 'true'" square text="删除" type="danger" class="delete-button" @click="deletezrz(item)"/>
  89. </template>
  90. </van-swipe-cell>
  91. </van-list>
  92. <div v-if="permission == 'true'" style=" width:95%;margin:20px auto;display: flex;justify-content: center;">
  93. <div style="width:100%;text-align:center;overflow:auto;border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: 15px 0px;background: #ffffff;color: #22B7F2;">
  94. <p style="font-size: 16px;" @click="showPopupAddzrz()">+ 添加自然幢信息</p>
  95. </div>
  96. </div>
  97. </div>
  98. </template>
  99. <script>
  100. import {listShyqr,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
  101. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  102. import MapGisDrawing from "@/components/Map/MapGisDrawing";
  103. import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz";
  104. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  105. import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr";
  106. import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy";
  107. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  108. import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss";
  109. import { listTown, getTown } from "@/api/homesteadSurvey/town";
  110. import { listVillage} from "@/api/homesteadSurvey/village";
  111. import { sysConfig} from "@/api/homesteadSurvey/index";
  112. import { Notify, Dialog, Toast } from 'vant';
  113. import axios from "axios";
  114. export default {
  115. name: "homesteadAdd",
  116. components: { MapGisDrawing,},
  117. data() {
  118. return {
  119. active:3,
  120. loading:false,
  121. finished:false,
  122. permission:false,
  123. countyhc:1,
  124. zjdzdxx:{},
  125. zrzlist:[]
  126. };
  127. },
  128. created(){
  129. this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
  130. this.permission = localStorage.getItem("executePermission");
  131. if(this.zjdzdxx.zjddm != null ){
  132. this.getList();
  133. }
  134. },
  135. mounted(){
  136. },
  137. methods: {
  138. getList(){
  139. let params = {
  140. zjddm:this.zjdzdxx.zjddm,
  141. pageNum: 1,
  142. pageSize:10,
  143. }
  144. listZrz(params).then(response => {
  145. this.zrzlist = response.rows;
  146. if(response.rows.length>0&&response.rows.length<response.total){
  147. this.countyhc++
  148. this.loading = false
  149. }else{
  150. this.loading = false
  151. this.finished = true
  152. }
  153. });
  154. },
  155. goBack(){
  156. if(this.ztMap && this.enterMap ==1){
  157. if(this.form.id == null){
  158. this.backMap.backMapZjdAData.theGeom= "";
  159. }else{
  160. this.backMap.backMapZjdAData = this.form;
  161. }
  162. this.$cookies.set("search",this.backMap);
  163. } else {
  164. this.$cookies.set("search","");
  165. }
  166. this.$router.push({name: this.$router.back(-1)});
  167. // }
  168. },
  169. onRefreshZrz(){
  170. if(this.loading){
  171. let params = {
  172. "zjddm":this.zjdzdxx.zjddm,
  173. "pageNum": this.countyhc+1,
  174. "pageSize":10,
  175. }
  176. listZrz(params).then(response => {
  177. if(response.rows.length>0&&this.zrzlist.length<response.total){
  178. response.rows.map(res => {
  179. this.zrzlist.push(res)
  180. })
  181. this.countyhc++
  182. this.loading = false
  183. }else{
  184. this.loading = false
  185. this.finished = true
  186. }
  187. });
  188. }
  189. },
  190. goRightBack(){
  191. this.$router.push({path:'/homesteadSurvey/list'});
  192. },
  193. showPopupzrz(val){
  194. this.$router.push({name:'zrzAdd',query:val});
  195. },
  196. showPopupAddzrz(){
  197. this.$router.push({name:'zrzAdd',query:{zjddm:this.zjdzdxx.zjddm}});
  198. },
  199. shownmfwlist(val){
  200. this.$router.push({name:'nmfwList',query:val});
  201. },
  202. deletezrz(val){
  203. const ids = val.id || this.ids;
  204. Dialog.confirm({
  205. title: '系统提示',
  206. message: '是否确认删除自然幢标识为"' + val.id + '"的数据项?',
  207. confirmButtonText: '确定',
  208. cancelButtonText: '取消'
  209. })
  210. .then(function() {
  211. return delZrz(ids);
  212. }).then(() => {
  213. this.$notify({ type: 'success' , message: "删除成功" });
  214. location.reload(true);
  215. }).catch(() => {});
  216. },
  217. }
  218. }
  219. </script>
  220. <style scoped>
  221. >>> .bannerBg{
  222. width: 100%;
  223. color:#fff;
  224. padding:10px;
  225. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  226. }
  227. >>> .van-hairline--bottom::after {
  228. border-bottom-width: 0;
  229. }
  230. >>> .title:before
  231. {
  232. content:"";
  233. width: 6px;
  234. height: 20PX;
  235. background: #7ac943;
  236. border-radius: 3px;
  237. position:absolute;
  238. left:0;
  239. bottom:0;
  240. }
  241. >>> .delete-button {
  242. height: 100%;
  243. }
  244. >>> .van-swipe-cell__wrapper{
  245. margin-right:-3px;
  246. }
  247. >>> .label-class .van-collapse-item__title--expanded{
  248. font-weight: bold;
  249. }
  250. /deep/ .van-nav-bar__text {
  251. color: #fff;
  252. }
  253. </style>