|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
useFormSize,
|
|
|
|
|
} from 'element-plus'
|
|
|
|
|
import { FlowNode, ErrorInfo } from './index'
|
|
|
|
|
import { type Component, computed, inject, nextTick, ref } from 'vue'
|
|
|
|
|
import { type Component, computed, inject, nextTick, ref, onUnmounted } from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
List,
|
|
|
|
|
Stamp,
|
|
|
|
@ -63,7 +63,6 @@
|
|
|
|
|
delNode: (node: FlowNode) => void
|
|
|
|
|
openPenal: (node: FlowNode) => void
|
|
|
|
|
}>('nodeHooks')!
|
|
|
|
|
const previousId = localStorage.getItem('previousId')
|
|
|
|
|
const onOpenPenal = () => {
|
|
|
|
|
if ($props.readOnly) return
|
|
|
|
|
openPenal(node.value)
|
|
|
|
@ -81,7 +80,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const tooltiptext = ref('')
|
|
|
|
|
const disabled = ref(true)
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
const Rdata = (taged) => {
|
|
|
|
|
let data = ''
|
|
|
|
|
switch (taged) {
|
|
|
|
@ -106,34 +105,46 @@
|
|
|
|
|
}
|
|
|
|
|
return data
|
|
|
|
|
}
|
|
|
|
|
if (previousId == node.value.id) {
|
|
|
|
|
console.log(node.value, 11111)
|
|
|
|
|
disabled.value = false
|
|
|
|
|
node.value.setInfo
|
|
|
|
|
tooltiptext.value = `
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
localStorage.setItem('previousId', '')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const previousId = ref('')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
previousId.value = localStorage.getItem('previousId')
|
|
|
|
|
if (previousId.value == node.value.id) {
|
|
|
|
|
visible.value = true
|
|
|
|
|
tooltiptext.value = `
|
|
|
|
|
<p>处理人:${node.value.setInfo.userName}</p>
|
|
|
|
|
<p>结果:${Rdata(node.value.setInfo.taged)}</p>
|
|
|
|
|
<p>处理时间:${node.value.setInfo.tagedTime}</p>
|
|
|
|
|
<p>备注:${node.value.setInfo.description}</p>
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 500)
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="node-box">
|
|
|
|
|
<!-- @click="onOpenPenal()" -->
|
|
|
|
|
|
|
|
|
|
<el-tooltip
|
|
|
|
|
class="item"
|
|
|
|
|
effect="dark"
|
|
|
|
|
:content="tooltiptext"
|
|
|
|
|
placement="right"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
:visible="visible"
|
|
|
|
|
raw-content
|
|
|
|
|
>
|
|
|
|
|
<el-card
|
|
|
|
|
shadow="always"
|
|
|
|
|
@click="onOpenPenal()"
|
|
|
|
|
:class="['node', { 'error-node': $props.errorInfo.showError }]"
|
|
|
|
|
:class="[
|
|
|
|
|
'node',
|
|
|
|
|
{ 'error-node': $props.errorInfo.showError },
|
|
|
|
|
previousId == node.id ? 'CurrentType' : '',
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<el-tooltip placement="top-start">
|
|
|
|
|
<template #content>
|
|
|
|
@ -246,9 +257,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
&:not(.error-node) {
|
|
|
|
|
box-shadow: 0 0 5px 0 var(--el-color-primary);
|
|
|
|
|
}
|
|
|
|
|
// &:not(.error-node) {
|
|
|
|
|
// box-shadow: 0 0 5px 0 var(--el-color-primary);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
.node-close {
|
|
|
|
|
display: block;
|
|
|
|
@ -275,7 +286,9 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.CurrentType {
|
|
|
|
|
box-shadow: 0 0 5px 0 var(--el-color-primary);
|
|
|
|
|
}
|
|
|
|
|
.arrow {
|
|
|
|
|
/* &:before{
|
|
|
|
|
content: '';
|
|
|
|
|