|
|
@@ -5,182 +5,67 @@
|
|
|
:rules="rule"
|
|
|
v-loading="loading"
|
|
|
ref="settingsForm"
|
|
|
- label-position="left"
|
|
|
- label-width="150px"
|
|
|
- style="width: 100%;">
|
|
|
- <div class="card-content">
|
|
|
- <!-- <div class="section-title">OCPP Settings</div>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="12" :lg="9">
|
|
|
- <div class="flexc">
|
|
|
- <el-form-item
|
|
|
- label="Heartbeat Interval:"
|
|
|
- prop="heartbeat"
|
|
|
- class="flex1">
|
|
|
- <el-input
|
|
|
- class="value-text"
|
|
|
- v-model="settingsForm.heartbeat"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="5"/>
|
|
|
- </el-form-item>
|
|
|
- <span class="el-form-item"> Minutes</span>
|
|
|
- </div>
|
|
|
- <div class="tips">The time interval in <i>minutes</i> for how often a charge point should request the current time from the CSMS.</div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="4" :sm="8" :md="2" :lg="6">
|
|
|
- <p></p>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="8">
|
|
|
- <div class="flexc">
|
|
|
- <el-form-item
|
|
|
- label="Expiration:"
|
|
|
- prop="expiration"
|
|
|
- label-width="95px"
|
|
|
- class="flex1">
|
|
|
- <el-input
|
|
|
- class="value-text"
|
|
|
- v-model="settingsForm.expiration"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="5"/>
|
|
|
- </el-form-item>
|
|
|
- <span class="el-form-item"> Hours</span>
|
|
|
- </div>
|
|
|
- <div class="tips" style="padding-left: 95px;">The amount of time in <i>hours</i> for how long a charge point should cache the authorization info of an idTag in its local white list, if an expiry date is not explicitly set.
|
|
|
- The value 0 disables this functionality
|
|
|
- (i.e.no expiry date will be set).</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="hr"></div> -->
|
|
|
- <div class="section-title">
|
|
|
- <span style="padding-right: 30px;">Mail Notification Settings</span>
|
|
|
- <el-checkbox v-model="settingsForm.enabled">Enable notifications</el-checkbox>
|
|
|
- </div>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Protocol:"
|
|
|
- prop="protocol">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="settingsForm.protocol"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="10"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="4" :sm="8" :md="4" :lg="6" :xl="6">
|
|
|
- <p></p>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9" :xl="9" v-if="featuresGroup >= 1" style="overflow: hidden;">
|
|
|
- <el-checkbox-group v-model="settingsForm.enabledFeatures">
|
|
|
- <template v-for="(item, index) in features">
|
|
|
- <el-checkbox
|
|
|
- :key="index"
|
|
|
- v-if="index < 2"
|
|
|
- :label="item.value">{{item.name}}</el-checkbox>
|
|
|
- </template>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Host:"
|
|
|
- prop="host">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="settingsForm.host"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="30"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="4" :sm="8" :md="4" :lg="6" :xl="6">
|
|
|
- <p></p>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9" :xl="9" v-if="featuresGroup >= 2" style="overflow: hidden;">
|
|
|
- <el-checkbox-group v-model="settingsForm.enabledFeatures">
|
|
|
- <template v-for="(item, index) in features">
|
|
|
- <el-checkbox
|
|
|
- :key="index"
|
|
|
- v-if="index >= 2 && index < 4"
|
|
|
- :label="item.value">{{item.name}}</el-checkbox>
|
|
|
- </template>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Port:"
|
|
|
- prop="port">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="settingsForm.port"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="5"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="4" :sm="8" :md="4" :lg="6" :xl="6">
|
|
|
- <p></p>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9" :xl="9" v-if="featuresGroup >= 3" style="overflow: hidden;">
|
|
|
- <el-checkbox-group v-model="settingsForm.enabledFeatures">
|
|
|
- <template v-for="(item, index) in features">
|
|
|
- <el-checkbox
|
|
|
- :key="index"
|
|
|
- v-if="index >= 4 && index < 6"
|
|
|
- :label="item.value">{{item.name}}</el-checkbox>
|
|
|
- </template>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="From:"
|
|
|
- prop="from">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="settingsForm.from"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="50"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="4" :sm="8" :md="4" :lg="6" :xl="6">
|
|
|
- <p></p>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9" :xl="9" v-if="featuresGroup >= 3" style="overflow: hidden;">
|
|
|
- <el-checkbox-group v-model="settingsForm.enabledFeatures">
|
|
|
- <template v-for="(item, index) in features">
|
|
|
- <el-checkbox
|
|
|
- :key="index"
|
|
|
- v-if="index >= 6 && index < 8"
|
|
|
- :label="item.value">{{item.name}}</el-checkbox>
|
|
|
- </template>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Username:"
|
|
|
- prop="username">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="settingsForm.username"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="30"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Password:"
|
|
|
- prop="password">
|
|
|
- <div class="flexc">
|
|
|
+ label-position="right"
|
|
|
+ label-width="110px">
|
|
|
+ <div class="flexr">
|
|
|
+ <div class="card-content">
|
|
|
+ <div class="section-title">
|
|
|
+ <span style="padding-right: 30px;">Mail Notification Settings</span>
|
|
|
+ <el-checkbox v-model="settingsForm.enabled">Enable notifications</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <el-form-item
|
|
|
+ label="Protocol:"
|
|
|
+ prop="protocol">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="settingsForm.protocol"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="10"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="Host:"
|
|
|
+ prop="host">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="settingsForm.host"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="30"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="Port:"
|
|
|
+ prop="port">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="settingsForm.port"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="5"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="From:"
|
|
|
+ prop="from">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="settingsForm.from"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="50"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="Username:"
|
|
|
+ prop="username">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="settingsForm.username"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="30"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="Password:"
|
|
|
+ prop="password">
|
|
|
+ <div class="add-text flexcr" style="margin: -5px 0;">
|
|
|
+ <div class="flex1">
|
|
|
<el-input
|
|
|
- class="add-text pwd"
|
|
|
ref="password"
|
|
|
+ class="add-text"
|
|
|
:type="passwordType"
|
|
|
v-model="settingsForm.password"
|
|
|
placeholder="Email password"
|
|
|
@@ -189,61 +74,73 @@
|
|
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
|
|
</span>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="sendTestMail">
|
|
|
- Send Test Mail
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-form
|
|
|
- :model="this"
|
|
|
- :rules="rule"
|
|
|
- ref="recipForm"
|
|
|
- label-position="left"
|
|
|
- label-width="150px">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
- <el-form-item
|
|
|
- label="Recipients:"
|
|
|
- prop="recipient">
|
|
|
- <el-input
|
|
|
- class="add-text"
|
|
|
- v-model="recipient"
|
|
|
- placeholder="Add text"
|
|
|
- maxlength="50"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <div class="divide10"></div>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="addRecipient">
|
|
|
- Add
|
|
|
+ @click="sendTestMail"
|
|
|
+ style="margin: 5px 0;">
|
|
|
+ Send Test Mail
|
|
|
</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="16" :md="10" :lg="9">
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form
|
|
|
+ :model="this"
|
|
|
+ :rules="rule"
|
|
|
+ ref="recipForm"
|
|
|
+ label-width="110px"
|
|
|
+ label-position="right">
|
|
|
<el-form-item
|
|
|
- label="Added Recipients:"
|
|
|
- prop="chargeBoxId">
|
|
|
- <div class="receip-item" v-for="(item, index) in settingsForm.recipients" :key="index">
|
|
|
- <span>{{item}}</span>
|
|
|
- <i class="el-icon-close" @click="deleteRecipient(index)"></i>
|
|
|
+ label="Recipients:"
|
|
|
+ prop="recipient">
|
|
|
+ <div class="add-text flexcr" style="margin: -5px 0;">
|
|
|
+ <div class="flex1">
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ v-model="recipient"
|
|
|
+ placeholder="Add text"
|
|
|
+ maxlength="50"/>
|
|
|
+ </div>
|
|
|
+ <div class="divide10"></div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addRecipient"
|
|
|
+ style="margin: 5px 0;">
|
|
|
+ Add
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="link-button"
|
|
|
- v-if="settingsForm.recipients.length > 0"
|
|
|
- @click="clearAllRecipient">Clear All</div>
|
|
|
- <div class="el-form-item__error" v-else-if="manualValid">Please add at least one recipient</div>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-form-item
|
|
|
+ label=""
|
|
|
+ prop="chargeBoxId"
|
|
|
+ label-width="0">
|
|
|
+ <label class="el-form-item__label">Added Recipients:</label>
|
|
|
+ <div class="receip-item" v-for="(item, index) in settingsForm.recipients" :key="index">
|
|
|
+ <span>{{item}}</span>
|
|
|
+ <i class="el-icon-close" @click="deleteRecipient(index)"></i>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="link-button"
|
|
|
+ v-if="settingsForm.recipients.length > 0"
|
|
|
+ @click="clearAllRecipient">Clear All</div>
|
|
|
+ <div class="el-form-item__error" v-else-if="manualValid">Please add at least one recipient</div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="card-content">
|
|
|
+ <div class="section-title">
|
|
|
+ <span style="padding-right: 10px;"></span>
|
|
|
+ </div>
|
|
|
+ <el-checkbox-group
|
|
|
+ class="features-group"
|
|
|
+ v-model="settingsForm.enabledFeatures">
|
|
|
+ <template v-for="(item, index) in features">
|
|
|
+ <el-checkbox
|
|
|
+ :key="index"
|
|
|
+ :label="item.value">{{item.name}}</el-checkbox>
|
|
|
+ </template>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="card-content">
|
|
|
<div class="buttons">
|
|
|
@@ -341,7 +238,6 @@
|
|
|
"enabledFeatures": []
|
|
|
},
|
|
|
features: [],
|
|
|
- featuresGroup: 0,
|
|
|
manualValid: false,
|
|
|
//chargeTypeOptions: [],
|
|
|
passwordType: "password"
|
|
|
@@ -356,7 +252,6 @@
|
|
|
const res = await api.getFeatures();
|
|
|
if (res.data && res.data.length > 0) {
|
|
|
this.features = res.data;
|
|
|
- this.featuresGroup = res.data.length / 2
|
|
|
}
|
|
|
//this.getChargeTypeOptions()
|
|
|
this.getSettings();
|
|
|
@@ -495,6 +390,7 @@
|
|
|
</style>
|
|
|
<style scoped="scoped">
|
|
|
.card-content {
|
|
|
+ flex: 1;
|
|
|
min-width: 500px;
|
|
|
margin: 0 8px 16px;
|
|
|
padding: 15px 50px;
|
|
|
@@ -515,7 +411,7 @@
|
|
|
.add-text {
|
|
|
width: 100%;
|
|
|
min-width: 150px;
|
|
|
- max-width: 300px;
|
|
|
+ max-width: 400px;
|
|
|
}
|
|
|
.add-text ::v-deep .el-textarea__inner {
|
|
|
font-family: sans-serif;
|
|
|
@@ -603,7 +499,12 @@
|
|
|
.link-button:hover {
|
|
|
color: #ff5500;
|
|
|
}
|
|
|
-
|
|
|
+ .divide10 {
|
|
|
+ width: 10px;
|
|
|
+ }
|
|
|
+ .features-group {
|
|
|
+ min-width: 400px;
|
|
|
+ }
|
|
|
@media screen and (max-width: 800px) {
|
|
|
.card-container {
|
|
|
padding: 10px 20px;
|
|
|
@@ -621,6 +522,12 @@
|
|
|
.card-content {
|
|
|
padding: 15px 20px;
|
|
|
}
|
|
|
+ .divide10 {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .features-group {
|
|
|
+ min-width: 80vw;
|
|
|
+ }
|
|
|
}
|
|
|
.el-checkbox-group .el-checkbox {
|
|
|
display: flex;
|