Ver código fonte

fix: 开启流程 数据修复

lanceJiang 1 ano atrás
pai
commit
4e87824592

+ 2 - 6
src/components/scWorkflow/nodes/approver.vue

@@ -216,13 +216,9 @@ export default {
 	methods: {
 		show() {
 			this.form = JSON.parse(JSON.stringify(this.nodeConfig))
-			let formConfig = []
-			if (this.form.extendConfig) {
-				formConfig = this.form.extendConfig.formConfig
-			}
 			const { formStructure } = JSON.parse(this.processForm)
-			const { fields } = formStructure
-			const operateTable = fields.map(item => {
+			const formConfig = this.form.extendConfig?.formConfig || []
+			const operateTable = (formStructure?.fields || []).map(item => {
 				let opera = '1'
 				formConfig.map(i => {
 					if (item.id === i.id) {

+ 2 - 1
src/views/flow/create/components/FormDesign.vue

@@ -47,8 +47,9 @@ const validate = () => {
 
 const updateCompInfo = () => {
 	if (processForm.value) {
+		// {formStructure: 表单结构值, formData: {}}
 		const { formStructure } = JSON.parse(processForm.value)
-		EReditorRef.value.setData(formStructure)
+		EReditorRef.value.setData(formStructure || {})
 	}
 }