Skip to content

Commit 2a06f67

Browse files
committed
fix:【BPM 工作流】流程预测时,“查看子流程”按钮不支持点击
1 parent 8ef499d commit 2a06f67

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/api/bpm/processInstance/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export type ApprovalNodeInfo = {
4848
status: number
4949
startTime?: Date
5050
endTime?: Date
51+
processInstanceId?: string
5152
candidateUsers?: User[]
5253
tasks: ApprovalTaskInfo[]
5354
}

src/components/DiyEditor/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ watch(
269269
if (!val || selectedComponentIndex.value === -1) {
270270
return
271271
}
272-
// 如果是基础设置页,默认选中的索引改成-1,为了防止删除组件后切换到此页导致报错
272+
// 如果是基础设置页,默认选中的索引改成 -1,为了防止删除组件后切换到此页导致报错
273+
// https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/792
273274
if (props.showTabBar) {
274275
selectedComponentIndex.value = -1
275276
}

src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@
3838
</div>
3939
</div>
4040
<div v-if="activity.nodeType === NodeType.CHILD_PROCESS_NODE">
41-
<el-button type="primary" plain size="small" @click="handleChildProcess(activity)">
41+
<el-button
42+
type="primary"
43+
plain
44+
size="small"
45+
@click="handleChildProcess(activity)"
46+
:disabled="!activity.processInstanceId"
47+
>
4248
查看子流程
4349
</el-button>
4450
</div>
@@ -319,7 +325,9 @@ const handleUserSelectConfirm = (activityId: string, userList: any[]) => {
319325
320326
/** 跳转子流程 */
321327
const handleChildProcess = (activity: any) => {
322-
// TODO @lesan:貌似跳不过去?!
328+
if (!activity.processInstanceId) {
329+
return
330+
}
323331
push({
324332
name: 'BpmProcessInstanceDetail',
325333
query: {

0 commit comments

Comments
 (0)