Răsfoiți Sursa

feat: 系统表单保存

luoyali 11 luni în urmă
părinte
comite
489b9e345a
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      src/views/approve/components/approvedContent.vue

+ 3 - 3
src/views/approve/components/approvedContent.vue

@@ -39,7 +39,7 @@
 					<!-- 审批信息 -->
 					<div v-show="tabName === 'ApprovalInfo'" class="scroll-wrap">
 						<!-- 系统表单-->
-						<template v-if="currentTaskRow.processType === 'business'">
+						<template v-if="currentTaskRow.processType === 'business' && currentObj?.formTemplate.type">
 							<component :is="dyVueComponent" ref="dyVueComponentRef"></component>
 						</template>
 
@@ -319,7 +319,7 @@ const modelContentConfig = ref({})
 const dyVueComponent = ref(undefined)
 const dyVueComponentRef = ref()
 const dyVueForm = ref({})
-const currentObj = ref({})
+const currentObj = ref()
 provide('dyVueForm', dyVueForm) // 这里主要是存放动态的form的属性值
 
 /**
@@ -395,7 +395,6 @@ const getTaskDetail = () => {
 		instanceState: cur.instanceState
 	})
 		.then(data => {
-			currentObj.value = data
 			const activeList = data.processApprovals
 			activeList.forEach(v => {
 				v.local_timestamp = v.id && formatTimestamp(v.createTime)
@@ -429,6 +428,7 @@ const getTaskDetail = () => {
 				let formContent = null
 				const { processType } = currentTaskRow.value
 				if (processType === 'business') {
+					currentObj.value = data
 					if (data?.formTemplate.type === 1) {
 						return
 					} else {