修改诊断模版编辑和新增
This commit is contained in:
parent
8553b0c01b
commit
d34889a432
@ -57,7 +57,7 @@
|
||||
type="textarea"
|
||||
:rows="10"
|
||||
resize="none"
|
||||
placeholder="请输入模板内容"
|
||||
placeholder="请输入指导建议"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康指导" prop="healthy">
|
||||
@ -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'))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user