Browse Source

优化子流程展示

hubin 1 year ago
parent
commit
d14224fd7f

+ 1 - 0
src/assets/icons/call-process.svg

@@ -0,0 +1 @@
+	<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M703.5904 497.4848c35.9936 0 65.9968-30.0032 65.9968-65.9968s-30.0032-65.9968-65.9968-65.9968-59.9808 30.0032-65.9968 65.9968a66.5856 66.5856 0 0 0 65.9968 65.9968zM703.5904 815.488c36.0192 0 65.9968-30.0032 65.9968-65.9968s-30.0032-65.9968-65.9968-65.9968-65.9968 30.0032-65.9968 65.9968 30.0032 65.9968 65.9968 65.9968z" fill="#9260fa" p-id="90441"></path><path d="M850.7392 0H173.2864A173.3376 173.3376 0 0 0 0 173.312v677.4016A173.2864 173.2864 0 0 0 173.2864 1024h677.4272A173.2864 173.2864 0 0 0 1024 850.7136V173.312A173.312 173.312 0 0 0 850.7392 0zM445.6192 707.4816H601.6c17.9968-41.984 59.9808-65.9968 101.9904-65.9968a107.5456 107.5456 0 0 1 108.0064 107.9808 107.5456 107.5456 0 0 1-108.0064 108.0064c-48 0-83.9936-30.0032-101.9904-65.9968h-155.9808a161.3312 161.3312 0 0 1-161.9968-161.9968V293.5808H160.5888V202.3424h335.1552v91.2384h-122.112v11.904c0 35.9936 35.9936 65.9968 71.9872 83.9936H601.6c17.9968-42.0096 59.9808-65.9968 101.9904-65.9968a107.5456 107.5456 0 0 1 108.0064 108.0064 107.52 107.52 0 0 1-108.0064 108.0064c-47.9744 0-83.9936-30.0032-101.9904-65.9968h-155.9808c-29.9776 0-48-5.9904-71.9872-17.9968v179.9936c0 41.984 35.9936 71.9872 71.9872 71.9872z" fill="#9260fa"></path></svg>

+ 3 - 0
src/components/Flow/FlowTypeDot.vue

@@ -38,6 +38,9 @@
 			<template v-else-if="type === 19">
 				<svg-icon icon-class="auto-jump" />
 			</template>
+			<template v-else-if="type === 22">
+				<svg-icon icon-class="call-process" />
+			</template>
 			<template v-else>
 				<svg-icon icon-class="in-progress" />
 			</template>

+ 3 - 3
src/components/scWorkflow/nodeWrap.vue

@@ -15,15 +15,15 @@
 		</template>
 	</branch>
 
+	<!-- 子流程 -->
+	<sub-process v-if="nodeConfig.type == 5" v-model="nodeConfig" :disabled="disabled"></sub-process>
+
 	<!-- 延时处理 -->
 	<delay-process v-if="nodeConfig.type == 6" v-model="nodeConfig" :disabled="disabled"></delay-process>
 
 	<!-- 触发器 -->
 	<trigger v-if="nodeConfig.type == 7" v-model="nodeConfig" :disabled="disabled"></trigger>
 
-	<!-- 子流程 -->
-	<sub-process v-if="nodeConfig.type == 8" v-model="nodeConfig" :disabled="disabled"></sub-process>
-
 	<node-wrap v-if="nodeConfig.childNode" v-model="nodeConfig.childNode" :disabled="disabled"></node-wrap>
 </template>
 

+ 9 - 9
src/components/scWorkflow/nodes/addNode.vue

@@ -20,7 +20,7 @@
 							<p>条件分支</p>
 						</li>
 						<li>
-							<el-icon style="color: #9260fa" @click="addType(8)"><Money /></el-icon>
+							<el-icon style="color: #9260fa" @click="addType(5)"><Money /></el-icon>
 							<p>子流程</p>
 						</li>
 						<li>
@@ -111,6 +111,14 @@ export default {
 					],
 					childNode: this.modelValue
 				}
+			} else if (type === 5) {
+				node = {
+					nodeName: '子流程',
+					nodeKey: getNodeKey(),
+					type: 5,
+					callProcess: undefined, // 设置 id:name  格式
+					childNode: this.modelValue
+				}
 			} else if (type === 6) {
 				node = {
 					nodeName: '延时处理',
@@ -138,14 +146,6 @@ export default {
 					},
 					childNode: this.modelValue
 				}
-			} else if (type === 8) {
-				node = {
-					nodeName: '子流程',
-					nodeKey: getNodeKey(),
-					type: 8,
-					callProcess: undefined, // 设置 id:name  格式
-					childNode: this.modelValue
-				}
 			}
 			this.$emit('update:modelValue', node)
 		}

+ 5 - 2
src/views/approve/components/approvedContent.vue

@@ -72,10 +72,13 @@
 								</div>
 
 								<div v-show="active.type !== 0" class="timeline-box flex-1">
-									<span style="color: #86909c; display: block; margin-bottom: 3px; padding-left: 4px">{{ active.taskName }}</span>
+									<span style="display: block" class="pl-1.5 mb-0">{{ active.taskName }}</span>
+									<span v-if="active.type === 22" class="text-gray-500 pl-1.5 mb-1">
+										调用子流程 [ {{ active.content.callProcess.split(':')[1] }} ]
+									</span>
 									<div class="flex flex-align-center">
 										<div class="timeline-box-user flex-1">
-											<span v-if="active.id" style="padding-left: 4px">{{ active.createBy }}</span>
+											<span v-if="active.id" class="text-gray-500 pl-1.5">{{ active.createBy }}</span>
 											<div style="display: flex; gap: 6px; margin-top: 3px">
 												<FlowNodeAvatar v-for="nodeUser in active.local_nodeUserList" :key="nodeUser.id" :name="nodeUser.name" />
 												<FlowNodeAvatar v-for="nodeRole in active.local_nodeRoleList" :key="nodeRole.id" :name="nodeRole.name">

+ 1 - 1
src/views/approve/launch/ItemDrawer.vue

@@ -23,7 +23,7 @@
 					</template>
 					<template v-else>
 						<div style="padding-bottom: 6px">{{ v.nodeName }}</div>
-						<span v-if="v.type === 8" class="text-gray-500">调用子流程 [ {{ v.callProcess.split(':')[1] }} ]</span>
+						<span v-if="v.type === 5" class="text-gray-500">调用子流程 [ {{ v.callProcess.split(':')[1] }} ]</span>
 						<div v-if="assigneeMap[v.nodeKey]" style="display: flex; align-items: center; gap: 6px; flex-wrap: wrap">
 							<template v-if="assigneeMap[v.nodeKey].type === 1">
 								<el-tooltip v-if="!assigneeMap[v.nodeKey].disabled" content="添加用户" placement="left">