@@ -769,6 +779,9 @@ export default {
offshelftime: "",
offshelftime: "",
updatetime: "",
+ residentialAreaState: false, // 所属小区的弹窗的状态
+ isResidentialAreaUpdate: true, // 所属小区的数据是否需要更新
+ communityList: [], // 所属小区的列表
stateObj: {
1: "已上架",
@@ -888,6 +901,9 @@ export default {
let info = data.info
+ console.log("info", info);
+ // info['rentalduration'] = 999
+
// info['type'] = 1.1
// info['leasetime'] = ""
// info['rent'] = 100
@@ -897,7 +913,8 @@ export default {
// info['sunshinearea'] = 1
// info['acreage'] = 200
// info.location = "1.5"
-
+ // communityid: ""
+ // communityname: ""
if (!info['leasetime']) info['leasetime'] = null
@@ -1077,6 +1094,7 @@ export default {
return
}
+
let allowedExtensions = ['mp4', 'webm', 'ogg'];
type == 'image' ? allowedExtensions = ['svg', 'jpg', 'jpeg', 'png', 'bmp', 'webp'] : ''
@@ -1118,7 +1136,9 @@ export default {
formData.append('name', target.name); // 文件名
formData.append('type', type); // 文件名
- this.$post('/tenement/forum/upload', formData).then(res => {
+ this.$axios.post('/tenement/forum/upload', formData).then(res => {
+ res = res['data']
+
if (res.code != 200) {
this.$message.error(res.message);
this.mediaUploadIndex += 1
@@ -1203,16 +1223,37 @@ export default {
this.$message.error(res.message);
// 获取 myRef 元素的位置信息
- let targetElement = this.$refs[data.field][0]
+ let targetElement = this.$refs[data.field]
if (!targetElement) return
- targetElement.style.borderColor = "rgba(249, 93, 93, 1)";
- const top = targetElement.offsetTop - 150 || 300;
+
+ console.log("targetElement", this.$refs[data.field]);
+ if (Array.isArray(targetElement)) {
+ targetElement.forEach(element => {
+ console.log("element", element);
+ element.style.borderColor = "rgba(249, 93, 93, 1)";
+ })
+ } else targetElement.style.borderColor = "rgba(249, 93, 93, 1)";
+
+ // targetElement.style.borderColor = "rgba(249, 93, 93, 1)";
+
this.$watch(`info.${data.field}`, (newVal, oldVal) => {
- if (newVal != null && newVal != undefined) targetElement.style.borderColor = "#aaaaaa";
+ if (newVal != null && newVal != undefined) {
+ if (Array.isArray(targetElement)) {
+ targetElement.forEach(element => {
+ console.log("element", element);
+ element.style.borderColor = "#aaaaaa";
+ })
+ } else targetElement.style.borderColor = "#aaaaaa";
+ // targetElement.style.borderColor = "#aaaaaa";
+ }
})
// 设置滚动距离
+ const top = targetElement.offsetTop - 150 || 300;
+ if (Array.isArray(targetElement)) targetElement[0].offsetTop - 150 || 300;
+ else targetElement.offsetTop - 150 || 300;
+
document.body.scrollTop = document.documentElement.scrollTop = top;
return
@@ -1307,8 +1348,56 @@ export default {
// 选择地点后
choosingLocation(value) {
- console.log(value);
- // this.mapComponentState = false
+ let info = this.info
+ info['address'] = value['poiname']
+ info['latitude'] = value['latlng']['lat']
+ info['longitude'] = value['latlng']['lng']
+
+ this.mapComponentState = false
+ this.isResidentialAreaUpdate = true
+ },
+
+ // 处理所属小区判断,并获取数据
+ handleResidentialArea() {
+ // communityList
+
+ if (this.isResidentialAreaUpdate) {
+
+ let info = this.info
+ let location = `${info['longitude'] || 114.160151},${info['latitu1de'] || 22.247117}`
+ this.$post("/tenement/forum/placeAround", {
+ location
+ }).then(res => {
+ if (res.code != 200) return
+ console.log(res, "res");
+ let data = res.data
+ data.push({
+ name: "以上都不是"
+ })
+ this.communityList = data
+ this.residentialAreaState = true
+ this.isResidentialAreaUpdate = false
+
+ })
+ } else this.residentialAreaState = true
+
+ },
+
+ // 点击所属小区选项
+ clickResidentialArea(id, name) {
+ let info = this.info
+
+ if (!id) {
+ info['communityid'] = null
+ info['communityname'] = null
+ } else {
+ info['communityid'] = id
+ info['communityname'] = name
+ }
+
+ this.info = info
+ this.residentialAreaState = false
+
},
@@ -1650,11 +1739,16 @@ export default {
content: "";
}
+ .modeTwo-select {
+ height: 100%;
+ }
+
/deep/ .el-input {
flex: 1;
width: 100%;
height: 100%;
+ .el-input__wrapper,
.el-input__inner {
height: 100%;
border: none;
@@ -1662,13 +1756,9 @@ export default {
color: #555;
padding-left: 0;
- /* 修改 Webkit 内核浏览器的输入框提示文本样式 */
- &::-webkit-input-placeholder {
- color: #555;
- }
-
/* 修改 FireFox 内核浏览器的输入框提示文本样式 */
- &:-moz-placeholder {
+ &:-moz-placeholder,
+ &::-webkit-input-placeholder {
color: #555;
}
@@ -1793,14 +1883,12 @@ export default {
}
&.modeSix {
-
.modeSix-select {
border: 1px solid rgba(170, 170, 170, 1);
border-radius: 10px;
overflow: hidden;
width: 269px;
height: 50px;
-
position: relative;
.el-select {
@@ -1968,8 +2056,6 @@ export default {
margin-left: 20px;
cursor: pointer;
}
-
-
}
}
@@ -1988,6 +2074,79 @@ export default {
}
}
+ .communityname-input {
+ width: 100%;
+ height: 100%;
+ color: #62B1FF;
+ border: none;
+ outline: none;
+ font-size: 16px;
+ }
+
+ .residential-area {
+ position: absolute;
+ top: 58px;
+ width: 640px;
+ height: 500px;
+ background-color: rgba(255, 255, 255, 1);
+ box-sizing: border-box;
+ border: 1px solid rgba(235, 235, 235, 1);
+ border-radius: 16px;
+ -moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ -webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ z-index: 1;
+ padding: 10px 30px;
+ overflow: auto;
+
+ /*滚动条样式*/
+ &::-webkit-scrollbar {
+ width: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
+ background: rgba(242, 242, 242, 1);
+ }
+
+ &::-webkit-scrollbar-track {
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
+ border-radius: 0;
+ background: transparent;
+ }
+
+ .residential-item {
+ height: 60px;
+ cursor: pointer;
+
+ .residential-dot {
+ width: 6px;
+ height: 6px;
+ background: #62b1ff;
+ border-radius: 50%;
+ margin-right: 47px;
+
+ }
+
+ .residential-text {
+ height: 100%;
+ color: #555;
+ font-size: 16px;
+
+ &.pitchpitch {
+ color: #62b1ff;
+
+ }
+ }
+
+ &:not(:last-of-type) {
+ border-bottom: 1px solid rgba(242, 242, 242, 1);
+ }
+
+ }
+ }
+
}
.form-arrows {
@@ -2003,21 +2162,47 @@ export default {
.media-box {
flex-wrap: wrap;
width: 640px;
+ align-items: flex-start;
.media-item {
width: 100px;
- height: 100px;
- border-radius: 10px;
- background-color: rgba(246, 246, 246, 1);
- border: 1px solid rgba(235, 235, 235, 1);
position: relative;
cursor: pointer;
+ flex-direction: column;
+
+ &:not(:nth-last-child(-n+5)) {
+ margin-bottom: 30px;
+ }
+
+ &.pitch {
+ .media-cover-bnt {
+ background: rgba(80, 227, 194, 1);
+ border: none;
+ color: #fff;
+ }
+
+ .media-item-box {
+ border: 1px solid rgba(80, 227, 194, 1);
+ }
+ }
+
+ .media-item-box {
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+ border-radius: 10px;
+ margin-bottom: 10px;
+ height: 100px;
+ border-radius: 10px;
+ background-color: rgba(246, 246, 246, 1);
+ border: 1px solid rgba(235, 235, 235, 1);
+ }
&:not(:nth-of-type(5n)) {
margin-right: 35px;
}
- margin-bottom: 30px;
+ // margin-bottom: 20px;
.input-file {
position: absolute;
@@ -2045,18 +2230,26 @@ export default {
.media-img {
width: 100px;
- // max-width: 100px;
- // max-height: 100px;
position: relative;
filter: brightness(0.5);
+ }
+ .media-cover-bnt {
+ width: 100px;
+ height: 30px;
+ border-radius: 8px;
+ font-size: 14px;
+ border: 1px solid rgba(215, 215, 215, 1);
+ color: #aaa;
+ font-weight: 400;
}
.media-play-icon {
width: 20px;
height: 20px;
position: absolute;
- top: 50%;
+ // top: 50%;
+ top: calc(50% - 5px);
left: 50%;
transform: translate(-50%, -50%);
}
@@ -2128,7 +2321,6 @@ export default {
margin-left: 48px;
margin-bottom: 60px;
-
.hint-icon {
width: 20px;
height: 20px;
@@ -2482,6 +2674,7 @@ export default {
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.349019607843137);
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.349019607843137);
overflow: hidden;
+ z-index: 101;
.area-pop-header {
font-weight: 650;