|
|
|
@ -17,7 +17,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="flow-time" |
|
|
|
class="flow-time" |
|
|
|
:danger="false" |
|
|
|
:danger="shouldHighlight(item)" |
|
|
|
> |
|
|
|
> |
|
|
|
<span class="second mr-8">用时</span> |
|
|
|
<span class="second mr-8">用时</span> |
|
|
|
<span class="primary">{{ |
|
|
|
<span class="primary">{{ |
|
|
|
@ -50,6 +50,7 @@ |
|
|
|
<script setup> |
|
|
|
<script setup> |
|
|
|
import { formatTimeText } from "@/utils/util"; |
|
|
|
import { formatTimeText } from "@/utils/util"; |
|
|
|
import moment from 'moment' |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
import useCatchStore from "@/stores/modules/catch.ts"; |
|
|
|
|
|
|
|
|
|
|
|
const actionHistory = inject('actionHistory') |
|
|
|
const actionHistory = inject('actionHistory') |
|
|
|
const negative = inject('negative') |
|
|
|
const negative = inject('negative') |
|
|
|
@ -61,7 +62,17 @@ function getConsumingTime(crtTime, index) { |
|
|
|
} |
|
|
|
} |
|
|
|
return moment(crtTime).diff(moment(actionHistory.value[index - 1].crtTime), "seconds") |
|
|
|
return moment(crtTime).diff(moment(actionHistory.value[index - 1].crtTime), "seconds") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const catchStore = useCatchStore(); |
|
|
|
|
|
|
|
// 触发字典加载 |
|
|
|
|
|
|
|
catchStore.getDicts(["approveShouldHighlight"]); |
|
|
|
|
|
|
|
// 在 computed 中通过 store 直接访问 |
|
|
|
|
|
|
|
const highlightKeywords = computed(() => catchStore.dict.approveShouldHighlight || []); |
|
|
|
|
|
|
|
const shouldHighlight = (item) => { |
|
|
|
|
|
|
|
debugger |
|
|
|
|
|
|
|
const keywords = highlightKeywords.value; |
|
|
|
|
|
|
|
const matchKeyword = keywords.some(k => item.actionName?.includes(k.dictLabel)); |
|
|
|
|
|
|
|
return item.duration > 86400 && matchKeyword; |
|
|
|
|
|
|
|
} |
|
|
|
const activeHistory = ref({}) |
|
|
|
const activeHistory = ref({}) |
|
|
|
function handleShowDetai(item) { |
|
|
|
function handleShowDetai(item) { |
|
|
|
activeHistory.value = item |
|
|
|
activeHistory.value = item |
|
|
|
|