fix:coding497、499

This commit is contained in:
shijing 2024-10-08 13:52:50 +08:00
parent 1dc5710f84
commit 12133a3b37
2 changed files with 33 additions and 1 deletions

View File

@ -610,6 +610,7 @@ export default {
that.$API.wf.ticket.create.req(ticket).then((res) => {
that.isSaveing = false;
that.ticketDialog = false;
that.visible = false;
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
@ -628,7 +629,10 @@ export default {
console.log('res',res);
this.test_file = res.path;
},
handleEditSuccess() {},
//
handleEditSuccess() {
this.getMlogItem();
},
//
setFilters(filters) {
this.selectionFilters = filters;

View File

@ -72,6 +72,11 @@
prop="handle_user_name"
width="80"
></el-table-column>
<el-table-column label="保温剩余时间" v-if="mgroupName=='黑化'||mgroupName=='退火'">
<template #default="scope">
{{ getRemaTime(scope.row) }}
</template>
</el-table-column>
<el-table-column
label="开始时间"
prop="work_start_time"
@ -208,6 +213,29 @@ export default {
});
},
methods: {
getRemaTime(row){
if(row.work_start_time !== null){
let times = 0;
let nowTime = new Date().getTime();
let startTiem = new Date(row.work_start_time).getTime();
console.log('nowTime',nowTime)
console.log('startTiem',startTiem)
let remaTime = nowTime - startTiem;
console.log('remaTime',remaTime)
let temp = Math.floor(remaTime/1000*60);
console.log('temp',temp)
if(remaTime>0&&row.reminder_interval_list[0]){
if(temp<row.reminder_interval_list[0]){
times = row.reminder_interval_list[0]-temp;
}else{
return '/';
}
return times
}else{
return '/';
}
}
},
detailClose() {
this.dialog.detail = false;
this.$refs.table.refresh();