vbea 3 anni fa
parent
commit
ec19194534

+ 2 - 1
Strides-Admin/src/http/api/chargingProfile.js

@@ -9,7 +9,8 @@ const profile = {
   getChargingRateUnitList: () => get('chargingProfile/getChargingRateUnitList'),
   getChargingRateUnitList: () => get('chargingProfile/getChargingRateUnitList'),
   getChargingProfileById: (params) => get('chargingProfile/getChargingProfile', {chargingProfilePk: params}),
   getChargingProfileById: (params) => get('chargingProfile/getChargingProfile', {chargingProfilePk: params}),
   getChargingProfilePages: (params) => post('chargingProfile/getChargingProfilePages', params),
   getChargingProfilePages: (params) => post('chargingProfile/getChargingProfilePages', params),
-  updateChargingProfile: (params) => post('chargingProfile/updateChargingProfile', params)
+  updateChargingProfile: (params) => post('chargingProfile/updateChargingProfile', params),
+  getConfigureChargingProfilePages: (params) => post('chargingProfile/getConnectorChargingProfilePages', params)
 }
 }
 
 
 export default profile;
 export default profile;

+ 17 - 8
Strides-Admin/src/layout/components/Sidebar/SidebarItem.vue

@@ -11,9 +11,7 @@
           :index="resolvePath(onlyOneChild.path)"
           :index="resolvePath(onlyOneChild.path)"
           :class="{ 'submenu-title-noDropdown': !isNest }">
           :class="{ 'submenu-title-noDropdown': !isNest }">
           <item
           <item
-            :icon="selectedItemIndex === resolvePath(onlyOneChild.path)
-              ? (onlyOneChild.meta.activeIcon || item.meta && item.meta.activeIcon)
-              : onlyOneChild.meta.icon || (item.meta && item.meta.icon)" 
+            :icon="isSelect(onlyOneChild)" 
             :title="onlyOneChild.meta.title"
             :title="onlyOneChild.meta.title"
             :additional="onlyOneChild.meta.additional"
             :additional="onlyOneChild.meta.additional"
           />
           />
@@ -29,10 +27,7 @@
       <template slot="title">
       <template slot="title">
         <item
         <item
           v-if="item.meta"
           v-if="item.meta"
-          :icon="item.meta
-                && resolvePath(item.path)
-                  ? item.meta.activeIcon || item.meta.icon
-                  : item.meta.icon"
+          :icon="isSelect(item)"
           :title="item.meta.title"
           :title="item.meta.title"
           :additional="onlyOneChild.meta.additional"/>
           :additional="onlyOneChild.meta.additional"/>
       </template>
       </template>
@@ -41,6 +36,7 @@
         :key="child.path"
         :key="child.path"
         :is-nest="true"
         :is-nest="true"
         :item="child"
         :item="child"
+        :activeMenu="activeMenu"
         :selectedItemIndex="selectedItemIndex"
         :selectedItemIndex="selectedItemIndex"
         :base-path="resolvePath(child.path)"
         :base-path="resolvePath(child.path)"
         class="nest-menu"
         class="nest-menu"
