fix:日志提交时若无结束时间,则获取服务器当前时间,更新后再提交日志
This commit is contained in:
parent
3d53796fa5
commit
6981147670
|
@ -96,4 +96,10 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
servertime: {
|
||||
name: "获取服务器时间",
|
||||
req: async function () {
|
||||
return await http.get(`${config.API_URL}/develop/server_time/`);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -933,13 +933,15 @@ export default {
|
|||
mlogSubmit() {
|
||||
let that = this;
|
||||
that.isSaveing = true;
|
||||
let obj = {};
|
||||
if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){
|
||||
obj.work_end_time = that.mlogItem.work_end_time = that.$TOOL.dateFormat1(new Date());
|
||||
obj.handle_date = that.mlogItem.handle_date = that.$TOOL.dateFormat2(new Date());
|
||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
||||
that.submitMlog();
|
||||
});
|
||||
that.$API.bi.servertime.req().then((res) => {
|
||||
let obj = {};
|
||||
obj.work_end_time = res.server_time;
|
||||
obj.handle_date = this.$TOOL.dateFormat2(new Date());
|
||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
||||
that.submitMlog();
|
||||
});
|
||||
})
|
||||
}else{
|
||||
that.submitMlog();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue