+
-
+
是否有流转意向
@@ -857,7 +870,7 @@
@@ -867,8 +880,12 @@
@@ -908,8 +925,7 @@ import {
treeselectByUser,
deptGetId,
houseEdit,
- landEdit
-
+ landEdit,
} from "@/api/homestead/index";
export default {
@@ -919,17 +935,17 @@ export default {
//省市区区级list
hcAreaInfoOption: [],
//省市区区级显示
- villageVisbile:false,
+ villageVisbile: false,
//选中的值
- villageValue:'',
+ villageValue: "",
//选中村相关信息
- villageDataObj:{
- deptName:'', //村名
+ villageDataObj: {
+ deptName: "", //村名
},
- hcAreaInfoFieldName:{
- text: 'label',
- value: 'value',
- children: 'children',
+ hcAreaInfoFieldName: {
+ text: "label",
+ value: "value",
+ children: "children",
},
// 待租列表显示
ishcBotton: false,
@@ -946,21 +962,21 @@ export default {
drawMapPolygon: false, //绘制地图
},
//地图绘制坐标存储
- coordinateList: '',
+ coordinateList: "",
//判断新增还是编辑 0 新增 1编辑
- currentType:0,
+ currentType: 0,
//新建选择农房土地弹窗 显隐
farmlandEditSwitchVisbule: false, //false
//编辑房屋土地块高度
- landHomesteadEditWrapHeight:0,
+ landHomesteadEditWrapHeight: 0,
//编辑房屋土地信息--显隐
landHomesteadEditVisbile: false,
//查看编辑房屋、土地--类型 0 农房 1 农地
farmhouseStatus: 0,
//新增农房日历显影
houseHomesteadEditcalendar: false,
- //新增农地日历显影
- landHomesteadEditcalendar:false,
+ //新增农地日历显影
+ landHomesteadEditcalendar: false,
//选择顺序
selectChooseOrder: 0,
@@ -1015,9 +1031,9 @@ export default {
},
//农地查看数据
- landInfoLookList:{},
+ landInfoLookList: {},
//农房查看数据
- houseInfoLookList:{},
+ houseInfoLookList: {},
//农房 - 农房权属
tdxzOptions: [],
@@ -1053,9 +1069,9 @@ export default {
//农地上传图片附件
ndAddfileList: [],
// 当前是否地图点击状态
- hasTable:false,
+ hasTable: false,
//查看农地\农房 显隐
- landHomesteadDetailsVisibile:false
+ landHomesteadDetailsVisibile: false,
};
},
mounted() {
@@ -1063,22 +1079,21 @@ export default {
},
methods: {
//编辑农地信息
- editnfdInfo(type){
+ editnfdInfo(type) {
this.currentType = 1;
- this.farmlandEditSwitchVisbuleFun("hide");
+ this.farmlandEditSwitchVisbuleFun("hide");
this.landHomesteadEditVisbileFun("show");
},
//显示农地\农房详情
- houseLandLookInfo(type){
- if(type=='show'){
- this.houseLandLookAnmitFun('show')
- }else{
- this.houseLandLookAnmitFun('hide')
+ houseLandLookInfo(type) {
+ if (type == "show") {
+ this.houseLandLookAnmitFun("show");
+ } else {
+ this.houseLandLookAnmitFun("hide");
}
},
//显示农地\农房详情 动画
- houseLandLookAnmitFun(type){
-
+ houseLandLookAnmitFun(type) {
if (type == "show") {
this.landHomesteadDetailsVisibile = true;
$(".landHomesteadDetails_wrap").css({ bottom: "-100vh" });
@@ -1114,7 +1129,7 @@ export default {
},
//新建选择农房土地弹窗
farmlandEditSwitchFun() {
- if (this.coordinateList == '') {
+ if (this.coordinateList == "") {
this.$toast("请先完成绘制");
return false;
}
@@ -1142,7 +1157,6 @@ export default {
},
//新增地块 编辑页 显影
landHomesteadEditVisbileFun(type) {
-
if (type == "show") {
this.landHomesteadEditVisbile = true;
$(".landHomesteadEdit_wrap").css({ bottom: "-100vh" });
@@ -1164,15 +1178,32 @@ export default {
this.landHomesteadEditVisbile = false;
}, 300);
}
- setTimeout(()=>{
+ setTimeout(() => {
//新建土地、房屋高度
- let landHomesteadEditWrap = this.$refs.landHomesteadEditWrap.offsetHeight;
- let landHomesteadEditWrapPdg = $('.landHomesteadEdit_wrap .content_mian').css('paddingTop').replace('px','')
- let landHomesteadEditWrapTitHei = $('.landHomesteadEdit_wrap .info_title').css('height').replace('px','')
- if(landHomesteadEditWrap && landHomesteadEditWrapPdg && landHomesteadEditWrapTitHei){
- this.landHomesteadEditWrapHeight = landHomesteadEditWrap-landHomesteadEditWrapPdg*2-landHomesteadEditWrapTitHei-10;
- }
- },301)
+ let landHomesteadEditWrap =
+ this.$refs.landHomesteadEditWrap.offsetHeight;
+ let landHomesteadEditWrapPdg = $(
+ ".landHomesteadEdit_wrap .content_mian"
+ )
+ .css("paddingTop")
+ .replace("px", "");
+ let landHomesteadEditWrapTitHei = $(
+ ".landHomesteadEdit_wrap .info_title"
+ )
+ .css("height")
+ .replace("px", "");
+ if (
+ landHomesteadEditWrap &&
+ landHomesteadEditWrapPdg &&
+ landHomesteadEditWrapTitHei
+ ) {
+ this.landHomesteadEditWrapHeight =
+ landHomesteadEditWrap -
+ landHomesteadEditWrapPdg * 2 -
+ landHomesteadEditWrapTitHei -
+ 10;
+ }
+ }, 301);
},
//选择农地 农房显影
farmlandEditSwitchVisbuleFun(type) {
@@ -1202,176 +1233,176 @@ export default {
landHomesteadEditCancel() {
this.landHomesteadEditVisbileFun("hide");
//新增信息显示
- if(this.currentType == 0){
+ if (this.currentType == 0) {
this.farmlandEditSwitchVisbuleFun("show");
}
},
//新增地块 编辑页 保存
landHomesteadEditSave() {
-
- if(this.farmhouseStatus == 0){
- //农房
- let houseInfoList = this.houseInfoList;
- houseInfoList.theGeom= this.coordinateList;
- houseInfoList.orgCode = this.villageDataObj.orgCode;
- houseInfoList.cdm = this.villageDataObj.orgCode;
- houseInfoList.cm = this.villageDataObj.deptName;
-
-
- if(houseInfoList.xh ==''){
- this.$toast("请填写序号");
- return false;
- }else if(houseInfoList.fwsyrmc ==''){
- this.$toast("请填写房屋所有人名称");
- return false;
- }else if(houseInfoList.fwsyqh ==''){
- this.$toast("请填写房屋所有权证号");
- return false;
- }else if(houseInfoList.tdzh ==''){
- this.$toast("请填写土地证号");
- return false;
- }else if(houseInfoList.jzmj ==''){
- this.$toast("请填写建筑面积");
- return false;
- }else if(houseInfoList.tdmj ==''){
- this.$toast("请填写土地面积");
- return false;
- }else if(houseInfoList.tdxz ==''){
- this.$toast("请选择土地性质");
- return false;
- }else if(houseInfoList.sfyspsx ==''){
- this.$toast("请选择是否有审批手续");
- return false;
- }else if(houseInfoList.xzqk ==''){
- this.$toast("请选择现状情况");
- return false;
- }else if(houseInfoList.frontHouse ==''){
- this.$toast("请选择上传图片");
- return false;
- }else if(houseInfoList.dz ==''){
- this.$toast("请填写地址");
- return false;
- }else if(houseInfoList.zlrxm ==''){
- this.$toast("请填写租赁人姓名");
- return false;
- }else if(houseInfoList.zlhtjzrq ==''){
- this.$toast("请填写租赁合同截止日期");
- return false;
- }else if(houseInfoList.zlsynx ==''){
- this.$toast("请填写租赁剩余年限");
- return false;
- }else if(houseInfoList.xzfwsfylzy ==''){
- this.$toast("请选择闲置房屋是否有流转意愿");
- return false;
- }else if(houseInfoList.tdfl ==''){
- this.$toast("请选择房屋类型");
+ if (this.farmhouseStatus == 0) {
+ //农房
+ let houseInfoList = this.houseInfoList;
+ houseInfoList.theGeom = this.coordinateList;
+ houseInfoList.orgCode = this.villageDataObj.orgCode;
+ houseInfoList.cdm = this.villageDataObj.orgCode;
+ houseInfoList.cm = this.villageDataObj.deptName;
+
+ if (houseInfoList.xh == undefined || houseInfoList.xh == "") {
+ this.$toast("请填写农房编号");
+ return false;
+ } else if (
+ houseInfoList.fwsyrmc == undefined ||
+ houseInfoList.fwsyrmc == ""
+ ) {
+ this.$toast("请填写房屋所有人名称");
+ return false;
+ } else if (houseInfoList.dz == undefined || houseInfoList.dz == "") {
+ this.$toast("请填写地址");
+ return false;
+ } else if (
+ houseInfoList.tdxz == undefined ||
+ houseInfoList.tdxz == ""
+ ) {
+ this.$toast("请选择土地性质");
+ return false;
+ } else if (
+ houseInfoList.sfyspsx == undefined ||
+ houseInfoList.sfyspsx == ""
+ ) {
+ this.$toast("请选择是否有审批手续");
+ return false;
+ } else if (
+ houseInfoList.jzmj == undefined ||
+ houseInfoList.jzmj == ""
+ ) {
+ this.$toast("请填写建筑面积");
+ return false;
+ } else if (
+ houseInfoList.xzqk == undefined ||
+ houseInfoList.xzqk == ""
+ ) {
+ this.$toast("请选择现状情况");
+ return false;
+ } else if (
+ houseInfoList.fwsyqh == undefined ||
+ houseInfoList.fwsyqh == ""
+ ) {
+ this.$toast("请填写房屋所有权证号");
+ return false;
+ } else if (
+ houseInfoList.tdzh == undefined ||
+ houseInfoList.tdzh == ""
+ ) {
+ this.$toast("请填写土地证号");
+ return false;
+ } else if (
+ houseInfoList.tdmj == undefined ||
+ houseInfoList.tdmj == ""
+ ) {
+ this.$toast("请填写土地面积");
+ return false;
+ } else if (
+ houseInfoList.xzfwsfylzy == undefined ||
+ houseInfoList.xzfwsfylzy == ""
+ ) {
+ this.$toast("请选择是否有流转意愿");
+ return false;
+ } else if (
+ houseInfoList.tdfl == undefined ||
+ houseInfoList.tdfl == ""
+ ) {
+ this.$toast("请选择房屋类型");
+ return false;
+ }
+
+ //新增
+ if (this.currentType == 0) {
+ if (houseInfoList.theGeom == "") {
+ this.$toast("请选择地图坐标");
return false;
}
-
-
-
- //新增
- if(this.currentType == 0){
- if(houseInfoList.theGeom ==''){
- this.$toast("请选择地图坐标");
- return false;
+ houseAdd(houseInfoList).then((res) => {
+ if (res.code == 200) {
+ this.landHomesteadEditVisbileFun("hide");
+ //新增
+ this.$toast("农房信息新建成功");
+ this.initDraw();
}
- houseAdd(houseInfoList).then((res)=>{
- if(res.code == 200){
- this.landHomesteadEditVisbileFun("hide");
- //新增
- this.$toast("农房信息新建成功");
- this.initDraw();
- }
- })
- }else{
- //编辑
- houseEdit(houseInfoList).then((res)=>{
- if(res.code == 200){
- this.landHomesteadEditVisbileFun("hide");
- this.$toast("农房信息修改成功");
- this.houseInfoLookList = this.houseInfoList;
- }
- })
- }
-
-
-
-
-
-
- }else if(this.farmhouseStatus == 1){
+ });
+ } else {
+ //编辑
+ houseEdit(houseInfoList).then((res) => {
+ if (res.code == 200) {
+ this.landHomesteadEditVisbileFun("hide");
+ this.$toast("农房信息修改成功");
+ this.houseInfoLookList = this.houseInfoList;
+ }
+ });
+ }
+ } else if (this.farmhouseStatus == 1) {
// orgCode: "", // String 否 行政区代码
// cdm: "", // String 否 村代码
// cm: "", //String 否 村名
- //农地
- let landInfoList = this.landInfoList;
- landInfoList.theGeom= this.coordinateList;
- landInfoList.orgCode = this.villageDataObj.orgCode;
- landInfoList.cdm = this.villageDataObj.orgCode;
- landInfoList.cm = this.villageDataObj.deptName;
- if(landInfoList.xh ==''){
- this.$toast("请填写序号");
- return false;
- }else if(landInfoList.cbrmc==''){
- this.$toast("请填写承包人名称");
- return false;
- }else if(landInfoList.syrmc==''){
- this.$toast("请填写使用人名称");
- return false;
- }else if(landInfoList.nydlx==''){
- this.$toast("请选择农用地类型");
- return false;
- }else if(landInfoList.mj==''){
- this.$toast("请填写面积");
- return false;
- }else if(landInfoList.lzsynx==''){
- this.$toast("请填写流转剩余年限");
- return false;
- }else if(landInfoList.lzhtjzrq==''){
- this.$toast("请填写流转合同截止日期");
- return false;
- }else if(landInfoList.sfylzyx==''){
- this.$toast("请填写是否流转意向");
- return false;
- }else if(landInfoList.xzqk==''){
- this.$toast("请填写现状情况");
- return false;
- }else if(landInfoList.frontland==''){
- this.$toast("请上传图片");
- return false;
- }
-
-
-
- //新增
- if(this.currentType == 0){
- if(landInfoList.theGeom==''){
- this.$toast("请选择空间坐标");
- return false;
- }
- landAdd(landInfoList).then((res)=>{
- if(res.code == 200){
- this.landHomesteadEditVisbileFun("hide");
- //新增
- this.initDraw();
- this.$toast("农地信息新建成功");
- }
- })
+ //农地
+ let landInfoList = this.landInfoList;
+ landInfoList.theGeom = this.coordinateList;
+ landInfoList.orgCode = this.villageDataObj.orgCode;
+ landInfoList.cdm = this.villageDataObj.orgCode;
+ landInfoList.cm = this.villageDataObj.deptName;
+ if (landInfoList.xm == undefined || landInfoList.xm == "") {
+ this.$toast("请填写农地编号");
+ return false;
+ } else if (
+ landInfoList.syrmc == undefined ||
+ landInfoList.syrmc == ""
+ ) {
+ this.$toast("请填写农地使用人名称");
+ return false;
+ } else if (landInfoList.xzqk == undefined || landInfoList.xzqk == "") {
+ this.$toast("请填写现状情况");
+ return false;
+ } else if (
+ landInfoList.nydlx == undefined ||
+ landInfoList.nydlx == ""
+ ) {
+ this.$toast("请选择农用地类型");
+ return false;
+ } else if (landInfoList.mj == undefined || landInfoList.mj == "") {
+ this.$toast("请填写土地面积");
+ return false;
+ } else if (
+ landInfoList.sfylzyx == undefined ||
+ landInfoList.sfylzyx == ""
+ ) {
+ this.$toast("请选择是否流转意向");
+ return false;
+ }
- }else{
- landEdit(landInfoList).then((res)=>{
- if(res.code == 200){
- this.landHomesteadEditVisbileFun("hide");
- this.$toast("农地信息修改成功");
- this.landInfoLookList = this.landInfoList;
- }
- })
+ //新增
+ if (this.currentType == 0) {
+ if (landInfoList.theGeom == "") {
+ this.$toast("请选择空间坐标");
+ return false;
}
-
+ landAdd(landInfoList).then((res) => {
+ if (res.code == 200) {
+ this.landHomesteadEditVisbileFun("hide");
+ //新增
+ this.initDraw();
+ this.$toast("农地信息新建成功");
+ }
+ });
+ } else {
+ landEdit(landInfoList).then((res) => {
+ if (res.code == 200) {
+ this.landHomesteadEditVisbileFun("hide");
+ this.$toast("农地信息修改成功");
+ this.landInfoLookList = this.landInfoList;
+ }
+ });
}
+ }
//保存成功触发
-
},
landHomesteadEdConfirm(value) {
@@ -1379,29 +1410,29 @@ export default {
this.landHomesteadEditcalendar = false;
this.landInfoList.lzhtjzrq = this.getDate(new Date(value));
},
- houseHomesteadEdConfirm(value){
+ houseHomesteadEdConfirm(value) {
//农房
- this.houseHomesteadEditcalendar = false;
- this.houseInfoList.zlhtjzrq = this.getDate(new Date(value));
+ this.houseHomesteadEditcalendar = false;
+ this.houseInfoList.zlhtjzrq = this.getDate(new Date(value));
},
- getDate(date){
- //date是传过来的时间戳,注意需为13位,10位需*1000
- //也可以不传,获取的就是当前时间
- var time = new Date(date);
- var year= time.getFullYear() //年
- var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
- var day = ("0" + time.getDate()).slice(-2); //日
- var mydate = year + "-" + month + "-" + day;
- return mydate
+ getDate(date) {
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year = time.getFullYear(); //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate;
},
//初始化绘制
initDraw() {
//清除数据
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
- this.coordinateList = '';
+ this.coordinateList = "";
//农地数据初始化
- this.landInfoList = {
+ this.landInfoList = {
id: "", //String 是 主键id
orgCode: "", // String 否 行政区代码
cdm: "", // String 否 村代码
@@ -1423,7 +1454,7 @@ export default {
};
//农房数据初始化
- this.houseInfoList = {
+ this.houseInfoList = {
id: "", // String 是 主键id
orgCode: "", // String 否 行政区代码
cdm: "", // String 否 村代码
@@ -1450,6 +1481,11 @@ export default {
tdfl: "", // 集体/个人
};
+ //农房上传图片附件
+ this.nfAddfileList = [];
+ //农地上传图片附件
+ this.ndAddfileList = [];
+
this.draw.drawMapPolygon = false; //绘制地图
},
initAxios() {
@@ -1477,7 +1513,6 @@ export default {
});
//现状情况
this.getDicts("geo_hc_land").then((response) => {
-
this.ndxzqkOptions = response.data;
});
},
@@ -1512,52 +1547,50 @@ export default {
$(".ol-hidden ,.ol-collapsed").hide();
},
switchLoad() {
- let objData = {
- orgCode: this.villageDataObj.orgCode,
- statusList: "1,2,3,4,5,6,7,8",
- };
- // //右侧详情农房农地列表
-
- hcBottomSearch(objData).then((res) => {
- let content = res.data;
- //房
- let houseArr = [];
- let landArr = [];
- //地
- content.forEach((v, i) => {
- if (v.type == "house") {
- houseArr.push({
- geo: v.geo,
- mj: v.mj,
- name: v.name,
- type: v.type,
- xh: v.xh,
- xzqk:v.xzqk
- });
- } else {
- landArr.push({
- geo: v.geo,
- mj: v.mj,
- name: v.name,
- type: v.type,
- xh: v.xh,
- xzqk:v.xzqk
- });
- }
- });
- this.hcBottonHouseArr = houseArr;
- this.hcBottonLandArr = landArr;
- this.ishcBotton = true;
+ let objData = {
+ orgCode: this.villageDataObj.orgCode,
+ statusList: "1,2,3,4,5,6,7,8",
+ };
+ // //右侧详情农房农地列表
+
+ hcBottomSearch(objData).then((res) => {
+ let content = res.data;
+ //房
+ let houseArr = [];
+ let landArr = [];
+ //地
+ content.forEach((v, i) => {
+ if (v.type == "house") {
+ houseArr.push({
+ geo: v.geo,
+ mj: v.mj,
+ name: v.name,
+ type: v.type,
+ xh: v.xh,
+ xzqk: v.xzqk,
+ });
+ } else {
+ landArr.push({
+ geo: v.geo,
+ mj: v.mj,
+ name: v.name,
+ type: v.type,
+ xh: v.xh,
+ xzqk: v.xzqk,
+ });
+ }
});
-
-
+ this.hcBottonHouseArr = houseArr;
+ this.hcBottonLandArr = landArr;
+ this.ishcBotton = true;
+ });
},
mapAreaSelectValue() {
treeselectByUser().then((res) => {
if (res.code == 200) {
let content = res.data;
this.hcAreaInfoOption = content;
- let currDeptId = '169';
+ let currDeptId = "169";
// if(content[0].children && content[0].children.length!=0){
// if(content[0].children[0].children && content[0].children[0].children.length!=0){
// currDeptId = content[0].children[0].children[0].value;
@@ -1568,7 +1601,7 @@ export default {
// currDeptId = content[0].value
// }
//获取村详细信息
- this.deptGetFun(currDeptId)
+ this.deptGetFun(currDeptId);
//获取地图
this.mapBackground();
//设置缩放按钮位置
@@ -1577,21 +1610,21 @@ export default {
});
},
//选择村
- hcAreaInfoFinish({value, selectedOptions, tabIndex} ){
- this.deptGetFun(value)
+ hcAreaInfoFinish({ value, selectedOptions, tabIndex }) {
+ this.deptGetFun(value);
},
//通过deptId获取经纬度
- deptGetFun(value){
- deptGetId(value).then((res)=>{
- this.villageVisbile = false;
- let content = res.data;
- this.villageDataObj = content;
- console.log(content)
+ deptGetFun(value) {
+ deptGetId(value).then((res) => {
+ this.villageVisbile = false;
+ let content = res.data;
+ this.villageDataObj = content;
+ console.log(content);
$("#cun").trigger("change");
this.switchLoad();
- })
+ });
},
-
+
searchBarOperFun(statue) {
if (statue == "true") {
this.searchBarOperVisbile = true;
@@ -1601,11 +1634,9 @@ export default {
this.initDraw();
}
},
-
/*右侧列表 --展开收缩*/
selectionPush() {
-
$(".homesteadList_wrap").animate(
{
right: "0",
@@ -1622,12 +1653,8 @@ export default {
);
},
-
-
-
villageVisbileFun() {
- this.villageVisbile =true;
-
+ this.villageVisbile = true;
},
housingTypes(type) {
@@ -1693,21 +1720,19 @@ export default {
var wmsSource = new ol.source.TileWMS({
//url: 'http://192.168.31.150:8888/geoserver/mywork_mysql/wms',
- url: 'http://116.255.135.38:8080/geoserver/nsgk_hc/wms',
+ url: "http://116.255.135.38:8080/geoserver/nsgk_hc/wms",
//url: 'http://localhost:8888/geoserver/mywork_mysql/wms',
params: {
- 'LAYERS': 'nsgk_hc:nsgk_hc_all',
+ LAYERS: "nsgk_hc:nsgk_hc_all",
//'LAYERS': 'mywork_mysql:t_geo_hc_land',
- 'TILED':true,
- SRID:3857,
- serverType: 'geoserver',
- crossOrigin: 'anonymous',
+ TILED: true,
+ SRID: 3857,
+ serverType: "geoserver",
+ crossOrigin: "anonymous",
},
- })
-
-
+ });
- map.on('pointermove', function (evt) {
+ map.on("pointermove", function (evt) {
if (evt.dragging) {
return;
}
@@ -1715,7 +1740,7 @@ export default {
var hit = map.forEachLayerAtPixel(pixel, function () {
return true;
});
- map.getTargetElement().style.cursor = hit ? 'pointer' : '';
+ map.getTargetElement().style.cursor = hit ? "pointer" : "";
});
//属性查询结束 ------------------end
var shitu = new ol.layer.Vector({
@@ -1757,32 +1782,30 @@ export default {
///-----------乡---------------------------------------------------------------------------------------------------------
var villageVectorLayer; //村标记
async function villageDiagram() {
-
- villageDataFun(_this.villageDataObj);
-
+ villageDataFun(_this.villageDataObj);
}
//村数据处理
function villageDataFun(villageMapData) {
let arrDatas = [];
// for (let i = 0; i < villageMapData.length; i++) {
- let varName = "iconFeature0";
- window[varName] = new ol.Feature({
- geometry: new ol.geom.Point(
- ol.proj.fromLonLat([villageMapData.lng, villageMapData.lat])
- ),
- name:
- villageMapData.name == undefined
- ? villageMapData.deptName
- : villageMapData.name, //名称属性
- orgCode: villageMapData.orgCode, //人口数(万)
- lat: villageMapData.lat,
- lng: villageMapData.lng,
- type: "村",
- zhenOrgCode: villageMapData.zhenOrgCode,
- });
- window[varName].setStyle(visCreateLabelStyle(window[varName]));
- arrDatas.push(window[varName]);
+ let varName = "iconFeature0";
+ window[varName] = new ol.Feature({
+ geometry: new ol.geom.Point(
+ ol.proj.fromLonLat([villageMapData.lng, villageMapData.lat])
+ ),
+ name:
+ villageMapData.name == undefined
+ ? villageMapData.deptName
+ : villageMapData.name, //名称属性
+ orgCode: villageMapData.orgCode, //人口数(万)
+ lat: villageMapData.lat,
+ lng: villageMapData.lng,
+ type: "村",
+ zhenOrgCode: villageMapData.zhenOrgCode,
+ });
+ window[varName].setStyle(visCreateLabelStyle(window[varName]));
+ arrDatas.push(window[varName]);
// }
var vectorSource = new ol.source.Vector({
@@ -1851,7 +1874,7 @@ export default {
);
if (feature) {
}
-
+
document.getElementById("info").innerHTML = "";
var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
var url = wmsSource.getFeatureInfoUrl(
@@ -1866,6 +1889,10 @@ export default {
return response.text();
})
.then(function (html) {
+ //农房上传图片附件
+ _this.nfAddfileList = [];
+ //农地上传图片附件
+ _this.ndAddfileList = [];
if (html.indexOf("
{
_this.hasTable = true;
@@ -1876,106 +1903,133 @@ export default {
let obj = {};
let trs = $("#info .featureInfo").find("tr:eq(1)");
let zjId = trs.find("td").eq(0).text();
- let zjIdNum = zjId.replace('t_geo_hc_house.','');
- obj.id = zjIdNum; // 主键id
- obj.fwsyrmc = trs.find("td").eq(1).text(); //房屋所有人名称
+ let zjIdNum = zjId.replace("t_geo_hc_house.", "");
+ obj.id = zjIdNum; // 主键id
+ obj.fwsyrmc = trs.find("td").eq(1).text(); //房屋所有人名称
obj.cm = trs.find("td").eq(2).text(); //村名
obj.cdm = trs.find("td").eq(3).text(); //村代码
- obj.dz = trs.find("td").eq(4).text(); //地址
- obj.sfyspsx = trs.find("td").eq(5).text(); //是否有审批手续
- obj.fwsyqh = trs.find("td").eq(6).text(); //房屋所有权证号
+ obj.dz = trs.find("td").eq(4).text(); //地址
+ obj.sfyspsx = trs.find("td").eq(5).text(); //是否有审批手续
+ obj.fwsyqh = trs.find("td").eq(6).text(); //房屋所有权证号
obj.jzmj = trs.find("td").eq(7).text(); //建筑面积
- obj.tdzh = trs.find("td").eq(8).text(); //建筑面积
- obj.tdxz = trs.find("td").eq(9).text(); //土地性质
- obj.tdmj = trs.find("td").eq(10).text(); //土地面积
+ obj.tdzh = trs.find("td").eq(8).text(); //建筑面积
+ obj.tdxz = trs.find("td").eq(9).text(); //土地性质
+ obj.tdmj = trs.find("td").eq(10).text(); //土地面积
obj.xzqk = trs.find("td").eq(11).text(); //现状情况
obj.zlrxm = trs.find("td").eq(12).text(); //租赁人姓名
obj.zlhtjzrq = trs.find("td").eq(13).text(); //租赁合同截止日期
- obj.zlsynx = trs.find("td").eq(14).text(); //租赁剩余年限
+ obj.zlsynx = trs.find("td").eq(14).text(); //租赁剩余年限
obj.xzfwsfylzy = trs.find("td").eq(15).text(); //闲置房屋是否有流转意愿
- obj.xh = trs.find("td").eq(16).text(); //农房编号
+ obj.xh = trs.find("td").eq(16).text(); //农房编号
- obj.orgCode = trs.find("td").eq(20).text(); //行政区代码
+ obj.orgCode = trs.find("td").eq(20).text(); //行政区代码
obj.tdfl = trs.find("td").eq(23).text(); //集体/个人
- obj.frontHouse = trs.find("td").eq(24).text(); //图片前
- obj.behindHouse = trs.find("td").eq(25).text(); //图片后
+ obj.frontHouse = trs.find("td").eq(24).text(); //图片前
+ obj.behindHouse = trs.find("td").eq(25).text(); //图片后
_this.houseInfoList = obj;
- _this.houseInfoLookList =obj;
-
-
-
+ _this.houseInfoList.frontland = "";
+ _this.houseInfoList.behindland = "";
+ _this.houseInfoLookList = obj;
} else {
_this.farmhouseStatus = 1;
//农地
let obj = {};
let trs = $("#info .featureInfo").find("tr:eq(1)");
let zjId = trs.find("td").eq(0).text();
- let zjIdNum = zjId.replace('t_geo_hc_land.','');
- obj.id = zjIdNum; // 主键id
- obj.xm = trs.find("td").eq(1).text(); //序号
+ let zjIdNum = zjId.replace("t_geo_hc_land.", "");
+ obj.id = zjIdNum; // 主键id
+ obj.xm = trs.find("td").eq(1).text(); //序号
obj.cm = trs.find("td").eq(2).text(); //村名
- obj.cbrmc = trs.find("td").eq(3).text(); //承包人名称
+ obj.cbrmc = trs.find("td").eq(3).text(); //承包人名称
obj.syrmc = trs.find("td").eq(4).text(); //使用人名称
- obj.nydlx = trs.find("td").eq(5).text(); //农用地类型
- obj.mj= trs.find("td").eq(6).text(); //面积
- obj.xzqk = trs.find("td").eq(7).text(); //现状情况
+ obj.nydlx = trs.find("td").eq(5).text(); //农用地类型
+ obj.mj = trs.find("td").eq(6).text(); //面积
+ obj.xzqk = trs.find("td").eq(7).text(); //现状情况
obj.lzhtjzrq = trs.find("td").eq(8).text(); //流转合同截止时间
obj.lzsynx = trs.find("td").eq(9).text(); //流转剩余年限
- obj.sfylzyx = trs.find("td").eq(10).text(); //是否流转意向
- obj.cdm = trs.find("td").eq(11).text(); //村代码
+ obj.sfylzyx = trs.find("td").eq(10).text(); //是否流转意向
+ obj.cdm = trs.find("td").eq(11).text(); //村代码
obj.orgCode = trs.find("td").eq(15).text(); //行政区化代码
- obj.frontland = trs.find("td").eq(18).text(); //图片前
+ obj.frontland = trs.find("td").eq(18).text(); //图片前
obj.behindland = trs.find("td").eq(19).text(); //图片后
+ _this.nydlxOptionsValue = trs.find("td").eq(5).text(); //农用地类型
_this.landInfoList = obj;
+ //编辑图片清空
+ _this.landInfoList.frontland = "";
+ _this.landInfoList.behindland = "";
_this.landInfoLookList = obj;
-
}
}, 300);
-
- if(_this.draw.drawMapPolygon ==false && _this.searchBarOperVisbile == false){ //判断不在绘制地图进入
- if($('.landHomestead_wrap').css('bottom')!='0px'){
- $('.searchBar_wrap').css({'bottom':'0'})
- $('.searchBar_wrap').animate({
- 'bottom':'-100%'
- },300)
-
- $('.landHomestead_wrap').css({'bottom':'-100%'})
- $('.landHomestead_wrap').animate({
- 'bottom':'0'
- },400)
-
-
-
- $('.rightIcon_wrap').animate({
- 'bottom':$('.landHomestead_wrap').height()+10+'px'
- },200)
- }
+ if (
+ _this.draw.drawMapPolygon == false &&
+ _this.searchBarOperVisbile == false
+ ) {
+ //判断不在绘制地图进入
+ if ($(".landHomestead_wrap").css("bottom") != "0px") {
+ $(".searchBar_wrap").css({ bottom: "0" });
+ $(".searchBar_wrap").animate(
+ {
+ bottom: "-100%",
+ },
+ 300
+ );
+
+ $(".landHomestead_wrap").css({ bottom: "-100%" });
+ $(".landHomestead_wrap").animate(
+ {
+ bottom: "0",
+ },
+ 400
+ );
+
+ $(".rightIcon_wrap").animate(
+ {
+ bottom: $(".landHomestead_wrap").height() + 10 + "px",
+ },
+ 200
+ );
+ }
}
} else {
_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)
+
+ 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
+ );
}
//非编辑情况初始化
- if(_this.landHomesteadEditVisbile == false){
+ if (_this.landHomesteadEditVisbile == false) {
//农地数据初始化
- _this.landInfoList = {
+ _this.landInfoList = {
id: "", //String 是 主键id
orgCode: "", // String 否 行政区代码
cdm: "", // String 否 村代码
@@ -1995,8 +2049,9 @@ export default {
frontland: "", //String 否 图片前
behindland: "", //String 否 图片后
};
+
//农房数据初始化
- _this.houseInfoList = {
+ _this.houseInfoList = {
id: "", // String 是 主键id
orgCode: "", // String 否 行政区代码
cdm: "", // String 否 村代码
@@ -2022,8 +2077,7 @@ export default {
xzfwsfylzy: "", // 闲置房屋是否有流转意愿
tdfl: "", // 集体/个人
};
- }
-
+ }
}
});
}
@@ -2054,23 +2108,23 @@ export default {
* @param {*} drawType
* @param {option 可选} geometryField
*/
-
+
var cun = _this.villageDataObj.deptName;
- console.log(cun)
+ console.log(cun);
//定位个人地图
map.removeLayer(texiao_layer_fang);
map.removeLayer(texiao_layer_di);
//删除之前加载的图层
-
- let currObjNum = _this.villageDataObj;
- map.getView().animate({
- // 只设置需要的属性即可
- center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
- zoom: 14.5, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- });
-
+
+ let currObjNum = _this.villageDataObj;
+ map.getView().animate({
+ // 只设置需要的属性即可
+ center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
+ zoom: 14.5, // 缩放级别
+ rotation: undefined, // 缩放完成view视图旋转弧度
+ duration: 1000, // 缩放持续时间,默认不需要设置
+ });
+
map.removeLayer(nongZt);
//村的数据判断
@@ -2079,7 +2133,7 @@ export default {
setTimeout(() => {
map.removeLayer(shitu);
}, 1000);
-
+
//查询条件
var cql_filter;
//for(var i=0; i< difang.length; i++){
@@ -2182,11 +2236,11 @@ export default {
var geometry = feature.getGeometry();
var coordinate = geometry.getCoordinates();
console.log("打印" + coordinate);
- _this.coordinateList= coordinate.toString();
- console.log( _this.coordinateList)
+ _this.coordinateList = coordinate.toString();
+ console.log(_this.coordinateList);
$("#drawRemove").trigger("click");
_this.$set(_this.draw, "drawMapPolygon", false);
-
+
//that.drawInsert = coordinate;
});
map.addInteraction(draw);
@@ -2220,9 +2274,9 @@ export default {
//alert("进入分类");
//删除之前加载的图层
map.removeLayer(texiao_layer_fang);
-
- var cun = _this.villageDataObj.deptName;
-
+
+ var cun = _this.villageDataObj.deptName;
+
//删除之前加载的图层
//map.removeLayer(dishitu);
//map.removeLayer(cunshitu);
@@ -2377,7 +2431,7 @@ export default {
//alert("进入分类");
//删除之前加载的图层
map.removeLayer(texiao_layer_di);
- var cun = _this.villageDataObj.deptName;
+ var cun = _this.villageDataObj.deptName;
//删除之前加载的图层
//map.removeLayer(dishitu);
//map.removeLayer(cunshitu);
@@ -2519,10 +2573,10 @@ export default {
//农房 - 土地性质 选择值
tdxzOptionsFun(value) {
this.houseInfoList.tdxz = value.dictLabel;
- this.tdxzOptionsValue = value.dictLabel;
+
this.tdxzOptionsVibile = false;
- console.log(value)
- console.log( this.houseInfoList)
+ console.log(value);
+ console.log(this.houseInfoList);
},
//农房 - 是否有审批 选择值
xfCirculationFun(value) {
@@ -2540,7 +2594,7 @@ export default {
this.houseInfoList.xzfwsfylzy = value;
},
//农房 - 房屋类型
- fwdlxOptionsFun(value){
+ fwdlxOptionsFun(value) {
this.houseInfoList.tdfl = value;
this.fwdlxOptionsVibile = false;
},
@@ -2561,23 +2615,22 @@ export default {
this.landInfoList.sfylzyx = value;
},
//农房 -- 新建 上传图片方法
- nfAddimgonRead(file){
- var formData =new FormData();//构造一个 FormData,把后台需要发送的参数添加
- formData.append('file', file.file);//接口需要传的参数
- commonUpload(formData).then((res)=>{
+ nfAddimgonRead(file) {
+ var formData = new FormData(); //构造一个 FormData,把后台需要发送的参数添加
+ formData.append("file", file.file); //接口需要传的参数
+ commonUpload(formData).then((res) => {
this.houseInfoList.frontHouse = res.url;
- })
+ });
},
//农地 -- 新建 上传图片方法
- ndAddimgonRead(file){
- var formData =new FormData();//构造一个 FormData,把后台需要发送的参数添加
- formData.append('file', file.file);//接口需要传的参数
- commonUpload(formData).then((res)=>{
+ ndAddimgonRead(file) {
+ var formData = new FormData(); //构造一个 FormData,把后台需要发送的参数添加
+ formData.append("file", file.file); //接口需要传的参数
+ commonUpload(formData).then((res) => {
this.landInfoList.frontland = res.url;
- })
+ });
},
},
-
};