|
@@ -3,7 +3,9 @@
|
|
|
<div class="node-wrap">
|
|
|
<div class="node-wrap-box" :class="[disabled ? 'node-wrap-box--disabled' : '', `node-wrap-box--${nodeConfig.local_status}`]">
|
|
|
<div class="title bg-red-600">
|
|
|
- <el-icon class="icon"><SvgIcon icon-class="route" /></el-icon>
|
|
|
+ <el-icon class="icon">
|
|
|
+ <SvgIcon icon-class="route" />
|
|
|
+ </el-icon>
|
|
|
<span v-show="!isEditTitle" class="title_label" @click="editTitle('box_nodeTitle')"
|
|
|
>{{ nodeConfig.nodeName }}<el-icon v-if="!disabled" class="edit-icon"><edit /></el-icon
|
|
|
></span>
|
|
@@ -16,7 +18,9 @@
|
|
|
@blur="saveTitle"
|
|
|
@keyup.enter="saveTitle"
|
|
|
></el-input>
|
|
|
- <el-icon v-if="!disabled" class="close" @click.stop="delNode()"><close /></el-icon>
|
|
|
+ <el-icon v-if="!disabled" class="close" @click.stop="delNode()">
|
|
|
+ <close />
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
|
<div class="content" @click="show">
|
|
|
<div v-html="toText(nodeConfig)" />
|
|
@@ -27,8 +31,11 @@
|
|
|
<template #header>
|
|
|
<div class="node-wrap-drawer__title">
|
|
|
<label v-show="!isEditTitle" @click="editTitle('nodeTitle')"
|
|
|
- >{{ form.nodeName }}<el-icon class="node-wrap-drawer__title-edit"><edit /></el-icon
|
|
|
- ></label>
|
|
|
+ >{{ form.nodeName }}
|
|
|
+ <el-icon class="node-wrap-drawer__title-edit">
|
|
|
+ <edit />
|
|
|
+ </el-icon>
|
|
|
+ </label>
|
|
|
<el-input
|
|
|
v-show="isEditTitle"
|
|
|
ref="nodeTitle"
|
|
@@ -51,8 +58,11 @@
|
|
|
v-show="!route.local_isEdit"
|
|
|
class="inline-flex items-center cursor-pointer text-[14px]"
|
|
|
@click="editRouteTitle(route, index)"
|
|
|
- >{{ route.nodeName }}<el-icon class="le-link ml-2"><edit /></el-icon
|
|
|
- ></label>
|
|
|
+ >{{ route.nodeName }}
|
|
|
+ <el-icon class="le-link ml-2">
|
|
|
+ <edit />
|
|
|
+ </el-icon>
|
|
|
+ </label>
|
|
|
<el-input
|
|
|
v-show="route.local_isEdit"
|
|
|
ref="routeNodeName"
|
|
@@ -88,7 +98,9 @@
|
|
|
<div class="header">
|
|
|
<span>条件组 {{ conditionGroupIdx + 1 }}</span>
|
|
|
<div @click="deleteConditionGroup(route, conditionGroupIdx)">
|
|
|
- <el-icon class="branch-delete-icon"><Delete /></el-icon>
|
|
|
+ <el-icon class="branch-delete-icon">
|
|
|
+ <Delete />
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -104,7 +116,9 @@
|
|
|
<div class="condition-relation">
|
|
|
<span>{{ idx === 0 ? '当' : '且' }}</span>
|
|
|
<div v-if="conditionGroup.length > 1" @click="deleteConditionList(conditionGroup, idx)">
|
|
|
- <el-icon class="branch-delete-icon"><Delete /></el-icon>
|
|
|
+ <el-icon class="branch-delete-icon">
|
|
|
+ <Delete />
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="condition-content">
|
|
@@ -148,14 +162,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <el-button style="width: 100%" type="info" icon="Plus" text bg @click="addConditionGroup(route)"> 添加条件组 </el-button>
|
|
|
+ <el-button style="width: 100%" type="info" icon="Plus" text bg @click="addConditionGroup(route)"> 添加条件组</el-button>
|
|
|
</el-card>
|
|
|
<!-- <el-form-item label="选择要抄送的人员">
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="">
|
|
|
- <el-checkbox v-model="form.allowSelection" label="允许发起人自选抄送人"></el-checkbox>
|
|
|
- </el-form-item>-->
|
|
|
- <el-button style="width: 100%" type="primary" icon="Plus" @click="addRouteNode"> 添加路由分支 </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-checkbox v-model="form.allowSelection" label="允许发起人自选抄送人"></el-checkbox>
|
|
|
+ </el-form-item>-->
|
|
|
+ <el-button style="width: 100%" type="primary" icon="Plus" @click="addRouteNode"> 添加路由分支</el-button>
|
|
|
</el-form>
|
|
|
</el-main>
|
|
|
<el-footer>
|
|
@@ -182,7 +196,10 @@ export default {
|
|
|
},
|
|
|
inject: ['getRootConfig'],
|
|
|
props: {
|
|
|
- modelValue: { type: Object, default: () => {} },
|
|
|
+ modelValue: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
+ },
|
|
|
disabled: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
@@ -227,12 +244,27 @@ export default {
|
|
|
if (!data) return
|
|
|
// validNodeList.push({ nodeKey: data.nodeKey, nodeName: data.nodeName, type: data.type })
|
|
|
validNodeList.push(data)
|
|
|
+ // 处理条件路由节点(type:4): conditionNodes[]
|
|
|
if (data.conditionNodes && Array.isArray(data.conditionNodes)) {
|
|
|
// 条件分支节点
|
|
|
data.conditionNodes.forEach(v => {
|
|
|
fn(v.childNode)
|
|
|
})
|
|
|
}
|
|
|
+ // 处理并行路由节点(type:8): parallelNodes[]
|
|
|
+ if (data.parallelNodes && Array.isArray(data.parallelNodes)) {
|
|
|
+ // 条件分支节点
|
|
|
+ data.parallelNodes.forEach(v => {
|
|
|
+ fn(v.childNode)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 处理包容路由节点(type:9): inclusiveNodes[]
|
|
|
+ if (data.inclusiveNodes && Array.isArray(data.inclusiveNodes)) {
|
|
|
+ // 条件分支节点
|
|
|
+ data.inclusiveNodes.forEach(v => {
|
|
|
+ fn(v.childNode)
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
if (data.childNode) {
|
|
|
// 正常子节点
|
|
@@ -240,7 +272,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
const rootConfig = this.getRootConfig()
|
|
|
+ console.error(rootConfig, 'rootConfig')
|
|
|
fn(rootConfig)
|
|
|
+ console.warn(validNodeList, 'validNodeList')
|
|
|
// 只允许选择审核人
|
|
|
this.validNodeList = validNodeList.filter(v => v.type === 1)
|
|
|
},
|
|
@@ -352,6 +386,7 @@ export default {
|
|
|
color: #646a73;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+
|
|
|
.condition-group-editor {
|
|
|
user-select: none;
|
|
|
border-radius: 4px;
|
|
@@ -362,6 +397,7 @@ export default {
|
|
|
.branch-delete-icon {
|
|
|
font-size: 18px;
|
|
|
cursor: pointer;
|
|
|
+
|
|
|
&:hover {
|
|
|
color: var(--el-color-danger);
|
|
|
}
|
|
@@ -445,6 +481,7 @@ export default {
|
|
|
padding: 12px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.route-header {
|
|
|
}
|
|
|
</style>
|