Эх сурвалжийг харах

feat: 流程创建编辑时,报错

luoyali 1 жил өмнө
parent
commit
96987c4bdc

+ 15 - 2
src/views/flow/create/index.vue

@@ -98,7 +98,13 @@ const submitHandler = async () => {
 	// 表单设计
 	// 流程设计
 	// 扩展设置
-	const leavePageFlag = await validateTabs()
+	let leavePageFlag = await validateTabs()
+	// let _id = queryObj.value.id
+	// if (_id) {
+	//
+	// } else {
+	// 	leavePageFlag = await validateTabs()
+	// }
 	if (!leavePageFlag) return
 	const params = {
 		categoryId: categoryId.value,
@@ -116,7 +122,6 @@ const submitHandler = async () => {
 		processSetting: processSetting.value
 	}
 	const res = await process.progressCreateApi(params)
-	console.log('---r-e-s----', res)
 	ElMessage.success('操作成功')
 	// 创建完成 删除 当前tab页
 	removeCurTab()
@@ -187,6 +192,14 @@ const getCurrentProcessDetailEv = () => {
 			processForm.value = res.processForm
 			flowStore.setProcessForm(processForm)
 			flowStore.setProcessSetting(res.processSetting)
+			// 默认执行一次保存
+			const _refs = compRefs.value
+			for (let i = 0; i < _refs.length; i++) {
+				const updateCompInfo = compRefs.value[i]?.updateCompInfo
+				if (updateCompInfo) {
+					updateCompInfo()
+				}
+			}
 		})
 	}
 }