显示完成时间
This commit is contained in:
parent
5a64cb2323
commit
4e8cc36d3a
@ -125,6 +125,7 @@
|
|||||||
:content="item.end_at">
|
:content="item.end_at">
|
||||||
<div @click="openTask(item)">{{expiresFormat(item.end_at)}}</div>
|
<div @click="openTask(item)">{{expiresFormat(item.end_at)}}</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
|
<div v-else-if="showCompleteAt && item.complete_at" :title="item.complete_at">{{completeAtFormat(item.complete_at)}}</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<TaskRow
|
<TaskRow
|
||||||
@ -167,6 +168,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'default'
|
default: 'default'
|
||||||
},
|
},
|
||||||
|
showCompleteAt: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -302,6 +307,15 @@ export default {
|
|||||||
}
|
}
|
||||||
return this.formatTime(date)
|
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>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user