|
@@ -125,12 +125,20 @@ export default {
|
|
handler(val) {
|
|
handler(val) {
|
|
this.currentNodeKey = val.benTaskNodeKey;
|
|
this.currentNodeKey = val.benTaskNodeKey;
|
|
if (val?.bepTaskProcessXmlContent) {
|
|
if (val?.bepTaskProcessXmlContent) {
|
|
- this.nodeList = getNodeSequence(
|
|
|
|
|
|
+ let nodeSequence = getNodeSequence(
|
|
xmlStr2XmlObj(val.bepTaskProcessXmlContent)
|
|
xmlStr2XmlObj(val.bepTaskProcessXmlContent)
|
|
- )?.filter((item) => item.nodeInfo.localName != "exceptionTask");
|
|
|
|
|
|
+ );
|
|
|
|
+ this.nodeList = nodeSequence
|
|
|
|
+ .slice(0, this.getIndexByNodeId(nodeSequence, this.currentNodeKey))
|
|
|
|
+ ?.filter((item) => item.nodeInfo.localName != "exceptionTask");
|
|
// this.nodeList = getNodeSequence(
|
|
// this.nodeList = getNodeSequence(
|
|
// xmlStr2XmlObj(val.bepTaskProcessXmlContent)
|
|
// xmlStr2XmlObj(val.bepTaskProcessXmlContent)
|
|
- // );
|
|
|
|
|
|
+ // )?.filter((item) => item.nodeInfo.localName != "exceptionTask");
|
|
|
|
+
|
|
|
|
+ //去掉开始和结束节点
|
|
|
|
+ this.nodeList.shift();
|
|
|
|
+ this.nodeList[this.nodeList.length - 1]?.nodeInfo.localName ==
|
|
|
|
+ "endEvent" && this.nodeList.pop();
|
|
console.log(this.nodeList);
|
|
console.log(this.nodeList);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -196,6 +204,10 @@ export default {
|
|
// this.$message.info("取消成功");
|
|
// this.$message.info("取消成功");
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ getIndexByNodeId(nodeSequence, nodeId) {
|
|
|
|
+ return nodeSequence.findIndex((item) => item.nodeId == nodeId);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|