feat: add ticket solution closure loop

This commit is contained in:
hailin
2026-07-02 10:11:30 +08:00
parent 0ea4a3c853
commit a6df96ebb0
18 changed files with 435 additions and 68 deletions

View File

@@ -49,10 +49,7 @@ export function TicketCreatePage() {
return (
<main className="min-h-screen bg-background p-6 text-foreground">
<div className="mx-auto grid max-w-6xl gap-5">
<AppPageHeader
title="创建工单"
description="记录明确的技术支持请求,便于后续分派、排查和复用方案。"
/>
<AppPageHeader title="创建工单" />
<form className="grid gap-4 xl:grid-cols-[minmax(0,1fr)_340px]" onSubmit={handleSubmit}>
<div className="grid gap-4">
{error ? (
@@ -63,7 +60,7 @@ export function TicketCreatePage() {
</Alert>
) : null}
<AppSection title="基础信息" description="先说明这张工单要解决什么问题。">
<AppSection title="基础信息">
<AppField label="工单标题">
<Input
required
@@ -74,7 +71,7 @@ export function TicketCreatePage() {
</AppField>
</AppSection>
<AppSection title="影响与优先级" description="帮助支持团队判断响应顺序和处理风险。">
<AppSection title="影响与优先级">
<div className="grid gap-4 md:grid-cols-2">
<AppField label="优先级">
<Select value={form.priority} onValueChange={(value) => updateField('priority', value as TicketInput['priority'])}>
@@ -99,7 +96,7 @@ export function TicketCreatePage() {
</div>
</AppSection>
<AppSection title="环境与系统" description="补充问题发生的系统域和运行环境。">
<AppSection title="环境与系统">
<div className="grid gap-4 md:grid-cols-2">
<AppField label="关联系统">
<Input
@@ -118,7 +115,7 @@ export function TicketCreatePage() {
</div>
</AppSection>
<AppSection title="问题描述" description="请描述现象、出现时间、复现步骤和已尝试的处理方式。">
<AppSection title="问题描述">
<AppField label="详细描述">
<Textarea
required
@@ -129,7 +126,7 @@ export function TicketCreatePage() {
</AppField>
</AppSection>
<AppSection title="提交确认" description="提交后工单会进入待处理队列。">
<AppSection title="提交确认">
<div className="flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
<div className="flex items-start gap-2 text-sm text-muted-foreground">
<CheckCircle2 className="mt-0.5 size-4" />
@@ -144,7 +141,7 @@ export function TicketCreatePage() {
</div>
<div className="grid content-start gap-4">
<AppSection title="建单提示" description="高质量工单能减少来回确认。">
<AppSection title="建单提示">
<div className="grid gap-3 text-sm text-muted-foreground">
<div className="flex gap-2">
<Lightbulb className="mt-0.5 size-4" />
@@ -163,7 +160,6 @@ export function TicketCreatePage() {
<AppSection
title="AI 建单辅助"
description="后续阶段能力预留"
action={<Badge variant="ai"><Bot className="size-3" /> 即将接入</Badge>}
>
<p className="text-sm text-muted-foreground">