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() {
|
mlogSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
let obj = {};
|
|
||||||
if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){
|
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());
|
that.$API.bi.servertime.req().then((res) => {
|
||||||
obj.handle_date = that.mlogItem.handle_date = that.$TOOL.dateFormat2(new Date());
|
let obj = {};
|
||||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
obj.work_end_time = res.server_time;
|
||||||
that.submitMlog();
|
obj.handle_date = this.$TOOL.dateFormat2(new Date());
|
||||||
});
|
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
||||||
|
that.submitMlog();
|
||||||
|
});
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
that.submitMlog();
|
that.submitMlog();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue