vbea 2 лет назад
Родитель
Сommit
cbf37e5897

+ 3 - 0
Strides-Admin/src/http/api/apiBalancing.js

@@ -9,6 +9,9 @@ const apiBalancing = {
   },
   updateBalancing(params) {
     return post('site-load-balancing/config', params)
+  },
+  getBalancingTypes() {
+    return get("site-load-balancing/load-balances")
   }
 }
 

+ 46 - 4
Strides-Admin/src/views/access/DialogDetail.vue

@@ -53,6 +53,20 @@
         </el-form-item>
       </div>
       <div class="form-row">
+        <el-form-item
+          label="Country:"
+          prop="countryCode"
+          class="form-item">
+          <el-select
+            v-model="form.countryCode"
+            class="flex-item">
+            <el-option
+              v-for="item in countryOptions"
+              :key="item.name"
+              :label="item.name"
+              :value="item.value" />
+          </el-select>
+        </el-form-item>
         <el-form-item
           class="form-item"
           label="SET PASSWORD:"
@@ -74,6 +88,8 @@
             type="password"
             maxlength="32"/>
         </el-form-item>
+      </div>
+      <div class="form-row">
         <el-form-item
           class="form-item"
           label="ROLE:">
@@ -88,8 +104,6 @@
               :value="item.roleName"/>
           </el-select>
         </el-form-item>
-      </div>
-      <div class="form-row">
         <el-form-item
           class="form-item"
           label="PROVIDER NAME:"
@@ -190,6 +204,7 @@ export default {
         roleName: "",
         lastLogin: "",
         password: "",
+        countryCode: settings.defaultCountry,
         callingCode: settings.defaultCalling,
         providerPk: "",
         groupPk: "",
@@ -219,6 +234,11 @@ export default {
           trigger: 'blur',
           message: 'Please type a correct email'
         }],
+        countryCode: [{
+          required: true,
+          message: "Country is required",
+          trigger: "change"
+        }],
         password: [{
           required: true,
           message: "Passwrod is required",
@@ -240,6 +260,7 @@ export default {
           trigger: "change"
         }
       },
+      countryOptions: [],
       siteOptions: [],
       groupOptions: [],
       callingOptions: [],
@@ -272,6 +293,7 @@ export default {
         roleName: this.roleOptions[0].roleName,
         lastLogin: "",
         password: "",
+        countryCode: settings.defaultCountry,
         callingCode: settings.defaultCalling,
         providerPk: "",
         groupPk: "",
@@ -285,18 +307,38 @@ export default {
       })
     },
     getOptions() {
-      getCountryList(list => {
+      /*getCountryList(list => {
         this.callingOptions = list
-      });
+      });*/
+      site.getCountryList().then(res => {
+        if (res.data) {
+          this.countryOptions = res.data
+        }
+      }).catch(err => {
+        this.$message({
+          type: 'error',
+          message: err
+        })
+      })
       provider.getAllServiceProvider().then(res => {
         if (res.data) {
           this.providerOptions = res.data
         }
+      }).catch(err => {
+        this.$message({
+          type: 'error',
+          message: err
+        })
       });
       group.getAllUserGroups().then(res => {
         if (res.data) {
           this.groupOptions = res.data
         }
+      }).catch(err => {
+        this.$message({
+          type: 'error',
+          message: err
+        })
       });
       this.getAllSite()
     },

+ 2 - 2
Strides-Admin/src/views/charging/ConfigureStations.vue

@@ -14,13 +14,13 @@
             :label="item.providerName"
             :value="item.providerPk"/>
         </el-select>
-        <div class="flex1" style="max-width: 350px;">
+        <div class="flex1" style="max-width: 440px;">
           <el-input
             clearable
             class="filter-view-item"
             v-model="filter.pageVo.criteria"
             prefix-icon="el-icon-search"
-            placeholder="Search by Station ID, Site Name, Carpark Code"
+            placeholder="Search by Station ID, Site Name, Carpark Code, Description"
             @keyup.enter.native="toSearch"
             @change="toSearch"/>
         </div>

+ 47 - 3
Strides-Admin/src/views/charging/LoadBalance.vue

@@ -1,7 +1,36 @@
 <template>
   <div class="app-container">
-    <div class="filter-container">
-      
+    <div class="filter-container filter-view">
+      <el-select
+        class="filter-view-item"
+        v-model="filter.pageVo.loadBalancing"
+        placeholder="Load Balancing Type"
+        @change="onSearch"
+        clearable>
+        <el-option
+          v-for="(item, index) in typeOptions"
+          :key="index"
+          :label="item.name"
+          :value="item.value"/>
+      </el-select>
+      <div class="flex1" style="min-width: 200px; max-width: 350px;">
+        <el-input
+          v-model="filter.pageVo.criteria"
+          class="filter-view-item"
+          prefix-icon="el-icon-search"
+          placeholder="Search by Carpark Code, Site Name"
+          @keyup.enter.native="onSearch"
+          @change="onSearch"
+          clearable/>
+      </div>
+      <div>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          @click="onSearch">
+          Search
+        </el-button>
+      </div>
     </div>
     <el-table
       :data="table.data"
@@ -81,17 +110,20 @@ export default {
         pageNo: 1,
         pageSize: 10,
         pageVo: {
-          criteria: ""
+          criteria: "",
+          loadBalancing: ""
         }
       },
       table: {
         data: [],
         total: 0
       },
+      typeOptions: []
     };
   },
   components: {Pagination, TableAction},
   created() {
+    this.getTypeOptions();
     this.onSearch();
   },
   methods: {
@@ -99,6 +131,18 @@ export default {
       this.filter.pageNo = 1;
       this.getTableData();
     },
+    getTypeOptions() {
+      api.getBalancingTypes().then(res => {
+        if (res.data) {
+          this.typeOptions = res.data
+        }
+      }).catch(err => {
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+      });
+    },
     getTableData() {
       this.loading = true;
       api.getBalancingPages(this.filter).then(res => {

+ 1 - 1
Strides-Admin/src/views/financial/TopUp.vue

@@ -36,7 +36,7 @@
           <el-input
             clearable
             v-model="filter.pageVo.criteria"
-            placeholder="Search by Email"
+            placeholder="Search by Email, Payment ID"
             prefix-icon="el-icon-search"
             @keyup.enter.native="handleFilter"
             @change="handleFilter"/>