|
@@ -3,7 +3,7 @@
|
|
|
<div class="branch-box-wrap">
|
|
|
<div class="branch-box" style="margin-bottom: 15px">
|
|
|
<el-button class="add-branch" color="#626aef" plain round @click="addTerm"> 添加分支 </el-button>
|
|
|
- <div v-for="(item, index) in nodeConfig.parallelNodes" :key="index" class="col-box">
|
|
|
+ <div v-for="(item, index) in nodeConfig.inclusiveNodes" :key="index" class="col-box">
|
|
|
<div class="condition-node">
|
|
|
<div class="condition-node-box">
|
|
|
<div class="auto-judge" @click="show(index)">
|
|
@@ -24,7 +24,7 @@
|
|
|
<div class="content">
|
|
|
<span class="placeholder"> 并行任务(同时进行) </span>
|
|
|
</div>
|
|
|
- <div v-if="index != nodeConfig.parallelNodes.length - 1" class="sort-right" @click.stop="arrTransfer(index)">
|
|
|
+ <div v-if="index != nodeConfig.inclusiveNodes.length - 1" class="sort-right" @click.stop="arrTransfer(index)">
|
|
|
<el-icon><ArrowRight /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -34,8 +34,8 @@
|
|
|
<slot v-if="item.childNode" :node="item"></slot>
|
|
|
<div v-if="index == 0" class="top-left-cover-line"></div>
|
|
|
<div v-if="index == 0" class="bottom-left-cover-line"></div>
|
|
|
- <div v-if="index == nodeConfig.parallelNodes.length - 1" class="top-right-cover-line"></div>
|
|
|
- <div v-if="index == nodeConfig.parallelNodes.length - 1" class="bottom-right-cover-line"></div>
|
|
|
+ <div v-if="index == nodeConfig.inclusiveNodes.length - 1" class="top-right-cover-line"></div>
|
|
|
+ <div v-if="index == nodeConfig.inclusiveNodes.length - 1" class="bottom-right-cover-line"></div>
|
|
|
</div>
|
|
|
<div class="svg-icon-box">
|
|
|
<svg-icon style="font-size: 18px" color="#626aef" icon-class="flow-paraller-branch" />
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
const self = this
|
|
|
this.index = index
|
|
|
this.form = {}
|
|
|
- this.form = _.cloneDeep(self.nodeConfig.parallelNodes[index])
|
|
|
+ this.form = _.cloneDeep(self.nodeConfig.inclusiveNodes[index])
|
|
|
this.drawer = true
|
|
|
},
|
|
|
editTitle() {
|
|
@@ -109,13 +109,13 @@ export default {
|
|
|
this.isEditTitle = false
|
|
|
},
|
|
|
save() {
|
|
|
- this.nodeConfig.parallelNodes[this.index] = this.form
|
|
|
+ this.nodeConfig.inclusiveNodes[this.index] = this.form
|
|
|
this.$emit('update:modelValue', this.nodeConfig)
|
|
|
this.drawer = false
|
|
|
},
|
|
|
addTerm() {
|
|
|
- let len = this.nodeConfig.parallelNodes.length + 1
|
|
|
- this.nodeConfig.parallelNodes.push({
|
|
|
+ let len = this.nodeConfig.inclusiveNodes.length + 1
|
|
|
+ this.nodeConfig.inclusiveNodes.push({
|
|
|
nodeName: '分支' + len,
|
|
|
type: 3,
|
|
|
nodeKey: getNodeKey(),
|
|
@@ -125,30 +125,30 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
delTerm(index) {
|
|
|
- this.nodeConfig.parallelNodes.splice(index, 1)
|
|
|
- if (this.nodeConfig.parallelNodes.length == 1) {
|
|
|
+ this.nodeConfig.inclusiveNodes.splice(index, 1)
|
|
|
+ if (this.nodeConfig.inclusiveNodes.length == 1) {
|
|
|
if (this.nodeConfig.childNode) {
|
|
|
- if (this.nodeConfig.parallelNodes[0].childNode) {
|
|
|
- this.reData(this.nodeConfig.parallelNodes[0].childNode, this.nodeConfig.childNode)
|
|
|
+ if (this.nodeConfig.inclusiveNodes[0].childNode) {
|
|
|
+ this.reData(this.nodeConfig.inclusiveNodes[0].childNode, this.nodeConfig.childNode)
|
|
|
} else {
|
|
|
- this.nodeConfig.parallelNodes[0].childNode = this.nodeConfig.childNode
|
|
|
+ this.nodeConfig.inclusiveNodes[0].childNode = this.nodeConfig.childNode
|
|
|
}
|
|
|
}
|
|
|
- this.$emit('update:modelValue', this.nodeConfig.parallelNodes[0].childNode)
|
|
|
+ this.$emit('update:modelValue', this.nodeConfig.inclusiveNodes[0].childNode)
|
|
|
}
|
|
|
},
|
|
|
// 复制分支
|
|
|
copyTerm(index) {
|
|
|
const self = this
|
|
|
- let len = this.nodeConfig.parallelNodes.length + 1
|
|
|
- const currentNode =_.cloneDeep(self.nodeConfig.parallelNodes[index])
|
|
|
+ let len = this.nodeConfig.inclusiveNodes.length + 1
|
|
|
+ const currentNode =_.cloneDeep(self.nodeConfig.inclusiveNodes[index])
|
|
|
const item = {
|
|
|
...currentNode,
|
|
|
nodeKey: getNodeKey(),
|
|
|
nodeName: currentNode.nodeName + '-Copy',
|
|
|
priorityLevel: len
|
|
|
}
|
|
|
- this.nodeConfig.parallelNodes.push(item)
|
|
|
+ this.nodeConfig.inclusiveNodes.push(item)
|
|
|
this.$emit('update:modelValue', this.nodeConfig)
|
|
|
},
|
|
|
reData(data, addData) {
|
|
@@ -159,8 +159,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
arrTransfer(index, type = 1) {
|
|
|
- this.nodeConfig.parallelNodes[index] = this.nodeConfig.parallelNodes.splice(index + type, 1, this.nodeConfig.parallelNodes[index])[0]
|
|
|
- this.nodeConfig.parallelNodes.map((item, index) => {
|
|
|
+ this.nodeConfig.inclusiveNodes[index] = this.nodeConfig.inclusiveNodes.splice(index + type, 1, this.nodeConfig.inclusiveNodes[index])[0]
|
|
|
+ this.nodeConfig.inclusiveNodes.map((item, index) => {
|
|
|
item.priorityLevel = index + 1
|
|
|
})
|
|
|
this.$emit('update:modelValue', this.nodeConfig)
|