-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #466 from rleidner/bmwbc_ui
configuration ui BMW-bimmer
- Loading branch information
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<template> | ||
<div class="vehicle-soc-bmwbc"> | ||
<openwb-base-text-input | ||
title="Benutzername" | ||
required | ||
subtype="user" | ||
:model-value="vehicle.configuration.user_id" | ||
@update:model-value=" | ||
updateConfiguration($event, 'configuration.user_id') | ||
" | ||
> | ||
<template #help> | ||
Der Benutzername für die Anmeldung an den BMW-Servern. | ||
</template> | ||
</openwb-base-text-input> | ||
<openwb-base-text-input | ||
title="Kennwort" | ||
required | ||
subtype="password" | ||
:model-value="vehicle.configuration.password" | ||
@update:model-value=" | ||
updateConfiguration($event, 'configuration.password') | ||
" | ||
> | ||
<template #help> | ||
Das Passwort für die Anmeldung an den BMW-Servern. | ||
</template> | ||
</openwb-base-text-input> | ||
<openwb-base-text-input | ||
title="VIN" | ||
required | ||
:model-value="vehicle.configuration.vin" | ||
@update:model-value=" | ||
updateConfiguration($event, 'configuration.vin') | ||
" | ||
> | ||
<template #help> Die Fahrgestellnummer des Fahrzeugs. </template> | ||
</openwb-base-text-input> | ||
<openwb-base-button-group-input | ||
title="SoC während der Ladung berechnen" | ||
:buttons="[ | ||
{ | ||
buttonValue: false, | ||
text: 'Nein', | ||
class: 'btn-outline-danger', | ||
}, | ||
{ | ||
buttonValue: true, | ||
text: 'Ja', | ||
class: 'btn-outline-success', | ||
}, | ||
]" | ||
:model-value="vehicle.configuration.calculate_soc" | ||
@update:model-value=" | ||
updateConfiguration($event, 'configuration.calculate_soc') | ||
" | ||
> | ||
<template #help> | ||
Berechnet den Ladestand (SoC) während der Ladung. <br /> | ||
Die Berechnung erfolgt über die Ladeleistung und die Ladedauer. <br /> | ||
</template> | ||
</openwb-base-button-group-input> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "VehicleSocBmw-bimmer_connected", | ||
emits: ["update:configuration"], | ||
props: { | ||
vehicleId: { required: true, type: Number }, | ||
vehicle: { required: true, type: Object }, | ||
}, | ||
data() { | ||
return {}; | ||
}, | ||
methods: { | ||
updateConfiguration(event, path = undefined) { | ||
this.$emit("update:configuration", { value: event, object: path }); | ||
}, | ||
}, | ||
}; | ||
</script> |