|
@@ -45,14 +45,14 @@
|
|
|
placeholder="请选择房间"
|
|
|
clearable
|
|
|
v-model="formDate.resDate"
|
|
|
- @click.native='formDateResDate'
|
|
|
+ @change='formDateResDate'
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item,index) in room"
|
|
|
- :key="index"
|
|
|
- :label='item.name'
|
|
|
- :value='item.label'
|
|
|
- @click.native="resDate(item)"
|
|
|
+ v-for="(itemse,ix) in room"
|
|
|
+ :key="ix"
|
|
|
+ :label='itemse.name'
|
|
|
+ :value='itemse.label'
|
|
|
+ @click.native="resDate(itemse)"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -442,7 +442,8 @@ export default {
|
|
|
id: '',
|
|
|
sort: '',
|
|
|
areaName: '',
|
|
|
- idName: ''
|
|
|
+ idName: '',
|
|
|
+ res: ''
|
|
|
},
|
|
|
tableData: [
|
|
|
{
|
|
@@ -632,21 +633,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- formDateResDate () {
|
|
|
- // alert(1)
|
|
|
- // this.formDate.resDate = ''
|
|
|
- // this.formDate.id = '';
|
|
|
- // this.formDate.idName = '';
|
|
|
- },
|
|
|
resDate (val) {
|
|
|
- this.formDate.resDate = ''
|
|
|
- this.formDate.id = '';
|
|
|
- this.formDate.idName = '';
|
|
|
// debugger
|
|
|
this.formDate.resDate = val.label;
|
|
|
this.formDate.id = val.residentId;
|
|
|
- this.formDate.idName = val.name
|
|
|
- console.log(this.formDate)
|
|
|
+ this.formDate.idName = val.name;
|
|
|
+ // console.log(this.formDate)
|
|
|
},
|
|
|
|
|
|
|
|
@@ -712,17 +704,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++) {
|
|
|
+
|
|
|
this.room.push({
|
|
|
name: data.houseInfos[i].roomNumber,
|
|
|
label: data.houseInfos[i].id,
|
|
|
residentId: data.houseInfos[i].residentId,
|
|
|
})
|
|
|
}
|
|
|
- debugger
|
|
|
- this.formDate.resDate = data.houseInfos[0].id;
|
|
|
- this.formDate.id = data.houseInfos[0].residentId;
|
|
|
- this.formDate.idName = data.houseInfos[i].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(() => { });
|
|
|
}
|
|
@@ -848,7 +843,6 @@ export default {
|
|
|
this.$http.post('/sc-community-web/parkingCar/findAreaInfo', { parkId: this.formDate.parkId }).then(({ data, status, msg }) => {
|
|
|
this.eloption = [];
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
- debugger
|
|
|
this.eloption.push({
|
|
|
label: data[i].areaName,
|
|
|
value: data[i].areaCode,
|
|
@@ -863,7 +857,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
submit () {
|
|
|
- debugger
|
|
|
if (this.params.comm == 'add') {
|
|
|
// this.url = '/sc-community-web/parkingCar/addVehicleInfor'
|
|
|
this.url = '/sc-community-web/parkingCar/updateVehicleInfor'
|
|
@@ -879,7 +872,6 @@ export default {
|
|
|
// this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
console.log(this.tableData[i]);
|
|
|
- debugger
|
|
|
table.push({
|
|
|
areaId: [this.tableData[i].parkingArea],
|
|
|
areaName: this.tableData[i].areaName,
|
|
@@ -921,7 +913,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- debugger
|
|
|
this.$http.post(this.url, {
|
|
|
cardId: this.params.cardId != undefined ? this.params.cardId : '',
|
|
|
cardName: this.formDate.userName,
|
|
@@ -956,7 +947,6 @@ export default {
|
|
|
|
|
|
|
|
|
}).then(({ data, status, msg }) => {
|
|
|
- debugger
|
|
|
if (status != 0) {
|
|
|
this.$message.error(msg);
|
|
|
} else if (status == 0) {
|
|
@@ -1029,7 +1019,6 @@ export default {
|
|
|
this.tableData[i].parkingArea = Number(carLotStr[i].areaId)
|
|
|
this.formDate.ruleId = carLotStr[i].ruleId
|
|
|
}
|
|
|
- debugger
|
|
|
for (let k = 0; k < data.parkCarDetails.length; k++) {
|
|
|
this.formDate.carType = data.cardType;
|
|
|
this.form[k].vehicleType = data.parkCarDetails[k].carType;
|