Skip to content

Commit 730e287

Browse files
committed
优化“流程表单:使用异步组件的方式动态加载业务表单指定的查看表单的组件”的命名
1 parent d87c02b commit 730e287

File tree

1 file changed

+6
-3
lines changed
  • src/views/bpm/processInstance/detail

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</el-col>
7474
<!-- 情况二:业务表单 -->
7575
<div v-if="processInstance?.processDefinition?.formType === 20">
76-
<autoComponent :id="processInstance.businessKey" />
76+
<BusinessFormComponent :id="processInstance.businessKey" />
7777
</div>
7878
</el-card>
7979

@@ -183,8 +183,9 @@ const getDetail = () => {
183183
// 2. 获得流程任务列表(审批记录)
184184
getTaskList()
185185
}
186-
const autoComponent = ref(null) // 异步组件
186+
187187
/** 加载流程实例 */
188+
const BusinessFormComponent = ref(null) // 异步组件
188189
const getProcessInstance = async () => {
189190
try {
190191
processInstanceLoading.value = true
@@ -194,7 +195,7 @@ const getProcessInstance = async () => {
194195
return
195196
}
196197
processInstance.value = data
197-
autoComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
198+
198199
// 设置表单信息
199200
const processDefinition = data.processDefinition
200201
if (processDefinition.formType === 10) {
@@ -209,6 +210,8 @@ const getProcessInstance = async () => {
209210
fApi.value?.fapi?.resetBtn.show(false)
210211
fApi.value?.fapi?.disabled(true)
211212
})
213+
} else {
214+
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
212215
}
213216
214217
// 加载流程图

0 commit comments

Comments
 (0)