feat: 同步质量校验修复并精简工作台操作

This commit is contained in:
GouJ
2026-09-03 19:38:57 +08:00
parent 771b66cafc
commit 13bb6dc83b
47 changed files with 2244 additions and 260 deletions
@@ -1,13 +1,19 @@
<script setup lang="ts">
import { NCollapse, NCollapseItem, NInput, NTag } from 'naive-ui'
import { NButton, NCollapse, NCollapseItem, NInput, NTag } from 'naive-ui'
import { computed, ref } from 'vue'
import { Search, ChevronDown } from '@lucide/vue'
import { Search } from '@lucide/vue'
import { EmptyState } from '../../../components/ui'
import type { SubjectCandidate, SubjectForm } from '../types'
/** 主体列表按稳定 ref 展示;形态以 profileId 关联。 */
const props = defineProps<{ subjects: SubjectCandidate[]; forms: SubjectForm[]; projectId?: string }>()
const search = ref('')
/** 长篇主体经历默认展示摘要,展开不丢失原始正文。 */
const expanded = ref(new Set<string>())
function toggleDescription(id: string) {
if (expanded.value.has(id)) expanded.value.delete(id)
else expanded.value.add(id)
}
const filtered = computed(() =>
props.subjects.filter(item =>
`${item.name} ${item.ref} ${item.aliases?.join(' ') ?? ''}`
@@ -43,7 +49,23 @@ const filtered = computed(() =>
>别名{{ subject.aliases.join('、') }}</span
>
</div>
<p class="text-sm leading-7">{{ subject.description }}</p>
<p
class="text-sm leading-7"
:class="{
'line-clamp-3': (subject.description?.length ?? 0) > 160 && !expanded.has(subject.profileId)
}"
>
{{ subject.description }}
</p>
<NButton
v-if="(subject.description?.length ?? 0) > 160"
text
size="small"
class="mt-2"
:aria-expanded="expanded.has(subject.profileId)"
@click="toggleDescription(subject.profileId)"
>{{ expanded.has(subject.profileId) ? '收起介绍' : '展开完整介绍' }}</NButton
>
<RouterLink
v-if="projectId"
:to="{ path: `/projects/${projectId}/subject-identity`, query: { subjectRef: subject.ref } }"
@@ -59,7 +81,7 @@ const filtered = computed(() =>
<NCollapse class="subject-details mt-4"
><NCollapseItem name="details"
><template #header
><ChevronDown :size="14" />外观描述与形态
>外观描述与形态
<span class="ml-1 text-muted">{{
forms.filter(form => form.profileId === subject.profileId).length
}}</span></template
@@ -77,7 +99,12 @@ const filtered = computed(() =>
}}<NTag v-if="form.isDefault" size="small" :bordered="false">默认</NTag>
</p>
<p class="mt-2 text-sm leading-6 text-muted">{{ form.description }}</p>
<p class="mt-2 text-xs leading-6 text-muted">{{ form.appearancePrompt }}</p>
<p
v-if="form.appearancePrompt?.trim() !== form.description?.trim()"
class="mt-2 text-xs leading-6 text-muted"
>
{{ form.appearancePrompt }}
</p>
</div></NCollapseItem
></NCollapse
>