打卡优化

This commit is contained in:
xiezhijun 2021-04-15 11:25:40 +08:00
parent a92941b525
commit 699de4b458
2 changed files with 17 additions and 8 deletions

View File

@ -131,6 +131,7 @@ export default {
visible: false, visible: false,
title: "", title: "",
data: null, data: null,
callback: null,
punchLog: null, punchLog: null,
imageUrl: [], imageUrl: [],
punchLogDetail: [], punchLogDetail: [],
@ -157,8 +158,8 @@ export default {
}, },
commentRules:{}, 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: { methods: {
@ -181,8 +182,10 @@ export default {
return "background:#ffffff;"; return "background:#ffffff;";
} }
}, },
showDialog(data) { showDialog(data, callback) {
this.data = data; this.data = data;
this.callback = callback;
this.commentFlag = false;
this.title = `${data.customerName}`+" "+`${data.logTime}」打卡记录`; this.title = `${data.customerName}`+" "+`${data.logTime}」打卡记录`;
this.getPunchLogById(); this.getPunchLogById();
}, },
@ -220,12 +223,14 @@ export default {
}, },
onClosed() { onClosed() {
this.data = null; this.data = null;
this.punchLog = null, this.callback = null;
this.imageUrl = [], this.punchLog = null;
this.punchLogDetail = [] this.imageUrl = [];
this.punchLogDetail = [];
}, },
clickComment(){ clickComment(){
console.log(this.punchLog.executionScore); //console.log(this.punchLog.executionScore);
this.commentForm = { this.commentForm = {
id: this.punchLog.id, id: this.punchLog.id,
comment: this.punchLog.comment, comment: this.punchLog.comment,
@ -248,6 +253,8 @@ export default {
this.msgSuccess("点评成功"); this.msgSuccess("点评成功");
this.commentVisible = false; this.commentVisible = false;
this.getPunchLogById(); this.getPunchLogById();
this.commentFlag = true;
this.callback && this.callback();
}else{ }else{
this.msgSuccess("点评失败"); this.msgSuccess("点评失败");
} }

View File

@ -543,7 +543,9 @@ export default {
.catch(function () {}); .catch(function () {});
}, },
showPunchLogDetail(data){ showPunchLogDetail(data){
this.$refs.punchLogDetailRef.showDialog(data); this.$refs.punchLogDetailRef.showDialog(data,() => {
this.getList();
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {