fix: 优化报销创建页面样式与洞察面板交互
修复侧边栏和审计视图样式细节,完善差旅报销洞察面板和消息 组件布局,优化报销创建页面会话管理和流程状态持久化,增强 申请预览工具函数和导航图标,补充单元测试。
This commit is contained in:
@@ -163,16 +163,19 @@ import {
|
||||
HOT_KNOWLEDGE_QUESTIONS,
|
||||
INTENT_LABELS,
|
||||
SCENARIO_LABELS,
|
||||
SESSION_TYPE_BUDGET,
|
||||
SESSION_TYPE_APPLICATION,
|
||||
SESSION_TYPE_APPROVAL,
|
||||
SESSION_TYPE_EXPENSE,
|
||||
SESSION_TYPE_KNOWLEDGE,
|
||||
canUseBudgetAssistantSession,
|
||||
aiAvatar,
|
||||
buildExpenseIntentConfirmationMessage,
|
||||
buildExpenseSceneSelectionMessage,
|
||||
buildMessageMeta,
|
||||
buildWelcomeInsight,
|
||||
createMessage,
|
||||
filterAssistantSessionModes,
|
||||
resolveAssistantSessionMode,
|
||||
resolveKnowledgeRankLabel,
|
||||
resolveKnowledgeRankTone,
|
||||
@@ -610,11 +613,12 @@ export default {
|
||||
const isKnowledgeSession = computed(() => activeSessionType.value === SESSION_TYPE_KNOWLEDGE)
|
||||
const isApplicationSession = computed(() => activeSessionType.value === SESSION_TYPE_APPLICATION)
|
||||
const activeAssistantMode = computed(() => resolveAssistantSessionMode(activeSessionType.value))
|
||||
const assistantHeaderTitle = computed(() => activeAssistantMode.value?.label || '财务助手')
|
||||
const assistantHeaderDescription = computed(() => activeAssistantMode.value?.description || '个人财务中心')
|
||||
const assistantHeaderTitle = computed(() => '个人工作台')
|
||||
const assistantHeaderDescription = computed(() => '个人工作窗,一站式费控解决枢纽')
|
||||
const {
|
||||
flowRunId,
|
||||
flowSteps,
|
||||
visibleFlowSteps,
|
||||
flowRefreshBusy,
|
||||
completedFlowStepCount,
|
||||
flowOverallStatusTone,
|
||||
@@ -1084,7 +1088,7 @@ export default {
|
||||
const isReviewOverviewDrawer = computed(() => reviewDrawerMode.value === REVIEW_DRAWER_MODE_REVIEW)
|
||||
|
||||
const shortcuts = computed(() =>
|
||||
ASSISTANT_SESSION_MODE_OPTIONS.map((mode) => ({
|
||||
filterAssistantSessionModes(ASSISTANT_SESSION_MODE_OPTIONS, currentUser.value).map((mode) => ({
|
||||
label: mode.label,
|
||||
icon: mode.icon,
|
||||
action: 'switch_view',
|
||||
@@ -1099,7 +1103,11 @@ export default {
|
||||
// reviewDrawerMode.value = resolveReviewRiskBriefs(payload).length
|
||||
// ? REVIEW_DRAWER_MODE_RISK
|
||||
// : REVIEW_DRAWER_MODE_REVIEW
|
||||
const shouldKeepFlowDrawer = reviewDrawerMode.value === REVIEW_DRAWER_MODE_FLOW && flowSteps.value.length > 0
|
||||
resetReviewDrawerFromPayload(payload)
|
||||
if (shouldKeepFlowDrawer) {
|
||||
reviewDrawerMode.value = REVIEW_DRAWER_MODE_FLOW
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
@@ -1359,6 +1367,10 @@ export default {
|
||||
|
||||
async function runShortcut(shortcut) {
|
||||
if (shortcut?.action === 'switch_view' && shortcut?.targetSessionType) {
|
||||
if (shortcut.targetSessionType === SESSION_TYPE_BUDGET && !canUseBudgetAssistantSession(currentUser.value)) {
|
||||
toast('目前暂无权限访问预算编制助手')
|
||||
return
|
||||
}
|
||||
if (shortcut.active) {
|
||||
return
|
||||
}
|
||||
@@ -1444,6 +1456,10 @@ export default {
|
||||
const actionPayload = action?.payload && typeof action.payload === 'object' ? action.payload : {}
|
||||
const targetSessionType = String(actionPayload.session_type || '').trim()
|
||||
if (!targetSessionType) return
|
||||
if (targetSessionType === SESSION_TYPE_BUDGET && !canUseBudgetAssistantSession(currentUser.value)) {
|
||||
toast('目前暂无权限访问预算编制助手')
|
||||
return
|
||||
}
|
||||
const carryText = String(actionPayload.carry_text || '').trim()
|
||||
const carryFiles = actionPayload.carry_files ? Array.from(attachedFiles.value || []) : []
|
||||
if (!lockSuggestedActionMessage(message, action)) return
|
||||
@@ -1714,6 +1730,14 @@ export default {
|
||||
return buildApplicationPreviewFooterMessage(message.applicationPreview)
|
||||
}
|
||||
|
||||
function resolveApplicationPreviewMissingFields(message) {
|
||||
if (!message?.applicationPreview) {
|
||||
return []
|
||||
}
|
||||
const normalizedPreview = normalizeApplicationPreview(message.applicationPreview)
|
||||
return Array.isArray(normalizedPreview.missingFields) ? normalizedPreview.missingFields : []
|
||||
}
|
||||
|
||||
function openApplicationSubmitConfirm(message) {
|
||||
if (!message) {
|
||||
return
|
||||
@@ -2128,6 +2152,7 @@ export default {
|
||||
resolveApplicationPreviewRows,
|
||||
resolveApplicationPreviewEditorControl,
|
||||
resolveApplicationPreviewEditorOptions,
|
||||
resolveApplicationPreviewMissingFields,
|
||||
isApplicationPreviewEditing,
|
||||
openApplicationPreviewEditor,
|
||||
commitApplicationPreviewEditor,
|
||||
@@ -2193,6 +2218,7 @@ export default {
|
||||
flowRefreshBusy: flowRefreshBusy.value,
|
||||
refreshFlowRunDetail,
|
||||
flowSteps: flowSteps.value,
|
||||
visibleFlowSteps: visibleFlowSteps.value,
|
||||
resolveFlowStepStatusLabel,
|
||||
formatFlowStepDuration,
|
||||
resolveFlowStepDetail,
|
||||
|
||||
Reference in New Issue
Block a user