Forráskód Böngészése

Develop OCPI Parking Type
https://dev.wormwood.com.sg/zentao/task-view-527.html

vbea 1 éve
szülő
commit
7fe69457cf

+ 3 - 0
Strides-Admin/src/api/apiBase.js

@@ -40,6 +40,9 @@ const apiBase = {
   getPaymentGatewayList() {
     return get(prefix + "payment-gateway-select")
   },
+  getParkingTypeList() {
+    return get(prefix + "parking-type-select")
+  },
   uploadImage(form) {
     return upload(prefix + 'upload/picture', form)
   }

+ 32 - 0
Strides-Admin/src/views/site2/detail.vue

@@ -112,6 +112,20 @@
                 </el-switch>
               </div>
             </el-form-item>
+            <el-form-item
+              label-width="130px"
+              label="Parking Type:"
+              prop="parkingType">
+              <el-select
+                v-model="siteForm.parkingType"
+                class="input-text">
+                <el-option
+                  v-for="item in parkingTypeOptions"
+                  :key="item.key"
+                  :label="item.value"
+                  :value="item.key" />
+              </el-select>
+            </el-form-item>
             <el-form-item
               label-width="130px"
               label="Additional Notes:">
@@ -399,6 +413,7 @@ import waves from '@/directive/waves' // waves directive
 import site from '../../http/api/site'
 import apiSet from '../../http/api/settings'
 import { getRoleName } from '@/utils/auth'
+import apiBase from '@/api/apiBase.js'
 export default {
   directives: { waves },
   components: {
@@ -419,6 +434,7 @@ export default {
       isMCSTUser: false,
       countryOptions: [],
       featuresOptions: [],
+      parkingTypeOptions: [],
       siteForm: {
         sitePk: "",
         siteName: "",
@@ -437,6 +453,7 @@ export default {
           heartbeatIntervalMinutes: ''
         },
         free: false,
+        parkingType: "",
         endlessService: false,//24/7
         additionalNotes: "",
         //罚款部分
@@ -583,6 +600,7 @@ export default {
     this.pageLoading = true;
     this.isMCSTUser = getRoleName() === "MCST";
     this.getCountryOptions();
+    this.getParkingOptions();
     this.getFeaturesList();
     if (this.$route.params.id) {
       this.isEdit = true;
@@ -627,6 +645,20 @@ export default {
         this.pageLoading = false;
       })
     },
+    getParkingOptions() {
+      apiBase.getParkingTypeList().then(res => {
+        if (res.data) {
+          this.parkingTypeOptions = res.data;
+        }
+      }).catch(() => {
+        this.$message({
+          message: err,
+          type: 'error',
+          duration: 3000,
+        })
+        this.pageLoading = false;
+      })
+    },
     getSiteInfo() {
       site.getSiteInfo({
         sitePk: this.$route.params.id,