Browse Source

调整js报错问题

Lijy 3 năm trước cách đây
mục cha
commit
5122bf6e6b

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/audit/audit.vue

@@ -63,10 +63,10 @@ export default {
             });
             this.$axios.get('/report/listImportByState', this.search)
             .then(res => {
-                toast.clear();
+                this.$toast.clear();
                 this.list = res.data
             }).catch(err=> {
-                toast.clear();
+                this.$toast.clear();
                 alert('err=' + err);
             });
         },
@@ -81,10 +81,10 @@ export default {
             this.$axios.get('/report/approve', {params:{id: id, reportIds: ids}})
             .then(res => {
                 this.obtain()
-                toast.clear();
+                this.$toast.clear();
                 this.$toast.success('审核成功');
             }).catch(err=> {
-                toast.clear();
+                this.$toast.clear();
                 alert('err=' + err);
             });
         },
@@ -103,11 +103,11 @@ export default {
             this.$axios.post('/report/deny', this.denyForm)
             .then(res => {
                 this.obtain()
-                toast.clear();
+                this.$toast.clear();
                 this.$toast.success('提交成功');
                 this.denyReasonDialog = false
             }).catch(err=> {
-                toast.clear();
+                this.$toast.clear();
                 alert('err=' + err);
             });
         }

+ 25 - 25
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -389,7 +389,7 @@
                     } else {
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             updateTxt() {
@@ -406,7 +406,7 @@
                     } else {
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             sea() {
                 console.log(this.userName.length)
@@ -465,7 +465,7 @@
                             domainItem.taskGroups = res.data;
                         } 
                         this.$forceUpdate();
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
             },
             getSubprojectList(domainItem) {
                 domainItem.subProjectList = [];
@@ -475,7 +475,7 @@
                             domainItem.subProjectList = res.data;
                         } 
                         this.$forceUpdate();
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
             },
             showEndDialog(timeItem) {
                 this.curWorktime = timeItem;
@@ -602,14 +602,14 @@
                     this.$axios.post("/report/delete", {userId: this.user.id, date:this.form.createDate})
                     .then(res => {
                         if(res.code == "ok") {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.success('删除成功');
                             window.location.reload();
                         } else {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.fail('删除失败');
                         }
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 }).catch(() => {});
             },
             changeAllTime() {
@@ -633,14 +633,14 @@
                 this.$axios.post("/report/cancel", {userId: this.user.id, reportIds:ids})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('撤销成功');
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             confirmWorkTime(field) {
@@ -713,10 +713,10 @@
                             this.timeType.push({value:2, label:'下午 - '+t.pm+'小时', hours: t.pm});
                         }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 返回
@@ -756,7 +756,7 @@
                 this.$axios.post("/project/getProjectList", {})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.project = res.data;
                         
                         // if (this.project.length > 0) {
@@ -764,10 +764,10 @@
                         //     this.getTaskList(this.project[0].id);
                         // }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 获取日报
@@ -779,7 +779,7 @@
                 this.$axios.post("/report/getReport", {date: this.form.createDate})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                         var t = res.data.timeType;
                         var timeType=[];
@@ -896,7 +896,7 @@
                             this.canEdit = true;
                         }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
                     if(localStorage.getItem("formVal")) {
@@ -905,7 +905,7 @@
                         this.form = JSON.parse(obj)
                         localStorage.removeItem('formVal')
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 改变时间
@@ -1038,7 +1038,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
             },
 
 
@@ -1053,7 +1053,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
             },
             // 获取维度
             dimension(projectId) {
@@ -1065,7 +1065,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
 
@@ -1081,7 +1081,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
                 }
             },
             //添加工时
@@ -1360,14 +1360,14 @@
                 .then(res => {
                     this.flgLg = true
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
                         this.$router.push("/index");
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);
                     }
