From fe65bff28c32f10b59e837cf5b05b9a280bfad08 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Mon, 2 Aug 2021 17:09:37 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 48 ++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index 6c06a11c..99c4406a 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -1599,27 +1599,27 @@ export default { if (res.code == 200) { let content = res.data; this.hcAreaInfoOption = content; - 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 - ) { - if ( - content[0].children[0].children[0].children && - content[0].children[0].children[0].children.length != 0 - ) { - currDeptId = - content[0].children[0].children[0].children[0].value; - } else { - currDeptId = content[0].children[0].children[0].value; - } - } else { - currDeptId = content[0].children[0].value; - } - } else { - currDeptId = content[0].value; - } + 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 + // ) { + // if ( + // content[0].children[0].children[0].children && + // content[0].children[0].children[0].children.length != 0 + // ) { + // currDeptId = + // content[0].children[0].children[0].children[0].value; + // } else { + // currDeptId = content[0].children[0].children[0].value; + // } + // } else { + // currDeptId = content[0].children[0].value; + // } + // } else { + // currDeptId = content[0].value; + // } // console.log(currDeptId); //获取村详细信息 this.deptGetFun(currDeptId); @@ -1947,7 +1947,8 @@ export default { 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; + let cloneObj = JSON.parse(JSON.stringify(obj)); + _this.houseInfoList = cloneObj; _this.houseInfoList.frontland = ""; _this.houseInfoList.behindland = ""; _this.houseInfoLookList = obj; @@ -1974,7 +1975,8 @@ export default { 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; + let cloneObj = JSON.parse(JSON.stringify(obj)); + _this.landInfoList = cloneObj; //编辑图片清空 _this.landInfoList.frontland = ""; _this.landInfoList.behindland = ""; From 718baede488867af36e682204b0f49ac64394117 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Tue, 3 Aug 2021 09:10:07 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=95=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index 99c4406a..f835be49 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -942,7 +942,7 @@ export default { villageValue: "", //选中村相关信息 villageDataObj: { - deptName: " ", //村名 + deptName: "  ", //村名 }, hcAreaInfoFieldName: { text: "label", @@ -1599,27 +1599,27 @@ export default { if (res.code == 200) { let content = res.data; this.hcAreaInfoOption = content; - 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 - // ) { - // if ( - // content[0].children[0].children[0].children && - // content[0].children[0].children[0].children.length != 0 - // ) { - // currDeptId = - // content[0].children[0].children[0].children[0].value; - // } else { - // currDeptId = content[0].children[0].children[0].value; - // } - // } else { - // currDeptId = content[0].children[0].value; - // } - // } else { - // currDeptId = content[0].value; - // } + 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 + ) { + if ( + content[0].children[0].children[0].children && + content[0].children[0].children[0].children.length != 0 + ) { + currDeptId = + content[0].children[0].children[0].children[0].value; + } else { + currDeptId = content[0].children[0].children[0].value; + } + } else { + currDeptId = content[0].children[0].value; + } + } else { + currDeptId = content[0].value; + } // console.log(currDeptId); //获取村详细信息 this.deptGetFun(currDeptId); From b2b3d5a5c42b8875e36217cb24520d2f33a4abb7 Mon Sep 17 00:00:00 2001 From: hbao Date: Tue, 3 Aug 2021 09:55:58 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=86=9C=E5=9C=B0=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index f835be49..32f3c573 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -361,7 +361,7 @@
- 农地编号{{ landInfoLookList.xm }} + 农地编号{{ landInfoLookList.xh }}
@@ -728,7 +728,7 @@
农地编号
@@ -1355,7 +1355,7 @@ export default { landInfoList.orgCode = this.villageDataObj.orgCode; landInfoList.cdm = this.villageDataObj.orgCode; landInfoList.cm = this.villageDataObj.deptName; - if (landInfoList.xm == undefined || landInfoList.xm == "") { + if (landInfoList.xh == undefined || landInfoList.xh == "") { this.$toast("请填写农地编号"); return false; } else if ( @@ -1960,7 +1960,7 @@ export default { 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(); //序号 + obj.xh = 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(); //使用人名称 From 6421313b7fa6e5c55dd13d10344306f6aea8dd70 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Tue, 3 Aug 2021 10:35:31 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 180 +++++++++++++++++++++++----------- 1 file changed, 123 insertions(+), 57 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index f835be49..f56a0f58 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -21,6 +21,8 @@
列表
+ +
@@ -195,21 +197,21 @@
-
+
{{ houseInfoList.fwsyrmc }}
{{ houseInfoList.dz }}
性质:{{ houseInfoList.tdxz }}
-
+
{{ houseInfoList.xh }}
大约{{ houseInfoList.jzmj }}㎡
-
+ >
-->
{{ houseInfoList.xzqk }}
@@ -219,21 +221,21 @@
-
+
{{ 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; From 50c36c94cde294cdd2498ebae63920161f56f457 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Tue, 3 Aug 2021 10:50:07 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index 7ba269be..cbc261f2 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -1140,9 +1140,26 @@ export default { drawMapPolygonFun() { let drawMapPolygon = this.draw.drawMapPolygon; if (drawMapPolygon == false) { - this.coordinateList = ""; - this.$set(this.draw, "drawMapPolygon", true); - $("#drawPolygon").trigger("click"); + console.log(this.coordinateList); + if (this.coordinateList == "") { + this.$set(this.draw, "drawMapPolygon", true); + $("#drawPolygon").trigger("click"); + } else { + this.$dialog + .confirm({ + title: "提示", + message: "是否重新绘制画图", + }) + .then(() => { + // on confirm + this.coordinateList = ""; + this.$set(this.draw, "drawMapPolygon", true); + $("#drawPolygon").trigger("click"); + }) + .catch(() => { + // on cancel + }); + } } else { $("#drawRemove").trigger("click"); this.$set(this.draw, "drawMapPolygon", false); From f9711858f5209f341737588512ed28e315746bb1 Mon Sep 17 00:00:00 2001 From: hbao Date: Tue, 3 Aug 2021 11:39:11 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homestead/index.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index cbc261f2..ac6a82fc 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -141,15 +141,6 @@
-
-
-
-
-