Преглед на файлове

处理耗时优化调整

hubin преди 1 година
родител
ревизия
86f5f94877
променени са 3 файла, в които са добавени 10 реда и са изтрити 19 реда
  1. 5 0
      src/views/approve/approved/index.vue
  2. 0 19
      src/views/approve/myApplication/index.vue
  3. 5 0
      src/views/approve/myReceived/index.vue

+ 5 - 0
src/views/approve/approved/index.vue

@@ -31,6 +31,10 @@
 					<el-tag v-if="scope.row.instanceState === 5" size="small" type="warning" effect="plain">强制终止</el-tag>
 				</template>
 
+				<template #durationSlot="scope">
+					<div>{{ format_milliseconds(scope.row.duration) }}</div>
+				</template>
+
 				<template #actionSlot="scope">
 					<el-tooltip content="查看" placement="bottom" effect="light">
 						<el-icon class="ibt0" @click="openDetail(scope.row)">
@@ -48,6 +52,7 @@
 import { processTaskPageApprovedApi } 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()

+ 0 - 19
src/views/approve/myApplication/index.vue

@@ -76,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

+ 5 - 0
src/views/approve/myReceived/index.vue

@@ -31,6 +31,10 @@
 					<el-tag v-if="scope.row.instanceState === 5" size="small" type="warning" effect="plain">强制终止</el-tag>
 				</template>
 
+				<template #durationSlot="scope">
+					<div>{{ format_milliseconds(scope.row.duration) }}</div>
+				</template>
+
 				<template #actionSlot="scope">
 					<el-tooltip content="查看" placement="bottom" effect="light">
 						<el-icon class="ibt0" @click="openDetail(scope.row)">
@@ -48,6 +52,7 @@
 import { processTaskPageMyReceivedApi } 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()