From ca22cdd5550cfa0defb0f430c538698182cdaec1 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 30 十二月 2024 16:42:49 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat-ui-vue3 --- src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue b/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue index 610963e..3800f19 100644 --- a/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue +++ b/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue @@ -8,8 +8,8 @@ <!-- 中间主要内容 tab 栏 --> <el-tabs v-model="activeTab"> <!-- 表单信息 --> - <el-tab-pane label="表单填写" name="form"> - <div class="form-scroll-area"> + <el-tab-pane label="表单填写" name="form" > + <div class="form-scroll-area" v-loading="processInstanceStartLoading"> <el-scrollbar> <el-row> <el-col :span="17"> @@ -90,7 +90,7 @@ selectProcessDefinition: any }>() const emit = defineEmits(['cancel']) - +const processInstanceStartLoading = ref(false) // 流程实例发起中 const { push, currentRoute } = useRouter() // 路由 const message = useMessage() // 消息弹窗 const { delView } = useTagsViewStore() // 视图操作 @@ -179,6 +179,8 @@ if (!fApi.value || !props.selectProcessDefinition) { return } + // 流程表单校验 + await fApi.value.validate() // 如果有指定审批人,需要校验 if (startUserSelectTasks.value?.length > 0) { for (const userTask of startUserSelectTasks.value) { @@ -191,7 +193,7 @@ } // 提交请求 - fApi.value.btn.loading(true) + processInstanceStartLoading.value = true try { await ProcessInstanceApi.createProcessInstance({ processDefinitionId: props.selectProcessDefinition.id, @@ -206,7 +208,7 @@ name: 'BpmProcessInstanceMy' }) } finally { - fApi.value.btn.loading(false) + processInstanceStartLoading.value = false } } -- Gitblit v1.9.3