|
@@ -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() {
|