forked from ccsens_fe/tall-mui-3
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
785 B
34 lines
785 B
<template>
|
|
<view v-if="realDuration && planDuration">
|
|
<!-- 任务时长延迟插件 -->
|
|
<!-- 超时 -->
|
|
<span class="font-bold text-green-500" v-if="realDuration - 0 > planDuration - 0">
|
|
+{{ $t.time.formatDuration(realDuration - planDuration) }}
|
|
</span>
|
|
<!-- 延时 -->
|
|
<span class="font-bold text-red-500" v-if="realDuration - 0 < planDuration - 0">
|
|
-{{ $t.time.formatDuration(planDuration - realDuration) }}
|
|
</span>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'p-task-duration-delay',
|
|
props: {
|
|
task: {
|
|
type: Object,
|
|
default: () => {},
|
|
},
|
|
},
|
|
|
|
computed: {
|
|
realDuration() {
|
|
return this.task.realDuration;
|
|
},
|
|
planDuration() {
|
|
return this.task.planDuration;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|