Selaa lähdekoodia

优化

wulanhaote
liuminjian 3 vuotta sitten
vanhempi
commit
6421313b7f
1 muutettua tiedostoa jossa 123 lisäystä ja 57 poistoa
  1. +123
    -57
      src/views/homestead/index.vue

+ 123
- 57
src/views/homestead/index.vue Näytä tiedosto

@@ -21,6 +21,8 @@
<div class="text">列表</div>
</div>
</div>
<van-overlay :show="selectionIconShow" @click="homesteadListShrink" />

<!--放大缩小-->
<div class="rightZoom_wrap">
<div class="amplification" ref="sliderBig"></div>
@@ -195,21 +197,21 @@
<div class="landHomestead_body">
<!--0-农房-->
<div class="body_flex" v-if="farmhouseStatus == 0">
<div class="attribute" @click="houseLandLookInfo('show')">
<div class="attribute" @click="houseLandLookInfo('show', 'house')">
<div class="names">{{ houseInfoList.fwsyrmc }}</div>
<div class="address">{{ houseInfoList.dz }}</div>
<div class="nature">性质:{{ houseInfoList.tdxz }}</div>
</div>
<div class="distance">
<div class="distance" @click="houseLandLookInfo('show', 'house')">
<div class="size">{{ houseInfoList.xh }}</div>
<div class="probably">大约{{ houseInfoList.jzmj }}㎡</div>
</div>
<div class="others">
<div class="information">
<div
<!-- <div
class="location"
@click="landHomeSerial('house', houseInfoList)"
></div>
></div> -->
<div class="status_text">{{ houseInfoList.xzqk }}</div>
</div>
<div class="editor">
@@ -219,21 +221,21 @@
</div>
<!--1-农地-->
<div class="body_flex" v-if="farmhouseStatus == 1">
<div class="attribute" @click="houseLandLookInfo('show')">
<div class="attribute" @click="houseLandLookInfo('show', 'land')">
<div class="names">{{ landInfoList.syrmc }}</div>
<div class="address">{{ landInfoList.cm }}</div>
<div class="nature">性质:{{ landInfoList.nydlx }}</div>
</div>
<div class="distance">
<div class="distance" @click="houseLandLookInfo('show', 'land')">
<div class="size">{{ landInfoList.xh }}</div>
<div class="probably">大约{{ landInfoList.mj }}㎡</div>
</div>
<div class="others">
<div class="information">
<div
<!-- <div
class="location"
@click="landHomeSerial('land', landInfoList)"
></div>
></div> -->
<div class="status_text">{{ landInfoList.xzqk }}</div>
</div>
<div class="editor">
@@ -437,6 +439,10 @@
</div>
</div>
<!--房地全部信息编辑-->
<van-overlay
:show="landHomesteadEditVisbile"
@click="landHomesteadEditCancel"
/>
<div
class="landHomesteadEdit_wrap"
v-show="landHomesteadEditVisbile"
@@ -776,7 +782,7 @@
<div class="input_m select">
<i class="dropDown_icon"></i>
<van-field
v-model="nydlxOptionsValue"
v-model="landInfoList.nydlx"
readonly
clickable
name="picker"
@@ -934,6 +940,7 @@ export default {
name: "homesteadLogin",
data() {
return {
selectionIconShow: false,
//省市区区级list
hcAreaInfoOption: [],
//省市区区级显示
@@ -1091,8 +1098,15 @@ export default {
this.landHomesteadEditVisbileFun("show");
},
//显示农地\农房详情
houseLandLookInfo(type) {
houseLandLookInfo(type, status) {
if (type == "show") {
if (status == "house") {
$("#texiao_fang").val(this.houseInfoList.fwsyrmc);
$("#texiao_fang").trigger("click");
} else {
$("#texiao_di").val(this.landInfoList.syrmc);
$("#texiao_di").trigger("click");
}
this.houseLandLookAnmitFun("show");
} else {
this.houseLandLookAnmitFun("hide");
@@ -1126,6 +1140,7 @@ export default {
drawMapPolygonFun() {
let drawMapPolygon = this.draw.drawMapPolygon;
if (drawMapPolygon == false) {
this.coordinateList = "";
this.$set(this.draw, "drawMapPolygon", true);
$("#drawPolygon").trigger("click");
} else {
@@ -1141,7 +1156,7 @@ export default {
}
this.currentType = 0;
this.farmlandEditSwitchVisbuleFun("show");
this.searchBarOperVisbile = false;
// this.searchBarOperVisbile = false;
},
//关闭选择农房土地
farmlandEditFun() {
@@ -1327,23 +1342,53 @@ export default {
this.$toast("请选择地图坐标");
return false;
}
houseAdd(houseInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
//新增
this.$toast("农房信息新建成功");
this.initDraw();
}
});

this.$dialog
.confirm({
title: "新建农房信息",
message: "是否保存信息或修改信息",
})
.then(() => {
// on confirm
houseAdd(houseInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
//新增
this.$toast("新建农房信息成功");
this.initDraw();
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
this.coordinateList = "";
}
});
})
.catch(() => {
// on cancel
});
} else {
this.$dialog
.confirm({
title: "修改农房信息",
message: "是否保存信息或修改信息",
})
.then(() => {
// on confirm
houseEdit(houseInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
this.$toast("修改农房信息成功");
this.houseInfoLookList = this.houseInfoList;
this.initDraw();
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
this.coordinateList = "";
}
});
})
.catch(() => {
// on cancel
});
//编辑
houseEdit(houseInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
this.$toast("农房信息修改成功");
this.houseInfoLookList = this.houseInfoList;
}
});
}
} else if (this.farmhouseStatus == 1) {
// orgCode: "", // String 否 行政区代码
@@ -1390,22 +1435,51 @@ export default {
this.$toast("请选择空间坐标");
return false;
}
landAdd(landInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
//新增
this.initDraw();
this.$toast("农地信息新建成功");
}
});
this.$dialog
.confirm({
title: "新建农地信息",
message: "是否保存信息或修改信息",
})
.then(() => {
// on confirm
landAdd(landInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
//新增
this.initDraw();
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
this.coordinateList = "";
this.$toast("新建农地信息成功");
}
});
})
.catch(() => {
// on cancel
});
} else {
landEdit(landInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
this.$toast("农地信息修改成功");
this.landInfoLookList = this.landInfoList;
}
});
this.$dialog
.confirm({
title: "修改农地信息",
message: "是否保存信息或修改信息",
})
.then(() => {
// on confirm
landEdit(landInfoList).then((res) => {
if (res.code == 200) {
this.landHomesteadEditVisbileFun("hide");
this.$toast("修改农地信息成功");
this.landInfoLookList = this.landInfoList;
this.initDraw();
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
this.coordinateList = "";
}
});
})
.catch(() => {
// on cancel
});
}
}
//保存成功触发
@@ -1434,9 +1508,9 @@ export default {
//初始化绘制
initDraw() {
//清除数据
$("#drawRemove").trigger("click");
$("#drawReset").trigger("click");
this.coordinateList = "";
// $("#drawRemove").trigger("click");
// $("#drawReset").trigger("click");
// this.coordinateList = "";
//农地数据初始化
this.landInfoList = {
id: "", //String 是 主键id
@@ -1652,12 +1726,14 @@ export default {
} else {
this.searchBarOperVisbile = false;
//初始化绘制
// this.coordinateList = "";
this.initDraw();
}
},

/*右侧列表 --展开收缩*/
selectionPush() {
this.selectionIconShow = true;
$(".homesteadList_wrap").animate(
{
right: "0",
@@ -1666,6 +1742,7 @@ export default {
);
},
homesteadListShrink() {
this.selectionIconShow = false;
$(".homesteadList_wrap").animate(
{
right: "-300px",
@@ -2628,7 +2705,7 @@ export default {
//农地 - 农用地类型 选择值
nydlxOptionsFun(value) {
this.landInfoList.nydlx = value.dictLabel;
this.nydlxOptionsValue = value.dictLabel;
// this.nydlxOptionsValue = value.dictLabel;
this.nydlxOptionsVibile = false;
},
//农地 - 是否有流转 选择值
@@ -2652,17 +2729,6 @@ export default {
this.landInfoList.frontland = res.url;
});
},
landHomeSerial(type, data) {
console.log(type);
console.log(data);
if (type == "house") {
$("#texiao_fang").val(data.fwsyrmc);
$("#texiao_fang").trigger("click");
} else {
$("#texiao_di").val(data.syrmc);
$("#texiao_di").trigger("click");
}
},
},
};
</script>
@@ -2870,7 +2936,7 @@ export default {
}
.address_wrap {
position: fixed;
z-index: 9;
// z-index: 9;
top: 24px;
left: 16px;
display: flex;


Ladataan…
Peruuta
Tallenna