Skip to content

Commit

Permalink
显示完成时间
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jan 7, 2022
1 parent 5a64cb2 commit 4e8cc36
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/assets/js/pages/manage/components/TaskRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
:content="item.end_at">
<div @click="openTask(item)">{{expiresFormat(item.end_at)}}</div>
</ETooltip>
<div v-else-if="showCompleteAt && item.complete_at" :title="item.complete_at">{{completeAtFormat(item.complete_at)}}</div>
</Col>
</Row>
<TaskRow
Expand Down Expand Up @@ -167,6 +168,10 @@ export default {
type: String,
default: 'default'
},
showCompleteAt: {
type: Boolean,
default: false
},
},
data() {
return {
Expand Down Expand Up @@ -302,6 +307,15 @@ export default {
}
return this.formatTime(date)
},
completeAtFormat(date) {
let time = Math.round($A.Date(date).getTime() / 1000);
if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
return $A.formatDate('m-d H:i', time)
} else {
return $A.formatDate('Y-m-d', time)
}
}
}
}
</script>

0 comments on commit 4e8cc36

Please sign in to comment.