Browse Source

feat:高亮审批超时的数据

master
buaixuexideshitongxue 2 weeks ago
parent
commit
0fdff5fb2b
  1. 15
      src/components/negative/action-history.vue

15
src/components/negative/action-history.vue

@ -17,7 +17,7 @@
</div>
<div
class="flow-time"
:danger="false"
:danger="shouldHighlight(item)"
>
<span class="second mr-8">用时</span>
<span class="primary">{{
@ -50,6 +50,7 @@
<script setup>
import { formatTimeText } from "@/utils/util";
import moment from 'moment'
import useCatchStore from "@/stores/modules/catch.ts";
const actionHistory = inject('actionHistory')
const negative = inject('negative')
@ -61,7 +62,17 @@ function getConsumingTime(crtTime, index) {
}
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({})
function handleShowDetai(item) {
activeHistory.value = item

Loading…
Cancel
Save