feat: 工作流

This commit is contained in:
wangdan-fit2cloud 2024-06-18 18:53:17 +08:00
parent c74854c325
commit 211733bf4e

View File

@ -48,6 +48,8 @@ const route = useRoute()
const {
params: { id }
} = route as any
let interval: any
const workflowRef = ref()
const loading = ref(false)
@ -84,11 +86,37 @@ function getDetail() {
})
}
/**
* 定时保存
*/
const initInterval = () => {
interval = setInterval(() => {
const obj = {
work_flow: getGraphData()
}
application.asyncPutApplication(id, obj)
}, 60000)
}
/**
* 关闭定时
*/
const closeInterval = () => {
if (interval) {
clearInterval(interval)
}
}
onMounted(() => {
getDetail()
// //
// initInterval()
})
onBeforeUnmount(() => {})
onBeforeUnmount(() => {
//
closeInterval()
})
</script>
<style lang="scss">
.application-workflow {