feat(web): update views and services

Views:
- AppShellRouteView.vue: update route view
- SettingsView.vue: update settings view
- TravelReimbursementCreateView.vue: update travel form view
- scripts/SettingsView.js: update settings view logic
- scripts/TravelReimbursementCreateView.js: update travel form logic

Services:
- services/orchestrator.js: update orchestrator service client
This commit is contained in:
caoxiaozhu
2026-05-12 06:40:19 +00:00
parent f6a5eeb620
commit c263fc9752
6 changed files with 561 additions and 89 deletions

View File

@@ -90,6 +90,35 @@
</div>
</div>
<div v-if="message.role === 'assistant' && message.reviewPayload" class="message-detail-block">
<strong>系统识别</strong>
<p class="review-summary">{{ message.reviewPayload.intent_summary }}</p>
<div v-if="message.reviewPayload.slot_cards?.length" class="review-mini-grid">
<article
v-for="item in message.reviewPayload.slot_cards.slice(0, 4)"
:key="`${message.id}-${item.key}`"
class="review-slot-card compact"
:class="item.status"
>
<span>{{ item.label }}</span>
<strong>{{ item.value || '待补充' }}</strong>
</article>
</div>
<div v-if="message.reviewPayload.confirmation_actions?.length" class="action-list compact">
<article
v-for="item in message.reviewPayload.confirmation_actions"
:key="`${message.id}-${item.action_type}-${item.label}`"
class="action-card"
:class="item.emphasis"
>
<div>
<strong>{{ item.label }}</strong>
<p>{{ item.description }}</p>
</div>
</article>
</div>
</div>
<div v-if="message.role === 'assistant' && message.draftPayload" class="draft-preview">
<header>
<strong>{{ message.draftPayload.title }}</strong>
@@ -193,6 +222,19 @@
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload" class="insight-card">
<div class="card-head">
<h4>识别结果</h4>
</div>
<div class="note-block">
<span>{{ currentInsight.agent.reviewPayload.intent }}</span>
<strong>{{ currentInsight.agent.reviewPayload.intent_summary }}</strong>
<p v-if="currentInsight.agent.reviewPayload.missing_slots?.length">
当前仍缺少{{ currentInsight.agent.reviewPayload.missing_slots.join('') }}
</p>
</div>
</section>
<section class="insight-card">
<div class="card-head">
<h4>运行明细</h4>
@@ -217,6 +259,132 @@
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload?.risk_briefs?.length" class="insight-card">
<div class="card-head">
<h4>历史风险与注意事项</h4>
</div>
<div class="review-brief-list">
<article
v-for="item in currentInsight.agent.reviewPayload.risk_briefs"
:key="`${item.title}-${item.level}`"
class="review-brief-card"
:class="item.level"
>
<strong>{{ item.title }}</strong>
<p>{{ item.content }}</p>
</article>
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload?.slot_cards?.length" class="insight-card">
<div class="card-head">
<h4>待确认字段</h4>
</div>
<div class="review-slot-grid">
<article
v-for="item in currentInsight.agent.reviewPayload.slot_cards"
:key="item.key"
class="review-slot-card"
:class="item.status"
>
<header>
<span>{{ item.label }}</span>
<small>{{ item.source }}</small>
</header>
<strong>{{ item.value || '待补充' }}</strong>
<p v-if="item.hint">{{ item.hint }}</p>
</article>
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload?.claim_groups?.length" class="insight-card">
<div class="card-head">
<h4>分单建议</h4>
</div>
<div class="review-claim-list">
<article
v-for="item in currentInsight.agent.reviewPayload.claim_groups"
:key="item.group_code"
class="review-claim-card"
>
<header>
<strong>{{ item.title }}</strong>
<span>{{ item.scene_label }}</span>
</header>
<p>{{ item.rationale }}</p>
<div class="message-detail-chip-row">
<span class="message-action-chip">票据 {{ item.document_indexes.join('、') || '待补' }}</span>
<span class="message-action-chip">金额 {{ item.amount_total.toFixed(2) }} </span>
</div>
</article>
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload?.document_cards?.length" class="insight-card">
<div class="card-head">
<h4>票据识别结果</h4>
</div>
<div class="review-document-list">
<article
v-for="item in currentInsight.agent.reviewPayload.document_cards"
:key="`${item.index}-${item.filename}`"
class="review-document-card"
>
<header>
<div>
<strong>票据 {{ item.index }}</strong>
<span>{{ item.filename }}</span>
</div>
<span class="message-action-chip">{{ item.scene_label }}</span>
</header>
<div class="document-preview" :class="resolveDocumentPreview(currentInsight.agent.filePreviews, item.filename)?.kind || 'file'">
<img
v-if="resolveDocumentPreview(currentInsight.agent.filePreviews, item.filename)?.kind === 'image'"
:src="resolveDocumentPreview(currentInsight.agent.filePreviews, item.filename)?.url"
:alt="item.filename"
/>
<div v-else class="document-preview-placeholder">
<i class="mdi mdi-file-document-outline"></i>
<span>{{ resolveDocumentPreview(currentInsight.agent.filePreviews, item.filename)?.kind === 'pdf' ? 'PDF' : '附件' }}</span>
</div>
</div>
<p>{{ item.summary || '暂无摘要。' }}</p>
<div v-if="item.fields?.length" class="review-doc-field-grid">
<article v-for="field in item.fields" :key="`${item.filename}-${field.label}`" class="review-doc-field-card">
<span>{{ field.label }}</span>
<strong>{{ field.value }}</strong>
</article>
</div>
<div v-if="item.warnings?.length" class="message-detail-chip-row">
<span v-for="warning in item.warnings" :key="warning" class="message-risk-chip">{{ warning }}</span>
</div>
</article>
</div>
</section>
<section v-if="currentInsight.agent.reviewPayload?.confirmation_actions?.length" class="insight-card">
<div class="card-head">
<h4>确认动作</h4>
</div>
<div class="action-list">
<article
v-for="item in currentInsight.agent.reviewPayload.confirmation_actions"
:key="`${item.action_type}-${item.label}`"
class="action-card"
:class="item.emphasis"
>
<div>
<strong>{{ item.label }}</strong>
<p>{{ item.description || item.action_type }}</p>
</div>
</article>
</div>
</section>
<section v-if="currentInsight.agent.selectedCapabilityCodes?.length" class="insight-card">
<div class="card-head">
<h4>命中能力</h4>