瀏覽代碼

修复断网数据混乱bug

zhanghongrui 7 月之前
父節點
當前提交
f24fe1592a

+ 25 - 17
pages/bottom_leg/bottom_leg.vue

@@ -681,8 +681,12 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
+							
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -690,8 +694,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					} else if (e == 'dy') { //单元
@@ -699,16 +706,23 @@
 							this.$modal.msg('请选择楼栋')
 
 						} else {
-							this.open = true;
-							this.selectList = this.DYList;
+							getUnitList(this.LDValue.id).then(res => {
+								this.DYList = res.data
+								this.selectList = this.DYList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'fj') { //房间
 						if (this.isEmpty(this.DYValue.id)) {
 							this.$modal.msg('请选择单元')
 
 						} else {
-							this.open = true;
-							this.selectList = this.FJList;
+							getHousesList(this.DYValue.id).then(res => {
+								this.FJList = res.data
+								this.selectList = this.FJList;
+								this.open = true;
+							
+							})
 						}
 					} else if (e == 'position') {
 						this.openDict = true;
@@ -727,9 +741,7 @@
 						this.XQValue = ''; //重置小区数据
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
+						
 					} else if (this.type == 'position') {
 						this.positionKey = item.dictValue;
 						this.positionValue = item.dictLabel;
@@ -748,9 +760,7 @@
 						//根据小区id 获取楼栋数据
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+						
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						//根据楼栋ID 获取单元数据
@@ -761,9 +771,7 @@
 						// 	this.getStatus();
 
 						// }
-						getUnitList(item.id).then(res => {
-							this.DYList = res.data
-						})
+						
 					} else if (this.type == 'dy') {
 						this.DYValue = item;
 

+ 13 - 24
pages/oldrenovation/courtyard/courtyard.vue

@@ -601,19 +601,7 @@
 						}
 
 					} else if (e == 'xq') { //小区
-						// if (this.isEmpty(this.XZQValue.dictValue)) {
-						// 	this.$modal.msg('请选择行政区')
-						//
-						// } else {
-						//根据行政区id获取小区数据
-
 
-						// getAreaList('').then(res => {
-						// 	this.XQList = res.data;
-						// 	this.open = true;
-						// 	this.selectList = this.XQList;
-						// })
-						// }
 
 						if (this.isEmpty(this.XZQValue.dictValue)) {
 							getAreaList('').then(res => {
@@ -622,8 +610,12 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -631,8 +623,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					}
@@ -661,10 +656,6 @@
 						//根据行政区id获取小区数据
 						this.XQValue = ''; //重置小区数据
 						this.LDValue = ''; //重置楼栋数据
-
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
 					}
 				},
 				changeSelect(item, index) {
@@ -703,9 +694,7 @@
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						if (!this.isEmpty(this.projectValue.dictValue)) {
@@ -981,7 +970,7 @@
 												this.zEngineeringMaterialBo = dataJson.zEngineeringMaterialBo;
 
 												this.zEngineeringMaterialBo.forEach((item) => {
-													
+
 													this.czggslList.push({
 														cz: {
 															id: item.materialQuality,

+ 11 - 11
pages/oldrenovation/courtyard/newcourtyard.vue

@@ -861,8 +861,11 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -870,8 +873,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					}
@@ -900,10 +906,6 @@
 						//根据行政区id获取小区数据
 						this.XQValue = ''; //重置小区数据
 						this.LDValue = ''; //重置楼栋数据
-
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
 					}
 				},
 				changeSelect(item, index) {
@@ -937,9 +939,7 @@
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						if (!this.isEmpty(this.projectValue.dictValue)) {

+ 0 - 1
pages/oldrenovation/indoor/indoor.vue

@@ -1008,7 +1008,6 @@
 						this.XZQValue = {
 							dictValue: item.district,
 							dictLabel: item.districtName,
-							id: item.id
 						};
 						this.XQValue = item;
 						//根据小区id 获取楼栋数据

+ 18 - 16
pages/oldrenovation/overhead/newoverhead.vue

@@ -549,8 +549,11 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -558,8 +561,12 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
+
 						}
 
 					} else if (e == 'dy') { //单元
@@ -567,8 +574,11 @@
 							this.$modal.msg('请选择楼栋')
 
 						} else {
-							this.open = true;
-							this.selectList = this.DYList;
+							getUnitList(this.LDValue.id).then(res => {
+								this.DYList = res.data
+								this.selectList = this.DYList;
+								this.open = true;
+							})
 						}
 					}
 
@@ -597,10 +607,6 @@
 						this.XQValue = ''; //重置小区数据
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
-
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
 					}
 				},
 				changeSelect(item, index) {
@@ -633,9 +639,7 @@
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						if (!this.isEmpty(this.projectValue.dictValue)) {
@@ -646,9 +650,7 @@
 						//根据楼栋ID 获取单元数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getUnitList(item.id).then(res => {
-							this.DYList = res.data
-						})
+
 
 					} else if (this.type == 'dy') {
 						this.DYValue = item;

+ 17 - 16
pages/oldrenovation/overhead/overhead.vue

@@ -473,8 +473,11 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -482,8 +485,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					} else if (e == 'dy') { //单元
@@ -491,8 +497,11 @@
 							this.$modal.msg('请选择楼栋')
 
 						} else {
-							this.open = true;
-							this.selectList = this.DYList;
+							getUnitList(this.LDValue.id).then(res => {
+								this.DYList = res.data
+								this.selectList = this.DYList;
+								this.open = true;
+							})
 						}
 					}
 
@@ -521,10 +530,6 @@
 						this.XQValue = ''; //重置小区数据
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
-
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
 					}
 				},
 				changeSelect(item, index) {
@@ -542,9 +547,7 @@
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						if (!this.isEmpty(this.projectValue.dictValue)) {
@@ -555,9 +558,7 @@
 						//根据楼栋ID 获取单元数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
-						getUnitList(item.id).then(res => {
-							this.DYList = res.data
-						})
+
 
 					} else if (this.type == 'dy') {
 						this.DYValue = item;

+ 25 - 20
pages/open_bolt/open_bolt.vue

@@ -1184,8 +1184,11 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -1193,8 +1196,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					} else if (e == 'dy') { //单元
@@ -1202,16 +1208,23 @@
 							this.$modal.msg('请选择楼栋')
 
 						} else {
-							this.open = true;
-							this.selectList = this.DYList;
+							getUnitList(this.LDValue.id).then(res => {
+								this.DYList = res.data
+								this.selectList = this.DYList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'fj') { //房间
 						if (this.isEmpty(this.DYValue.id)) {
 							this.$modal.msg('请选择单元')
 
 						} else {
-							this.open = true;
-							this.selectList = this.FJList;
+							getHousesList(this.DYValue.id).then(res => {
+								this.FJList = res.data
+								this.selectList = this.FJList;
+								this.open = true;
+							
+							})
 						}
 					}
 
@@ -1230,9 +1243,7 @@
 						this.LDValue = '';
 						this.DYValue = '';
 						this.FJValue = '';
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
+						
 					} else if (this.type == 'brank') {
 						this.brankValue = item;
 					} else if (this.type == 'Model') {
@@ -1253,23 +1264,17 @@
 						this.LDValue = '';
 						this.DYValue = '';
 						this.FJValue = '';
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+						
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 
 						this.DYValue = '';
 						this.FJValue = '';
-						getUnitList(item.id).then(res => {
-							this.DYList = res.data
-						})
+						
 					} else if (this.type == 'dy') {
 						this.DYValue = item; //根据单元数据 获取房间数据
 						this.FJValue = ''; //重置房间数据
-						getHousesList(item.id).then(res => {
-							this.FJList = res.data
-						})
+						
 					} else if (this.type == 'fj') {
 						this.FJValue = item;
 					}

+ 26 - 20
pages/piping_record/piping_record.vue

@@ -387,8 +387,12 @@
 								this.selectList = this.XQList;
 							})
 						} else {
-							this.open = true;
-							this.selectList = this.XQList;
+							getAreaList(this.XZQValue.dictValue).then(res => {
+								this.XQList = res.data;
+								this.selectList = this.XQList;
+								this.open = true;
+							})
+							
 						}
 					} else if (e == 'ld') { //楼栋
 
@@ -396,8 +400,11 @@
 							this.$modal.msg('请选择小区')
 
 						} else {
-							this.open = true;
-							this.selectList = this.LDList;
+							getBuildingList(this.XQValue.id).then(res => {
+								this.LDList = res.data
+								this.selectList = this.LDList;
+								this.open = true;
+							})
 						}
 
 					} else if (e == 'dy') { //单元
@@ -405,16 +412,23 @@
 							this.$modal.msg('请选择楼栋')
 
 						} else {
-							this.open = true;
-							this.selectList = this.DYList;
+							getUnitList(this.LDValue.id).then(res => {
+								this.DYList = res.data
+								this.selectList = this.DYList;
+								this.open = true;
+							})
 						}
 					} else if (e == 'fj') { //房间
 						if (this.isEmpty(this.DYValue.id)) {
 							this.$modal.msg('请选择单元')
 
 						} else {
-							this.open = true;
-							this.selectList = this.FJList;
+							getHousesList(this.DYValue.id).then(res => {
+								this.FJList = res.data
+								this.selectList = this.FJList;
+								this.open = true;
+							
+							})
 						}
 					} else if (e == 'reason') {
 						this.openDict = true;
@@ -434,9 +448,7 @@
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = '';
-						getAreaList(item.dictValue).then(res => {
-							this.XQList = res.data;
-						})
+						
 					} else if (this.type == 'reason') {
 						this.reasonValue = item;
 					}
@@ -456,17 +468,13 @@
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = '';
 						this.administrative = item.administrative;
-						getBuildingList(item.id).then(res => {
-							this.LDList = res.data
-						})
+						
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						//根据楼栋ID 获取单元数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = '';
-						getUnitList(item.id).then(res => {
-							this.DYList = res.data
-						})
+						
 					} else if (this.type == 'dy') {
 						this.DYValue = item;
 						this.FJValue = ''; //重置房间数据
@@ -474,9 +482,7 @@
 						this.houseHeadName = "";
 						this.houseHeadPhone = "";
 						this.houseHeadIDcardNumber = "";
-						getHousesList(item.id).then(res => {
-							this.FJList = res.data
-						})
+						
 					} else if (this.type == 'fj') {
 						this.FJValue = item;
 						this.houseHeadName = item.houseUserName;