Explorar el Código

解决提示信息消失太快的问题

zhulu hace 1 año
padre
commit
2640ca495e
Se han modificado 1 ficheros con 10 adiciones y 7 borrados
  1. 10 7
      src/views/menu/resumption/detail.vue

+ 10 - 7
src/views/menu/resumption/detail.vue

@@ -434,10 +434,10 @@
         } catch (e) {
           nfcCode = nfcStr.content
         }
-        this.checkNfcFilter(nfcCode)
-
-        //保存一次数据
-        this.resumptionDataSave();
+        this.checkNfcFilter(nfcCode);       
+            //保存一次数据
+        this.resumptionDataSave(true);
+        
       },
       checkNfcFilter(nfcCode) {
         let areaId = null
@@ -599,7 +599,7 @@
         this.openCollapseItems()
 
         //保存一次数据
-        this.resumptionDataSave();
+        this.resumptionDataSave(true);
       },
       changeSwitch() {
         let num = 0
@@ -827,7 +827,7 @@
         this.$refs.dvrDetail.show(point)
       },
       //保存数据
-      resumptionDataSave() {
+      resumptionDataSave(autoSave=false) {
         //组装数据
         let data = {}
         data.taskId = this.resumptionData.taskId
@@ -835,7 +835,10 @@
         data.nfcs = this.nfcs
         data.subType = 1
         saveTask(data).then(res => {
-          this.$toast('保存成功')
+          // 自动保存时 不提示 保存成功,否则前一个提示会立马消失, 只有点击保存按钮时提示
+          if(autoSave!==true){
+            this.$toast('保存成功')
+          }          
         })
       },
       submitResumptionData() {