Persist front project requirement keyword

This commit is contained in:
王鹏
2026-05-23 16:49:02 +08:00
parent dfbae3387f
commit ecdc015c2f
13 changed files with 72 additions and 11 deletions

View File

@@ -296,6 +296,7 @@ async function loadProjectDraft(value) {
projectId.value = id
projectForm.projectName = project.projectName || ''
projectForm.projectDesc = project.projectDesc || ''
projectForm.keyword = project.requirementKeyword || projectForm.keyword || ''
projectForm.industryTemplate = project.industryTemplate || ''
appBlueprint.value = normalizeAppBlueprint(project.appBlueprint)
syncAppBlueprintJson()
@@ -314,6 +315,7 @@ async function ensureProject() {
const result = await createProject({
projectName: projectForm.projectName,
projectDesc: projectForm.projectDesc,
requirementKeyword: projectForm.keyword,
industryTemplate: projectForm.industryTemplate
})
const data = unwrap(result)
@@ -360,10 +362,9 @@ async function handleGenerateAppBlueprint() {
const id = await ensureProject()
const result = await generateAppBlueprint(id, {
projectName: projectForm.projectName,
projectDesc: projectForm.projectDesc || projectForm.keyword,
projectDesc: projectForm.projectDesc,
industryTemplate: projectForm.industryTemplate,
extraRequirements: projectForm.keyword,
appBlueprint: appBlueprintJson.value
extraRequirements: projectForm.keyword
})
appBlueprint.value = normalizeAppBlueprint(result)
syncAppBlueprintJson()
@@ -401,9 +402,10 @@ async function handleGenerateDatabase() {
const id = await ensureProject()
const result = await generateDatabase(id, {
projectName: projectForm.projectName,
projectDesc: projectForm.projectDesc || projectForm.keyword,
projectDesc: projectForm.projectDesc,
industryTemplate: projectForm.industryTemplate,
extraRequirements: projectForm.keyword
extraRequirements: projectForm.keyword,
appBlueprint: appBlueprintJson.value
})
database.value = normalizeDatabase(result)

View File

@@ -17,7 +17,7 @@
<el-table-column prop="projectName" label="项目名称" min-width="190">
<template #default="{ row }">
<div class="project-name">{{ row.projectName || '未命名项目' }}</div>
<div class="project-desc">{{ row.projectDesc || row.industryTemplate || '暂无描述' }}</div>
<div class="project-desc">{{ row.projectDesc || row.requirementKeyword || row.industryTemplate || '暂无描述' }}</div>
</template>
</el-table-column>
<el-table-column label="状态" width="140">