-
+
{{ landInfoList.syrmc }}
{{ landInfoList.cm }}
性质:{{ landInfoList.nydlx }}
-
+
{{ landInfoList.xh }}
大约{{ landInfoList.mj }}㎡
-->
{{ landInfoList.xzqk }}
@@ -437,6 +439,10 @@
+
{
- 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");
- }
- },
},
};
@@ -2870,7 +2936,7 @@ export default {
}
.address_wrap {
position: fixed;
- z-index: 9;
+ // z-index: 9;
top: 24px;
left: 16px;
display: flex;