Browse Source

feat: 子表单预览

luoyali 1 năm trước cách đây
mục cha
commit
3e9c2231f2
1 tập tin đã thay đổi với 4 bổ sung17 xóa
  1. 4 17
      src/components/scWorkflow/nodes/formDetail.vue

+ 4 - 17
src/components/scWorkflow/nodes/formDetail.vue

@@ -1,5 +1,5 @@
 <template>
-	<el-dialog v-model="visibleDialog" title="表单详情" @close="handleCancel" append-to-body>
+	<el-dialog v-model="visibleDialog" title="表单详情" append-to-body class="formDetail" @close="handleCancel">
 		<div>
 			<er-form-preview ref="EReditorRef" :file-upload-u-r-i="uploadFileApi" :is-show-complete-button="false" />
 		</div>
@@ -25,7 +25,6 @@ const myProps = defineProps({
 	}
 })
 
-const formOptions = ref({})
 const EReditorRef = ref()
 const { VITE_APP_BASE_API } = import.meta.env
 const uploadFileApi = ref(`${VITE_APP_BASE_API}/v1/oss/upload`)
@@ -37,9 +36,9 @@ const handleCancel = () => {
 const getMessageInfoDetail = async () => {
 	const { templateId } = myProps
 	const res = await formTemplate.formTemplateDetailApi(templateId)
-	// EReditorRef.value.setData(newFormStructure, formData)
+	const formStructure = JSON.parse(res.content)
+	EReditorRef.value.setData(formStructure)
 	console.log(res)
-	// formOptions.value = res.content
 }
 
 getMessageInfoDetail()
@@ -55,17 +54,5 @@ const visibleDialog = computed({
 })
 </script>
 
-<style scoped lang="scss">
-.content-title {
-	overflow: hidden;
-	color: #000000d9;
-	font-weight: 500;
-	font-size: 16px;
-	white-space: nowrap;
-	text-overflow: ellipsis;
-	margin-bottom: 20px;
-	&.mbt20 {
-		margin-top: 20px;
-	}
-}
+<style lang="scss">
 </style>