vbea 3 năm trước cách đây
mục cha
commit
6adb1d95e4

+ 72 - 70
Strides-Admin/src/router/index.js

@@ -97,10 +97,33 @@ const constantRoutes = [
   },
   SiteManagementRouter,
   ChargeRouter,
-  ProviderRouter,
-  fleetCompanyRoute,
-  driver,
+  Transactions,
+  {
+    path: '/error-table',
+    component: Layout,
+    meta: {
+      title: 'Error Table',
+      icon: 'error-table',
+      activeIcon: 'error-table-active',
+      affix: true
+    },
+    children: [
+      {
+        path: '/error-table',
+        component: () => import('@/views/transaction/error_table'),
+        name: 'error-table',
+        meta: {
+          title: 'Error Table',
+          icon: 'error-table',
+          breadcrumb: false
+        }
+      }
+    ]
+  },
+  ChargingProfile,
+  /*FinancialRouter,*/
   UserRouter,
+  driver,
   {
     path: '/feedback-management',
     component: Layout,
@@ -131,72 +154,6 @@ const constantRoutes = [
       }
     ],
   },
-  Transactions,
-  CreditLimit,
-  {
-    path: '/pos-device',
-    component: Layout,
-    meta: {
-      title: 'POS Device Management',
-      icon: 'pos-device',
-      activeIcon: 'pos-device-active',
-      affix: true
-    },
-    children: [
-      {
-        path: '/pos-device',
-        component: () => import('@/views/posDevice/index'),
-        name: 'pos-device-index',
-        meta: {
-          title: 'POS Device Management',
-          icon: 'pos-device',
-          activeIcon: 'pos-device-active',
-          breadcrumb: false
-        }
-      },
-      {
-        path: '/pos-device/add',
-        component: () => import('@/views/posDevice/detail'),
-        name: 'pos-device-add',
-        meta: {
-          title: 'Add Device',
-          activeMenu: '/pos-device'
-        }
-      },
-      {
-        path: '/pos-device/:deviceId',
-        component: () => import('@/views/posDevice/detail'),
-        name: 'pos-device-edit',
-        meta: {
-          title: 'Edit Device',
-          activeMenu: '/pos-device'
-        }
-      }
-    ]
-  },
-  {
-    path: '/error-table',
-    component: Layout,
-    meta: {
-      title: 'Error Table',
-      icon: 'error-table',
-      activeIcon: 'error-table-active',
-      affix: true
-    },
-    children: [
-      {
-        path: '/error-table',
-        component: () => import('@/views/transaction/error_table'),
-        name: 'error-table',
-        meta: {
-          title: 'Error Table',
-          icon: 'error-table',
-          breadcrumb: false
-        }
-      }
-    ]
-  },
-  ChargingProfile,
   OCPPRouter,
   {
     path: '/reports',
@@ -256,7 +213,52 @@ const constantRoutes = [
         }
       }
     ],
-  }
+  },
+  ProviderRouter,
+  fleetCompanyRoute,
+  CreditLimit,
+  {
+    path: '/pos-device',
+    component: Layout,
+    meta: {
+      title: 'POS Device Management',
+      icon: 'pos-device',
+      activeIcon: 'pos-device-active',
+      affix: true
+    },
+    children: [
+      {
+        path: '/pos-device',
+        component: () => import('@/views/posDevice/index'),
+        name: 'pos-device-index',
+        meta: {
+          title: 'POS Device Management',
+          icon: 'pos-device',
+          activeIcon: 'pos-device-active',
+          breadcrumb: false
+        }
+      },
+      {
+        path: '/pos-device/add',
+        component: () => import('@/views/posDevice/detail'),
+        name: 'pos-device-add',
+        meta: {
+          title: 'Add Device',
+          activeMenu: '/pos-device'
+        }
+      },
+      {
+        path: '/pos-device/:deviceId',
+        component: () => import('@/views/posDevice/detail'),
+        name: 'pos-device-edit',
+        meta: {
+          title: 'Edit Device',
+          activeMenu: '/pos-device'
+        }
+      }
+    ]
+  },
+  /*OCPI*/
 ]
 
 const asyncRoutes = []

+ 9 - 1
Strides-Admin/src/styles/sidebar.scss

@@ -73,7 +73,9 @@
     }
 
     .el-menu-item {
+      height: 40px;
       display: flex;
+      line-height: 48px;
       align-items: center;
       flex-direction: row;
       border-radius: 6px;
@@ -82,6 +84,13 @@
         height: 5px;
       }
     }
