diff --git a/src/api/homestead/index.js b/src/api/homestead/index.js index 6c4c3e48..7420f76f 100644 --- a/src/api/homestead/index.js +++ b/src/api/homestead/index.js @@ -129,9 +129,25 @@ export function currentLocation(query) { //修改坐标数据同步 export function coordinatesUpdateGeo(data) { - return request({ - url: '/geo/geo/coordinatesEdit', - method: 'post', - data: data - }) + return request({ + url: '/geo/geo/coordinatesEdit', + method: 'post', + data: data + }) +} + +//删除农房信息 +export function houseRemove(id) { + return request({ + url: '/geo/house/remove/' + id, + method: 'get', + }) } + +//删除农地信息 +export function landRemove(id) { + return request({ + url: '/geo/land/remove/' + id, + method: 'get', + }) +} \ No newline at end of file diff --git a/src/assets/images/homestead/delete_icon.png b/src/assets/images/homestead/delete_icon.png new file mode 100644 index 00000000..d1992f00 Binary files /dev/null and b/src/assets/images/homestead/delete_icon.png differ diff --git a/src/views/homestead/index.vue b/src/views/homestead/index.vue index 879c8437..5c1b81f4 100644 --- a/src/views/homestead/index.vue +++ b/src/views/homestead/index.vue @@ -231,6 +231,7 @@
+
@@ -255,6 +256,7 @@
+
@@ -352,7 +354,11 @@ class="picture" v-if="houseInfoLookList.behindHouse == ''" > -
+



@@ -362,7 +368,11 @@ class="picture" v-if="houseInfoLookList.frontHouse == ''" >
-
+



@@ -434,15 +444,23 @@
-
- +
+



-
- +
+



@@ -726,33 +744,55 @@
-
上传现状图片
-
- -
- 等待传图 -
-
+
+
+ +
+ 等待传图 +
+
+
+ +
+ 上




片 +
-
-
-
上传历史图片
-
- -
- 等待传图 -
-
+
+
+ +
+ 等待传图 +
+
+
+ +
+ 上




片 +
@@ -923,16 +963,69 @@
+
+
+ +
+ 等待传图 +
+
+
+ +
+ 上




片 +
+
+
+
+ +
+ 等待传图 +
+
+
+ +
+ 上




片 +
+
+
+
+ + +
+ +
+
@@ -991,6 +1095,8 @@ import { getHouse, currentLocation, coordinatesUpdateGeo, + houseRemove, + landRemove, } from "@/api/homestead/index"; import { uploadFileBase } from "../../api/authenticRight"; import request from "@/utils/request"; @@ -1156,6 +1262,9 @@ export default { //农房列表 显影 homesteadListStatus: false, geoJson: "", + //放大预览图片弹窗 + previewZoomImageVisbile: false, + previewZoomImageValue: "", }; }, mounted() { @@ -1164,6 +1273,82 @@ export default { this.windowHeight = windowHeight; }, methods: { + previewZoomImageFun() { + this.previewZoomImageVisbile = false; + this.previewZoomImageValue = ""; + }, + //放大预览图片 + previewZoomImage(imagesUrl) { + this.previewZoomImageVisbile = true; + this.previewZoomImageValue = imagesUrl; + console.log(imagesUrl); + }, + //删除农地信息 + deletefdInfo() { + this.$dialog + .confirm({ + title: "确认执行删除操作?", + message: "删除后内容不可恢复", + }) + .then(() => { + console.log(this.farmhouseStatus); + if (this.farmhouseStatus == 0) { + //农房 + houseRemove(this.houseInfoList.id).then((res) => { + if (res.code == 200) { + this.hideEditNav(); + this.tGeoOrganization.orgCode = this.houseInfoList.orgCode; + coordinatesUpdateGeo(this.tGeoOrganization).then((res) => {}); + } + }); + } else { + //农地 + landRemove(this.landInfoList.id).then((res) => { + if (res.code == 200) { + this.hideEditNav(); + this.tGeoOrganization.orgCode = this.landInfoList.orgCode; + coordinatesUpdateGeo(this.tGeoOrganization).then((res) => {}); + } + }); + } + }) + .catch(() => { + // on cancel + }); + }, + //隐藏编辑农地状态 + hideEditNav() { + 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 + ); + } + }, //编辑农地信息 editnfdInfo(type) { this.currentType = 1; @@ -1263,11 +1448,11 @@ export default { //farmhouse农房 land农地 if (type == "farmhouse") { this.farmhouseStatus = 0; - this.houseInfoList.behindHouse =null; - this.houseInfoList.frontHouse =null; + this.houseInfoList.behindHouse = null; + this.houseInfoList.frontHouse = null; } else if (type == "land") { - this.landInfoList.frontland =null; - this.landInfoList.behindland =null; + this.landInfoList.frontland = null; + this.landInfoList.behindland = null; this.farmhouseStatus = 1; } }, @@ -3266,6 +3451,10 @@ export default { // this.houseInfoList.frontHouse = res.url; // }); // }, + nfAddimgonReadHistoryDelete() { + this.nfAddfileListHistory = []; + this.houseInfoList.frontHouse = ""; + }, nfAddimgonReadHistory(file) { // 创建Canvas对象(画布) let canvas = document.createElement("canvas"); @@ -3313,6 +3502,10 @@ export default { }); }; }, + nfAddimgonReadNowDelete() { + this.nfAddfileListNow = []; + this.houseInfoList.behindHouse = ""; + }, nfAddimgonReadNow(file) { // 创建Canvas对象(画布) let canvas = document.createElement("canvas"); @@ -3367,6 +3560,10 @@ export default { // console.log(this.landInfoList.frontland); // }); // }, + ndAddimgonReadHistoryDelete() { + this.ndAddfileListHistory = []; + this.landInfoList.frontland = ""; + }, ndAddimgonReadHistory(file) { // 创建Canvas对象(画布) let canvas = document.createElement("canvas"); @@ -3412,6 +3609,10 @@ export default { }); }; }, + ndAddimgonReadNowDelete() { + this.ndAddfileListNow = []; + this.landInfoList.behindland = ""; + }, ndAddimgonReadNow(file) { // 创建Canvas对象(画布) let canvas = document.createElement("canvas"); @@ -3465,6 +3666,19 @@ export default { width: 100vw; height: 100vh; position: relative; + .previewZoomImage_wrap { + z-index: 99; + .previewZoomImage_main { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + .previewImg { + max-width: 90vw; + max-height: 90vh; + } + } + } .rightIcon_wrap { position: absolute; right: 16px; @@ -4063,6 +4277,20 @@ export default { no-repeat; background-size: 100% 100%; margin-top: 14px; + box-shadow: 3px 3px 5px rgba(60, 191, 91, 0.3); + border-radius: 50%; + } + .delete_icon { + width: 72px; + height: 72px; + float: right; + background: url("../../assets/images/homestead/delete_icon.png") + no-repeat; + background-size: 100% 100%; + margin-top: 14px; + margin-right: 20px; + box-shadow: 3px 3px 5px rgba(212, 42, 42, 0.3); + border-radius: 50%; } } } @@ -4121,8 +4349,8 @@ export default { } } .uploadPictures_block { - flex: 0 0 160px; - max-height: 160px; + flex: 0 0 200px; + max-height: 200px; display: flex; max-width: 90%; .statusQuo { @@ -4130,16 +4358,17 @@ export default { display: flex; &:first-child { - margin-right: 36px; + margin-right: 20px; } .picture { flex: 1; background: url("../../assets/images/homestead/no_img.png") center center no-repeat; background-size: 90% auto; + padding-left: 10px; img { - width: 98%; - height: 90%; + width: 100%; + height: 100%; } } .describe { @@ -4148,6 +4377,17 @@ export default { justify-content: center; /* 相对父元素水平居中 */ align-items: center; /* 子元素相对父元素垂直居中 */ margin-left: 6px; + padding-left: 10px; + .uploads_main { + width: 200px; + height: 200px; + ::v-deep { + .van-uploader__input-wrapper { + width: 200px; + height: 200px; + } + } + } } } } @@ -4295,18 +4535,94 @@ export default { } } .uploadPicturesFlex_block { - .title_m { - font-size: 28px; - flex: 0 0 50px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; - align-items: center; /* 子元素相对父元素垂直居中 */ - margin-bottom: 20px; - } - .main_m { + flex: 0 0 250px; + max-height: 280px; + display: flex; + padding-top: 30px; + // max-width: 90%; + .statusQuo { + flex: 1; + display: flex; + + &:first-child { + margin-right: 30px; + } + .picture { + flex: 1; + display: flex; + // background: url("../../assets/images/homestead/no_img.png") center + // center no-repeat; + // background-size: 90% auto; + img { + width: 100%; + height: 230px; + } + .uploads_main { + width: 100%; + display: flex; + flex: 1; + /deep/ { + .van-uploader__wrapper { + flex: 1; + display: flex; + .van-uploader__preview { + flex: 1; + margin: 0; + display: flex; + .van-uploader__preview-image { + flex: 1; + width: initial; + height: initial; + .van-image__img { + height: 230px; + } + } + } + } + .van-uploader__input-wrapper { + width: 100%; + } + .van-uploader__upload { + // width: 100%; + // height: 200px; + width: initial; + height: initial; + flex: 1; + margin: 0; + } + } + } + } + .describe { + flex: 0 0 32px; + display: flex; + justify-content: center; /* 相对父元素水平居中 */ + align-items: center; /* 子元素相对父元素垂直居中 */ + margin-left: 15px; + } } + // .title_m { + // font-size: 28px; + // flex: 0 0 50px; + // white-space: nowrap; + // text-overflow: ellipsis; + // overflow: hidden; + // word-break: break-all; + // align-items: center; /* 子元素相对父元素垂直居中 */ + // margin-bottom: 20px; + // } + // .main_m { + // width: 200px; + // height: 200px; + // .uploads_main { + // width: 100%; + // height: 100%; + // img { + // width: 200px; + // height: 200px; + // } + // } + // } } } .footer_main {