From 698114767020328d59caa7fd7e165062ab47b73d Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 11 Sep 2025 15:23:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A5=E5=BF=97=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=97=B6=E8=8B=A5=E6=97=A0=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E8=8E=B7=E5=8F=96=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E6=8F=90=E4=BA=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/bi.js | 6 ++++++ src/views/wpm_bx/mlog_detail.vue | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/api/model/bi.js b/src/api/model/bi.js index 3802307d..6d812d78 100644 --- a/src/api/model/bi.js +++ b/src/api/model/bi.js @@ -96,4 +96,10 @@ export default { }, }, }, + servertime: { + name: "获取服务器时间", + req: async function () { + return await http.get(`${config.API_URL}/develop/server_time/`); + }, + } }; diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index aa827499..754610a7 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -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(); }