From 699de4b4583f86fde4972f4a2fb694cf2125723d Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Thu, 15 Apr 2021 11:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PunchLog/PunchLogDetail/index.vue | 21 ++++++++++++------- .../src/views/custom/wxUserLog/index.vue | 4 +++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/stdiet-ui/src/components/PunchLog/PunchLogDetail/index.vue b/stdiet-ui/src/components/PunchLog/PunchLogDetail/index.vue index 50a6909b1..207a4c17a 100644 --- a/stdiet-ui/src/components/PunchLog/PunchLogDetail/index.vue +++ b/stdiet-ui/src/components/PunchLog/PunchLogDetail/index.vue @@ -131,6 +131,7 @@ export default { visible: false, title: "", data: null, + callback: null, punchLog: null, imageUrl: [], punchLogDetail: [], @@ -157,8 +158,8 @@ export default { }, commentRules:{}, - scoreArray:[0.5,1,1.5,2,2.5,3,3.5,4,4.5,5] - + scoreArray:[0.5,1,1.5,2,2.5,3,3.5,4,4.5,5], + commentFlag: false, //是否更新了点评 }; }, methods: { @@ -181,8 +182,10 @@ export default { return "background:#ffffff;"; } }, - showDialog(data) { + showDialog(data, callback) { this.data = data; + this.callback = callback; + this.commentFlag = false; this.title = `「${data.customerName}`+" "+`${data.logTime}」打卡记录`; this.getPunchLogById(); }, @@ -220,12 +223,14 @@ export default { }, onClosed() { this.data = null; - this.punchLog = null, - this.imageUrl = [], - this.punchLogDetail = [] + this.callback = null; + this.punchLog = null; + this.imageUrl = []; + this.punchLogDetail = []; + }, clickComment(){ - console.log(this.punchLog.executionScore); + //console.log(this.punchLog.executionScore); this.commentForm = { id: this.punchLog.id, comment: this.punchLog.comment, @@ -248,6 +253,8 @@ export default { this.msgSuccess("点评成功"); this.commentVisible = false; this.getPunchLogById(); + this.commentFlag = true; + this.callback && this.callback(); }else{ this.msgSuccess("点评失败"); } diff --git a/stdiet-ui/src/views/custom/wxUserLog/index.vue b/stdiet-ui/src/views/custom/wxUserLog/index.vue index 6783e9fa4..b1c034ccd 100644 --- a/stdiet-ui/src/views/custom/wxUserLog/index.vue +++ b/stdiet-ui/src/views/custom/wxUserLog/index.vue @@ -543,7 +543,9 @@ export default { .catch(function () {}); }, showPunchLogDetail(data){ - this.$refs.punchLogDetailRef.showDialog(data); + this.$refs.punchLogDetailRef.showDialog(data,() => { + this.getList(); + }); }, /** 导出按钮操作 */ handleExport() {