|
|
@@ -2,7 +2,7 @@
|
|
|
<el-dialog
|
|
|
class="dialog-profile"
|
|
|
:visible="visible"
|
|
|
- :before-close="hideDialog"
|
|
|
+ :before-close="e => hideDialog()"
|
|
|
:title='isEdit ? "Edit Charging Profile" : "Set Charging Profile"'>
|
|
|
<el-form
|
|
|
ref="setForm"
|
|
|
@@ -92,8 +92,8 @@ export default {
|
|
|
this.getProfileOptions();
|
|
|
},
|
|
|
methods: {
|
|
|
- hideDialog() {
|
|
|
- this.$emit("hide");
|
|
|
+ hideDialog(success) {
|
|
|
+ this.$emit("hide", success || false);
|
|
|
this.chargingProfilePk = "";
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['setForm'].clearValidate();
|
|
|
@@ -127,10 +127,10 @@ export default {
|
|
|
chargingProfilePk: this.chargingProfilePk
|
|
|
}
|
|
|
ocpp.sendPerform("ocppOperations/setChargingProfile", params).then(res => {
|
|
|
- this.hideDialog();
|
|
|
+ this.hideDialog(true);
|
|
|
this.loading = false;
|
|
|
if (res.data.taskId) {
|
|
|
- this.$openRoute("/ocpp-operations/result/" + res.data.taskId);
|
|
|
+ this.$openRoute("/ocpp-operations/result/" + res.data.taskId, true);
|
|
|
//this.$router.push({path: '/ocpp-operations/result/' + res.data.taskId});
|
|
|
}
|
|
|
}).catch(err => {
|