diff --git a/src/views/inspect/inspecttemplate/TemplateForm.vue b/src/views/inspect/inspecttemplate/TemplateForm.vue index a902867..f4d430f 100644 --- a/src/views/inspect/inspecttemplate/TemplateForm.vue +++ b/src/views/inspect/inspecttemplate/TemplateForm.vue @@ -57,7 +57,7 @@ type="textarea" :rows="10" resize="none" - placeholder="请输入模板内容" + placeholder="请输入指导建议" /> @@ -107,7 +107,7 @@ const formRules = reactive({ category: [{ required: true, message: '请选择部位', trigger: 'change' }], contentName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }], status: [{ required: true, message: '请选择状态', trigger: 'change' }], - content: [{ required: true, message: '请输入模板内容', trigger: 'blur' }], + content: [{ required: true, message: '请输入指导建议', trigger: 'blur' }], science: [{ required: true, message: '请输入科普知识', trigger: 'blur' }], healthy: [{ required: true, message: '请输入健康指导', trigger: 'blur' }] }) @@ -186,6 +186,7 @@ const submitForm = async () => { formLoading.value = true try { const data = formData.value as unknown as TemplateVO + console.log(data) if (formType.value === 'create') { await TemplateApi.createTemplate(data) message.success(t('common.createSuccess')) diff --git a/src/views/inspect/inspecttemplate/index.vue b/src/views/inspect/inspecttemplate/index.vue index eef2d31..8ff64e1 100644 --- a/src/views/inspect/inspecttemplate/index.vue +++ b/src/views/inspect/inspecttemplate/index.vue @@ -258,7 +258,9 @@ const convertToTreeTableData = (listData: TemplateVO[]) => { contentName: '', content: '', children: new Map(), - isLeaf: false + isLeaf: false, + science: '', + healthy: '' }) } @@ -274,7 +276,9 @@ const convertToTreeTableData = (listData: TemplateVO[]) => { contentName: '', content: '', children: [], - isLeaf: false + isLeaf: false, + science: '', + healthy: '' }) } @@ -286,7 +290,9 @@ const convertToTreeTableData = (listData: TemplateVO[]) => { contentName: item.contentName, content: item.content, status: item.status, - isLeaf: true + isLeaf: true, + science: item.science, + healthy: item.healthy }) }) @@ -300,7 +306,9 @@ const convertToTreeTableData = (listData: TemplateVO[]) => { contentName: typeNode.contentName, content: typeNode.content, isLeaf: typeNode.isLeaf, - children: [] as any[] + children: [] as any[], + science: typeNode.science, + healthy: typeNode.healthy } typeNode.children.forEach(categoryNode => { @@ -311,7 +319,9 @@ const convertToTreeTableData = (listData: TemplateVO[]) => { contentName: categoryNode.contentName, content: categoryNode.content, isLeaf: categoryNode.isLeaf, - children: categoryNode.children + children: categoryNode.children, + science: categoryNode.science, + healthy: categoryNode.healthy } typeItem.children.push(categoryItem)