fix(hrm): 修复流程数据空值时的渲染异常

针对印章详情和流程详情页面,在缺少流程实例ID时提前返回,避免调用接口产生无效请求和脏数据
This commit is contained in:
2026-07-07 14:39:33 +08:00
parent 9689d152e0
commit 649d9fdfcc
3 changed files with 107 additions and 0 deletions

View File

@@ -295,6 +295,10 @@ export default {
}
},
async loadComment () {
if (!this.flowInstance || !this.flowInstance.instId) {
this.commentList = []
return
}
try {
const res = await listFlowComment({ instId: this.flowInstance.instId })
this.commentList = res.rows
@@ -352,6 +356,10 @@ export default {
}
},
async loadAssignTask () {
if (!this.detail.instId) {
this.assignTasks = []
return
}
try {
const res = await listAssignTask(this.detail.instId)
this.assignTasks = res?.data || []