Przeglądaj źródła

联锁成功但iot报错的情况下,刷新列表

yuhan 2 miesięcy temu
rodzic
commit
12c2782cd4

+ 4 - 1
src/components/module_interLock/UEquipmentTree/UEquipmentTreeDrag.vue

@@ -289,9 +289,12 @@
         }
         var that = this;
         deleteAction(that.url.delete, {id: id}).then((res) => {
-          if (res.success) {
+          if(res.code === 200){
             that.getTpmTreeData();
             that.$message.success(res.message);
+          }else if(res.code === 400){
+            that.getTpmTreeData();
+            that.$message.warning(res.message);
           } else {
             that.$message.warning(res.message);
           }

+ 5 - 2
src/views/module_interLock/baseInterLock/modules/BaseInterLockModal.vue

@@ -501,10 +501,13 @@
         }
         // console.log(this.model.groupName)
         httpAction(httpurl,this.model,method).then((res)=>{
-          if(res.success){
+          if(res.code === 200){
             this.$message.success(res.message);
             this.$emit('ok');
-          }else{
+          }else if(res.code === 400){
+            this.$message.warning(res.message);
+            this.$emit('ok');
+          } else {
             this.$message.warning(res.message);
           }
         }).finally(() => {