|
@@ -27,18 +27,18 @@ export default {
|
|
|
parkName: '',
|
|
|
totalNum: '',
|
|
|
freeSpaceNum: '',
|
|
|
+ parkId: '',
|
|
|
+ nodeId: ''
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- getData() {
|
|
|
- debugger;
|
|
|
+ getData(id) {
|
|
|
this.$http
|
|
|
- .get('/sc-community/parkingCar/queryParkingLot', { parkId: this.params.row.deviceId })
|
|
|
+ .get('/sc-community/parkingCar/queryParkingLot', { parkId: id})
|
|
|
.then(({ status, data, msg }) => {
|
|
|
if (status == 0) {
|
|
|
- // this.formData = data;
|
|
|
- console.log(data);
|
|
|
+ Object.assign(this.formData,data)
|
|
|
} else {
|
|
|
this.$message.error(msg);
|
|
|
}
|
|
@@ -46,11 +46,10 @@ export default {
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
openType(formData) {
|
|
|
- debugger;
|
|
|
- this.$msgBox(`远程开门`, `是否远程开闸?`)
|
|
|
+ this.$msgBox(`远程开闸`, `是否远程开闸?`)
|
|
|
.then(() => {
|
|
|
this.$http
|
|
|
- .post('/sc-community/parkingCar/operateChannel', { nodeId: '', parkId: formData.parkId, type: 0 })
|
|
|
+ .post('/sc-community/parkingCar/operateChannel', { nodeId: formData.nodeId, parkId: formData.parkId, type: 0 })
|
|
|
.then(({ status, data, msg }) => {
|
|
|
if (0 === status) {
|
|
|
this.$message({
|
|
@@ -66,8 +65,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getData();
|
|
|
- // console.log(this.params.row);
|
|
|
+ let ids = JSON.parse(JSON.stringify(this.params.row.deviceId));
|
|
|
+ let newIds = ids.split(',');
|
|
|
+ this.formData.nodeId = newIds[0];
|
|
|
+ this.formData.parkId = newIds[1];
|
|
|
+ this.getData(newIds[1]);
|
|
|
}
|
|
|
};
|
|
|
</script>
|