|
@@ -32,7 +32,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template #durationSlot="scope">
|
|
|
- <div>{{ formatTime(scope.row.duration) }}</div>
|
|
|
+ <div>{{ format_milliseconds(scope.row.duration) }}</div>
|
|
|
</template>
|
|
|
|
|
|
<template #actionSlot="scope">
|
|
@@ -52,6 +52,7 @@
|
|
|
import { processTaskPageMyApplicationApi } from '@/api/flow/processTask'
|
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
import { useTablePage } from '@/hooks/useTablePage'
|
|
|
+import { format_milliseconds } from '@/utils'
|
|
|
import MessageDetail from './detail.vue'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
const route = useRoute()
|
|
@@ -75,25 +76,6 @@ const forms = ref([
|
|
|
}
|
|
|
])
|
|
|
|
|
|
-function formatTime(milliseconds: any) {
|
|
|
- let timeString = ''
|
|
|
- if (milliseconds) {
|
|
|
- let hours = Math.floor(milliseconds / 3600000)
|
|
|
- let minutes = Math.floor((milliseconds % 3600000) / 60000)
|
|
|
- let seconds = Math.floor((milliseconds % 60000) / 1000)
|
|
|
- if (hours > 0) {
|
|
|
- timeString += hours + '小时 '
|
|
|
- }
|
|
|
- if (minutes > 0) {
|
|
|
- timeString += minutes + '分钟 '
|
|
|
- }
|
|
|
- if (seconds > 0) {
|
|
|
- timeString += seconds + '秒'
|
|
|
- }
|
|
|
- }
|
|
|
- return timeString
|
|
|
-}
|
|
|
-
|
|
|
// table列表数据请求
|
|
|
const queryList = async () => {
|
|
|
const { options, searchParams } = tableOpts
|