diff --git a/src/api/homestead/index.js b/src/api/homestead/index.js index 8931c8a8..43d21e17 100644 --- a/src/api/homestead/index.js +++ b/src/api/homestead/index.js @@ -1,107 +1,119 @@ -import request from '@/utils/request' - -// 获取区下拉 -export function bigDataHcAreaInfo(query) { - return request({ - url: '/bigData/hc/hcAreaInfo', - method: 'get', - params: query - }) -} - - -// 获取乡镇下拉 -export function bigDataHcCountyInfo(query) { - return request({ - url: '/bigData/hc/hcCountyInfo', - method: 'get', - params: query - }) -} - -//获取村级下拉 -export function bigDataHcVillageInfo(query) { - return request({ - url: '/bigData/hc/hcVillageInfo', - method: 'get', - params: query - }) -} - -//右侧详情农房农地列表 -export function hcBottomSearch(query) { - return request({ - url: '/bigData/hc/hcBottomSearch', - method: 'get', - params: query - }) -} - -//上传附件图片 -export function commonUpload(query) { - return request({ - url: '/common/upload', - method: 'post', - data: query - }) -} - -//农房新增 -export function houseAdd(query) { - return request({ - url: '/geo/house/add', - method: 'post', - data: query - }) -} -//农房编辑 -export function houseEdit(query) { - return request({ - url: '/geo/house/edit', - method: 'post', - data: query - }) -} - - - -//农地新增 -export function landAdd(query) { - return request({ - url: '/geo/land/add', - method: 'post', - data: query - }) -} - -//农地编辑 -export function landEdit(query) { - return request({ - url: '/geo/land/edit', - method: 'post', - data: query - }) -} - -//获取区、镇、村地区 -export function treeselectByUser(query) { - return request({ - url: '/system/dept/treeselectByUser', - method: 'get', - params: query - }) -} - - -//获取村的经纬度 -export function deptGetId(id) { - return request({ - url: '/system/dept/get/'+id, - method: 'get', - - }) -} - - - - +import request from '@/utils/request' + +// 获取区下拉 +export function bigDataHcAreaInfo(query) { + return request({ + url: '/bigData/hc/hcAreaInfo', + method: 'get', + params: query + }) +} + + +// 获取乡镇下拉 +export function bigDataHcCountyInfo(query) { + return request({ + url: '/bigData/hc/hcCountyInfo', + method: 'get', + params: query + }) +} + +//获取村级下拉 +export function bigDataHcVillageInfo(query) { + return request({ + url: '/bigData/hc/hcVillageInfo', + method: 'get', + params: query + }) +} + +//右侧详情农房农地列表 +export function hcBottomSearch(query) { + return request({ + url: '/bigData/hc/hcBottomSearch', + method: 'get', + params: query + }) +} + +//上传附件图片 +export function commonUpload(query) { + return request({ + url: '/common/upload', + method: 'post', + data: query + }) +} + +//农房新增 +export function houseAdd(query) { + return request({ + url: '/geo/house/add', + method: 'post', + data: query + }) +} +//农房编辑 +export function houseEdit(query) { + return request({ + url: '/geo/house/edit', + method: 'post', + data: query + }) +} + + + +//农地新增 +export function landAdd(query) { + return request({ + url: '/geo/land/add', + method: 'post', + data: query + }) +} + +//农地编辑 +export function landEdit(query) { + return request({ + url: '/geo/land/edit', + method: 'post', + data: query + }) +} + +//获取区、镇、村地区 +export function treeselectByUser(query) { + return request({ + url: '/system/dept/treeselectByUser', + method: 'get', + params: query + }) +} + + +//获取村的经纬度 +export function deptGetId(id) { + return request({ + url: '/system/dept/get/'+id, + method: 'get', + + }) +} + +//查询农地地信息 +export function getLand(id) { + return request({ + url: '/geo/land/get/'+id, + method: 'get', + }) +} + +//查询农房信息 +export function getHouse(id) { + return request({ + url: '/geo/house/get/'+id, + method: 'get', + }) +} diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index 33552435..e47dc96b 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -945,6 +945,8 @@ import { deptGetId, houseEdit, landEdit, + getLand, + getHouse, } from "@/api/homestead/index"; export default { @@ -1410,6 +1412,13 @@ export default { if (res.code == 200) { this.landHomesteadEditVisbileFun("hide"); this.$toast("修改农房信息成功"); + getHouse(houseInfoList.id).then((res) => { + if (res.code == 200) { + this.farmhouseStatus=0; + this.houseInfoList.frontHouse =res.data.frontHouse; + this.houseInfoList.behindHouse =res.data.behindHouse; + } + }) this.houseInfoLookList = this.houseInfoList; // this.initDraw(); $("#drawRemove").trigger("click"); @@ -1502,8 +1511,16 @@ export default { if (res.code == 200) { this.landHomesteadEditVisbileFun("hide"); this.$toast("修改农地信息成功"); + //this.initDraw(); + getLand(landInfoList.id).then((res) => { + console.log(res.data.frontland); + if (res.code == 200) { + this.farmhouseStatus=1; + this.landInfoList.frontland =res.data.frontland; + this.landInfoList.behindland =res.data.behindland; + } + }) this.landInfoLookList = this.landInfoList; - // this.initDraw(); $("#drawRemove").trigger("click"); $("#drawReset").trigger("click"); this.coordinateList = ""; @@ -2142,7 +2159,6 @@ export default { obj.cdm = trs.find("td").eq(11).text(); //村代码 obj.orgCode = trs.find("td").eq(15).text(); //行政区化代码 obj.frontland = trs.find("td").eq(18).text(); //图片前 - console.log(obj.frontland); obj.behindland = trs.find("td").eq(19).text(); //图片后 _this.nydlxOptionsValue = trs.find("td").eq(5).text(); //农用地类型 let cloneObj = JSON.parse(JSON.stringify(obj));