wu há 2 semanas atrás
pai
commit
386e7cc81c

+ 9 - 7
src/views/api/apisql.vue

@@ -720,6 +720,8 @@ export default {
       if (!this.pushFrom.version) {
         return this.$message({ message: '请输入版本', type: 'warning' });
       }
+      // 拷贝一下 pushFrom
+      let pushFrom = JSON.parse(JSON.stringify(this.pushFrom));
       if (this.form.isPage){
         const params = [
           {
@@ -738,16 +740,16 @@ export default {
           }
         ];
         // 确保 this.pushFrom.extJson 存在并且 params 是一个数组
-        if (!this.pushFrom.extJson) {
-          this.pushFrom.extJson = {};
+        if (!pushFrom.extJson) {
+          pushFrom.extJson = {};
         }
-        if (!Array.isArray(this.pushFrom.extJson.params)) {
-          this.pushFrom.extJson.params = [];
+        if (!Array.isArray(pushFrom.extJson.params)) {
+          pushFrom.extJson.params = [];
         }
-        this.pushFrom.extJson.params = params.concat(this.pushFrom.extJson.params);
+        pushFrom.extJson.params = params.concat(pushFrom.extJson.params);
       }
-      this.pushFrom.extJson = JSON.stringify(this.pushFrom.extJson);
-      dataapiRelease(this.pushFrom).then(res => {
+      pushFrom.extJson = JSON.stringify(pushFrom.extJson);
+      dataapiRelease(pushFrom).then(res => {
         this.$message({ message: '已提交', type: 'success' });
         this.showPush = false;
       });

+ 1 - 1
src/views/api/datasourcelist.vue

@@ -151,7 +151,7 @@
       <el-pagination
         :current-page.sync="dataPage.current"
         :page-size="dataPage.size"
-        :page-sizes="[10, 20, 50, 100]"
+        :page-sizes="[10, 40, 50, 100]"
         :total="dataPage.total"
         background
         class="my-paging"

+ 2 - 1
src/views/api/type.vue

@@ -196,10 +196,11 @@ export default {
         if (obj.code !== 10000) {
           vm.$message.error(obj.message)
         } else {
-          vm.$message(obj.message)
+          vm.$message({ type: 'success', message: obj.message });
           vm.addForm.name = ''
           vm.addForm.description = ''
           vm.addFormVisible = false
+          vm.pageNo = 1
           vm.btn_search()
         }
       }).catch(function(error) {

+ 6 - 2
src/views/app/approve.vue

@@ -168,7 +168,7 @@
               active-text="启用"
               inactive-text="停用"
               size="mini"
-              @change="handleEnable(scope.row.id,$event)"/>
+              @change="handleEnable(scope.row.id,$event,scope.row)"/>
           </template>
         </el-table-column>
         <el-table-column
@@ -396,7 +396,7 @@ export default {
         })
       }
     },
-    handleEnable(id, e) {
+    handleEnable(id, e, row) {
       if (e === 0) {
         this.$confirm('此操作将启用该接口,是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -404,6 +404,8 @@ export default {
           type: 'warning'
         }).then(() => {
           this.enable(id, e)
+        }).catch(() => {
+          row.enable = 1
         })
       } else {
         this.$confirm('此操作将停用该接口,是否继续?', '提示', {
@@ -412,6 +414,8 @@ export default {
           type: 'warning'
         }).then(() => {
           this.enable(id, e)
+        }).catch(() => {
+          row.enable = 0
         })
       }
     },

+ 3 - 1
src/views/app/detail.vue

@@ -327,7 +327,7 @@ export default {
           }
         })
         .catch(function(error) {
-          alert(error)
+          vm.$message.error(error)
         })
     },
     getAppApi() {
@@ -363,6 +363,8 @@ export default {
             // this.getUseApi()
           }
         })
+      }).catch(function(error) {
+        vm.$message.error(error)
       })
     }
   }

+ 0 - 2
src/views/devbase/app/detail.vue

@@ -385,7 +385,6 @@ export default {
           }
         })
         .catch(function(error) {
-          alert(error)
         })
     },
 
@@ -445,7 +444,6 @@ export default {
           }
         })
         .catch(function(error) {
-          alert(error)
         })
     },
     getAppApi() {