Parcourir la source

选择编辑接口报错时添加catch

xiebeibei il y a 4 ans
Parent
commit
33aa17fca3
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/components/edit/attr_select.vue

+ 4 - 1
src/components/edit/attr_select.vue

@@ -627,7 +627,10 @@ export default {
             this.$message.error("工程信息化中的位置信息获取失败");
           }
         }
-      );
+      ).catch(()=>{
+        this.spinning = false;
+        this.$message.error("工程信息化中的设备信息获取失败");
+      });
       // }else if(newval.itemType == 'Image'){
       this.spinning = true;
       if (assetnumList.length) {