-
-
-
-
孙全礼
-
南郊村东二街30号南郊村东二街30号
-
性质:农村宅基地
+
+
+
+
{{houseInfoList.fwsyrmc}}
+
{{houseInfoList.dz}}
+
性质:{{houseInfoList.tdxz}}
+
+
+
{{houseInfoList.xh}}
+
大约{{houseInfoList.jzmj}}㎡
+
+
+
+
+
+
+
+
{{landInfoList.syrmc}}
+
{{landInfoList.cm}}
+
性质:{{landInfoList.nydlx}}
-
103
-
大约120㎡
+
{{landInfoList.xh}}
+
大约{{landInfoList.mj}}㎡
-
+
-
+
-
农房编号31
-
+
农房编号{{houseInfoLookList.xh}}
+
房屋所有人名称孙全礼
+ >{{houseInfoLookList.fwsyrmc}}
- 村名南郊村
+ 村名{{houseInfoLookList.cm}}
地址东二街30号
+ >{{houseInfoLookList.dz}}
是否有审批手续是
+ >{{houseInfoLookList.sfyspsx}}
房屋所有权证号15-76-105
+ >{{houseInfoLookList.fwsyqh}}
建筑面积大约80㎡
+ >大约{{houseInfoLookList.jzmj}}㎡
土地证号38718490184
+ >{{houseInfoLookList.tdzh}}
土地性质农村宅基地
+ >{{houseInfoLookList.tdxz}}
土地面积大约130㎡
+ >大约{{houseInfoLookList.tdmj}}㎡
现状情况已盘活
+ >{{houseInfoLookList.xzqk}}
是否有流转意向
+ >{{houseInfoLookList.xzfwsfylzy}}
租赁人李福任
+ >{{houseInfoLookList.zlrxm}}
- 租赁年限10年
+ 租赁剩余年限{{houseInfoLookList.zlsynx}}年
租赁合同截止日期2021.7.1-2031.6.30
+ >{{houseInfoLookList.zlhtjzrq}}
@@ -334,7 +337,7 @@
-
@@ -343,56 +346,53 @@
农地使用人名称孙全礼
+ >{{landInfoLookList.syrmc}}
- 村名南郊村
+ 村名{{landInfoLookList.cm}}
- 是否有审批手续是
-
-
-
- 土地证号38718490184
+ 是否有流转意向{{landInfoLookList.sfylzyx}}
+
土地面积大约3亩
+ >大约{{landInfoLookList.mj}}亩
- 现状情况已流转
+ 农用地类型大约{{landInfoLookList.nydlx}}
- 是否有流转意向
+ 现状情况{{landInfoLookList.xzqk}}
+
承包人李福任
+ >{{landInfoLookList.cbrmc}}
流转剩余年限10年
+ >{{landInfoLookList.lzsynx}}年
流转合同截止日期2021.7.1-2031. 6.30
+ >{{landInfoLookList.lzhtjzrq}}
@@ -407,7 +407,7 @@
-
@@ -892,39 +892,30 @@ import {
hcBottomSearch,
commonUpload,
houseAdd,
- landAdd
+ landAdd,
+ treeselectByUser,
+ deptGetId
} from "@/api/homestead/index";
export default {
name: "homesteadLogin",
data() {
return {
- //当前选择区 0 镇1 村2
- currentSelected: 0,
- //区级list
+ //省市区区级list
hcAreaInfoOption: [],
- //区级id
- hcAreaInfoValue: "",
- //镇级显示隐
- townVisbile: false,
- //镇级List
- townOptions: [],
- //选中的镇级
- focusTownOptions: [{ orgCode: "", deptName: "全部" }],
- //选择的镇级
- orderTownOptions: [],
- //镇选择框高度
- towneOptionsHeight: 0,
- //村级显影
- villageVisbile: false,
- //村级list
- villageOptions: [],
- //选中的村级
- focusVillageOptions: [{ orgCode: "", deptName: "全部" }],
- //选择的村级
- orderVillageOptions: [],
- //村选择框高度
- villageOptionsHeight: 0,
+ //省市区区级显示
+ villageVisbile:false,
+ //选中的值
+ villageValue:'',
+ //选中村相关信息
+ villageDataObj:{
+ deptName:'', //村名
+ },
+ hcAreaInfoFieldName:{
+ text: 'label',
+ value: 'value',
+ children: 'children',
+ },
// 待租列表显示
ishcBotton: false,
// 待租列表 类型 0 农房 1 农地
@@ -941,6 +932,8 @@ export default {
},
//地图绘制坐标存储
coordinateList: '',
+ //判断新增还是编辑 0 新增 1编辑
+ currentType:0,
//新建选择农房土地弹窗 显隐
farmlandEditSwitchVisbule: false, //false
//编辑房屋土地块高度
@@ -1006,6 +999,11 @@ export default {
tdfl: "", // 集体/个人
},
+ //农地查看数据
+ landInfoLookList:{},
+ //农房查看数据
+ houseInfoLookList:{},
+
//农房 - 农房权属
tdxzOptions: [],
tdxzOptionsVibile: false, //农房 - 农房权属 -弹窗
@@ -1039,12 +1037,55 @@ export default {
nfAddfileList: [],
//农地上传图片附件
ndAddfileList: [],
+ // 当前是否地图点击状态
+ hasTable:false,
+ //查看农地\农房 显隐
+ landHomesteadDetailsVisibile:false
};
},
mounted() {
this.initAxios();
},
methods: {
+ //编辑农地信息
+ editnfdInfo(type){
+ this.currentType = 1;
+ this.farmlandEditSwitchVisbuleFun("hide");
+ this.landHomesteadEditVisbileFun("show");
+ },
+ //显示农地\农房详情
+ houseLandLookInfo(type){
+ if(type=='show'){
+ this.houseLandLookAnmitFun('show')
+ }else{
+ this.houseLandLookAnmitFun('hide')
+ }
+ },
+ //显示农地\农房详情 动画
+ houseLandLookAnmitFun(type){
+
+ if (type == "show") {
+ this.landHomesteadDetailsVisibile = true;
+ $(".landHomesteadDetails_wrap").css({ bottom: "-100vh" });
+ $(".landHomesteadDetails_wrap").animate(
+ {
+ bottom: "0",
+ },
+ 300
+ );
+ } else {
+ $(".landHomesteadDetails_wrap").css({ bottom: "0" });
+ $(".landHomesteadDetails_wrap").animate(
+ {
+ bottom: "-100vh",
+ },
+ 300
+ );
+ setTimeout(() => {
+ this.landHomesteadDetailsVisibile = false;
+ }, 300);
+ }
+ },
//绘制多边形地图
drawMapPolygonFun() {
let drawMapPolygon = this.draw.drawMapPolygon;
@@ -1062,7 +1103,7 @@ export default {
this.$toast("请先完成绘制");
return false;
}
-
+ this.currentType = 0;
this.farmlandEditSwitchVisbuleFun("show");
this.searchBarOperVisbile = false;
},
@@ -1086,6 +1127,7 @@ export default {
},
//新增地块 编辑页 显影
landHomesteadEditVisbileFun(type) {
+
if (type == "show") {
this.landHomesteadEditVisbile = true;
$(".landHomesteadEdit_wrap").css({ bottom: "-100vh" });
@@ -1144,7 +1186,10 @@ export default {
//新增地块 编辑页 取消
landHomesteadEditCancel() {
this.landHomesteadEditVisbileFun("hide");
- this.farmlandEditSwitchVisbuleFun("show");
+ //新增信息显示
+ if(this.currentType == 0){
+ this.farmlandEditSwitchVisbuleFun("show");
+ }
},
//新增地块 编辑页 保存
landHomesteadEditSave() {
@@ -1153,9 +1198,10 @@ export default {
//农房
let houseInfoList = this.houseInfoList;
houseInfoList.theGeom= this.coordinateList;
- // orgCode 后期传
- // cdm 后期传
- // cm 后期传
+ houseInfoList.orgCode = this.villageDataObj.orgCode;
+ houseInfoList.cdm = this.villageDataObj.orgCode;
+ houseInfoList.cm = this.villageDataObj.deptName;
+
if(houseInfoList.xh ==''){
this.$toast("请填写序号");
@@ -1184,9 +1230,6 @@ export default {
}else if(houseInfoList.xzqk ==''){
this.$toast("请选择现状情况");
return false;
- }else if(houseInfoList.theGeom ==''){
- this.$toast("请选择地图坐标");
- return false;
}else if(houseInfoList.frontHouse ==''){
this.$toast("请选择上传图片");
return false;
@@ -1209,13 +1252,29 @@ export default {
this.$toast("请选择房屋类型");
return false;
}
+ //新增
+ if(this.currentType == 0){
+ if(houseInfoList.theGeom ==''){
+ this.$toast("请选择地图坐标");
+ return false;
+ }
+ }
console.log(houseInfoList)
houseAdd(houseInfoList).then((res)=>{
if(res.code == 200){
- this.$toast("农房新建成功");
+
+
this.landHomesteadEditVisbileFun("hide");
- this.initDraw();
+ //新增
+ if(this.currentType == 0){
+ this.$toast("农房信息新建成功");
+ this.initDraw();
+ }else{
+ this.$toast("农房信息修改成功");
+ //编辑
+ this.houseInfoLookList = this.houseInfoList;
+ }
}
})
@@ -1228,7 +1287,9 @@ export default {
//农地
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;
@@ -1256,20 +1317,33 @@ export default {
}else if(landInfoList.xzqk==''){
this.$toast("请填写现状情况");
return false;
- }else if(landInfoList.theGeom==''){
- 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.$toast("农地新建成功");
+
this.landHomesteadEditVisbileFun("hide");
- this.initDraw();
+ //新增
+ if(this.currentType == 0){
+ this.initDraw();
+ this.$toast("农地信息新建成功");
+ }else{
+ this.$toast("农地信息修改成功");
+ //编辑
+ this.landInfoLookList = this.landInfoList;
+ }
}
})
@@ -1360,7 +1434,7 @@ export default {
this.draw.drawMapPolygon = false; //绘制地图
},
initAxios() {
- //获取区
+ //获取区镇村
this.mapAreaSelectValue();
//农房---字典项
this.nfDictionary();
@@ -1391,7 +1465,6 @@ export default {
styleSteup() {
let smallTop = this.$refs.sliderSmall.getBoundingClientRect().top;
let smallLeft = this.$refs.sliderSmall.getBoundingClientRect().left;
- console.log(smallTop);
$(".ol-zoom-out").css({
position: "absolute",
left: smallLeft + "px",
@@ -1420,20 +1493,12 @@ export default {
$(".ol-hidden ,.ol-collapsed").hide();
},
switchLoad() {
- let orgCode = "";
- if (this.currentSelected == 0) {
- orgCode = this.hcAreaInfoOption[0].orgCode;
- } else if (this.currentSelected == 1) {
- orgCode = this.focusTownOptions[0].orgCode;
- } else {
- orgCode = this.focusVillageOptions[0].orgCode;
- }
- let objData = {
- orgCode: orgCode,
- statusList: "1,2,3,4,5,6,7,8",
- };
- //右侧详情农房农地列表
- if (objData.orgCode.length == 12) {
+ let objData = {
+ orgCode: this.villageDataObj.orgCode,
+ statusList: "1,2,3,4,5,6,7,8",
+ };
+ // //右侧详情农房农地列表
+
hcBottomSearch(objData).then((res) => {
let content = res.data;
//房
@@ -1448,6 +1513,7 @@ export default {
name: v.name,
type: v.type,
xh: v.xh,
+ xzqk:v.xzqk
});
} else {
landArr.push({
@@ -1456,6 +1522,7 @@ export default {
name: v.name,
type: v.type,
xh: v.xh,
+ xzqk:v.xzqk
});
}
});
@@ -1463,23 +1530,26 @@ export default {
this.hcBottonLandArr = landArr;
this.ishcBotton = true;
});
- } else {
- this.hcBottonHouseArr = [];
- //待租列表 地
- this.hcBottonLandArr = [];
- this.ishcBotton = false;
- }
- // console.log();
+
+
},
mapAreaSelectValue() {
- bigDataHcAreaInfo().then((res) => {
+ treeselectByUser().then((res) => {
if (res.code == 200) {
let content = res.data;
this.hcAreaInfoOption = content;
- this.hcAreaInfoValue = content[0].orgCode;
- //获取乡镇
- this.headerSelectValue();
- this.switchLoad();
+ 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;
+ // }else{
+ // currDeptId = content[0].children[0].value
+ // }
+ // }else{
+ // currDeptId = content[0].value
+ // }
+ //获取村详细信息
+ this.deptGetFun(currDeptId)
//获取地图
this.mapBackground();
//设置缩放按钮位置
@@ -1487,45 +1557,22 @@ export default {
}
});
},
- //镇相关
- headerSelectValue() {
- let oData = {
- orgCode: this.hcAreaInfoValue,
- };
- bigDataHcCountyInfo(oData).then((res) => {
- if (res.code == 200) {
- let content = res.data;
- let dateValue = { orgCode: "", deptName: "全部" };
- content.unshift(dateValue);
- this.townOptions = content;
-
- let oHeight = (content.length - 1) * 16;
- this.towneOptionsHeight = oHeight > 100 ? 100 : oHeight;
-
- this.townDealWithFun(dateValue);
- }
- });
+ //选择村
+ hcAreaInfoFinish({value, selectedOptions, tabIndex} ){
+ this.deptGetFun(value)
},
- townDealWithFun(value) {
- let focusTownOptions = [];
- let orderTownOptions = [];
- this.townOptions.forEach((v, i) => {
- if (value.deptName == v.deptName) {
- focusTownOptions.push({
- orgCode: v.orgCode,
- deptName: v.deptName,
- });
- } else {
- orderTownOptions.push({
- orgCode: v.orgCode,
- deptName: v.deptName,
- });
- }
- });
-
- this.focusTownOptions = focusTownOptions;
- this.orderTownOptions = orderTownOptions;
+ //通过deptId获取经纬度
+ 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;
@@ -1535,16 +1582,11 @@ export default {
this.initDraw();
}
},
- townVisbileFun() {
- this.townVisbile = true;
- this.villageVisbile = false;
- },
+
/*右侧列表 --展开收缩*/
selectionPush() {
- if (this.ishcBotton == false) {
- return false;
- }
+
$(".homesteadList_wrap").animate(
{
right: "0",
@@ -1560,95 +1602,13 @@ export default {
300
);
},
- /*点击顶部村庄--伸缩样式*/
- addressPush() {
- let addressWrapBlock = $(".address_wrap .address_item.more .name");
- let lefValue = 0;
- if (addressWrapBlock.hasClass("shrink")) {
- addressWrapBlock.removeClass("shrink");
- lefValue = "-40px";
- } else {
- addressWrapBlock.addClass("shrink");
- lefValue = "8px";
- }
- $(".address_wrap").animate(
- {
- left: lefValue,
- },
- 300
- );
- },
- townDropdown(command) {
- this.townDealWithFun(command);
- this.townVisbile = false;
- if (command.deptName == "全部") {
- this.focusVillageOptions = [{ orgCode: "", deptName: "全部" }];
- this.focusVillageOptions = [{ orgCode: "", deptName: "全部" }];
- this.orderVillageOptions = [];
- this.villageOptionsHeight = 0;
- this.currentSelected = 0;
- this.switchLoad();
- return false;
- }
- this.currentSelected = 1;
- this.switchLoad();
- this.bigDataHcVillageFun();
- $("#zhen").trigger("change");
- },
- bigDataHcVillageFun() {
- let oData = {
- orgCode: this.focusTownOptions[0].orgCode,
- };
- bigDataHcVillageInfo(oData).then((res) => {
- let content = res.data;
- let dateValue = { orgCode: "", deptName: "全部" };
- content.unshift(dateValue);
- this.villageOptions = content;
- this.villageDealWithFun(dateValue);
- this.selectChooseOrder = 0;
- });
- },
- villageDealWithFun(value) {
- let focusVillageOptions = [];
- let orderVillageOptions = [];
- this.villageOptions.forEach((v, i) => {
- if (value.deptName == v.deptName) {
- focusVillageOptions.push({
- orgCode: v.orgCode,
- deptName: v.deptName,
- });
- } else {
- orderVillageOptions.push({
- orgCode: v.orgCode,
- deptName: v.deptName,
- });
- }
- });
- this.focusVillageOptions = focusVillageOptions;
- this.orderVillageOptions = orderVillageOptions;
- let oHeight = orderVillageOptions.length * 16;
- this.villageOptionsHeight = oHeight > 100 ? 100 : oHeight;
- },
- villageDropdown(command) {
- this.villageDealWithFun(command);
- this.villageVisbile = false;
- if (command.deptName == "全部") {
- this.currentSelected = 1;
- } else {
- this.currentSelected = 2;
- }
- this.switchLoad();
- $("#cun").trigger("change");
- },
+
+
villageVisbileFun() {
- if (this.orderVillageOptions.length == 0) {
- this.$toast("请先选择所属镇");
- return false;
- }
- this.townVisbile = false;
- this.villageVisbile = true;
+ this.villageVisbile =true;
+
},
housingTypes(type) {
@@ -1726,31 +1686,7 @@ export default {
},
})
- map.on('singleclick', function (evt) {
- var aa = evt.coordinate;
- map.getView().animate({
- // 只设置需要的属性即可
- center: [aa[0],aa[1]], // 中心点
- zoom: 15, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- });
- document.getElementById('info').innerHTML = '';
- var viewResolution = map.getView().getResolution();///** @type {number} */ (view.getResolution());
- var url = wmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- 'EPSG:3857',
- {'INFO_FORMAT': 'text/html'}
- );
- if (url) {
- fetch(url)
- .then(function (response) { return response.text(); })
- .then(function (html) {
- document.getElementById('info').innerHTML = html;
- });
- }
- });
+
map.on('pointermove', function (evt) {
if (evt.dragging) {
@@ -1798,219 +1734,37 @@ export default {
}),
});
map.addLayer(huancui_zhen);
- ///--镇------------------------------------------------------------------------------------------------------------------
- //实例化矢量点要素,通过矢量图层添加到地图容器中
- let townVectorLayer;
- townDiagram();
- function townDiagram() {
- if (_this.townOptions.length == 0) {
- _this.hcAreaInfoOption.forEach((areaVal, areaIndex) => {
- let objData = {
- orgCode: areaVal.orgCode,
- };
- bigDataHcCountyInfo(objData).then((res) => {
- let content = res.data;
-
- let townMapData = [];
- content.forEach((townval, townIndex) => {
- let obj = {
- lat: townval.lat,
- lng: townval.lng,
- name: townval.deptName,
- orgCode: townval.orgCode,
- type: "镇",
- };
- townMapData.push(obj);
- });
-
- _this.townDataSet = townMapData;
-
- townDataFun(townMapData);
- });
- });
- } else {
- townDataFun(_this.townOptions);
- }
- }
- //数据处理
- function townDataFun(townMapData) {
- let arrDatas = [];
- for (let i = 0; i < townMapData.length; i++) {
- let varName = "iconFeature" + i;
- window[varName] = new ol.Feature({
- geometry: new ol.geom.Point(
- ol.proj.fromLonLat([townMapData[i].lng, townMapData[i].lat])
- ),
- name:
- townMapData[i].name == undefined
- ? townMapData[i].deptName
- : townMapData[i].name, //名称属性
- orgCode: townMapData[i].orgCode, //人口数(万)
- lat: townMapData[i].lat,
- lng: townMapData[i].lng,
- type: "镇",
- });
- window[varName].setStyle(createLabelStyle(window[varName]));
- arrDatas.push(window[varName]);
- }
-
- var vectorSource = new ol.source.Vector({
- features: arrDatas,
- });
- // //矢量标注图层
- townVectorLayer = new ol.layer.Vector({
- source: vectorSource,
- });
- map.addLayer(townVectorLayer);
- }
-
- //矢量标注样式设置函数,设置image为图标ol.style.Icon
- function createLabelStyle(feature) {
- return new ol.style.Style({
- image: new ol.style.Icon({
- //设置图标偏移
- anchor: [0.5, 1],
- //标注样式的起点位置
- anchorOrigin: "top-right",
- //X方向单位:分数
- anchorXUnits: "fraction",
- //Y方向单位:像素
- anchorYUnits: "pixels",
- //偏移起点位置的方向
- offsetOrigin: "top-right",
- //透明度
- opacity: 0.9,
- // rotation: (Math.PI / 180) * 20,
- //图片路径
- src: require("../../assets/images/homestead/mark.png"),
- //src: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
- }),
- text: new ol.style.Text({
- textAlign: "center", //位置
- textBaseline: "bottom", //基准线
- font: "normal 12px 微软雅黑", //文字样式
- text: feature.get("name"), //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#ffffff",
- }),
- }),
- });
- }
///-----------乡---------------------------------------------------------------------------------------------------------
var villageVectorLayer; //村标记
async function villageDiagram() {
- if (_this.villageOptions.length == 0) {
- //镇
- let townArray = [];
- let villageArray = [];
- function townObjFun() {
- return new Promise(function (resolve, reject) {
- _this.hcAreaInfoOption.forEach((areaVal, areaIndex) => {
- let objData = {
- orgCode: areaVal.orgCode,
- };
-
- bigDataHcCountyInfo(objData).then((res) => {
- let content = res.data;
- content.forEach((v, i) => {
- let objDatas = {
- orgCode: v.orgCode,
- };
- townArray.push(objDatas);
- resolve();
- });
- });
- });
- });
- }
- function numbersAnd(num) {
- let data = 0;
- for (let i = 0; i < num; i++) {
- data += i;
- }
- return data;
- }
-
- async function villageObjFun() {
- return new Promise(function (resolve, reject) {
- let allIndex = numbersAnd(townArray.length);
- let curIndex = 0;
- townArray.forEach((villageVal, villageIndex) => {
- var objDataz = {
- orgCode: villageVal.orgCode,
- };
-
- bigDataHcVillageInfo(objDataz).then((res) => {
- curIndex = curIndex + villageIndex;
-
- let content = res.data;
- content.forEach((v, i) => {
- let obj = {
- lat: v.lat,
- lng: v.lng,
- name: v.deptName,
- orgCode: v.orgCode,
- type: "村",
- zhenOrgCode: villageVal.orgCode,
- };
- villageArray.push(obj);
- });
- if (curIndex == allIndex) {
- setTimeout(() => {
- resolve();
- }, 400);
- }
- });
- });
- });
- }
- await townObjFun();
- await villageObjFun();
- let villageMapData = [];
- villageArray.forEach((townval, townIndex) => {
- let obj = {
- lat: townval.lat,
- lng: townval.lng,
- name: townval.name,
- orgCode: townval.orgCode,
- type: "村",
- zhenOrgCode: townval.zhenOrgCode,
- };
- villageMapData.push(obj);
- });
-
- _this.allVillage = villageMapData;
-
- villageDataFun(villageMapData);
- } else {
- villageDataFun(_this.allVillage);
- }
+
+ villageDataFun(_this.villageDataObj);
+
}
//村数据处理
function villageDataFun(villageMapData) {
let arrDatas = [];
- for (let i = 0; i < villageMapData.length; i++) {
- let varName = "iconFeature" + i;
+ // 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[i].lng, villageMapData[i].lat])
+ ol.proj.fromLonLat([villageMapData.lng, villageMapData.lat])
),
name:
- villageMapData[i].name == undefined
- ? villageMapData[i].deptName
- : villageMapData[i].name, //名称属性
- orgCode: villageMapData[i].orgCode, //人口数(万)
- lat: villageMapData[i].lat,
- lng: villageMapData[i].lng,
+ villageMapData.name == undefined
+ ? villageMapData.deptName
+ : villageMapData.name, //名称属性
+ orgCode: villageMapData.orgCode, //人口数(万)
+ lat: villageMapData.lat,
+ lng: villageMapData.lng,
type: "村",
- zhenOrgCode: villageMapData[i].zhenOrgCode,
+ zhenOrgCode: villageMapData.zhenOrgCode,
});
window[varName].setStyle(visCreateLabelStyle(window[varName]));
arrDatas.push(window[varName]);
- }
+ // }
var vectorSource = new ol.source.Vector({
features: arrDatas,
@@ -2057,19 +1811,19 @@ export default {
});
}
- map.on("moveend", function (evt) {
- var zoom = map.getView().getZoom();
- if (zoom < 13) {
- if (villageVectorLayer != undefined) {
- map.removeLayer(villageVectorLayer);
- map.removeLayer(shitu);
+ // map.on("moveend", function (evt) {
+ // var zoom = map.getView().getZoom();
+ // if (zoom < 13) {
+ // if (villageVectorLayer != undefined) {
+ // map.removeLayer(villageVectorLayer);
+ // map.removeLayer(shitu);
- map.addLayer(shitu);
- map.removeLayer(townVectorLayer);
- townDiagram();
- }
- }
- });
+ // map.addLayer(shitu);
+ // map.removeLayer(townVectorLayer);
+ // townDiagram();
+ // }
+ // }
+ // });
map.on("singleclick", function (evt) {
let feature = map.forEachFeatureAtPixel(
@@ -2077,158 +1831,179 @@ export default {
(feature) => feature
);
if (feature) {
- let featureValue = feature.values_;
- if (featureValue.type == "镇") {
- map.getView().animate({
- // 只设置需要的属性即可
- center: ol.proj.fromLonLat([featureValue.lng, featureValue.lat]), // 中心点
- zoom: 13, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- });
- map.removeLayer(villageVectorLayer);
- villageDiagram();
- _this.currentSelected = 1;
- let SelectOrgCode = {
- orgCode: featureValue.orgCode,
- deptName: featureValue.name,
- };
- _this.townDealWithFun(SelectOrgCode);
- _this.switchLoad();
- let obj = {
- orgCode: featureValue.orgCode,
- };
- bigDataHcVillageInfo(obj).then((res) => {
- if (res.code == 200) {
- let content = res.data;
- let dateValue = { orgCode: "", deptName: "全部" };
- content.unshift(dateValue);
- _this.villageOptions = content;
- _this.villageDealWithFun(dateValue);
- }
- });
- } else if (featureValue.type == "村") {
- setTimeout(() => {
- map.removeLayer(shitu);
- }, 1000);
- _this.currentSelected = 2;
- _this.statusList = 0;
- if (_this.focusTownOptions[0].orgCode != featureValue.zhenOrgCode) {
- let zhenOrgCode = featureValue.zhenOrgCode;
- let selectArr = _this.townOptions.filter((v, i) => {
- return v.orgCode == zhenOrgCode;
- });
+ }
+
+ document.getElementById("info").innerHTML = "";
+ var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
+ var url = wmsSource.getFeatureInfoUrl(
+ evt.coordinate,
+ viewResolution,
+ "EPSG:3857",
+ { INFO_FORMAT: "text/html" }
+ );
+ if (url) {
+ fetch(url)
+ .then(function (response) {
+ return response.text();
+ })
+ .then(function (html) {
+ if (html.indexOf("
{
+ _this.hasTable = true;
+ document.getElementById("info").innerHTML = html;
+ if (html.indexOf("house") != -1) {
+ //农房
+ _this.farmhouseStatus = 0;
+ 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(); //房屋所有人名称
+ 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.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.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.xzfwsfylzy = trs.find("td").eq(15).text(); //闲置房屋是否有流转意愿
+ obj.xh = trs.find("td").eq(16).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(); //图片后
+ _this.houseInfoList = obj;
+ _this.houseInfoLookList =obj;
+
- _this.townDealWithFun(selectArr[0]);
-
- let obj = {
- orgCode: featureValue.zhenOrgCode,
- };
- bigDataHcVillageInfo(obj).then((res) => {
- if (res.code == 200) {
- let content = res.data;
- let dateValue = { orgCode: "", deptName: "全部" };
- content.unshift(dateValue);
- _this.villageOptions = content;
- let selecVillagetArr = content.filter((v, i) => {
- return v.orgCode == featureValue.orgCode;
- });
-
- _this.villageDealWithFun(selecVillagetArr[0]);
- _this.switchLoad();
- $("#cun").trigger("change");
- }
- });
- } else {
- let SelectOrgCode = {
- orgCode: featureValue.orgCode,
- deptName: featureValue.name,
- };
+ } else {
+ _this.farmhouseStatus = 1;
+ //农地
+ let obj = {};
+ let trs = $("#info .featureInfo").find("tr:eq(1)");
+ 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.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.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.orgCode = trs.find("td").eq(12).text(); //行政区化代码
+ obj.frontland = trs.find("td").eq(15).text(); //图片前
+ obj.behindland = trs.find("td").eq(16).text(); //图片后
+ _this.landInfoList = obj;
+ _this.landInfoLookList = obj;
+
+ }
+ }, 300);
- _this.villageDealWithFun(SelectOrgCode);
- _this.switchLoad();
+
+ 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(_this.landHomesteadEditVisbile == false){
+ //农地数据初始化
+ _this.landInfoList = {
+ id: "", //String 是 主键id
+ orgCode: "", // String 否 行政区代码
+ cdm: "", // String 否 村代码
+ cm: "", //String 否 村名
+ xh: "", // String 否 序号
+ cbrmc: "", //String 否 承包人名称
+ syrmc: "", //String 否 使用人名称
+ nydlx: "", // String 否 农用地类型
+ mj: "", // String 否 面积
+ lzsynx: "", // String 否 流转剩余年限
+ zlhtjzrq: "", // String 否 日期
+ sfylzyx: "", // String 否 是否流转意向
+ xzqk: "", // String 否 现状情况
+ theGeom: "", //String 否 空间坐标
+ xzqkKey: "", // String 否 忽略
+ nydlxKey: "", // String 否 忽略
+ frontland: "", //String 否 图片前
+ behindland: "", //String 否 图片后
+ };
+ //农房数据初始化
+ _this.houseInfoList = {
+ id: "", // String 是 主键id
+ orgCode: "", // String 否 行政区代码
+ cdm: "", // String 否 村代码
+ cm: "", // String 否 村名
+ xh: "", // String 否 序号
+ tdxz: "", //土地性质
+ fwsyrmc: "", // String 否 房屋所有人名称
+ fwsyqh: "", // String 否 房屋所有权证号
+ tdzh: "", // String 否 土地证号
+ jzmj: "", // String 否 建筑面积
+ tdmj: "", // String 否 土地面积
+ sfyspsx: "", // String 否 是否有审批手续
+ xzqk: "", // String 否 现状情况
+ theGeom: "", // String 否 空间坐标
+ xzqkKey: "", // String 否 忽略传null
+ tdxzKey: "", // String 否 忽略传null
+ frontHouse: "", // String 否 图片前
+ behindHouse: "", // String 否 图片后
+ dz: "", // String 否 地址
+ zlrxm: "", // String 否 租赁人姓名
+ zlhtjzrq: "", // 租赁合同截止日期
+ zlsynx: "", // 租赁剩余年限
+ xzfwsfylzy: "", // 闲置房屋是否有流转意愿
+ tdfl: "", // 集体/个人
+ };
+ }
- $("#cun").trigger("change");
- }
- }
+ }
+ });
}
- // var zb = evt.coordinate;
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: [zb[0], zb[1]], // 中心点
- // zoom: 15, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // });
- // document.getElementById("info").innerHTML = "";
- // var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
- // var url = wmsSource.getFeatureInfoUrl(
- // evt.coordinate,
- // viewResolution,
- // "EPSG:3857",
- // { INFO_FORMAT: "text/html" }
- // );
- // if (url) {
- // fetch(url)
- // .then(function (response) {
- // return response.text();
- // })
- // .then(function (html) {
- // if (html.indexOf(" {
- // _this.hasTable = true;
- // document.getElementById("info").innerHTML = html;
- // if (html.indexOf("house") != -1) {
- // _this.hasDateStatus = 1;
- // let obj = {};
- // let trs = $("#info .featureInfo").find("tr:eq(1)");
- // obj.FWSYRMC = ""; //房屋所有人名称
- // // obj.FWSYRMC = trs.find("td").eq(1).text(); //房屋所有人名称
- // obj.XH = trs.find("td").eq(16).text(); //农房编号
- // obj.TDMJ = trs.find("td").eq(10).text(); //土地面积
- // obj.DZ = trs.find("td").eq(4).text(); //地址
- // obj.org_code = trs.find("td").eq(20).text(); //农房编号
- // obj.tel = "";
- // _this.hasData = obj;
- // let orgCode = {
- // orgCode: obj.org_code,
- // };
- // hcWebsiteLxr(orgCode).then((res) => {
- // if (res.code == 200) {
- // let content = res.data;
- // _this.hasData.FWSYRMC = content.linker;
- // _this.hasData.tel = content.telephone;
- // }
- // });
- // } else {
- // _this.hasDateStatus = 0;
- // let obj = {};
- // let trs = $("#info .featureInfo").find("tr:eq(1)");
- // obj.CBRMC = trs.find("td").eq(3).text(); //承包人名称
- // obj.CBRMC = "";
- // obj.XH = trs.find("td").eq(1).text(); //编号
- // obj.MJ = trs.find("td").eq(6).text(); //面积
- // obj.CM = trs.find("td").eq(2).text(); //村名
- // obj.org_code = trs.find("td").eq(15).text(); //行政区化代码
- // obj.tel = "";
- // _this.hasData = obj;
- // let orgCode = {
- // orgCode: obj.org_code,
- // };
- // hcWebsiteLxr(orgCode).then((res) => {
- // if (res.code == 200) {
- // let content = res.data;
- // _this.hasData.CBRMC = content.linker;
- // _this.hasData.tel = content.telephone;
- // }
- // });
- // }
- // }, 300);
- // } else {
- // _this.hasTable = false;
- // }
- // });
- // }
});
map.on("pointermove", function (evt) {
@@ -2243,45 +2018,6 @@ export default {
});
//属性查询结束 ------------------end
- $("#zhen").on("change", function () {
- /**
- * @api wfs服务空间查询
- * @param {*} wfsurl
- * @param {*} srsName
- * @param {*} typeName
- * @param {*} drawType
- * @param {option 可选} geometryField
- */
- //获取类型 测距
- var zhen = _this.focusTownOptions[0].deptName;
-
- let currObj = _this.townOptions.filter((v) => {
- return v.deptName == zhen;
- });
- //删除之前图层 --------------------start
-
- if (currObj.length > 0) {
- let currObjNum = currObj[0];
- map.getView().animate({
- // 只设置需要的属性即可
- center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
- zoom: 13, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- });
- } else {
- map.getView().animate({
- // 只设置需要的属性即可
- center: ol.proj.fromLonLat([122.145662, 37.369575]), // 中心点
- zoom: 11.2, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- });
- }
- map.removeLayer(villageVectorLayer);
- villageDiagram();
- });
-
//按照分类查询 村定位地图-----------------start
var nongZt;
var texiao_layer_fang;
@@ -2295,22 +2031,15 @@ export default {
* @param {*} drawType
* @param {option 可选} geometryField
*/
- var cunmap = _this.focusVillageOptions[0].orgCode;
- var cun;
- let currObj = _this.villageOptions.filter((v) => {
- return v.orgCode == cunmap;
- });
- if (currObj.length == 1) {
- cun = currObj[0].deptName;
- } else {
- cun = "";
- }
+
+ var cun = _this.villageDataObj.deptName;
+ console.log(cun)
//定位个人地图
map.removeLayer(texiao_layer_fang);
map.removeLayer(texiao_layer_di);
//删除之前加载的图层
- if (cun != "全部") {
- let currObjNum = currObj[0];
+
+ let currObjNum = _this.villageDataObj;
map.getView().animate({
// 只设置需要的属性即可
center: ol.proj.fromLonLat([currObjNum.lng, currObjNum.lat]), // 中心点
@@ -2318,25 +2047,16 @@ export default {
rotation: undefined, // 缩放完成view视图旋转弧度
duration: 1000, // 缩放持续时间,默认不需要设置
});
- }
+
map.removeLayer(nongZt);
//村的数据判断
- if (cun == "all" || cun == "") {
- //删除之前图层
-
- //定位个人地图
- map.removeLayer(texiao_layer_fang);
- map.removeLayer(texiao_layer_di);
- //删除之前图层 -------------------end
- } else {
- // map.removeLayer(cunshitu);
- // map.removeLayer(dishitu);
- map.removeLayer(villageVectorLayer);
- villageDiagram();
- setTimeout(() => {
- map.removeLayer(shitu);
- }, 1000);
- }
+
+ map.removeLayer(villageVectorLayer);
+ villageDiagram();
+ setTimeout(() => {
+ map.removeLayer(shitu);
+ }, 1000);
+
//查询条件
var cql_filter;
//for(var i=0; i< difang.length; i++){
@@ -2439,8 +2159,8 @@ export default {
var geometry = feature.getGeometry();
var coordinate = geometry.getCoordinates();
console.log("打印" + coordinate);
- _this.coordinateList= coordinate;
-
+ _this.coordinateList= coordinate.toString();
+ console.log( _this.coordinateList)
$("#drawRemove").trigger("click");
_this.$set(_this.draw, "drawMapPolygon", false);
@@ -2477,16 +2197,9 @@ export default {
//alert("进入分类");
//删除之前加载的图层
map.removeLayer(texiao_layer_fang);
- var cunmap = _this.focusVillageOptions[0].orgCode;
- var cun;
- let currObj = _this.villageOptions.filter((v) => {
- return v.orgCode == cunmap;
- });
- if (currObj.length == 1) {
- cun = currObj[0].deptName;
- } else {
- cun = "";
- }
+
+ var cun = _this.villageDataObj.deptName;
+
//删除之前加载的图层
//map.removeLayer(dishitu);
//map.removeLayer(cunshitu);
@@ -2641,16 +2354,7 @@ export default {
//alert("进入分类");
//删除之前加载的图层
map.removeLayer(texiao_layer_di);
- var cunmap = _this.focusVillageOptions[0].orgCode;
- var cun;
- let currObj = _this.villageOptions.filter((v) => {
- return v.orgCode == cunmap;
- });
- if (currObj.length == 1) {
- cun = currObj[0].deptName;
- } else {
- cun = "";
- }
+ var cun = _this.villageDataObj.deptName;
//删除之前加载的图层
//map.removeLayer(dishitu);
//map.removeLayer(cunshitu);
@@ -2905,7 +2609,7 @@ export default {
right: 16px;
top: 50%;
width: 74px;
- margin-top: -100px;
+ margin-top: -200px;
background: #fff;
margin-bottom: 16px;
border-radius: 10px;
@@ -2944,7 +2648,13 @@ export default {
border-bottom-left-radius: 15px;
flex-direction: column;
-
+ .noInfo_data{
+ font-size: 28px;
+ text-align: center;
+ height: 300px;
+ line-height: 300px;
+ color: #666;
+ }
.title_m {
color: #333;
line-height: 36px;
@@ -2979,26 +2689,41 @@ export default {
box-shadow: 0px 0px 10px rgba(24, 45, 51, 0.5);
}
.name_text {
- font-size: 34px;
+ font-size: 28px;
flex: 1;
overflow: hidden; /*超出部分隐藏*/
white-space: nowrap; /*不换行*/
text-overflow: ellipsis; /*超出部分文字以...显示*/
}
.square_text {
- font-size: 34px;
+ font-size: 28px;
flex: 0.8;
}
.operation_mian {
flex: 0 0 150px;
+
.describe {
font-size: 20px;
padding: 6px 12px;
float: right;
color: #fff;
+ border-radius: 30px;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+ max-width: 150px;
&.yph {
+ background: rgb(175,39,255);
+
+ }
+ &.dlzdph{
+ background: rgb(255,111,54);
+ }
+ &.ylz{
background: #3cbf5b;
- border-radius: 30px;
+ }
+ &.dlz{
+ background: rgb(255,232,76);
}
}
}
@@ -3039,8 +2764,8 @@ export default {
position: fixed;
z-index: 9;
top: 24px;
- // left: 16px;
- left: -80px;
+ left: 8px;
+ // left: -80px;
display: flex;
.address_item {
display: flex;
@@ -3080,6 +2805,8 @@ export default {
background: #fff;
padding: 2px 6px;
border-radius: 8px;
+ height: 36px;
+ min-width: 100px;
}
&.more {
.portrait {
@@ -3122,7 +2849,7 @@ export default {
// display: none;
display: flex;
position: fixed;
- bottom: 0;
+ bottom: 0%;
left: 0;
width: 100%;
padding: 28px 16px 28px 13px;
@@ -3287,9 +3014,9 @@ export default {
}
}
.landHomestead_wrap {
- display: none;
+
position: fixed;
- bottom: 0;
+ bottom: -100%;
left: 0;
width: 100%;
padding: 0 16px;
@@ -3350,10 +3077,13 @@ export default {
background: url("../../assets/images/homestead/landHomestead_home.png")
left center no-repeat;
background-size: 38px 36px;
- font-size: 40px;
+ font-size: 32px;
line-height: 54px;
color: #333333;
margin-bottom: 12px;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
}
.address {
height: 48px;
@@ -3424,8 +3154,7 @@ export default {
}
}
.landHomesteadDetails_wrap {
- display: none;
- // display: flex;
+ display: flex;
position: absolute;
left: 0;
bottom: 0;
@@ -3511,10 +3240,6 @@ export default {
background-size: 100% 100%;
}
}
-
- //
}
}
.landHomesteadEdit_wrap {
@@ -3522,6 +3247,7 @@ export default {
position: absolute;
left: 0;
bottom: -100vh;
+ z-index: 100;
width: 100%;
height: calc(100% - 190px);
flex-direction: column;