diff --git a/src/api/homestead/index.js b/src/api/homestead/index.js index e1dc89e8..65b847e0 100644 --- a/src/api/homestead/index.js +++ b/src/api/homestead/index.js @@ -1,116 +1,129 @@ -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 currentLocation(query) { - return request({ - url: '/bigData/common/currentLocation', - method: 'get', - params: query - }) -} - - - +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', + }) +} + +//获取接口地图地址 +export function currentLocation(query) { + return request({ + url: '/bigData/common/currentLocation', + method: 'get', + params: query + }) +} + diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index 41a8914b..ee2b608d 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -490,6 +490,7 @@ import {Dialog} from "vant"; import {getInfo} from "@/api/login/index"; import {getNowFormatDate} from "../../utils/utils"; + import request from '@/utils/request' export default { name: "authenticRightApply", @@ -724,7 +725,8 @@ const data2 = new FormData(); data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'})); uploadFileBase(data2).then(res => { - this.xcdcform.fileUrl1=res.url + this.xcdcform.fileUrl1=res.fileName + console.log(res) }) } }, @@ -757,7 +759,7 @@ const data2 = new FormData(); data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'})); uploadFileBase(data2).then(res => { - this.xcdcform.fileUrl2=res.url + this.xcdcform.fileUrl2=res.fileName }) } }, @@ -1028,6 +1030,7 @@ getInvestigate(data.id).then(res => { if(res.data){ this.xcdcform = res.data + console.log(res.data) if(this.xcdcform.fileUrl1){ this.fileList1.push({ "url":this.xcdcform.fileUrl1 @@ -1129,7 +1132,8 @@ i++ } this.xcdcform["lackCount"] = i - console.log(this.xcdcform) + this.xcdcform.fileUrl1 = location.protocol+"//"+location.host+request.defaults.baseURL+ this.xcdcform.fileUrl1 + this.xcdcform.fileUrl2 = location.protocol+"//"+location.host+request.defaults.baseURL+ this.xcdcform.fileUrl2 if(this.xcdcform.id){ updateInvestigate(this.xcdcform).then(res => { this.showXCDC = false diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index a02c3e69..bce72119 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -52,8 +52,12 @@ :class="[ items.xzqk == '已盘活' ? 'yph' : '', items.xzqk == '待流转待盘活' ? 'dlzdph' : '', - items.xzqk == '已流转' ? 'ylz' : '', - items.xzqk == '待流转' ? 'dlz' : '', + //items.xzqk == '已流转' ? 'ylz' : '', + //items.xzqk == '待流转' ? 'dlz' : '', + items.xzqk == '已流转待盘活' ? 'ylzdph' : '', + items.xzqk == '自用' ? 'zy' : '', + items.xzqk == '闲置' ? 'xz' : '', + items.xzqk == '残垣断壁' ? 'chdb' : '', ]" > {{ items.xzqk }} @@ -945,6 +949,8 @@ import { deptGetId, houseEdit, landEdit, + getLand, + getHouse, currentLocation, } from "@/api/homestead/index"; @@ -1160,7 +1166,6 @@ export default { drawMapPolygonFun() { let drawMapPolygon = this.draw.drawMapPolygon; if (drawMapPolygon == false) { - console.log(this.coordinateList); if (this.coordinateList == "") { this.$set(this.draw, "drawMapPolygon", true); $("#drawPolygon").trigger("click"); @@ -1396,6 +1401,14 @@ export default { $("#drawRemove").trigger("click"); $("#drawReset").trigger("click"); this.coordinateList = ""; + // 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.switchLoad(); } }); }) @@ -1414,6 +1427,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"); @@ -1488,6 +1508,21 @@ export default { $("#drawReset").trigger("click"); this.coordinateList = ""; this.$toast("新建农地信息成功"); + //查询图层 + // if(landInfoList.id !=null && landInfoList.id != ""){ + // console.log(landInfoList.id ); + // getLand(landInfoList.id).then((res) => { + // console.log(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.switchLoad(); } }); }) @@ -1506,8 +1541,15 @@ export default { if (res.code == 200) { this.landHomesteadEditVisbileFun("hide"); this.$toast("修改农地信息成功"); + //this.initDraw(); + getLand(landInfoList.id).then((res) => { + 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 = ""; @@ -2201,7 +2243,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)); @@ -2363,7 +2404,6 @@ export default { map.removeLayer(texiao_layer_fang); map.removeLayer(texiao_layer_di); //删除之前加载的图层 - let currObjNum = _this.villageDataObj; map.getView().animate({ // 只设置需要的属性即可 @@ -2391,7 +2431,6 @@ export default { //图层加载 //地的数据判断 var difang = ["nsgk_hc:t_geo_hc_house", "nsgk_hc:t_geo_hc_land"]; - console.log("++++++++++++" + cun); //业务图层 wms服务 for (var i = 0; i < difang.length; i++) { if (difang[i] == "nsgk_hc:t_geo_hc_house") { @@ -2435,7 +2474,6 @@ export default { url_dw = url_dw + key + "=" + param_dw[key] + "&"; } url_dw = url_dw.substr(0, url_dw.length - 1); - console.log(url_dw); fetch(url_dw, { method: "POST", // *GET, POST, PUT, DELETE, etc. }) @@ -2458,6 +2496,37 @@ export default { console.log("【异常】", error); }); map.addLayer(nongZt[i]); + //切换村底部盒子隐藏 + _this.hasTable = false; + if ($(".searchBar_wrap").css("bottom") != "0px") { + $(".landHomestead_wrap").css({ bottom: "0" }); + $(".landHomestead_wrap").animate( + { + bottom: "-100%", + }, + 300 + ); + + $(".searchBar_wrap").css({ bottom: "-100%" }); + $(".searchBar_wrap").animate( + { + bottom: "0", + }, + 400 + ); + let searchBarWrapPadding = $(".searchBar_wrap") + .css("paddingTop") + .replace("px", ""); + let searchBarWrapHeight = $(".searchBar_wrap").height(); + + $(".rightIcon_wrap").animate( + { + bottom: + searchBarWrapHeight + searchBarWrapPadding * 2 + 10 + "px", + }, + 200 + ); + } } }); //村定位查询-------------------------------------end @@ -2719,9 +2788,7 @@ export default { var feature = evt.feature; var geometry = feature.getGeometry(); var coordinate = geometry.getCoordinates(); - console.log("打印" + coordinate); _this.coordinateList = coordinate.toString(); - console.log(_this.coordinateList); $("#drawRemove").trigger("click"); _this.$set(_this.draw, "drawMapPolygon", false); @@ -2810,30 +2877,40 @@ export default { }) .then((data) => { //关联查询农房信息---------------start - // document.getElementById("info").innerHTML = ""; - // var select_fang = (document.getElementById("info").innerHTML = - // data.features[0].properties); - // _this.hasTable = true; - // _this.hasDateStatus = 1; - // let obj = {}; - // //let trs = $("#info .featureInfo").find("tr:eq(1)"); - // obj.FWSYRMC = select_fang.FWSYRMC; //房屋所有人名称 - // obj.CM = select_fang.CM; //村名 - // obj.CDM = select_fang.CDM; //村代码 - // obj.DZ = select_fang.DZ; //地址 - // obj.SFYSPSX = select_fang.SFYSPSX; //是否有审批手续 - // obj.FWSYQH = select_fang.FWSYQH; //房屋所有权证号 - // obj.JZMJ = select_fang.JZMJ; //建筑面积 - // obj.TDZH = select_fang.TDZH; //土地证号 - // obj.TDXZ = select_fang.TDXZ; //土地性质 - // obj.TDMJ = select_fang.TDMJ; //土地面积 - // obj.XZQK = select_fang.XZQK; //现状情况 - // obj.ZLRXM = select_fang.ZLRXM; //租赁人姓名 - // obj.ZLHTJZRQ = select_fang.ZLHTJZRQ; //租赁合同截止时间 - // obj.ZLSYNX = select_fang.ZLSYNX; //租赁剩余年现 - // obj.XZFWSFYLZY = select_fang.XZFWSFYLZY; //是否流转意向 - // obj.XH = select_fang.XH; //农房编号 - // _this.hasData = obj; + document.getElementById("info").innerHTML = ""; + var select_fang = (document.getElementById("info").innerHTML = + data.features[0].properties); + _this.farmhouseStatus = 0; + let obj = {}; + let zjId = data.features[0].id; + let zjIdNum = zjId.replace("t_geo_hc_house.", ""); + obj.id = zjIdNum; // 主键id + obj.fwsyrmc = select_fang.FWSYRMC; //房屋所有人名称 + obj.cm = select_fang.CM; //村名 + obj.cdm = select_fang.CDM; //村代码 + obj.dz = select_fang.DZ; //地址 + obj.sfyspsx = select_fang.SFYSPSX; //是否有审批手续 + obj.fwsyqh = select_fang.FWSYQH; //房屋所有权证号 + obj.jzmj = select_fang.JZMJ; //建筑面积 + obj.tdzh = select_fang.TDZH; //建筑面积 + obj.tdxz = select_fang.TDXZ; //土地性质 + obj.tdmj = select_fang.TDMJ; //土地面积 + obj.xzqk = select_fang.XZQK; //现状情况 + obj.zlrxm = select_fang.ZLRXM; //租赁人姓名 + obj.zlhtjzrq = select_fang.ZLHTJZRQ; //租赁合同截止日期 + obj.zlsynx = select_fang.ZLSYNX; //租赁剩余年限 + obj.xzfwsfylzy = select_fang.XZFWSFYLZY; //闲置房屋是否有流转意愿 + obj.xh = select_fang.XH; //农房编号 + + obj.orgCode = select_fang.org_code; //行政区代码 + obj.tdfl = select_fang.TDFL; //集体/个人 + obj.frontHouse = select_fang.front_house; //图片前 + obj.behindHouse = select_fang.behind_house; //图片后 + let cloneObj = JSON.parse(JSON.stringify(obj)); + _this.houseInfoList = cloneObj; + _this.houseInfoList.frontland = ""; + _this.houseInfoList.behindland = ""; + _this.houseInfoLookList = obj; //关联查询农房信息---------------end //定位结束 --------------start //var datamap = data.bbox; @@ -2966,34 +3043,6 @@ export default { return geojsonmap; }) .then((data) => { - //关联查询农地信息 ----------start - // document.getElementById("info").innerHTML = ""; - // var select_di = (document.getElementById("info").innerHTML = - // data.features[0].properties); - // _this.farmhouseStatus = 1; - // let obj = {}; - // let zjId = data.features[0].id; - // let zjIdNum = zjId.replace("t_geo_hc_land.", ""); - // obj.id = zjIdNum; // 主键id - // obj.xh = select_di.XH; //序号 - // obj.cm = select_di.CM; //村名 - // obj.cbrmc = select_di.CBRMC; //承包人名称 - // obj.syrmc = select_di.SYRMC; //使用人名称 - // obj.nydlx = select_di.NYDLX; //农用地类型 - // obj.mj = select_di.MJ; //面积 - // obj.xzqk = select_di.XZQK; //现状情况 - // obj.lzhtjzrq = select_di.LZHTJZRQ; //流转合同截止时间 - // obj.lzsynx = select_di.LZSYNX; //流转剩余年限 - // obj.sfylzyx = select_di.SFYLZYX; //是否流转意向 - // obj.cdm = select_di.CDM; //村代码 - // obj.orgCode = select_di.org_code; //行政区化代码 - // obj.frontland = select_di.frontland; //图片前 - // obj.behindland = select_di.behindland; //图片后 - // // // _this.nydlxOptionsValue = trs.find("td").eq(5).text(); //农用地类型 - // let cloneObj = JSON.parse(JSON.stringify(obj)); - // _this.landInfoList = cloneObj; - // _this.landInfoLookList = obj; - //关联查询农地信息 ----------end //获取坐标定位开始----------start //var datamap = data.bbox; var datamap = data.features[0].bbox; @@ -3053,6 +3102,34 @@ export default { ); }); //特效动画实现 -----------------------------end + //关联查询农地信息 ----------start + document.getElementById("info").innerHTML = ""; + var select_di = (document.getElementById("info").innerHTML = + data.features[0].properties); + _this.farmhouseStatus = 1; + let obj = {}; + let zjId = data.features[0].id; + let zjIdNum = zjId.replace("t_geo_hc_land.", ""); + obj.id = zjIdNum; // 主键id + obj.xh = select_di.XH; //序号 + obj.cm = select_di.CM; //村名 + obj.cbrmc = select_di.CBRMC; //承包人名称 + obj.syrmc = select_di.SYRMC; //使用人名称 + obj.nydlx = select_di.NYDLX; //农用地类型 + obj.mj = select_di.MJ; //面积 + obj.xzqk = select_di.XZQK; //现状情况 + obj.lzhtjzrq = select_di.LZHTJZRQ; //流转合同截止时间 + obj.lzsynx = select_di.LZSYNX; //流转剩余年限 + obj.sfylzyx = select_di.SFYLZYX; //是否流转意向 + obj.cdm = select_di.CDM; //村代码 + obj.orgCode = select_di.org_code; //行政区化代码 + obj.frontland = select_di.front_land; //图片前 + obj.behindland = select_di.behind_land; //图片后 + // // _this.nydlxOptionsValue = trs.find("td").eq(5).text(); //农用地类型 + let cloneObj = JSON.parse(JSON.stringify(obj)); + _this.landInfoList = cloneObj; + _this.landInfoLookList = obj; + //关联查询农地信息 ----------end }) .catch((error) => { console.log("【异常】", error); @@ -3067,8 +3144,6 @@ export default { this.houseInfoList.tdxz = value.dictLabel; this.tdxzOptionsVibile = false; - console.log(value); - console.log(this.houseInfoList); }, //农房 - 是否有审批 选择值 xfCirculationFun(value) { @@ -3258,21 +3333,21 @@ export default { } .name_text { font-size: 28px; - flex: 1; + flex: 0.5; overflow: hidden; /*超出部分隐藏*/ white-space: nowrap; /*不换行*/ text-overflow: ellipsis; /*超出部分文字以...显示*/ } .square_text { font-size: 28px; - flex: 0.8; + flex: 0.4; } .operation_mian { flex: 0 0 150px; .describe { font-size: 20px; - padding: 6px 12px; + padding: 6px 5px; float: right; color: #fff; border-radius: 30px; @@ -3281,17 +3356,29 @@ export default { white-space: nowrap; max-width: 150px; &.yph { - background: rgb(175, 39, 255); + background: #b026ff; } &.dlzdph { - background: rgb(255, 111, 54); + background: #ff6f36; } &.ylz { - background: #3cbf5b; + background: #7fff4c; } &.dlz { background: rgb(255, 232, 76); } + &.ylzdph { + background: #ff7dd0; + } + &.zy { + background: rgb(100, 30, 100); + } + &.xz { + background: rgb(60, 100, 180); + } + &.chdb { + background: #fe0303; + } } } }