-                }).catch(err=> {toast.clear(); this.flgLg = true});
+                }).catch(err=> {this.$toast.clear(); this.flgLg = true});
             },
             //初始化参数
             initWxConfig() {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/search.vue

@@ -68,7 +68,7 @@ export default {
               } else {
                   this.$toast.fail('获取失败:'+res.msg);
               }
-          }).catch(err=> {toast.clear();});
+          }).catch(err=> {this.$toast.clear();});
       },
       back() {
           this.$router.go(-1);

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -299,7 +299,7 @@
                         console.log(this.unreadNum);
                         
                     } 
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
         },
         activated(){

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/msg/index.vue

@@ -59,7 +59,7 @@
                             this.getMessage();
                             this.$router.push('/edit?date='+date);
                         } 
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 } else {
                     var date = item.content; 
                     this.$axios.post("/information/check", {id:item.id
@@ -68,7 +68,7 @@
                         if(res.code == "ok") {
                             this.getMessage()
                         } 
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 }
                 
             },
@@ -94,7 +94,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             onRefresh() {

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/set.vue

@@ -39,16 +39,16 @@
                 this.$axios.post("/user/editPassword", this.form)
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('修改成功,请重新登录');
                         this.$store.commit("updateLogin", false);
                         sessionStorage.removeItem("userInfo");
                         this.$router.push("/login");
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('修改失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             }
         }
     };

+ 9 - 9
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -121,7 +121,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             choseIncharger(value, index) {
                 this.showPickerIncharger = false;
@@ -214,7 +214,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 获取项目
@@ -281,7 +281,7 @@
                         this.isUpLoading = false
                     }
                 }).catch(err=> {
-                    toast.clear();
+                    this.$toast.clear();
                     this.isDownLoading = false
                     this.isUpLoading = false
                 });
@@ -412,17 +412,17 @@
                     this.$axios.post("/project/editProject", formData, config)
                     .then(res => {
                         if(res.code == "ok") {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.success(this.form.id==null?'新增成功':'修改成功');
                             this.list = [];
                             this.page = 1;
                             this.getProject();
                             this.yanjiuzx()
                         } else {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.fail(this.form.id==null?'新增失败':'修改失败');
                         }
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 } else {
                     this.show = false;
                     this.yanjiuzx()
@@ -443,16 +443,16 @@
                     this.$axios.post("/project/deleteProject", {id: this.list[i].id})
                     .then(res => {
                         if(res.code == "ok") {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.success('删除成功');
                             this.list = [];
                             this.page = 1;
                             this.getProject();
                         } else {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.fail(res.msg);
                         }
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 }).catch(() => {});
             },
 

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/register/index.vue

@@ -97,14 +97,14 @@
                 this.$axios.post("/user/insertCompany", this.form)
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('注册成功');
                         this.$router.push("/login");
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             
             back() {

+ 9 - 9
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/department_list.vue

@@ -141,13 +141,13 @@
                 this.$axios.post("/report/listByStateDepartment", {state:0})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             approve(id, item) {
@@ -166,15 +166,15 @@
                 this.$axios.post("/report/approve", {id: id , date: this.nowTime, reportIds: ids, isDepartment: 1})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('审核成功');
                         
                         that.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             deny(id, item) {
@@ -192,14 +192,14 @@
                 this.$axios.post("/report/deny", {id: id , date: this.nowTime, reportIds: ids, isDepartment: 1})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('驳回成功');
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             }
         },
 

+ 9 - 9
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -169,13 +169,13 @@
                 this.$axios.post("/report/listByState", {state: 0})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             approve(id, item) {
@@ -194,19 +194,19 @@
                 this.$axios.post("/report/approve", {id: id , date: this.nowTime, reportIds: ids})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         setTimeout(function() {
                             that.$toast.success('审核成功');
                         }, 300);
                         
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         setTimeout(function() {
                             that.$toast.fail('审核失败');
                         }, 300);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             showDenyDialog(id,i,date, item) {
@@ -232,7 +232,7 @@
                 this.$axios.post("/report/deny", this.denyForm)
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         setTimeout(function() {
                             that.$toast.success(that.denyForm.i==0?'驳回成功':'撤销成功');
                         }, 300);
@@ -240,13 +240,13 @@
                         this.getReport();
                         this.denyReasonDialog = false;
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         setTimeout(function() {
                             that.$toast.fail(that.denyForm.i==0?'驳回失败':'撤销失败');
                         }, 300);
                         
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             }
         },
 

+ 9 - 9
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/profession_list.vue

@@ -139,13 +139,13 @@
                 this.$axios.post("/report/listByStateProfession", {state:0})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             approve(id, item) {
@@ -163,14 +163,14 @@
                 this.$axios.post("/report/approve", {id: id , date: this.nowTime, reportIds: ids})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('审核成功');
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('审核失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             deny(id,i, item) {
@@ -188,14 +188,14 @@
                 this.$axios.post("/report/deny", {id: id , date: this.nowTime, reportIds: ids})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success(i==0?'驳回成功':'撤销成功');
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(i==0?'驳回失败':'撤销失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             }
         },
 

+ 25 - 25
fhKeeper/formulahousekeeper/timesheet_h5/src/views/test/list.vue

@@ -382,7 +382,7 @@
                     } else {
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             updateTxt() {
@@ -399,7 +399,7 @@
                     } else {
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             sea() {
                 console.log(this.userName.length)
@@ -458,7 +458,7 @@
                             domainItem.taskGroups = res.data;
                         } 
                         this.$forceUpdate();
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
             },
             getSubprojectList(domainItem) {
                 domainItem.subProjectList = [];
@@ -468,7 +468,7 @@
                             domainItem.subProjectList = res.data;
                         } 
                         this.$forceUpdate();
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
             },
             showEndDialog(timeItem) {
                 this.curWorktime = timeItem;
@@ -595,14 +595,14 @@
                     this.$axios.post("/report/delete", {userId: this.user.id, date:this.form.createDate})
                     .then(res => {
                         if(res.code == "ok") {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.success('删除成功');
                             window.location.reload();
                         } else {
-                            toast.clear();
+                            this.$toast.clear();
                             this.$toast.fail('删除失败');
                         }
-                    }).catch(err=> {toast.clear();});
+                    }).catch(err=> {this.$toast.clear();});
                 }).catch(() => {});
             },
             changeAllTime() {
@@ -626,14 +626,14 @@
                 this.$axios.post("/report/cancel", {userId: this.user.id, reportIds:ids})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success('撤销成功');
                         this.getReport();
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             confirmWorkTime(field) {
@@ -706,10 +706,10 @@
                             this.timeType.push({value:2, label:'下午 - '+t.pm+'小时', hours: t.pm});
                         }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail(res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 返回
@@ -749,7 +749,7 @@
                 this.$axios.post("/project/getProjectList", {})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.project = res.data;
                         
                         // if (this.project.length > 0) {
@@ -757,10 +757,10 @@
                         //     this.getTaskList(this.project[0].id);
                         // }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 获取日报
@@ -772,7 +772,7 @@
                 this.$axios.post("/report/getReport", {date: this.form.createDate})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                         var t = res.data.timeType;
                         var timeType=[];
@@ -889,7 +889,7 @@
                             this.canEdit = true;
                         }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
                     if(localStorage.getItem("formVal")) {
@@ -898,7 +898,7 @@
                         this.form = JSON.parse(obj)
                         localStorage.removeItem('formVal')
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
             // 改变时间
@@ -1031,7 +1031,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
             },
 
 
@@ -1046,7 +1046,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
             },
             // 获取维度
             dimension(projectId) {
@@ -1058,7 +1058,7 @@
                     } else {
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
 
 
@@ -1074,7 +1074,7 @@
                             } else {
                                 this.$toast.fail('获取失败');
                             }
