Skip to content

Commit

Permalink
优化“流程表单:使用异步组件的方式动态加载业务表单指定的查看表单的组件”的命名
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Apr 19, 2023
1 parent d87c02b commit 730e287
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/views/bpm/processInstance/detail/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</el-col>
<!-- 情况二:业务表单 -->
<div v-if="processInstance?.processDefinition?.formType === 20">
<autoComponent :id="processInstance.businessKey" />
<BusinessFormComponent :id="processInstance.businessKey" />
</div>
</el-card>
Expand Down Expand Up @@ -183,8 +183,9 @@ const getDetail = () => {
// 2. 获得流程任务列表(审批记录)
getTaskList()
}
const autoComponent = ref(null) // 异步组件
/** 加载流程实例 */
const BusinessFormComponent = ref(null) // 异步组件
const getProcessInstance = async () => {
try {
processInstanceLoading.value = true
Expand All @@ -194,7 +195,7 @@ const getProcessInstance = async () => {
return
}
processInstance.value = data
autoComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
// 设置表单信息
const processDefinition = data.processDefinition
if (processDefinition.formType === 10) {
Expand All @@ -209,6 +210,8 @@ const getProcessInstance = async () => {
fApi.value?.fapi?.resetBtn.show(false)
fApi.value?.fapi?.disabled(true)
})
} else {
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
}
// 加载流程图
Expand Down

0 comments on commit 730e287

Please sign in to comment.