+ {{ typeData[info['type'] >>> 0]['name'] }}
+

+ {{ typeValueUltimately }}
-
-
+
+
{{ item['value'] }}
-
-
-
随时
-
-
-
-
-
-

-

-
+
@@ -174,7 +210,9 @@
v-model="info.leasetime" type="date" placeholder="选择日期" ref="daterange"
:pickerVisible.sync="true" @blur="chooseDate"> -->
+ ref="datePicker" popover-class="el-date-picker__popover--right">
+ >
+
@@ -821,10 +859,12 @@ export default {
type: "", // 编辑类型
locationData: [],
locationValue: 1,
+ rentaldurationObj: [], // 起租日期的配置数据
typeData: [], // 单独拿出 第一步 的出租类型的数据
typeValue: 0, // 出租类型的临时值
typeValueUltimately: "", // 出租类型的最终值
typePopState: false, // 出租类型的弹窗状态
+ rentaldurationPopState: false, // 出租时长的弹窗状态
areaPopState: false, // 所在区域的弹窗状态
base64: "",
@@ -876,6 +916,8 @@ export default {
verified: 0, // 房源是否已经验证
+ rentaldurationTwo: false, // 出租时长的二级显示状态
+
loading: null, // 加载
}
@@ -926,8 +968,19 @@ export default {
let data = res.data
let fieldinfo = data.fieldinfo
- let typeData = fieldinfo.basic[0]['choices'] || []
- let locationData = fieldinfo.address[0]['choices'] || []
+
+ let typeData = []
+ let locationData = []
+ let rentaldurationData = []
+
+ for (const key in fieldinfo) {
+ fieldinfo[key].forEach(element => {
+ if (element['field'] == 'type') typeData = element['choices'] || []
+ if (element['field'] == 'location') locationData = element['choices'] || []
+ if (element['field'] == 'rentalduration') rentaldurationData = element['choices']
+ })
+ }
+
let locationObj = {}
locationData.forEach(element => {
locationObj[element["key"]] = element["value"]
@@ -961,6 +1014,15 @@ export default {
return acc;
}, {});
+ let rentaldurationObj = {}
+ rentaldurationObj = rentaldurationData.reduce(function (acc, item) {
+ acc[item.key] = item.value
+ return acc;
+ }, {});
+
+ rentaldurationObj[0] = "不限"
+ console.log("rentaldurationObj", rentaldurationObj);
+
let info = data.info
@@ -1001,11 +1063,11 @@ export default {
if (info['rentalduration']) info['rentalduration'] = Number(info['rentalduration'])
}
- console.log("typeData", typeData);
this.fieldinfo = fieldinfo
this.typeData = typeData
this.locationData = locationData
+ this.rentaldurationObj = rentaldurationObj
this.fieldinfoBasic = fieldinfo.basic
this.fieldinfoAddress = fieldinfo.address
this.fieldinfoIntroduce = fieldinfo.introduce
@@ -1057,14 +1119,12 @@ export default {
handleType(key, value) {
if (key >>> 0 == key) {
this.typeValue = key
- this.typePopState = true
if (this.info['type'] >>> 0 != key) this.info['type'] = null
-
} else {
this.info['type'] = key
this.typeValueUltimately = value
- this.typePopState = false
}
+
},
// 直接修改值
@@ -2940,11 +3000,14 @@ export default {
font-size: 16px;
color: #555555;
+ &.pitch {
+ color: #62B1FF;
+ }
+
.dot {
margin-right: 27px;
}
-
.content {
width: 160px;
height: 40px;