|
@@ -115,7 +115,9 @@ const PCA = {
|
115
|
115
|
},
|
116
|
116
|
selectHandler(selectedVal, selectedIndex, selectedTxt) {
|
117
|
117
|
console.log(selectedVal, selectedIndex, selectedTxt, "baba", this);
|
118
|
|
- this.getRoomData(selectedVal[1]);
|
|
118
|
+ if (this.$parent.$parent.$parent.$parent.$parent.ifRoom == 1) {
|
|
119
|
+ this.getRoomData(selectedVal[1]);
|
|
120
|
+ }
|
119
|
121
|
this.selected = selectedTxt;
|
120
|
122
|
this.selectIndex = selectedIndex;
|
121
|
123
|
this.$emit("input", selectedVal);
|
|
@@ -186,7 +188,9 @@ const PCA = {
|
186
|
188
|
var data = JSON.parse(localStorage.getItem("loginUser"));
|
187
|
189
|
this.selected[0] = data.place.area.area;
|
188
|
190
|
this.selected[1] = data.place.place;
|
189
|
|
- this.getRoomData(data.place.id);
|
|
191
|
+ if (this.$parent.$parent.$parent.$parent.$parent.ifRoom == 1) {
|
|
192
|
+ this.getRoomData(data.place.id);
|
|
193
|
+ }
|
190
|
194
|
},
|
191
|
195
|
getRoomData(placeId) {
|
192
|
196
|
this.$http
|
|
@@ -197,6 +201,7 @@ const PCA = {
|
197
|
201
|
})
|
198
|
202
|
.then(result => {
|
199
|
203
|
let arr = [];
|
|
204
|
+ result.data.list = result.data.list || [];
|
200
|
205
|
result.data.list.forEach(item => {
|
201
|
206
|
arr.push({ value: item.room, text: item.room });
|
202
|
207
|
});
|