|
|
@@ -283,9 +283,9 @@ const nodeName = computed({
|
|
|
|
|
|
const nodeTypes = [
|
|
|
{ type: 'start-node', label: '开始', icon: VideoPlay, color: '#67C23A' },
|
|
|
- { type: 'approval-node', label: '审批', icon: User, color: '#409EFF' },
|
|
|
- { type: 'cc-node', label: '抄送', icon: Message, color: '#E6A23C' },
|
|
|
- { type: 'condition-node', label: '条件', icon: Operation, color: '#909399' },
|
|
|
+ { type: 'approval-node', label: '审批节点', icon: User, color: '#409EFF' },
|
|
|
+ { type: 'cc-node', label: '抄送节点', icon: Message, color: '#E6A23C' },
|
|
|
+ { type: 'condition-node', label: '条件节点', icon: Operation, color: '#909399' },
|
|
|
{ type: 'end-node', label: '结束', icon: CircleCheck, color: '#F56C6C' }
|
|
|
]
|
|
|
|
|
|
@@ -352,7 +352,7 @@ function registerNodes() {
|
|
|
class StartNodeModel extends CircleNodeModel {
|
|
|
setAttributes() {
|
|
|
this.r = 30
|
|
|
- this.text.value = '开始'
|
|
|
+ if (!this.text.value) this.text.value = '开始'
|
|
|
}
|
|
|
getNodeStyle() {
|
|
|
const style = super.getNodeStyle()
|
|
|
@@ -373,7 +373,7 @@ function registerNodes() {
|
|
|
this.width = 160
|
|
|
this.height = 60
|
|
|
this.radius = 8
|
|
|
- this.text.value = '审批节点'
|
|
|
+ if (!this.text.value) this.text.value = '审批节点'
|
|
|
}
|
|
|
getNodeStyle() {
|
|
|
const style = super.getNodeStyle()
|
|
|
@@ -390,7 +390,7 @@ function registerNodes() {
|
|
|
this.width = 160
|
|
|
this.height = 60
|
|
|
this.radius = 8
|
|
|
- this.text.value = '抄送节点'
|
|
|
+ if (!this.text.value) this.text.value = '抄送节点'
|
|
|
}
|
|
|
getNodeStyle() {
|
|
|
const style = super.getNodeStyle()
|
|
|
@@ -405,7 +405,7 @@ function registerNodes() {
|
|
|
class ConditionNodeModel extends PolygonNodeModel {
|
|
|
setAttributes() {
|
|
|
this.points = [[60, 0], [120, 40], [60, 80], [0, 40]]
|
|
|
- this.text.value = '条件'
|
|
|
+ if (!this.text.value) this.text.value = '条件'
|
|
|
}
|
|
|
getNodeStyle() {
|
|
|
const style = super.getNodeStyle()
|
|
|
@@ -419,7 +419,7 @@ function registerNodes() {
|
|
|
class EndNodeModel extends CircleNodeModel {
|
|
|
setAttributes() {
|
|
|
this.r = 30
|
|
|
- this.text.value = '结束'
|
|
|
+ if (!this.text.value) this.text.value = '结束'
|
|
|
}
|
|
|
getNodeStyle() {
|
|
|
const style = super.getNodeStyle()
|