|
|
|
@ -18,8 +18,7 @@
|
|
|
|
<el-steps :space="120" finish-status="success" align-center>
|
|
|
|
<el-steps :space="120" finish-status="success" align-center>
|
|
|
|
<template v-if="!isFirstNode">
|
|
|
|
<template v-if="!isFirstNode">
|
|
|
|
<el-step
|
|
|
|
<el-step
|
|
|
|
v-for="step in config.logs"
|
|
|
|
v-for="step in config.logs ? config.logs.slice(0, -1) : []"
|
|
|
|
v-if="(step.flow_node_id !== node.id && step.status !== -1)"
|
|
|
|
|
|
|
|
:title="step.node.name"
|
|
|
|
:title="step.node.name"
|
|
|
|
:status="step.status !== -1 ? 'success' : 'error'"
|
|
|
|
:status="step.status !== -1 ? 'success' : 'error'"
|
|
|
|
icon="el-icon-circle-check"
|
|
|
|
icon="el-icon-circle-check"
|
|
|
|
@ -35,10 +34,14 @@
|
|
|
|
status="wait"
|
|
|
|
status="wait"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #title>
|
|
|
|
<template #title>
|
|
|
|
<div style="max-width: 180px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
|
<el-tooltip class="item" effect="dark" :content="(node.nextNodes && node.nextNodes instanceof Array) ? node.nextNodes.map(i => i.name).toString() : ''" placement="bottom">
|
|
|
|
<span v-for="(nextNode, index) in ((node.nextNodes && node.nextNodes instanceof Array) ? node.nextNodes : [])">{{ index === 0 ? '' : ',' }}{{ nextNode.name }}</span>
|
|
|
|
<div>
|
|
|
|
</div>
|
|
|
|
<div style="max-width: 180px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
|
<div v-if="node.nextNodes">({{ node.nextNodes.length }}种流程)</div>
|
|
|
|
<span v-for="(nextNode, index) in ((node.nextNodes && node.nextNodes instanceof Array) ? node.nextNodes : [])">{{ index === 0 ? '' : ',' }}{{ nextNode.name }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="node.nextNodes">({{ node.nextNodes.length }}种流程)</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-step>
|
|
|
|
</el-step>
|
|
|
|
</el-steps>
|
|
|
|
</el-steps>
|
|
|
|
@ -248,11 +251,13 @@ import { generateRandomString } from '@/utils'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
create,
|
|
|
|
create,
|
|
|
|
deal,
|
|
|
|
deal,
|
|
|
|
fieldConfig, flowList,
|
|
|
|
fieldConfig,
|
|
|
|
|
|
|
|
flowList,
|
|
|
|
preConfig,
|
|
|
|
preConfig,
|
|
|
|
preDeal,
|
|
|
|
preDeal,
|
|
|
|
updateNodeTime,
|
|
|
|
updateNodeTime,
|
|
|
|
view,
|
|
|
|
view,
|
|
|
|
|
|
|
|
rollbackJump
|
|
|
|
} from "@/api/flow";
|
|
|
|
} from "@/api/flow";
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
import { validation, validationName } from "@/utils/validate";
|
|
|
|
import { validation, validationName } from "@/utils/validate";
|
|
|
|
@ -783,7 +788,35 @@ export default {
|
|
|
|
if (this.$route.query.flow_id) {
|
|
|
|
if (this.$route.query.flow_id) {
|
|
|
|
copyForm["temporary_save"] = 0;
|
|
|
|
copyForm["temporary_save"] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
callback = () => (this.isShowAssign = true);
|
|
|
|
callback = () => {
|
|
|
|
|
|
|
|
if (this.isRollbackNode) {
|
|
|
|
|
|
|
|
this.$confirm('是否直接流转至退回人节点', '提示', {
|
|
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
|
|
|
confirmButtonText: '流转至退回人节点',
|
|
|
|
|
|
|
|
cancelButtonText: '重新流转'
|
|
|
|
|
|
|
|
}).then(async _ => {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await rollbackJump({
|
|
|
|
|
|
|
|
id: this.$route.query.flow_id,
|
|
|
|
|
|
|
|
way: 2
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$router.push("/flow/list/todo")
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
console.error(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch(async(action) => {
|
|
|
|
|
|
|
|
if (action === 'cancel') {
|
|
|
|
|
|
|
|
const res = await rollbackJump({
|
|
|
|
|
|
|
|
id: this.$route.query.flow_id,
|
|
|
|
|
|
|
|
way: 1
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.isShowAssign = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.isShowAssign = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -833,7 +866,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
device() {
|
|
|
|
device() {
|
|
|
|
@ -854,6 +887,21 @@ export default {
|
|
|
|
node() {
|
|
|
|
node() {
|
|
|
|
return this.config?.currentNode || {};
|
|
|
|
return this.config?.currentNode || {};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
isRollbackNode() {
|
|
|
|
|
|
|
|
if (this.config.logs && this.config.logs instanceof Array && this.config.logs?.length > 0) {
|
|
|
|
|
|
|
|
if (this.config.logs.at(-1)?.flow_node_id === this.node.id) {
|
|
|
|
|
|
|
|
if (this.config.logs.at(-2)?.hasOwnProperty('status')) {
|
|
|
|
|
|
|
|
return this.config.logs.at(-2).status === -1
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
scriptContent() {
|
|
|
|
scriptContent() {
|
|
|
|
if (this.config?.customModel?.view_js && this.$route.query.flow_id && /\/detail/.test(this.$route.path)) {
|
|
|
|
if (this.config?.customModel?.view_js && this.$route.query.flow_id && /\/detail/.test(this.$route.path)) {
|
|
|
|
return this.config?.customModel?.view_js;
|
|
|
|
return this.config?.customModel?.view_js;
|
|
|
|
|