|
@@ -33,7 +33,7 @@
|
|
class="width100"
|
|
class="width100"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item, index) in unitList"
|
|
|
|
|
|
+ v-for="(item, index) in resunitList"
|
|
:label="item.unitName"
|
|
:label="item.unitName"
|
|
:value="item.unitName"
|
|
:value="item.unitName"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -164,10 +164,10 @@
|
|
class="width100"
|
|
class="width100"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item, index) in floorNumberList"
|
|
|
|
- :label="item.floorNumber"
|
|
|
|
- :value="item.floorNumber"
|
|
|
|
- :key="index"
|
|
|
|
|
|
+ v-for="(items, indexs) in floorNumberList"
|
|
|
|
+ :label="items.floorNumber"
|
|
|
|
+ :value="items.floorNumber"
|
|
|
|
+ :key="indexs"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -317,6 +317,8 @@ export default {
|
|
return {
|
|
return {
|
|
buildingList: [], //楼栋下拉选择列表
|
|
buildingList: [], //楼栋下拉选择列表
|
|
unitList: [], //单元下拉选择列表
|
|
unitList: [], //单元下拉选择列表
|
|
|
|
+ floorNumberList: [],
|
|
|
|
+ resunitList: [],
|
|
addEditState: '',
|
|
addEditState: '',
|
|
housingType: {
|
|
housingType: {
|
|
//房屋户型,roomNumber为室,officeNumber为厅,guardNumber为卫
|
|
//房屋户型,roomNumber为室,officeNumber为厅,guardNumber为卫
|
|
@@ -371,10 +373,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
'ruleForm.buildingId' (newValue, oldValue) {
|
|
'ruleForm.buildingId' (newValue, oldValue) {
|
|
- debugger
|
|
|
|
|
|
+
|
|
if (newValue !== oldValue) {
|
|
if (newValue !== oldValue) {
|
|
- debugger
|
|
|
|
|
|
+
|
|
this.unitNameList();
|
|
this.unitNameList();
|
|
|
|
+ this.unitChoice(newValue);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
'ruleForm.unitName' (newValue, oldValue) {
|
|
'ruleForm.unitName' (newValue, oldValue) {
|
|
@@ -383,13 +386,14 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
unitList (val) {
|
|
unitList (val) {
|
|
- debugger
|
|
|
|
if (val.length !== 0) {
|
|
if (val.length !== 0) {
|
|
this.unitChoice(this.ruleForm.unitName);
|
|
this.unitChoice(this.ruleForm.unitName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
|
|
+
|
|
submitForm (formName) {
|
|
submitForm (formName) {
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -433,13 +437,18 @@ export default {
|
|
},
|
|
},
|
|
unitNameList () {
|
|
unitNameList () {
|
|
this.unitList = [];
|
|
this.unitList = [];
|
|
|
|
+ this.resunitList = [];
|
|
this.$http.get('/czc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
|
|
this.$http.get('/czc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
|
|
|
|
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
if (res.data.buildingUnitList.length != 0) {
|
|
if (res.data.buildingUnitList.length != 0) {
|
|
- debugger
|
|
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < res.data.buildingUnitList.length; i++) {
|
|
|
|
+ if (res.data.buildingUnitList.unitName != null) {
|
|
|
|
+ this.resunitList.push(res.data.buildingUnitList[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.unitList = res.data.buildingUnitList;
|
|
this.unitList = res.data.buildingUnitList;
|
|
- console.log(this.unitList);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -449,9 +458,12 @@ export default {
|
|
|
|
|
|
this.floorNumberList = [];
|
|
this.floorNumberList = [];
|
|
this.unitList.map((item) => {
|
|
this.unitList.map((item) => {
|
|
- if (item.unitName == e) {
|
|
|
|
- this.floorNumberList = item.unitFloorList;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (item.unitName == e) {
|
|
|
|
+
|
|
|
|
+ this.floorNumberList = item.unitFloorList;
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ console.log(' this.unitList11', this.floorNumberList);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|