Compare commits

...

2 Commits

  1. 17
      src/views/work/Done.vue
  2. 21
      src/views/work/Query.vue
  3. 16
      src/views/work/Todo.vue

17
src/views/work/Done.vue

@ -161,7 +161,7 @@ import { getDones } from "@/api/work";
import { getMailFlowDetail } from "@/api/mail";
import { useDictData } from "@/hooks/useDictOptions";
import { useDictOptions } from '@/hooks/useDictOptions'
import { onMounted, onUnmounted } from 'vue'
import useMailStore from "@/stores/modules/mail";
import { getDictLable, formatTimeText, getFlowTagType } from "@/utils/util";
import { ref, reactive, watchEffect } from "vue";
@ -201,6 +201,21 @@ function handleMail(row) {
activeWorkId.value = row.id
}
let timeClock: any = null
const updateCountdown = (second: number) => {
dones.value.forEach((item: any) => {
if (item.flowLimitedRemainingTime > 0) {
item.flowLimitedRemainingTime -= 1;
}
});
};
onMounted(() => {
timeClock = setInterval(updateCountdown, 1000)
})
onUnmounted(() => {
clearInterval(timeClock);
});
function getList() {
getDones(query.value).then((data) => {
dones.value = data.records;

21
src/views/work/Query.vue

@ -200,12 +200,12 @@ import { useDictOptions } from '@/hooks/useDictOptions'
import { deptLists } from '@/api/org/department'
import { labelLists } from '@/api/org/label'
import { getFlowNodes } from '@/api/org/flowNode'
import { ref, reactive, watch } from "vue";
import { ElMessage, ElTable } from "element-plus";
import { ref, reactive, watch, onMounted, onUnmounted } from "vue";
import { ElTable } from "element-plus";
import { getToken } from '@/utils/auth'
import axios from 'axios'
import { useRouterParamsStore } from "@/stores/modules/routerParams";
import { onBeforeRouteLeave, useRoute } from "vue-router";
import { useRoute } from "vue-router";
const rowKey = "id";
const loading = ref(false)
@ -238,6 +238,21 @@ watch(() => query.value.contactField, (val, prevVal) => {
}
});
let timeClock = null
const updateCountdown = (second: number) => {
form.value.forEach((item: any) => {
if (item.flowLimitedRemainingTime > 0) {
item.flowLimitedRemainingTime -= 1;
}
});
};
onMounted(() => {
timeClock = setInterval(updateCountdown, 1000)
})
onUnmounted(() => {
clearInterval(timeClock);
});
const route = useRoute()
const useRouterParams = useRouterParamsStore()
const loadingOnce = ref(true)

16
src/views/work/Todo.vue

@ -170,6 +170,7 @@ import useMailStore from "@/stores/modules/mail";
import { formatTimeText, getDictLable, getFlowTagType } from "@/utils/util";
import { deptLists } from '@/api/org/department'
import { getFlowNodes } from '@/api/org/flowNode'
import { onMounted, onUnmounted } from 'vue'
const mailStore = useMailStore();
mailStore.getMailCategorys();
const { dictData } = useDictData(["mail_source", "mail_level", "mail_state"]);
@ -208,6 +209,21 @@ function handleMail(row) {
activeWorkType.value = row.workType
}
let timeClock: any = null
const updateCountdown = (second: number) => {
todos.value.forEach((item: any) => {
if (item.flowLimitedRemainingTime > 0) {
item.flowLimitedRemainingTime -= 1;
}
});
};
onMounted(() => {
timeClock = setInterval(updateCountdown, 1000)
})
onUnmounted(() => {
clearInterval(timeClock);
});
function getList() {
getTodos(query.value).then((data) => {
todos.value = data.records;

Loading…
Cancel
Save