Skip to content

Commit 9f0f5b0

Browse files
committed
【代码优化】 发起流程页面时,加 Loading 遮罩
1 parent 0ab7f23 commit 9f0f5b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<!-- 中间主要内容 tab 栏 -->
99
<el-tabs v-model="activeTab">
1010
<!-- 表单信息 -->
11-
<el-tab-pane label="表单填写" name="form">
12-
<div class="form-scroll-area">
11+
<el-tab-pane label="表单填写" name="form" >
12+
<div class="form-scroll-area" v-loading="processInstanceStartLoading">
1313
<el-scrollbar>
1414
<el-row>
1515
<el-col :span="17">
@@ -90,7 +90,7 @@ const props = defineProps<{
9090
selectProcessDefinition: any
9191
}>()
9292
const emit = defineEmits(['cancel'])
93-
93+
const processInstanceStartLoading = ref(false) // 流程实例发起中
9494
const { push, currentRoute } = useRouter() // 路由
9595
const message = useMessage() // 消息弹窗
9696
const { delView } = useTagsViewStore() // 视图操作
@@ -193,7 +193,7 @@ const submitForm = async () => {
193193
}
194194
195195
// 提交请求
196-
fApi.value.btn.loading(true)
196+
processInstanceStartLoading.value = true
197197
try {
198198
await ProcessInstanceApi.createProcessInstance({
199199
processDefinitionId: props.selectProcessDefinition.id,
@@ -208,7 +208,7 @@ const submitForm = async () => {
208208
name: 'BpmProcessInstanceMy'
209209
})
210210
} finally {
211-
fApi.value.btn.loading(false)
211+
processInstanceStartLoading.value = false
212212
}
213213
}
214214

0 commit comments

Comments
 (0)