Hwt 2 lat temu
rodzic
commit
a92f39d75d

+ 10 - 12
smart/src/views/vehicleInformation/setpPage/details.vue

@@ -828,24 +828,20 @@ export default {
           .get('/sc-community/parkingCar/getUserInfo', { phone: this.formDate.tel })
           .then(({ data, msg, status }) => {
             for (let i = 0; i < data.houseInfos.length; i++) {
-              debugger
               this.room.push({
-                name: data.houseInfos[i].roomNumber,
+                name: data.houseInfos[i].communityName + '-' + data.houseInfos[i].buildingName + '-' + data.houseInfos[i].unitName + '-' + data.houseInfos[i].roomNumber,
                 label: data.houseInfos[i].id,
                 residentId: data.houseInfos[i].residentId,
               })
             }
 
+            debugger
+            if (this.formDate.resDate == '') {
+              this.formDate.resDate = data.houseInfos[0].id;
+              this.formDate.id = data.houseInfos[0].residentId;
+              this.formDate.idName = data.houseInfos[0].communityName + '-' + data.houseInfos[0].buildingName + '-' + data.houseInfos[0].unitName + '-' + data.houseInfos[0].roomNumber
+            }
 
-            this.formDate.resDate = data.houseInfos[0].id;
-            this.formDate.id = data.houseInfos[0].residentId;
-            this.formDate.idName = data.houseInfos[0].roomNumber
-            // if (this.room.length == 1) {
-            //   this.formDate.resDate = data.houseInfos[0].id;
-            //   this.formDate.id = data.houseInfos[0].residentId;
-            //   this.formDate.idName = data.houseInfos[0].roomNumber
-
-            // }
           })
           .catch(() => { });
       }
@@ -1195,8 +1191,10 @@ export default {
         this.rechargeRules();
         this.nameParking();
         this.region();
+        debugger
+        this.formDate.resDate = data.houseId;
         // this.personnel();
-
+        debugger
         for (let i = 0; i < carLotStr.length; i++) {
           this.tableData[i].parkingArea = Number(carLotStr[i].areaId)
           this.formDate.ruleId = carLotStr[i].ruleId