+    
+    .el-submenu__title {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      flex-direction: row;
+    }
 
     .is-active > .el-submenu__title {
       color: $subMenuActiveText !important;
@@ -154,7 +163,6 @@
 
       & > .el-submenu__title {
         padding: 0 !important;
-        
         .svg-icon {
           margin-left: 20px;
         }

+ 89 - 78
Strides-Admin/src/views/driver/DriverDetail.vue

@@ -10,7 +10,7 @@
         label-position="right"
       >
         <el-row :gutter="20">
-          <el-col :span="10" :offset="0">
+          <el-col :xs="24" :md="10" :offset="0">
             <el-form-item label="Display Name:" prop="nickName">
               <el-input
                 :disabled="isDispatch"
@@ -18,24 +18,17 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="10" :offset="2">
-            <el-form-item label="Company:" prop="fleetCompanyId">
-              <el-select
+          <el-col :xs="24" :md="10" >
+            <el-form-item label="PDVL:" prop="pdvLicence">
+              <el-input
                 :disabled="isDispatch"
-                v-model="form.fleetCompanyId"
-              >
-                <el-option
-                  v-for="(item) in options.fleetCompany"
-                  :key="item.fleetCompanyId"
-                  :label="item.fleetCompanyName"
-                  :value="item.fleetCompanyId"
-                ></el-option>
-              </el-select>
+                v-model="form.pdvLicence"
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
-          <el-col :span="10" :offset="0">
+          <el-col :xs="24" :md="10" :offset="0">
             <el-form-item label="Email Address:" prop="email">
               <el-input
                 :disabled="isDispatch"
@@ -43,30 +36,49 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="10" :offset="2">
-            <el-form-item label="PDVL:" prop="pdvLicence">
-              <el-input
+          <el-col :xs="24" :md="10">
+            <el-form-item label="Company:" prop="fleetCompanyId">
+              <el-select
                 :disabled="isDispatch"
-                v-model="form.pdvLicence"
-              ></el-input>
+                v-model="form.fleetCompanyId">
+                <el-option
+                  v-for="(item) in options.fleetCompany"
+                  :key="item.fleetCompanyId"
+                  :label="item.fleetCompanyName"
+                  :value="item.fleetCompanyId"
+                ></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
-          <el-col :span="10" :offset="0">
+          <el-col :xs="24" :md="10">
+            <el-form-item label="Country:" prop="phone">
+              <el-select
+                :disabled="isDispatch"
+                v-model="form.countryCode">
+                <el-option
+                  v-for="item in options.countryList"
+                  :key="item.value"
+                  :label="item.name"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :md="10" :offset="0">
             <el-form-item label="Phone Number:" prop="phone">
               <el-row :gutter="0">
                 <el-col :span="7">
                   <el-select
                     :disabled="isDispatch"
-                    v-model="form.callingCode"
-                  >
+                    v-model="form.callingCode">
                     <el-option
                       v-for="item in options.callingCode"
                       :key="item.callingCode"
                       :label="'+' + item.callingCode"
                       :value="item.callingCode"
-                    ></el-option>
+                    />
                   </el-select>
                 </el-col>
                 <el-col :span="16" :offset="1">
@@ -83,54 +95,47 @@
               ></el-input-->
             </el-form-item>
           </el-col>
-          <el-col :span="10" :offset="2">
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
             <el-form-item label="PDVL:" class="pdvl" prop="pdvLicencePictures">
               <template v-slot:label>
-                PDVL: <br> (Front & Back)
+                PDVL Photos: <br> (Front & Back)
               </template>
-              <el-row :gutter="0">
-                <el-col :span="12" :offset="0">
-                  <el-upload
-                    :disabled="isDispatch"
-                    class="avatar-uploader"
-                    accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
-                    :action="action"
-                    :headers="headers"
-                    :show-file-list="false"
-                    :on-success="handleAvatarSuccessFirst"
-                    :before-upload="beforeAvatarUpload"
-                  >
-                    <el-image
-                      style="width: 100px; height: 100px"
-                      v-if="form.pdvLicencePictures.front"
-                      :src="form.pdvLicencePictures.front | imageSrc"
-                      :preview-src-list="isDispatch ? previewSrcList : []"
-                    ></el-image>
-                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                  </el-upload>
-                </el-col>
-                <el-col :span="12" :offset="0">
-                  <el-upload
-                    :disabled="isDispatch"
-                    class="avatar-uploader"
-                    accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
-                    :action="action"
-                    :headers="headers"
-                    :show-file-list="false"
-                    :on-success="handleAvatarSuccessSecond"
-                    :before-upload="beforeAvatarUpload"
-                  >
-                    <el-image
-                      style="width: 100px; height: 100px"
-                      v-if="form.pdvLicencePictures.back"
-                      :src="form.pdvLicencePictures.back | imageSrc"
-                      :preview-src-list="isDispatch ? previewSrcList : []"
-                    ></el-image>
-                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                  </el-upload>
-                </el-col>
-              </el-row>
-              
+              <div class="flexcr">
+                <el-upload
+                  :disabled="isDispatch"
+                  class="avatar-uploader"
+                  accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
+                  :action="action"
+                  :headers="headers"
+                  :show-file-list="false"
+                  :on-success="handleAvatarSuccessFirst"
+                  :before-upload="beforeAvatarUpload">
+                  <el-image
+                    style="width: 150px; height: 100px"
+                    v-if="form.pdvLicencePictures.front"
+                    :src="form.pdvLicencePictures.front | imageSrc"
+                    :preview-src-list="isDispatch ? previewSrcList : []"/>
+                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+                <el-upload
+                  :disabled="isDispatch"
+                  class="avatar-uploader"
+                  accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
+                  :action="action"
+                  :headers="headers"
+                  :show-file-list="false"
+                  :on-success="handleAvatarSuccessSecond"
+                  :before-upload="beforeAvatarUpload">
+                  <el-image
+                    style="width: 150px; height: 100px"
+                    v-if="form.pdvLicencePictures.back"
+                    :src="form.pdvLicencePictures.back | imageSrc"
+                    :preview-src-list="isDispatch ? previewSrcList : []"/>
+                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -185,6 +190,7 @@ import {
   updateDriver
 } from '@/http/api/driver'
 import { baseURL } from '@/http/http'
+import site from '../../http/api/site'
 import { getToken } from '@/utils/auth'
 import {getCountryList} from '../../utils/index.js'
 
@@ -205,6 +211,7 @@ export default {
         driverStatus: "",
         email: "",
         phone: "",
+        countryCode: 'SG',
         callingCode: "65",
         fleetCompanyId: "",
         pdvLicence: "",
@@ -214,6 +221,7 @@ export default {
         },
       },
       options: {
+        countryList: [],
         callingCode: [],
         fleetCompany: [],
       },
@@ -308,7 +316,8 @@ export default {
           this.form.fleetCompanyId = data.fleetCompanyId
           this.form.nickName = data.nickName
           this.form.pdvLicence = data.pdvLicence
-          this.form.callingCode = data.callingCode
+          this.form.countryCode = data.countryCode || 'SG'
+          this.form.callingCode = "" + data.callingCode
           this.form.phone = data.phone
           this.form.userPk = data.userPk
           if (data.pdvLicencePictures) {
@@ -348,7 +357,6 @@ export default {
         this.options.fleetCompany = data
       }
     },
-
     async onClickApproveButton() {
       const params = { userPk: this.getDriverId() }
       this.approveButtonLoading = true
@@ -390,6 +398,7 @@ export default {
                 front,
                 back,
               },
+              countryCode,
               callingCode,
               phone,
               ...others
@@ -403,12 +412,14 @@ export default {
               result = await updateDriver({
                 pdvLicencePictures,
                 phone,
+                countryCode,
                 callingCode,
                 ...others,
               })
             } else {
               result = await addDriver({
                 pdvLicencePictures,
+                countryCode,
                 callingCode,
                 phone,
                 ...others,
@@ -427,12 +438,18 @@ export default {
       })
       this.confirmButtonLoading = false
     },
+    getCountryOptions() {
+      site.getCountryList().then(({ data }) => {
+        this.options.countryList = data
+      })
+    }
   },
   async created() {
     this.getFleetCompanyOptions()
     if (this.isEdit) {
       this.getDriverDetail()
     }
+    this.getCountryOptions()
     getCountryList(list => {
       this.options.callingCode = list
     })
@@ -454,11 +471,12 @@ export default {
         padding: 45px 100px;
         .pdvl {
           ::v-deep .el-form-item__label {
-            padding: 12px 0;
+            padding: 12px;
             line-height: 16px;
           }
         }
         .avatar-uploader {
+          margin-right: 10px;
           .avatar-uploader-icon {
             border: 1px dashed #d9d9d9;
             border-radius: 6px;
@@ -479,13 +497,6 @@ export default {
 
       .buttons {
         padding: 0 45px;
-        .cancelButton {
-          color: #555;
-          background: #FFFFFF;
-          border: 1px solid #001489;
-          box-sizing: border-box;
-          border-radius: 4px;
-        }
       }
     }
   }

+ 85 - 74
Strides-Admin/src/views/feedback/Detail.vue

@@ -5,84 +5,95 @@
         label-position="left"
         label-width="140px"
         style="width: 100%;">
-        <div class="section-title">Feedback</div>
         <el-row :gutter="20">
-          <el-col :xs="24" :md="14">
-            <el-form-item
-              label="Type of Feedback:">
-              <el-input
-                class="add-text"
-                v-model="feedbackInfo.typeOfFeedback"
-                readonly/>
-            </el-form-item>
+          <el-col :xs="24" :md="12">
+            <div class="section-title">Feedback</div>
+            <el-row :gutter="20">
+              <el-col :xs="24">
+                <el-form-item
+                  label="Type of Feedback:">
+                  <el-input
+                    class="add-text"
+                    v-model="feedbackInfo.typeOfFeedback"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24">
+                <el-form-item
+                  label="Feedback:">
+                  <el-input
+                    class="add-text"
+                    :autosize="autosize"
+                    v-model="feedbackInfo.feedback"
+                    type="textarea"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24">
+                <el-form-item
+                  label="Feedback Status:">
+                  <el-input
+                    class="add-text"
+                    :value='feedbackInfo.readStatus ? "Readed" : "Unread"'
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24">
+                <el-form-item
+                  label="Feedback By:">
+                  <el-input
+                    class="add-text"
+                    v-model="feedbackInfo.nickName"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24">
+                <el-form-item
+                  label="Feedback Time:">
+                  <el-input
+                    class="add-text"
+                    v-model="feedbackInfo.feedbackTime"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" v-if="feedbackInfo.chargeBoxId">
+                <el-form-item
+                  label="Charging Station:">
+                  <el-input
+                    class="add-text"
+                    v-model="feedbackInfo.chargeBoxId"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" v-if="feedbackInfo.connectorId">
+                <el-form-item
+                  label="Connector:">
+                  <el-input
+                    class="add-text"
+                    v-model="feedbackInfo.connectorId"
+                    readonly/>
+                </el-form-item>
+              </el-col>
+            </el-row>
           </el-col>
-          <el-col :xs="24" :md="10">
-            <el-form-item
-              label="Feedback By:">
-              <el-input
-                class="add-text"
-                v-model="feedbackInfo.nickName"
-                readonly/>
-            </el-form-item>
+          <el-col :xs="24" :md="12">
+            <div class="section-title">Photos</div>
+            <div class="feedback-photo">
+              <img
+                class="feedback-img"
+                :src="baseURL + feedbackInfo.feedbackImgOne"
+                v-if="feedbackInfo.feedbackImgOne"/>
+              <img
+                class="feedback-img"
+                :src="baseURL + feedbackInfo.feedbackImgTwo"
+                v-if="feedbackInfo.feedbackImgTwo"/>
+              <img
+                class="feedback-img"
+                :src="baseURL + feedbackInfo.feedbackImgThree"
+                v-if="feedbackInfo.feedbackImgThree"/>
+            </div>
           </el-col>
         </el-row>
-        <el-row :gutter="20">
-          <el-col :xs="24" :md="14">
-            <el-form-item
-              label="Feedback:">
-              <el-input
-                class="add-text"
-                :autosize="autosize"
-                v-model="feedbackInfo.feedback"
-                type="textarea"
-                readonly/>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :md="10">
-            <el-form-item
-              label="Feedback Time:">
-              <el-input
-                class="add-text"
-                v-model="feedbackInfo.feedbackTime"
-                readonly/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row :gutter="20">
-          <el-col :xs="24" :md="14" v-if="feedbackInfo.chargeBoxId">
-            <el-form-item
-              label="Charging Station:">
-              <el-input
-                class="add-text"
-                v-model="feedbackInfo.chargeBoxId"
-                readonly/>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :md="10" v-if="feedbackInfo.connectorId">
-            <el-form-item
-              label="Connector:">
-              <el-input
-                class="add-text"
-                v-model="feedbackInfo.connectorId"
-                readonly/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <div class="section-title">Photos</div>
-        <div class="feedback-photo">
-          <img
-            class="feedback-img"
-            :src="baseURL + feedbackInfo.feedbackImgOne"
-            v-if="feedbackInfo.feedbackImgOne"/>
-          <img
-            class="feedback-img"
-            :src="baseURL + feedbackInfo.feedbackImgTwo"
-            v-if="feedbackInfo.feedbackImgTwo"/>
-          <img
-            class="feedback-img"
-            :src="baseURL + feedbackInfo.feedbackImgThree"
-            v-if="feedbackInfo.feedbackImgThree"/>
-        </div>
         <div class="hr-full"/>
         <div class="buttons">
           <el-button

+ 16 - 0
Strides-Admin/src/views/feedback/FeedbackManagement.vue

@@ -68,6 +68,22 @@
             <span>{{ row.feedback }}</span>
           </template>
       </el-table-column>
+      <el-table-column
+        label="Status"
+        align="center"
+        class-name="fixed-width">
+          <template slot-scope="{row}">
+            <span>{{ row.readStatus ? "Read" : "Unread" }}</span>
+          </template>
+      </el-table-column>
+      <el-table-column
+        label="Reply Count"
+        align="center"
+        class-name="fixed-width">
+          <template slot-scope="{row}">
+            <span>{{ "0" }}</span>
+          </template>
+      </el-table-column>
       <el-table-column
         label="Feedback Time"
         align="center"

+ 7 - 2
Strides-Admin/src/views/posDevice/detail.vue

@@ -22,6 +22,8 @@
                 maxlength="20"/>
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row :gutter="20">
           <el-col :xs="24" :md="12">
             <el-form-item
               label="Status"
@@ -58,6 +60,8 @@
               </el-select>
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row :gutter="20">
           <el-col :xs="24" :md="12">
             <el-form-item
               label="Station ID"
@@ -77,7 +81,7 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row :gutter="20">
+        <el-row :gutter="20" v-if="showProvider">
           <el-col :xs="24" :md="12">
             <el-form-item
               label="Service Provider"
@@ -124,6 +128,7 @@ export default {
     return {
       loading: false,
       loadingBox: false,
+      showProvider: false,
       form: {
         deviceSerialNo: '',
         sitePk: '',
@@ -291,7 +296,7 @@ export default {
       });
     },
     handleClickCancleButton() {
-      this.$router.push('/pos-device');
+      this.$router.push({path: '/pos-device'});
     },
     handleClickSaveButton() {
       this.$refs['addForm'].validate(result => {

+ 29 - 2
Strides-Admin/src/views/provider/addProvider.vue

@@ -30,7 +30,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :md="18">
             <el-form-item
-              label="Provider Person:">
+              label="Contact Person:">
               <el-input
                 class="add-text"
                 maxlength="50"
@@ -39,6 +39,31 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row :gutter="20">
+          <el-col :xs="24" :md="18">
+            <el-form-item
+              label="Login ID:">
+              <el-input
+                class="add-text"
+                maxlength="50"
+                v-model="addForm.loginId"
+                placeholder="Add text"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :xs="24" :md="18">
+            <el-form-item
+              label="Password Set:">
+              <el-input
+                class="add-text"
+                maxlength="50"
+                v-model="addForm.password"
+                type="password"
+                placeholder="Add text"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row :gutter="20">
           <el-col :xs="24" :md="18">
             <el-form-item
@@ -108,7 +133,9 @@
           providerName: '',
           providerAddress: '',
           providerContact: '',
-          providerLogo: ''
+          providerLogo: '',
+          loginId: '',
+          password: ""
         },
         logos: [],
         imgAddress: baseURL

+ 31 - 4
Strides-Admin/src/views/provider/editProvider.vue

@@ -30,7 +30,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :md="18">
             <el-form-item
-              label="Provider Person:">
+              label="Contact Person:">
               <el-input
                 class="add-text"
                 maxlength="50"
@@ -39,6 +39,31 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row :gutter="20">
+          <el-col :xs="24" :md="18">
+            <el-form-item
+              label="Login ID:">
+              <el-input
+                class="add-text"
+                maxlength="50"
+                v-model="editForm.loginId"
+                placeholder="Add text"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :xs="24" :md="18">
+            <el-form-item
+              label="Password Set:">
+              <el-input
+                class="add-text"
+                maxlength="50"
+                v-model="editForm.password"
+                type="password"
+                placeholder="Add text"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row :gutter="20">
           <el-col :xs="24" :md="18">
             <el-form-item
@@ -109,7 +134,9 @@
           providerName: '',
           providerAddress: '',
           providerContact: '',
-          providerLogo: ''
+          providerLogo: '',
+          loginId: '',
+          password: ""
         },
         logos: [],
         imgAddress: baseURL
@@ -161,7 +188,7 @@
             message: 'Edit service provider successfully',
             type: 'success'
           })
-          this.$router.go(-1)
+          this.handleClickCancleButton()
         }).catch(err => {
           this.loading = false;
           this.$message({
@@ -171,7 +198,7 @@
         });
       },
       handleClickCancleButton() {
-        this.$router.go(-1)
+        this.$router.push("/service-provider-management/index")
       }
     }
   }