qinzhipeng_v 5 år sedan
förälder
incheckning
6fe2442503
2 ändrade filer med 7 tillägg och 7 borttagningar
  1. 4 4
      src/views/mock/httprule.vue
  2. 3 3
      src/views/mock/rule.vue

+ 4 - 4
src/views/mock/httprule.vue

@@ -43,7 +43,7 @@
       </el-table-column>
 
       <el-table-column label="接口ID" min-width="80px" align="center">
-        {{ this.$route.path.split('/')[3] }}
+        {{ this.$route.path.split('/')[4] }}
       </el-table-column>
 
       <!--<el-table-column label="方法协议" min-width="150px" align="center">-->
@@ -429,7 +429,7 @@ export default {
             this.dataFrom.creator = this.userNames
             this.dataFrom.creatorEn = this.username
             this.dataFrom.updator = ''
-            this.dataFrom.methodId = parseInt(this.$route.path.split('/')[3])
+            this.dataFrom.methodId = parseInt(this.$route.path.split('/')[4])
             this.dataFrom.methodProtocol = 'http'
             this.dataFrom = vel
             this.dataFrom = vel
@@ -534,7 +534,7 @@ export default {
             this.dataFrom = vel
             // this.dataFrom.creator = this.userNames
             this.dataFrom.updator = this.userNames
-            this.dataFrom.methodId = parseInt(this.$route.path.split('/')[3])
+            this.dataFrom.methodId = parseInt(this.$route.path.split('/')[4])
             this.dataFrom.methodProtocol = 'http'
             this.dataFrom = vel
             this.dataFrom = vel
@@ -550,7 +550,7 @@ export default {
             //   const tempData = Object.assign({}, this.ruleData)
             // const tempData = {
             //   id: this.ruleForm.id,
-            //   methodId: parseInt(this.$route.path.split('/')[3]),
+            //   methodId: parseInt(this.$route.path.split('/')[4]),
             //   updator: '',
             //   execSort: this.ruleForm.execSort,
             //   whenScript: this.ruleForm.whenScript,

+ 3 - 3
src/views/mock/rule.vue

@@ -47,7 +47,7 @@
       </el-table-column> -->
       <el-table-column label="方法ID" min-width="220px" align="center">
         <!-- <template slot-scope="scope"> -->
-        <span>{{ this.$route.path.split('/')[3] }}</span>
+        <span>{{ this.$route.path.split('/')[4] }}</span>
         <!-- </template> -->
       </el-table-column>
 
@@ -350,7 +350,7 @@ export default {
         this.$refs['ruleDataForm'].validate((valid) => {
           if (valid) {
             delete this.ruleData.id
-            this.ruleData.methodId = parseInt(this.$route.path.split('/')[3])
+            this.ruleData.methodId = parseInt(this.$route.path.split('/')[4])
             this.ruleData.creator = this.userNames
             this.ruleData.creatorEn = this.username
             this.ruleData.updator = ''
@@ -429,7 +429,7 @@ export default {
         //   const tempData = Object.assign({}, this.ruleData)
           const tempData = {
             id: this.ruleData.id,
-            methodId: parseInt(this.$route.path.split('/')[3]),
+            methodId: parseInt(this.$route.path.split('/')[4]),
             updator: this.userNames,
             execSort: this.ruleData.execSort,
             whenScript: this.ruleData.whenScript,