-                        }).catch(err=> {toast.clear();});
+                        }).catch(err=> {this.$toast.clear();});
                 }
             },
             //添加工时
@@ -1358,14 +1358,14 @@
                 this.$axios.post("/report/editReport", formData)
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
                         this.$router.push("/index");
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             //初始化参数
             initWxConfig() {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/timetool/timetool.vue

@@ -255,7 +255,7 @@ export default {
                     } else {
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
     }
   },
   mounted() {

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/calendar.vue

@@ -113,14 +113,14 @@
                 this.$axios.post("/report/getReportFillStatus", {startDate: this.format(this.minDate), endDate:this.format(this.maxDate), userId: this.user.id})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                         
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败');
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
         },
 

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

@@ -170,7 +170,7 @@
                 this.$axios.post("/report/getReportList", {date: this.nowTime})
                 .then(res => {
                     if(res.code == "ok") {
-                        toast.clear();
+                        this.$toast.clear();
                         this.report = res.data;
                         //计算状态
                         for (var i=0;i<this.report.length; i++) {
@@ -180,10 +180,10 @@
                             }
                         }
                     } else {
-                        toast.clear();
+                        this.$toast.clear();
                         this.$toast.fail('获取失败:'+res.msg);
                     }
-                }).catch(err=> {toast.clear();});
+                }).catch(err=> {this.$toast.clear();});
             },
             // 点击编辑
             editor(item) {