@@ -77,7 +73,11 @@ export default {
     selectedItemIndex: {
     selectedItemIndex: {
       type: String,
       type: String,
       default: '',
       default: '',
-    }
+    },
+    activeMenu: {
+      type: String,
+      default: '',
+    },
   },
   },
   data() {
   data() {
     // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
     // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
@@ -110,6 +110,15 @@ export default {
 
 
       return false
       return false
     },
     },
+    isSelect(child) {
+      const path = this.resolvePath(child.path);
+      //selectedItemIndex === 
+      if (this.activeMenu === path) {
+        return (child.meta.activeIcon || this.item.meta && this.item.meta.activeIcon)
+      } else {
+        return child.meta.icon || (this.item.meta && this.item.meta.icon)
+      }
+    },
     resolvePath(routePath) {
     resolvePath(routePath) {
       if (isExternal(routePath)) {
       if (isExternal(routePath)) {
         return routePath
         return routePath

+ 2 - 1
Strides-Admin/src/layout/components/Sidebar/index.vue

@@ -19,6 +19,7 @@
             v-for="route in permission_routes"
             v-for="route in permission_routes"
             :key="route.path"
             :key="route.path"
             :item="route"
             :item="route"
+            :activeMenu="activeMenu"
             :selectedItemIndex="selectedItemIndex"
             :selectedItemIndex="selectedItemIndex"
             :base-path="route.path" />
             :base-path="route.path" />
         </el-menu>
         </el-menu>
@@ -38,7 +39,7 @@ export default {
   created() {
   created() {
     this.authRoutesList = getAuthRoutes()
     this.authRoutesList = getAuthRoutes()
     this.filterRoutes(this.$router.options.routes)
     this.filterRoutes(this.$router.options.routes)
-    this.selectedItemIndex = this.activeMenu
+    //this.selectedItemIndex = this.activeMenu
   },
   },
   data() {
   data() {
     return {
     return {

+ 40 - 5
Strides-Admin/src/router/ChargingProfile.js

@@ -2,40 +2,75 @@ import Layout from '@/layout'
 
 
 export default {
 export default {
   path: '/charging-profiles',
   path: '/charging-profiles',
+  redirect: '/charging-profiles/index',
   component: Layout,
   component: Layout,
   meta: {
   meta: {
     title: 'Charging Profiles',
     title: 'Charging Profiles',
     icon: 'charging-profiles',
     icon: 'charging-profiles',
-    activeIcon: 'charging-profiles-active',
+    //activeIcon: 'charging-profiles-active',
     affix: true,
     affix: true,
   },
   },
   children: [
   children: [
     {
     {
-      path: '/charging-profiles',
+      path: '/charging-profiles/index',
       component: () => import('@/views/charging/ChargingProfiles'),
       component: () => import('@/views/charging/ChargingProfiles'),
       name: 'charging-profiles',
       name: 'charging-profiles',
       meta: {
       meta: {
         title: 'Charging Profiles',
         title: 'Charging Profiles',
+        icon: 'sidebar-submenu-item',
+        activeIcon: 'sidebar-submenu-item-active',
         breadcrumb: false
         breadcrumb: false
       }
       }
     },
     },
+    {
+      path: '/charging-profiles/config-stations',
+      component: () => import('@/views/charging/ConfigureStations'),
+      name: 'config-stations',
+      meta: {
+        title: 'Configure Stations',
+        icon: 'sidebar-submenu-item',
+        activeIcon: 'sidebar-submenu-item-active',
+        breadcrumb: true
+      },
+      /*children: [{
+        path: '/charging-profiles/config-stations/view/:id',
+        component: () => import('@/views/charging/EditProfile'),
+        name: 'view-charging-profile',
+        meta: {
+          title: 'View Charging Profile',
+          activeMenu: '/charging-profiles/config-stations',
+          breadcrumb: false
+        },
+        hidden: true
+      }]*/
+    },
     {
     {
       path: '/charging-profiles/add',
       path: '/charging-profiles/add',
       component: () => import('@/views/charging/AddProfile'),
       component: () => import('@/views/charging/AddProfile'),
       name: 'add-charging-profile',
       name: 'add-charging-profile',
       meta: {
       meta: {
         title: 'Add Charging Profile',
         title: 'Add Charging Profile',
-        activeMenu: '/charging-profiles'
+        activeMenu: '/charging-profiles/index'
       },
       },
       hidden: true
       hidden: true
     },
     },
     {
     {
       path: '/charging-profiles/edit',
       path: '/charging-profiles/edit',
       component: () => import('@/views/charging/EditProfile'),
       component: () => import('@/views/charging/EditProfile'),
-      name: 'add-charging-profile',
+      name: 'edit-charging-profile',
       meta: {
       meta: {
         title: 'Edit Charging Profile',
         title: 'Edit Charging Profile',
-        activeMenu: '/charging-profiles'
+        activeMenu: '/charging-profiles/index'
+      },
+      hidden: true
+    },
+    {
+      path: '/charging-profiles/view/:id',
+      component: () => import('@/views/charging/EditProfile'),
+      name: 'view-charging-profile',
+      meta: {
+        title: 'View Charging Profile',
+        activeMenu: '/charging-profiles/config-stations'
       },
       },
       hidden: true
       hidden: true
     }
     }

+ 12 - 0
Strides-Admin/src/styles/index.scss

@@ -193,6 +193,11 @@ aside {
   }
   }
 }
 }
 
 
+.underline {
+  cursor: pointer;
+  text-decoration: underline;
+}
+
 .filter-container {
 .filter-container {
   padding-bottom: 10px;
   padding-bottom: 10px;
 
 
@@ -348,4 +353,11 @@ aside {
   flex: 1;
   flex: 1;
   text-align: right;
   text-align: right;
   margin-bottom: 0;
   margin-bottom: 0;
+}
+.icon-action {
+  padding: 10px;
+  transform: rotate(90deg);
+}
+.el-dropdown-menu.el-popper {
+  margin-top: 6px;
 }
 }

+ 123 - 1
Strides-Admin/src/views/charge/Connectors.vue

@@ -124,7 +124,41 @@
         width="100">
         width="100">
         <template slot-scope="{row}">
         <template slot-scope="{row}">
           <!-- <TableAction /> -->
           <!-- <TableAction /> -->
-          <span class="link-type" @click="showConnectorQR(row)">QRCode</span>
+          <el-dropdown
+            class="action-dropdown"
+            @command="(v) => handleCommand(v, row)">
+            <i class="el-icon-more icon-action"></i>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item
+                command="showConnectorQR">
+                QRCode
+              </el-dropdown-item>
+              <el-dropdown-item
+                command="changeToAvailable"
+                v-if='row.status == "Unavailable"'>
+                Change Availability to Available
+              </el-dropdown-item>
+              <el-dropdown-item
+                command="changeToUnavailable"
+                v-else>
+                Change Availability to Unavailable
+              </el-dropdown-item>
+              <el-dropdown-item
+                command="unlockConnector">
+                Unlock Connector
+              </el-dropdown-item>
+              <el-dropdown-item
+                command="remoteStart"
+                v-if='row.status == "Preparing"'>
+                Remote Start Transaction
+              </el-dropdown-item>
+              <el-dropdown-item
+                command="remoteStop"
+                v-if='row.status == "Charging"'>
+                Remote Stop Transaction
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -148,6 +182,7 @@
   import TableAction from '@/components/TableAction.vue'
   import TableAction from '@/components/TableAction.vue'
   import ConnectorTags from './components/ConnectorTags.vue'
   import ConnectorTags from './components/ConnectorTags.vue'
   import api from '../../http/api/charge'
   import api from '../../http/api/charge'
+  import ocpp from '../../http/api/ocpp'
   export default {
   export default {
     components: { Pagination, TableAction, ConnectorTags },
     components: { Pagination, TableAction, ConnectorTags },
     data() {
     data() {
@@ -224,10 +259,97 @@
           this.listLoading = false;
           this.listLoading = false;
         })
         })
       },
       },
+      handleCommand(cb, item) {
+        this[cb](item)
+      },
       showConnectorQR(row) {
       showConnectorQR(row) {
         this.printConnector.visible = true;
         this.printConnector.visible = true;
         this.printConnector.qrCode = row.chargeBoxId + "::" + row.connectorId
         this.printConnector.qrCode = row.chargeBoxId + "::" + row.connectorId
       },
       },
+      unlockConnector(row) {
+        this.$confirm("Confirm unlock this connector?", "Unlock Connector",  {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }).then(res => {
+          const params = {
+            connectorId: row.connectorId,
+            stationIds: [row.chargeBoxId]
+          }
+          this.sendPerform("ocppOperations/unlockConnector", params);
+        })
+      },
+      changeToAvailable(row) {
+        this.$confirm("Confirm change to available?", "Change Availability",  {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }).then(res => {
+          const params = {
+            availType: "OPERATIVE",
+            connectorId: row.connectorId,
+            stationIds: [row.chargeBoxId]
+          }
+          this.sendPerform("ocppOperations/changeAvailability", params);
+        })
+      },
+      changeToUnavailable(row) {
+        this.$confirm("Confirm change to unavailable?", "Change Availability",  {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }).then(res => {
+          const params = {
+            availType: "INOPERATIVE",
+            connectorId: row.connectorId,
+            stationIds: [row.chargeBoxId]
+          }
+          this.sendPerform("ocppOperations/changeAvailability", params);
+        })
+      },
+      sendPerform(api, params) {
+        this.listLoading = true;
+        ocpp.sendPerform(api, params).then(res => {
+          this.listLoading = false;
+          if (res.data.taskId) {
+            this.$router.push({path: '/ocpp-operations/result/' + res.data.taskId});
+          }
+        }).catch(err => {
+          this.listLoading = false;
+          this.$message({
+            type: 'error',
+            message: err
+          })
+        });
+      },
+      remoteStart(row) {
+        this.$confirm("Confirm remote start?", "Remote",  {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }).then(res => {
+          const params = {
+            availType: "INOPERATIVE",
+            connectorId: row.connectorId,
+            stationIds: [row.chargeBoxId]
+          }
+          //this.sendPerform("ocppOperations/remoteStartTransaction", params);
+        })
+      },
+      remoteStop(row) {
+        this.$confirm("Confirm remote stop?", "Remote",  {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }).then(res => {
+          const params = {
+            availType: "INOPERATIVE",
+            connectorId: row.connectorId,
+            stationIds: [row.chargeBoxId]
+          }
+          //this.sendPerform("ocppOperations/remoteStopTransaction", params);
+        })
+      },
       hideConnectorQR() {
       hideConnectorQR() {
         console.log('hide');
         console.log('hide');
         this.printConnector.visible = false;
         this.printConnector.visible = false;

+ 73 - 5
Strides-Admin/src/views/charge/RegisteredChargeStations.vue

@@ -132,11 +132,34 @@
         v-if="!$route.meta.onlyView"
         v-if="!$route.meta.onlyView"
         label="Action"
         label="Action"
         align="center"
         align="center"
-        class-name="fixed-width">
+        width="80">
           <template slot-scope="{row}">
           <template slot-scope="{row}">
-            <TableAction
+            <el-dropdown
+              class="action-dropdown"
+              @command="(v) => handleCommand(v, row)">
+              <i class="el-icon-more icon-action"></i>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item
+                  command="editStation">
+                  Edit
+                </el-dropdown-item>
+                <el-dropdown-item
+                  command="softReset">
+                  Soft Reset
+                </el-dropdown-item>
+                <el-dropdown-item
+                  command="hardReset">
+                  Hard Reset
+                </el-dropdown-item>
+                <el-dropdown-item
+                  command="delStation">
+                  Delete
+                </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+            <!-- <TableAction
               @edit="editStation(row)"
               @edit="editStation(row)"
-              @delete="delStation(row)"/>
+              @delete="delStation(row)"/> -->
           </template>
           </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -155,6 +178,7 @@
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import TableAction from '@/components/TableAction.vue'
 import TableAction from '@/components/TableAction.vue'
 import api from '../../http/api/charge'
 import api from '../../http/api/charge'
+import ocpp from '../../http/api/ocpp'
 export default {
 export default {
   components: { Pagination, TableAction },
   components: { Pagination, TableAction },
   data() {
   data() {
@@ -237,13 +261,57 @@ export default {
         this.stationList = [];
         this.stationList = [];
       });
       });
     },
     },
+    handleCommand(cb, item) {
+      this[cb](item)
+    },
     addStation() {
     addStation() {
-      this.$router.push('/charge/add-charge-stations');
+      this.$router.push({path: '/charge/add-charge-stations'});
     },
     },
     editStation(row) {
     editStation(row) {
       //console.log('row', row);
       //console.log('row', row);
       this.$store.commit('charge/SET_StationId', row.chargeBoxPk)
       this.$store.commit('charge/SET_StationId', row.chargeBoxPk)
-      this.$router.push('/charge/edit-charge-stations');
+      this.$router.push({path: '/charge/edit-charge-stations'});
+    },
+    softReset(row) {
+      this.$confirm("Confirm soft reset?", "Reset",  {
+        confirmButtonText: 'OK',
+        cancelButtonText: 'Cancel',
+        type: 'warning'
+      }).then(res => {
+        const params = {
+          resetType: "SOFT",
+          stationIds: [row.chargeBoxId]
+        }
+        this.resetStation(params);
+      })
+    },
+    hardReset(row) {
+      this.$confirm("Confirm hard reset?", "Reset",  {
+        confirmButtonText: 'OK',
+        cancelButtonText: 'Cancel',
+        type: 'warning'
+      }).then(res => {
+        const params = {
+          resetType: "HARD",
+          stationIds: [row.chargeBoxId]
+        }
+        this.resetStation(params);
+      })
+    },
+    resetStation(params) {
+      this.listLoading = true;
+      ocpp.sendPerform("ocppOperations/reset", params).then(res => {
+        this.listLoading = false;
+        if (res.data.taskId) {
+          this.$router.push({path: '/ocpp-operations/result/' + res.data.taskId});
+        }
+      }).catch(err => {
+        this.listLoading = false;
+        this.$message({
+          type: 'error',
+          message: err
+        })
+      });
     },
     },
     delStation(row) {
     delStation(row) {
       this.$confirm('Are you sure you want to delete this station ?', 'Delete', {
       this.$confirm('Are you sure you want to delete this station ?', 'Delete', {

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

@@ -95,7 +95,7 @@
     },
     },
     methods: {
     methods: {
       toAddPage() {
       toAddPage() {
-        this.$router.push('/charging-profiles/add')
+        this.$router.push({path: '/charging-profiles/add'})
       },
       },
       handlePageChange() {
       handlePageChange() {
         this.listLoading = true;
         this.listLoading = true;
@@ -114,7 +114,7 @@
       },
       },
       editProfile(row) {
       editProfile(row) {
         this.$store.commit('charge/SET_ProfileId', row.chargingProfilePk)
         this.$store.commit('charge/SET_ProfileId', row.chargingProfilePk)
-        this.$router.push('/charging-profiles/edit');
+        this.$router.push({path: '/charging-profiles/edit'});
       },
       },
       delProfile(row) {
       delProfile(row) {
         this.$confirm('Are you sure you want to delete this profile ?', 'Delete', {
         this.$confirm('Are you sure you want to delete this profile ?', 'Delete', {

+ 100 - 0
Strides-Admin/src/views/charging/ConfigureStations.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="app-container">
+    <div class="filter-view">
+      <el-input
+        clearable
+        style="max-width: 400px;"
+        v-model="filter.pageVo.criteria"
+        placeholder="Search by Station ID/Site Name"
+        @keyup.enter.native="getTableData" />
+      <el-button
+        type="primary"
+        icon="el-icon-search"
+        @click="getTableData">
+        Search
+      </el-button>
+    </div>
+    <el-table
+      :data="table.list"
+      v-loading="loading">
+      <el-table-column
+        label="Station ID"
+        align="center"
+        prop="chargeBoxId"/>
+      <el-table-column
+        label="Connector ID"
+        align="center"
+        prop="connectorId"/>
+      <el-table-column
+        label="Site Name"
+        align="center"
+        prop="siteName"/>
+      <el-table-column
+        label="Description"
+        align="center"
+        prop="description">
+        <template slot-scope="{row}">
+          <div
+            class="underline"
+            v-if="row.description"
+            @click="viewProfiles(row)">
+            {{row.description}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="Validity Period"
+        align="center"
+        prop="validityPeriod"/>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import api from '../../http/api/chargingProfile.js'
+import Pagination from '@/components/Pagination'
+export default {
+  data() {
+    return {
+      loading: false,
+      table: {
+        list: [],
+        total: 0
+      },
+      filter: {
+        pageNo: 1,
+        pageSize: 10,
+        pageVo: {
+          criteria: ""
+        }
+      },
+    }
+  },
+  components: { Pagination },
+  created() {
+    this.getTableData();
+  },
+  methods: {
+    getTableData() {
+      this.loading = true;
+      api.getConfigureChargingProfilePages(this.filter).then(res => {
+        this.loading = false;
+        this.table.total = res.total;
+        this.table.list = res.data;
+      }).catch(err => {
+        this.loading = false;
+        this.table.total = 0;
+        this.table.list = [];
+      })
+    },
+    viewProfiles(row) {
+      this.$router.push(({
+        path: "/charging-profiles/view/" + row.chargingProfilePk
+      }))
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 20 - 4
Strides-Admin/src/views/charging/EditProfile.vue

@@ -260,6 +260,7 @@
             style="margin-left: 20px;"
             style="margin-left: 20px;"
             type="primary"
             type="primary"
             native-type="submit"
             native-type="submit"
+            v-if="!isView"
             @click="handleClickConfigUpateButton">
             @click="handleClickConfigUpateButton">
             Save
             Save
           </el-button>
           </el-button>
@@ -295,6 +296,7 @@
           validTo: "",
           validTo: "",
           startSchedule: "",
           startSchedule: "",
           note: "",
           note: "",
+          chargingProfilePk: "",
           chargingProfilePurpose: "TX_DEFAULT_PROFILE",
           chargingProfilePurpose: "TX_DEFAULT_PROFILE",
           chargingProfileKind: "RECURRING",
           chargingProfileKind: "RECURRING",
           recurrencyKind: "DAILY",
           recurrencyKind: "DAILY",
@@ -370,19 +372,25 @@
           startPeriod: "",
           startPeriod: "",
           numberPhases: "",
           numberPhases: "",
           powerLimitInAmperes: ""
           powerLimitInAmperes: ""
-        }
+        },
+        isView: false
       }
       }
     },
     },
     computed: {
     computed: {
       ...mapState('charge', ['profileId'])
       ...mapState('charge', ['profileId'])
     },
     },
     created() {
     created() {
+      this.editForm.chargingProfilePk = this.profileId;
+      if (this.$route.params.id) {
+        this.editForm.chargingProfilePk = this.$route.params.id;
+        this.isView = true;
+      }
       this.addSchedule();
       this.addSchedule();
       this.getProfileInfo();
       this.getProfileInfo();
     },
     },
     methods: {
     methods: {
       async getProfileInfo() {
       async getProfileInfo() {
-        const res = await api.getChargingProfileById(this.profileId)
+        const res = await api.getChargingProfileById(this.editForm.chargingProfilePk)
         if (res.success) {
         if (res.success) {
           const editForm = res.data
           const editForm = res.data
           editForm.durationInSeconds = parseInt(editForm.durationInSeconds / 3600);
           editForm.durationInSeconds = parseInt(editForm.durationInSeconds / 3600);
@@ -449,7 +457,7 @@
             message: 'Edit charging profile successfully',
             message: 'Edit charging profile successfully',
             type: 'success'
             type: 'success'
           })
           })
-          this.$router.go(-1)
+          this.handleClickCancleButton()
         }).catch(err => {
         }).catch(err => {
           this.loading = false;
           this.loading = false;
           this.$message({
           this.$message({
@@ -459,7 +467,15 @@
         });
         });
       },
       },
       handleClickCancleButton() {
       handleClickCancleButton() {
-        this.$router.go(-1)
+        if (this.isView) {
+          this.$router.push({
+            path: "/charging-profiles/config-stations"
+          })
+        } else {
+          this.$router.push({
+            path: "/charging-profiles/index"
+          })
+        }
       }
       }
     }
     }
   }
   }

+ 1 - 1
Strides-Admin/src/views/dashboard/Dashboard.vue

@@ -288,7 +288,7 @@
         this.barLoading = false
         this.barLoading = false
       },
       },
       toMaps() {
       toMaps() {
-        this.$router.push('/maps')
+        this.$router.push({path: '/maps'})
         /*this.$notify({
         /*this.$notify({
           title: 'It works!',
           title: 'It works!',
           type: 'success',
           type: 'success',

+ 1 - 1
Strides-Admin/src/views/feedback/FeedbackManagement.vue

@@ -158,7 +158,7 @@
       },
       },
       viewFeedback(row) {
       viewFeedback(row) {
         this.$store.commit('provider/SET_Feedback', row)
         this.$store.commit('provider/SET_Feedback', row)
-        this.$router.push('/feedback-management/view/'+row.feedbackPk)
+        this.$router.push({path: '/feedback-management/view/'+row.feedbackPk})
       },
       },
       deleteFeedback(row) {
       deleteFeedback(row) {
         this.$confirm('Are you sure you want to delete this feedback?', 'Delete', {
         this.$confirm('Are you sure you want to delete this feedback?', 'Delete', {

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

@@ -10,7 +10,7 @@
             clearable
             clearable
             v-model="filter.pageVo.criteria"
             v-model="filter.pageVo.criteria"
             placeholder="Search by Number/Email"
             placeholder="Search by Number/Email"
-            @keyup.enter.native="handleFilter" />
+            @keyup.enter.native="getTableData" />
         </el-form-item>
         </el-form-item>
         <el-form-item>
         <el-form-item>
           <el-date-picker
           <el-date-picker

+ 3 - 3
Strides-Admin/src/views/limit/CreditLimit.vue

@@ -121,15 +121,15 @@
         });
         });
       },
       },
       addCreditLimit() {
       addCreditLimit() {
-        this.$router.push('credit-limit/add');
+        this.$router.push({path: 'credit-limit/add'});
       },
       },
       editLimit(row) {
       editLimit(row) {
         //this.$store.commit('provider/SET_CreditLimit', row);
         //this.$store.commit('provider/SET_CreditLimit', row);
-        this.$router.push('/credit-limit/edit/' + row.creditLimitId);
+        this.$router.push({path: '/credit-limit/edit/' + row.creditLimitId});
       },
       },
       viewCreditLimit(row) {
       viewCreditLimit(row) {
         this.$store.commit('provider/SET_CreditLimit', row);
         this.$store.commit('provider/SET_CreditLimit', row);
-        this.$router.push('/credit-limit/CL' + row.creditLimitId);
+        this.$router.push({path: '/credit-limit/CL' + row.creditLimitId});
       },
       },
       deleteLimit(row) {
       deleteLimit(row) {
         this.$confirm('Are you sure you want to delete this credit limit?', 'Delete', {
         this.$confirm('Are you sure you want to delete this credit limit?', 'Delete', {

+ 1 - 1
Strides-Admin/src/views/notification/add.vue

@@ -129,7 +129,7 @@ export default {
   },
   },
   methods: {
   methods: {
     onBack() {
     onBack() {
-      this.$router.push('/notification')
+      this.$router.push({path: '/notification'})
     },
     },
     onSend() {
     onSend() {
       this.$refs['addForm'].validate(result => {
       this.$refs['addForm'].validate(result => {

+ 2 - 2
Strides-Admin/src/views/notification/index.vue

@@ -127,10 +127,10 @@ export default {
       })
       })
     },
     },
     creatNotification() {
     creatNotification() {
-      this.$router.push('/notification/add')
+      this.$router.push({path: '/notification/add'})
     },
     },
     viewNotification(row) {
     viewNotification(row) {
-      this.$router.push('/notification/' + row.notificationId)
+      this.$router.push({path: '/notification/' + row.notificationId})
     },
     },
     handlePageChange() {
     handlePageChange() {
       this.getTableData();
       this.getTableData();

+ 1 - 1
Strides-Admin/src/views/ocpp/OCPPOperations.vue

@@ -621,7 +621,7 @@
               ocpp.sendPerform(this.operationInfo.api, params).then(res => {
               ocpp.sendPerform(this.operationInfo.api, params).then(res => {
                 this.btnLoading = false;
                 this.btnLoading = false;
                 if (res.data.taskId) {
                 if (res.data.taskId) {
-                  this.$router.push('/ocpp-operations/result/' + res.data.taskId);
+                  this.$router.push({path: '/ocpp-operations/result/' + res.data.taskId});
                 }
                 }
               }).catch(err => {
               }).catch(err => {
                 this.btnLoading = false;
                 this.btnLoading = false;

+ 1 - 1
Strides-Admin/src/views/posDevice/index.vue

@@ -111,7 +111,7 @@ export default {
       });
       });
     },
     },
     addDevice() {
     addDevice() {
-      this.$router.push('pos-device/add');
+      this.$router.push({path: 'pos-device/add'});
     },
     },
     viewDevice({deviceId}) {
     viewDevice({deviceId}) {
       this.$router.push(`pos-device/${deviceId}`);
       this.$router.push(`pos-device/${deviceId}`);

+ 2 - 2
Strides-Admin/src/views/provider/ServiceProviderManagement.vue

@@ -141,11 +141,11 @@
         })
         })
       },
       },
       addProvider() {
       addProvider() {
-        this.$router.push('add')
+        this.$router.push({path: '/service-provider-management/add'})
       },
       },
       editProvider(row) {
       editProvider(row) {
         this.$store.commit('provider/SET_ProviderInfo', row)
         this.$store.commit('provider/SET_ProviderInfo', row)
-        this.$router.push('edit')
+        this.$router.push({path: '/service-provider-management/edit'})
       },
       },
       deleteProvider(row) {
       deleteProvider(row) {
         this.$confirm('Are you sure you want to delete this service provider?', 'Delete', {
         this.$confirm('Are you sure you want to delete this service provider?', 'Delete', {