feat: 官网与助手共用 Nana 会话,完善下单与顶栏门户过渡 #20
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@ -47,6 +47,8 @@ declare module 'vue' {
|
|||||||
NanaAssistant: typeof import('./components/NanaAssistant/index.vue')['default']
|
NanaAssistant: typeof import('./components/NanaAssistant/index.vue')['default']
|
||||||
NanaAvatar: typeof import('./components/NanaAssistant/NanaAvatar.vue')['default']
|
NanaAvatar: typeof import('./components/NanaAssistant/NanaAvatar.vue')['default']
|
||||||
NanaBatchJobsDrawer: typeof import('./components/NanaAssistant/NanaBatchJobsDrawer.vue')['default']
|
NanaBatchJobsDrawer: typeof import('./components/NanaAssistant/NanaBatchJobsDrawer.vue')['default']
|
||||||
|
NanaChatDialog: typeof import('./components/NanaAssistant/NanaChatDialog.vue')['default']
|
||||||
|
NanaComposer: typeof import('./components/NanaAssistant/NanaComposer.vue')['default']
|
||||||
OrderPrintModal: typeof import('./components/PrintTemplate/OrderPrintModal.vue')['default']
|
OrderPrintModal: typeof import('./components/PrintTemplate/OrderPrintModal.vue')['default']
|
||||||
PaginationPro: typeof import('./components/PaginationPro/index.vue')['default']
|
PaginationPro: typeof import('./components/PaginationPro/index.vue')['default']
|
||||||
PrintOptionsForm: typeof import('./components/PrintTemplate/PrintOptionsForm.vue')['default']
|
PrintOptionsForm: typeof import('./components/PrintTemplate/PrintOptionsForm.vue')['default']
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="ai-advisor-shell ai-advisor-shell--page"
|
class="ai-advisor-shell ai-advisor-shell--page ai-advisor-shell--round-send"
|
||||||
:class="{ 'ai-history-open': historyOpen }"
|
:class="{ 'ai-history-open': historyOpen }"
|
||||||
>
|
>
|
||||||
<div class="ai-shell-bg" aria-hidden="true" />
|
<div class="ai-shell-bg" aria-hidden="true" />
|
||||||
@ -190,70 +190,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div v-show="isChatting" class="ai-messages is-active" role="log" aria-live="polite">
|
<NanaChatDialog
|
||||||
<div
|
v-show="isChatting"
|
||||||
v-for="(msg, idx) in messages"
|
:messages="messages"
|
||||||
:key="idx"
|
:typing="chatLoading"
|
||||||
:class="['ai-msg-row', msg.role === 'user' ? 'ai-msg-row--user' : 'ai-msg-row--assistant']"
|
:active="isChatting"
|
||||||
>
|
|
||||||
<div class="ai-msg-avatar">
|
|
||||||
<NanaAvatar v-if="msg.role === 'assistant'" size="sm" :pulse="false" />
|
|
||||||
<template v-else>{{ youInitial }}</template>
|
|
||||||
</div>
|
|
||||||
<div class="ai-msg-bubble">{{ msg.content }}</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="chatLoading" class="ai-msg-row ai-msg-row--assistant ai-msg-row--typing">
|
|
||||||
<div class="ai-msg-avatar"><NanaAvatar size="sm" :pulse="false" /></div>
|
|
||||||
<div class="ai-msg-bubble"><span /><span /><span /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-show="isChatting" class="ai-followup is-visible" role="toolbar">
|
|
||||||
<button
|
|
||||||
v-for="cap in mcpCapabilities"
|
|
||||||
:key="cap.id"
|
|
||||||
type="button"
|
|
||||||
class="ai-followup-chip"
|
|
||||||
:disabled="chatLoading"
|
|
||||||
@click="startMcpCapability(cap.id)"
|
|
||||||
>
|
>
|
||||||
{{ t(cap.titleKey) }}
|
<template #assistant-extra="{ isLatest }">
|
||||||
</button>
|
<div v-if="isLatest" class="ai-msg-followups" role="toolbar">
|
||||||
|
<button
|
||||||
|
v-for="cap in mcpCapabilities"
|
||||||
|
:key="cap.id"
|
||||||
|
type="button"
|
||||||
|
class="ai-followup-chip"
|
||||||
|
:disabled="chatLoading"
|
||||||
|
@click="startMcpCapability(cap.id)"
|
||||||
|
>
|
||||||
|
{{ t(cap.titleKey) }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</NanaChatDialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ai-composer-wrap">
|
<NanaComposer
|
||||||
<div class="ai-composer">
|
ref="composerRef"
|
||||||
<form class="ai-composer-form" @submit.prevent="sendMessage">
|
v-model="inputText"
|
||||||
<textarea
|
:placeholder="composerPlaceholder"
|
||||||
ref="inputRef"
|
:send-label="t('nanaAssistant.send')"
|
||||||
v-model="inputText"
|
:busy="chatLoading"
|
||||||
class="ai-composer-input"
|
@submit="sendMessage"
|
||||||
rows="1"
|
>
|
||||||
maxlength="2000"
|
<template #footer>
|
||||||
:placeholder="composerPlaceholder"
|
|
||||||
:disabled="chatLoading"
|
|
||||||
@keydown.enter.exact.prevent="sendMessage"
|
|
||||||
@input="resizeInput"
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="ai-composer-send"
|
|
||||||
:class="{ 'is-empty': roundSend && !inputText.trim() }"
|
|
||||||
:aria-label="t('nanaAssistant.send')"
|
|
||||||
:disabled="roundSend ? chatLoading : !canSend"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
v-if="roundSend"
|
|
||||||
class="ai-composer-send__mark"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<path d="M12 19V5M6.5 10.5 12 5l5.5 5.5" />
|
|
||||||
</svg>
|
|
||||||
<icon-send v-else />
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
<div class="ai-composer-footer">
|
<div class="ai-composer-footer">
|
||||||
<p class="ai-composer-hint">
|
<p class="ai-composer-hint">
|
||||||
{{ providerKey ? t('nanaAssistant.hintLive') : t('nanaAssistant.hint') }}
|
{{ providerKey ? t('nanaAssistant.hintLive') : t('nanaAssistant.hint') }}
|
||||||
@ -263,8 +231,8 @@
|
|||||||
{{ t('nanaAssistant.human') }}
|
{{ t('nanaAssistant.human') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</div>
|
</NanaComposer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -328,7 +296,6 @@ import { useRoute, useRouter } from 'vue-router';
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import {
|
import {
|
||||||
IconSend,
|
|
||||||
IconClockCircle,
|
IconClockCircle,
|
||||||
IconCustomerService,
|
IconCustomerService,
|
||||||
IconDelete,
|
IconDelete,
|
||||||
@ -375,15 +342,14 @@ import { isMobileUserAgent, isWeChatBrowser } from '@/utils/device';
|
|||||||
import { openWecomKf } from '@/utils/wecomKf';
|
import { openWecomKf } from '@/utils/wecomKf';
|
||||||
import { resolveTextModelId } from '@/views/system/aiAssistant/providerCatalog';
|
import { resolveTextModelId } from '@/views/system/aiAssistant/providerCatalog';
|
||||||
import NanaAvatar from './NanaAvatar.vue';
|
import NanaAvatar from './NanaAvatar.vue';
|
||||||
|
import NanaChatDialog from './NanaChatDialog.vue';
|
||||||
|
import NanaComposer from './NanaComposer.vue';
|
||||||
import logoImg from '@/assets/logo2.png';
|
import logoImg from '@/assets/logo2.png';
|
||||||
|
|
||||||
withDefaults(
|
/** @deprecated 圆钮发送已默认开启,保留 prop 兼容旧调用方 */
|
||||||
defineProps<{
|
defineProps<{
|
||||||
/** 发送钮用首页提问卡的圆钮:空态浅灰,有内容黑底上箭头 */
|
roundSend?: boolean;
|
||||||
roundSend?: boolean;
|
}>();
|
||||||
}>(),
|
|
||||||
{ roundSend: false },
|
|
||||||
);
|
|
||||||
|
|
||||||
type QuickTagDef = {
|
type QuickTagDef = {
|
||||||
id: string;
|
id: string;
|
||||||
@ -456,7 +422,7 @@ function mcpCardIcon(id: McpCapabilityId) {
|
|||||||
const activeThreadId = ref<string | null>(null);
|
const activeThreadId = ref<string | null>(null);
|
||||||
const messages = ref<ChatMessage[]>([]);
|
const messages = ref<ChatMessage[]>([]);
|
||||||
const mainScrollRef = ref<HTMLElement>();
|
const mainScrollRef = ref<HTMLElement>();
|
||||||
const inputRef = ref<HTMLTextAreaElement>();
|
const composerRef = ref<InstanceType<typeof NanaComposer> | null>(null);
|
||||||
|
|
||||||
const advisorLoading = ref(false);
|
const advisorLoading = ref(false);
|
||||||
const advisorLoaded = ref(false);
|
const advisorLoaded = ref(false);
|
||||||
@ -540,8 +506,6 @@ const canSend = computed(() => Boolean(inputText.value.trim() && !chatLoading.va
|
|||||||
|
|
||||||
const composerPlaceholder = computed(() => '');
|
const composerPlaceholder = computed(() => '');
|
||||||
|
|
||||||
const youInitial = computed(() => t('nanaAssistant.you').charAt(0).toUpperCase());
|
|
||||||
|
|
||||||
const waybillDisplayNo = computed(() =>
|
const waybillDisplayNo = computed(() =>
|
||||||
waybillContext.value ? getWaybillDisplayNo(waybillContext.value) : '',
|
waybillContext.value ? getWaybillDisplayNo(waybillContext.value) : '',
|
||||||
);
|
);
|
||||||
@ -747,21 +711,18 @@ function shouldSkipAutoFocus() {
|
|||||||
function focusInput(options?: { force?: boolean }) {
|
function focusInput(options?: { force?: boolean }) {
|
||||||
if (!options?.force && shouldSkipAutoFocus()) return;
|
if (!options?.force && shouldSkipAutoFocus()) return;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
inputRef.value?.focus({ preventScroll: true });
|
composerRef.value?.focus({ preventScroll: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function blurInput() {
|
function blurInput() {
|
||||||
inputRef.value?.blur();
|
composerRef.value?.blur();
|
||||||
const active = document.activeElement;
|
const active = document.activeElement;
|
||||||
if (active instanceof HTMLElement) active.blur();
|
if (active instanceof HTMLElement) active.blur();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resizeInput() {
|
function resizeInput() {
|
||||||
const el = inputRef.value;
|
composerRef.value?.resize();
|
||||||
if (!el) return;
|
|
||||||
el.style.height = 'auto';
|
|
||||||
el.style.height = `${Math.min(el.scrollHeight, 120)}px`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensureWelcomeMessage() {
|
function ensureWelcomeMessage() {
|
||||||
|
|||||||
87
src/components/NanaAssistant/NanaChatDialog.vue
Normal file
87
src/components/NanaAssistant/NanaChatDialog.vue
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="nana-chat-dialog ai-messages"
|
||||||
|
:class="{ 'is-active': active }"
|
||||||
|
role="log"
|
||||||
|
aria-live="polite"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(msg, index) in normalized"
|
||||||
|
:key="index"
|
||||||
|
class="ai-msg-row"
|
||||||
|
:class="'ai-msg-row--' + msg.role"
|
||||||
|
>
|
||||||
|
<NanaAvatar
|
||||||
|
v-if="msg.role === 'assistant'"
|
||||||
|
size="sm"
|
||||||
|
:pulse="false"
|
||||||
|
class="ai-msg-nana"
|
||||||
|
/>
|
||||||
|
<div v-if="msg.role === 'assistant'" class="ai-msg-body">
|
||||||
|
<p v-if="msg.text" class="ai-msg-text">{{ msg.text }}</p>
|
||||||
|
<slot
|
||||||
|
name="assistant-extra"
|
||||||
|
:message="msg.raw"
|
||||||
|
:index="index"
|
||||||
|
:is-latest="isLatestAssistant(index)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else class="ai-msg-bubble">
|
||||||
|
<p v-if="msg.text" class="ai-msg-text">{{ msg.text }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="typing" class="ai-msg-row ai-msg-row--assistant ai-msg-row--typing">
|
||||||
|
<NanaAvatar size="sm" pulse class="ai-msg-nana" />
|
||||||
|
<div class="ai-msg-body ai-msg-body--typing">
|
||||||
|
<span /><span /><span />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import NanaAvatar from './NanaAvatar.vue';
|
||||||
|
|
||||||
|
export type NanaChatMessageInput = {
|
||||||
|
role: 'user' | 'assistant';
|
||||||
|
/** 官网会话字段 */
|
||||||
|
text?: string;
|
||||||
|
/** OMS 助手会话字段 */
|
||||||
|
content?: string;
|
||||||
|
[key: string]: unknown;
|
||||||
|
};
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
messages: NanaChatMessageInput[];
|
||||||
|
typing?: boolean;
|
||||||
|
/** 是否展示会话流(对应 .ai-messages.is-active) */
|
||||||
|
active?: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
typing: false,
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const normalized = computed(() =>
|
||||||
|
props.messages.map((msg) => ({
|
||||||
|
role: msg.role,
|
||||||
|
text: String(msg.text ?? msg.content ?? '').trim(),
|
||||||
|
raw: msg,
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
|
||||||
|
function isLatestAssistant(index: number) {
|
||||||
|
if (props.typing) return false;
|
||||||
|
const list = normalized.value;
|
||||||
|
if (!list[index] || list[index].role !== 'assistant') return false;
|
||||||
|
for (let i = list.length - 1; i >= 0; i -= 1) {
|
||||||
|
if (list[i].role === 'assistant') return i === index;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style src="./nana-chat.css"></style>
|
||||||
@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ai-composer-wrap" :class="{ 'has-new-chat-tip': showHint }">
|
<div class="ai-composer-wrap" :class="{ 'has-new-chat-tip': showHint }">
|
||||||
<div class="ai-new-chat-tip" :hidden="!showHint" role="status" aria-live="polite">
|
<div
|
||||||
|
class="ai-new-chat-tip"
|
||||||
|
:class="{ 'is-visible': showHint }"
|
||||||
|
:hidden="!showHint"
|
||||||
|
role="status"
|
||||||
|
aria-live="polite"
|
||||||
|
>
|
||||||
<span class="ai-new-chat-tip__text">{{ hint }}</span>
|
<span class="ai-new-chat-tip__text">{{ hint }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-composer">
|
<div class="ai-composer">
|
||||||
@ -17,12 +23,19 @@
|
|||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
@keydown="onKeydown"
|
@keydown="onKeydown"
|
||||||
></textarea>
|
></textarea>
|
||||||
<button type="submit" class="ai-composer-send" :class="{ 'is-empty': !modelValue.trim() }" :disabled="busy" :aria-label="sendLabel">
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="ai-composer-send"
|
||||||
|
:class="{ 'is-empty': !modelValue.trim() }"
|
||||||
|
:disabled="busy"
|
||||||
|
:aria-label="sendLabel"
|
||||||
|
>
|
||||||
<svg class="ai-composer-send__mark" viewBox="0 0 24 24" aria-hidden="true">
|
<svg class="ai-composer-send__mark" viewBox="0 0 24 24" aria-hidden="true">
|
||||||
<path d="M12 19V5M6.5 10.5 12 5l5.5 5.5" />
|
<path d="M12 19V5M6.5 10.5 12 5l5.5 5.5" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
<slot name="footer" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -30,14 +43,21 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = withDefaults(
|
||||||
modelValue: string;
|
defineProps<{
|
||||||
placeholder: string;
|
modelValue: string;
|
||||||
sendLabel: string;
|
placeholder: string;
|
||||||
busy: boolean;
|
sendLabel: string;
|
||||||
hint?: string;
|
busy?: boolean;
|
||||||
showHint?: boolean;
|
hint?: string;
|
||||||
}>();
|
showHint?: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
busy: false,
|
||||||
|
hint: '',
|
||||||
|
showHint: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
'update:modelValue': [value: string];
|
'update:modelValue': [value: string];
|
||||||
@ -50,7 +70,7 @@
|
|||||||
const el = inputRef.value;
|
const el = inputRef.value;
|
||||||
if (!el) return;
|
if (!el) return;
|
||||||
el.style.height = 'auto';
|
el.style.height = 'auto';
|
||||||
el.style.height = Math.min(el.scrollHeight, 160) + 'px';
|
el.style.height = `${Math.min(el.scrollHeight, 160)}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onInput(event: Event) {
|
function onInput(event: Event) {
|
||||||
@ -62,7 +82,6 @@
|
|||||||
function onFocus() {
|
function onFocus() {
|
||||||
const el = inputRef.value;
|
const el = inputRef.value;
|
||||||
if (!el) return;
|
if (!el) return;
|
||||||
// iOS 键盘顶起后,把输入框滚进可视区
|
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
el.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
el.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
||||||
}, 80);
|
}, 80);
|
||||||
@ -81,8 +100,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
focus() {
|
focus(options?: FocusOptions) {
|
||||||
inputRef.value?.focus();
|
inputRef.value?.focus(options);
|
||||||
},
|
},
|
||||||
|
blur() {
|
||||||
|
inputRef.value?.blur();
|
||||||
|
},
|
||||||
|
resize,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -924,108 +924,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row {
|
/* 会话气泡/阅读流由 NanaChatDialog + nana-chat.css 统一提供 */
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
align-items: flex-end;
|
|
||||||
max-width: 100%;
|
|
||||||
animation: ai-msg-in 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes ai-msg-in {
|
/* Compact chips(跟进条仍可在壳层单独使用) */
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--user {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
align-self: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant {
|
|
||||||
align-self: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-avatar {
|
|
||||||
flex-shrink: 0;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 10px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-avatar {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
padding: 0;
|
|
||||||
background: transparent;
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--user .ai-msg-avatar {
|
|
||||||
background: rgba(27, 42, 107, 0.08);
|
|
||||||
color: var(--kc-primary, #1b2a6b);
|
|
||||||
font-size: 0.75rem;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-bubble {
|
|
||||||
max-width: min(680px, 88%);
|
|
||||||
padding: 12px 16px;
|
|
||||||
border-radius: 18px;
|
|
||||||
font-size: 0.94rem;
|
|
||||||
line-height: 1.6;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-break: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--user .ai-msg-bubble {
|
|
||||||
background: var(--kc-primary, #1b2a6b);
|
|
||||||
color: #fff;
|
|
||||||
border-bottom-right-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-bubble {
|
|
||||||
background: var(--app-card-bg);
|
|
||||||
color: var(--color-text-1);
|
|
||||||
border: 1px solid rgba(27, 42, 107, 0.08);
|
|
||||||
box-shadow: 0 2px 8px rgba(27, 42, 107, 0.04);
|
|
||||||
border-bottom-left-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--typing .ai-msg-bubble {
|
|
||||||
display: flex;
|
|
||||||
gap: 5px;
|
|
||||||
align-items: center;
|
|
||||||
padding: 14px 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--typing span {
|
|
||||||
width: 7px;
|
|
||||||
height: 7px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--kc-secondary, #6a75b8);
|
|
||||||
animation: ai-typing 1.2s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--typing span:nth-child(2) { animation-delay: 0.15s; }
|
|
||||||
.ai-msg-row--typing span:nth-child(3) { animation-delay: 0.3s; }
|
|
||||||
|
|
||||||
@keyframes ai-typing {
|
|
||||||
0%, 80%, 100% { opacity: 0.35; transform: scale(0.85); }
|
|
||||||
40% { opacity: 1; transform: scale(1); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compact chips after chat starts */
|
|
||||||
.ai-followup {
|
.ai-followup {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: none;
|
display: none;
|
||||||
@ -1151,6 +1052,68 @@
|
|||||||
filter: none;
|
filter: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 与官网欢迎提问卡一致:32px 圆钮,空态浅灰 / 有内容黑底上箭头 */
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: #0d0d0d;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: none;
|
||||||
|
font-size: inherit;
|
||||||
|
opacity: 1;
|
||||||
|
transform: none;
|
||||||
|
filter: none;
|
||||||
|
transition: background 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send__mark,
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send svg {
|
||||||
|
display: block;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
fill: none;
|
||||||
|
stroke: currentColor;
|
||||||
|
stroke-width: 2.25;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send.is-empty,
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send.is-empty:hover {
|
||||||
|
background: #ececec;
|
||||||
|
color: #9a9a9a;
|
||||||
|
cursor: default;
|
||||||
|
transform: none;
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send:hover:not(:disabled):not(.is-empty) {
|
||||||
|
background: #2f2f2f;
|
||||||
|
transform: none;
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send:focus-visible {
|
||||||
|
outline: 2px solid #0d0d0d;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send:disabled:not(.is-empty) {
|
||||||
|
background: #0d0d0d;
|
||||||
|
color: #fff;
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-advisor-shell--round-send .ai-composer-send:not(:disabled):not(.is-empty):active {
|
||||||
|
background: #2f2f2f;
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
.ai-composer-footer {
|
.ai-composer-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
157
src/components/NanaAssistant/nana-chat.css
Normal file
157
src/components/NanaAssistant/nana-chat.css
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
/* Nana 公共会话流:与 FAB 同源头像 + 阅读流排版 */
|
||||||
|
|
||||||
|
.nana-chat-dialog.ai-messages {
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 18px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: min(720px, 100%);
|
||||||
|
margin-inline: auto;
|
||||||
|
padding: 8px 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog.ai-messages.is-active {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
align-items: flex-start;
|
||||||
|
max-width: 100%;
|
||||||
|
animation: nana-chat-msg-in 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes nana-chat-msg-in {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(8px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--user {
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--assistant {
|
||||||
|
align-self: stretch;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-nana.nana-fab-wrap,
|
||||||
|
.nana-chat-dialog .ai-msg-row--assistant .nana-fab-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-nana .nana-fab__img,
|
||||||
|
.nana-chat-dialog .ai-msg-row--assistant .nana-fab__img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(0 3px 8px rgba(45, 140, 140, 0.28));
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-nana .nana-fab__pulse,
|
||||||
|
.nana-chat-dialog .ai-msg-row--assistant .nana-fab__pulse {
|
||||||
|
position: absolute;
|
||||||
|
inset: 1px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1.5px solid var(--app-primary-color, #2d8c8c);
|
||||||
|
opacity: 0;
|
||||||
|
animation: nana-pulse 2.4s ease-out infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-body {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
color: var(--ai-ink, var(--color-text-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-body--typing {
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
min-height: 36px;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-bubble {
|
||||||
|
max-width: min(520px, 86%);
|
||||||
|
padding: 11px 15px;
|
||||||
|
border-radius: 18px;
|
||||||
|
font-size: 0.94rem;
|
||||||
|
line-height: 1.55;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--user .ai-msg-bubble {
|
||||||
|
background: var(--ai-action, var(--app-primary-color, #2d8c8c));
|
||||||
|
color: #fff;
|
||||||
|
border-bottom-right-radius: 6px;
|
||||||
|
box-shadow: 0 8px 20px color-mix(in srgb, var(--ai-action, var(--app-primary-color, #2d8c8c)) 18%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-text {
|
||||||
|
margin: 0;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--assistant .ai-msg-text {
|
||||||
|
font-size: 0.98rem;
|
||||||
|
line-height: 1.68;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
color: var(--ai-ink, var(--color-text-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-followups {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--typing .ai-msg-body--typing span {
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--ai-muted, var(--color-text-3, #86909c));
|
||||||
|
animation: nana-chat-typing 1.2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--typing .ai-msg-body--typing span:nth-child(2) {
|
||||||
|
animation-delay: 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nana-chat-dialog .ai-msg-row--typing .ai-msg-body--typing span:nth-child(3) {
|
||||||
|
animation-delay: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes nana-chat-typing {
|
||||||
|
0%,
|
||||||
|
80%,
|
||||||
|
100% {
|
||||||
|
opacity: 0.35;
|
||||||
|
transform: scale(0.85);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -259,7 +259,7 @@ const props = withDefaults(
|
|||||||
/** 侧栏收起等场景只显示头像 */
|
/** 侧栏收起等场景只显示头像 */
|
||||||
compact?: boolean
|
compact?: boolean
|
||||||
/** 下拉相对触发器位置;侧栏 Cursor 风格默认 tl(向上) */
|
/** 下拉相对触发器位置;侧栏 Cursor 风格默认 tl(向上) */
|
||||||
dropdownPosition?: 'br' | 'bl' | 'tr' | 'tl' | 'rt' | 'rb'
|
dropdownPosition?: 'br' | 'bl' | 'tr' | 'tl' | 'rt' | 'rb' | 'bottom' | 'top'
|
||||||
/** 客户侧栏:资产与账户菜单,收进用户下拉 */
|
/** 客户侧栏:资产与账户菜单,收进用户下拉 */
|
||||||
accountMenus?: CustomerNavItem[]
|
accountMenus?: CustomerNavItem[]
|
||||||
/** 客户侧栏:语言收进用户菜单,不再单独占底栏 */
|
/** 客户侧栏:语言收进用户菜单,不再单独占底栏 */
|
||||||
@ -303,7 +303,7 @@ const dropdownTrigger = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const dropdownPosition = computed(
|
const dropdownPosition = computed(
|
||||||
() => props.dropdownPosition ?? (isSiderVariant.value ? 'tl' : 'br'),
|
() => props.dropdownPosition ?? (isSiderVariant.value ? 'tl' : 'bottom'),
|
||||||
);
|
);
|
||||||
|
|
||||||
const contentClass = computed(() =>
|
const contentClass = computed(() =>
|
||||||
@ -641,27 +641,29 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-menu-item {
|
.user-menu-item {
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 148px;
|
width: max-content;
|
||||||
max-width: 220px;
|
max-width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
line-height: 1.35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-menu-item__icon {
|
.user-menu-item__icon {
|
||||||
width: 18px;
|
width: 16px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 10px;
|
margin-right: 8px;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
color: var(--color-text-3);
|
color: var(--color-text-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-menu-item__label {
|
.user-menu-item__label {
|
||||||
flex: 1;
|
flex: 0 1 auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@ -679,12 +681,33 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.user-account-dropdown {
|
.user-account-dropdown {
|
||||||
|
padding: 6px !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
width: max-content !important;
|
||||||
|
|
||||||
.arco-dropdown {
|
.arco-dropdown {
|
||||||
min-width: 156px;
|
min-width: 0;
|
||||||
|
width: max-content;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arco-dropdown-list {
|
||||||
|
padding: 0;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arco-dropdown-option {
|
||||||
|
min-height: 32px;
|
||||||
|
line-height: 1.35;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arco-dropdown-option-content {
|
.arco-dropdown-option-content {
|
||||||
padding: 8px 12px;
|
display: flex;
|
||||||
|
padding: 7px 12px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
||||||
<div class="top-nav-header">
|
<div class="top-nav-header">
|
||||||
<!-- Logo 区域:点击跳转官网首页 -->
|
<!-- Logo 区域:点击跳转官网首页 -->
|
||||||
<a class="top-nav-logo" href="/" :title="t('brand.fullName')" @click.prevent="goOfficialSite">
|
<a class="top-nav-logo" href="/" :title="t('brand.fullName')" @click="goOfficialSite">
|
||||||
<img :src="navLogo" :alt="t('brand.name')" />
|
<img :src="navLogo" :alt="t('brand.name')" />
|
||||||
<div class="top-nav-logo__brand">
|
<div class="top-nav-logo__brand">
|
||||||
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
|
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
|
||||||
@ -306,6 +306,7 @@ import { resolveCurrentCustomer } from '@/api/customer/resolve';
|
|||||||
import { CUSTOMER_BALANCE_CHANGED_EVENT } from '@/api/customer/accountFlow';
|
import { CUSTOMER_BALANCE_CHANGED_EVENT } from '@/api/customer/accountFlow';
|
||||||
import { resolvePortalDrawerPanel } from '@/views/user/portal-drawer/types';
|
import { resolvePortalDrawerPanel } from '@/views/user/portal-drawer/types';
|
||||||
import { PRINT_CONTROL_DOWNLOAD_URL } from '@/constants/printControl';
|
import { PRINT_CONTROL_DOWNLOAD_URL } from '@/constants/printControl';
|
||||||
|
import { armPageFlip } from '@/utils/page-transition-flag';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -319,9 +320,21 @@ const topNavEnable = computed(() => true); // 启用顶部导航
|
|||||||
const tabNavEnable = computed(() => appStore.tabBar);
|
const tabNavEnable = computed(() => appStore.tabBar);
|
||||||
const printConnectionState = useHiprintClientState();
|
const printConnectionState = useHiprintClientState();
|
||||||
|
|
||||||
/** 顶栏 Logo → 官网首页(开发环境即 http://localhost:5173/) */
|
/** 顶栏 Logo → 官网首页(与登录门户切换同一套中心虹膜过渡) */
|
||||||
function goOfficialSite() {
|
function goOfficialSite(e: MouseEvent) {
|
||||||
window.location.href = '/';
|
if (
|
||||||
|
e.button !== 0 ||
|
||||||
|
e.metaKey ||
|
||||||
|
e.ctrlKey ||
|
||||||
|
e.shiftKey ||
|
||||||
|
e.altKey
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
if (route.name === 'siteRoot') return;
|
||||||
|
armPageFlip();
|
||||||
|
void router.push({ name: 'siteRoot' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const menuItemEls = new Map<string, HTMLElement>();
|
const menuItemEls = new Map<string, HTMLElement>();
|
||||||
|
|||||||
@ -50,18 +50,16 @@ const ORDER: AppRouteRecordRaw = {
|
|||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.order.myOrders',
|
locale: 'menu.order.myOrders',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
ignoreCache: true,
|
|
||||||
menuPermission: 'Order.MyOrders',
|
menuPermission: 'Order.MyOrders',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'fulfillOrders',
|
path: 'fulfillOrders',
|
||||||
name: 'FulfillOrders',
|
name: 'FulfillOrders',
|
||||||
component: () => import('@/views/order/myOrders/index.vue'),
|
component: () => import('@/views/order/fulfillOrders/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.order.fulfillOrders',
|
locale: 'menu.order.fulfillOrders',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
ignoreCache: true,
|
|
||||||
listMode: 'fulfill',
|
listMode: 'fulfill',
|
||||||
permission: 'Order.FulfillOrders',
|
permission: 'Order.FulfillOrders',
|
||||||
menuPermission: 'Order.FulfillOrders',
|
menuPermission: 'Order.FulfillOrders',
|
||||||
@ -77,7 +75,6 @@ const ORDER: AppRouteRecordRaw = {
|
|||||||
adminPortalOnly: true,
|
adminPortalOnly: true,
|
||||||
permission: 'Order.WaybillManage',
|
permission: 'Order.WaybillManage',
|
||||||
menuPermission: 'Order.WaybillManage',
|
menuPermission: 'Order.WaybillManage',
|
||||||
ignoreCache: true,
|
|
||||||
order: 3,
|
order: 3,
|
||||||
icon: 'icon-storage',
|
icon: 'icon-storage',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -76,7 +76,15 @@ export function shouldPortalIris(to: PortalRouteLike, from: PortalRouteLike): bo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const isPcLogin = (name: string) => name === 'login' || name === 'adminLogin';
|
const isPcLogin = (name: string) => name === 'login' || name === 'adminLogin';
|
||||||
return isPcLogin(fromName) && isPcLogin(toName) && fromName !== toName;
|
// 客户/管理登录互切
|
||||||
|
if (isPcLogin(fromName) && isPcLogin(toName) && fromName !== toName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// 登录页回官网(与门户切换同一套中心虹膜)
|
||||||
|
if (isPcLogin(fromName) && toName === 'siteRoot') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated 同 peekPageFlip */
|
/** @deprecated 同 peekPageFlip */
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="assistant-page">
|
<div class="assistant-page">
|
||||||
<AiAdvisorShell />
|
<AiAdvisorShell round-send />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -1476,7 +1476,8 @@ import { pickResolvedAudit } from '@/utils/auditFields'
|
|||||||
const PRICE_LIST_HOT_HEIGHT = 550
|
const PRICE_LIST_HOT_HEIGHT = 550
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'ServiceChannel'
|
// 须与路由 name `ServiceChannels` 一致,否则 keep-alive include 对不上,切标签会整页重挂
|
||||||
|
name: 'ServiceChannels'
|
||||||
})
|
})
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|||||||
@ -337,65 +337,6 @@ function promptGuestRegister() {
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ai-composer-send) {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: #0d0d0d;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: none;
|
|
||||||
opacity: 1;
|
|
||||||
transform: none;
|
|
||||||
filter: none;
|
|
||||||
|
|
||||||
.ai-composer-send__mark,
|
|
||||||
svg {
|
|
||||||
display: block;
|
|
||||||
width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
fill: none;
|
|
||||||
stroke: currentColor;
|
|
||||||
stroke-width: 2.25;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-empty,
|
|
||||||
&.is-empty:hover {
|
|
||||||
background: #ececec;
|
|
||||||
color: #9a9a9a;
|
|
||||||
cursor: default;
|
|
||||||
transform: none;
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover:not(:disabled):not(.is-empty) {
|
|
||||||
background: #2f2f2f;
|
|
||||||
transform: none;
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus-visible {
|
|
||||||
outline: 2px solid #0d0d0d;
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:disabled:not(.is-empty) {
|
|
||||||
background: #0d0d0d;
|
|
||||||
color: #fff;
|
|
||||||
opacity: 0.45;
|
|
||||||
cursor: not-allowed;
|
|
||||||
transform: none;
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:disabled):not(.is-empty):active {
|
|
||||||
background: #2f2f2f;
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ai-composer-footer) {
|
:deep(.ai-composer-footer) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
class="nova-login__header"
|
class="nova-login__header"
|
||||||
href="/"
|
href="/"
|
||||||
:title="brandHint"
|
:title="brandHint"
|
||||||
@click.prevent="goOfficialSite"
|
@click="goOfficialSite"
|
||||||
>
|
>
|
||||||
<LoginLockLogo />
|
<LoginLockLogo />
|
||||||
<p class="nova-login__brand-hint">{{ brandHint }}</p>
|
<p class="nova-login__brand-hint">{{ brandHint }}</p>
|
||||||
@ -110,6 +110,7 @@ import { setToken } from '@/utils/auth';
|
|||||||
import { getDefaultHomePathByType, resolveCustomerEntryPath } from '@/utils/login-portal';
|
import { getDefaultHomePathByType, resolveCustomerEntryPath } from '@/utils/login-portal';
|
||||||
import { enterSystemAfterLogin, applyRbacUserToUserStore } from '@/utils/enter-system';
|
import { enterSystemAfterLogin, applyRbacUserToUserStore } from '@/utils/enter-system';
|
||||||
import { ensureHeavyPlugins } from '@/plugins/heavy-plugins';
|
import { ensureHeavyPlugins } from '@/plugins/heavy-plugins';
|
||||||
|
import { armPageFlip } from '@/utils/page-transition-flag';
|
||||||
import { LOGIN_CHARACTERS_KEY, type LoginCharactersApi } from '../../composables/useLoginCharacters';
|
import { LOGIN_CHARACTERS_KEY, type LoginCharactersApi } from '../../composables/useLoginCharacters';
|
||||||
import { LOGIN_EXIT_KEY, type LoginExitApi } from '../../composables/useLoginExit';
|
import { LOGIN_EXIT_KEY, type LoginExitApi } from '../../composables/useLoginExit';
|
||||||
import LoginLockLogo from '../LoginLockLogo.vue';
|
import LoginLockLogo from '../LoginLockLogo.vue';
|
||||||
@ -162,9 +163,20 @@ const brandHint = computed(() => {
|
|||||||
return t('login.form.brandHint.admin');
|
return t('login.form.brandHint.admin');
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Logo / 欢迎文案 → 官网首页 */
|
/** Logo / 欢迎文案 → 官网首页(与门户切换同一套中心虹膜过渡) */
|
||||||
function goOfficialSite() {
|
function goOfficialSite(e: MouseEvent) {
|
||||||
window.location.href = '/';
|
if (
|
||||||
|
e.button !== 0 ||
|
||||||
|
e.metaKey ||
|
||||||
|
e.ctrlKey ||
|
||||||
|
e.shiftKey ||
|
||||||
|
e.altKey
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
armPageFlip();
|
||||||
|
void router.push({ name: 'siteRoot' });
|
||||||
}
|
}
|
||||||
const accountFieldLabel = computed(() =>
|
const accountFieldLabel = computed(() =>
|
||||||
isAgentLogin.value ? t('login.field.account.agent') : t('login.field.account'),
|
isAgentLogin.value ? t('login.field.account.agent') : t('login.field.account'),
|
||||||
|
|||||||
15
src/views/order/fulfillOrders/index.vue
Normal file
15
src/views/order/fulfillOrders/index.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
/**
|
||||||
|
* 代发订单与「我的订单」共用列表实现,但 keep-alive 按组件 name 缓存。
|
||||||
|
* 独立壳组件使用路由名 FulfillOrders,避免与 MyOrders 抢同一缓存实例。
|
||||||
|
*/
|
||||||
|
import MyOrders from '../myOrders/index.vue';
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'FulfillOrders',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<MyOrders />
|
||||||
|
</template>
|
||||||
@ -17,6 +17,7 @@
|
|||||||
import SelectDeclarationSkuModal from './components/SelectDeclarationSkuModal.vue';
|
import SelectDeclarationSkuModal from './components/SelectDeclarationSkuModal.vue';
|
||||||
import FormLabelWithPreview from '@/views/channel/salesProducts/components/FormLabelWithPreview.vue';
|
import FormLabelWithPreview from '@/views/channel/salesProducts/components/FormLabelWithPreview.vue';
|
||||||
import CustomerGuideDrawer from '@/views/order/priceCheck/components/CustomerGuideDrawer.vue';
|
import CustomerGuideDrawer from '@/views/order/priceCheck/components/CustomerGuideDrawer.vue';
|
||||||
|
import ShippingMethodTabSelect from '@/views/order/priceCheck/components/ShippingMethodTabSelect.vue';
|
||||||
import ExportCustoms9610GuideModal from './components/ExportCustoms9610GuideModal.vue';
|
import ExportCustoms9610GuideModal from './components/ExportCustoms9610GuideModal.vue';
|
||||||
import { Message, Modal } from '@arco-design/web-vue';
|
import { Message, Modal } from '@arco-design/web-vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@ -42,6 +43,7 @@
|
|||||||
postOrderUpload,
|
postOrderUpload,
|
||||||
getOrderBatchJob,
|
getOrderBatchJob,
|
||||||
postOrderReceiverParseAddress,
|
postOrderReceiverParseAddress,
|
||||||
|
type PriceCheckShippingGroup,
|
||||||
} from '@/api/order';
|
} from '@/api/order';
|
||||||
import { listAiProviders, listAiSkills, type AiSkillItem } from '@/api/ai';
|
import { listAiProviders, listAiSkills, type AiSkillItem } from '@/api/ai';
|
||||||
import {
|
import {
|
||||||
@ -217,9 +219,6 @@
|
|||||||
if (!p) return [];
|
if (!p) return [];
|
||||||
return resolveProviderModelTags(p);
|
return resolveProviderModelTags(p);
|
||||||
});
|
});
|
||||||
/** 申报表固定高度(框内滚动,不支持拖拽调高) */
|
|
||||||
const DECLARATION_PANEL_HEIGHT = 280;
|
|
||||||
|
|
||||||
interface TemplateRow {
|
interface TemplateRow {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@ -385,6 +384,7 @@
|
|||||||
|
|
||||||
const singleReferenceLoading = ref(false);
|
const singleReferenceLoading = ref(false);
|
||||||
const singleSalesProductOptions = ref<SingleProductOption[]>([]);
|
const singleSalesProductOptions = ref<SingleProductOption[]>([]);
|
||||||
|
const singleShippingMethodGroups = ref<PriceCheckShippingGroup[]>([]);
|
||||||
const singleDomesticPickupProductOptions = ref<Array<{ value: string; label: string }>>([]);
|
const singleDomesticPickupProductOptions = ref<Array<{ value: string; label: string }>>([]);
|
||||||
const singleCargoAttributeOptions = ref<SingleSelectOption[]>([]);
|
const singleCargoAttributeOptions = ref<SingleSelectOption[]>([]);
|
||||||
const singleExportCustomsModeOptions = ref<SingleSelectOption[]>([]);
|
const singleExportCustomsModeOptions = ref<SingleSelectOption[]>([]);
|
||||||
@ -404,6 +404,7 @@
|
|||||||
const code = String(row?.productCode ?? row?.ProductCode ?? '').trim();
|
const code = String(row?.productCode ?? row?.ProductCode ?? '').trim();
|
||||||
const name = String(row?.productName ?? row?.ProductName ?? '').trim();
|
const name = String(row?.productName ?? row?.ProductName ?? '').trim();
|
||||||
const id = Number(row?.id ?? row?.Id ?? 0);
|
const id = Number(row?.id ?? row?.Id ?? 0);
|
||||||
|
const productGroup = String(row?.productGroup ?? row?.ProductGroup ?? '').trim();
|
||||||
const routeSortRaw = row?.routeSort ?? row?.RouteSort;
|
const routeSortRaw = row?.routeSort ?? row?.RouteSort;
|
||||||
const routeSortNum = Number(routeSortRaw);
|
const routeSortNum = Number(routeSortRaw);
|
||||||
const minTimelinessRaw = row?.minTimeliness ?? row?.MinTimeliness;
|
const minTimelinessRaw = row?.minTimeliness ?? row?.MinTimeliness;
|
||||||
@ -418,6 +419,7 @@
|
|||||||
code,
|
code,
|
||||||
name,
|
name,
|
||||||
productId: id > 0 ? id : undefined,
|
productId: id > 0 ? id : undefined,
|
||||||
|
productGroup,
|
||||||
routeSort: Number.isFinite(routeSortNum) ? routeSortNum : 0,
|
routeSort: Number.isFinite(routeSortNum) ? routeSortNum : 0,
|
||||||
minTimeliness:
|
minTimeliness:
|
||||||
minTimelinessNum != null && Number.isFinite(minTimelinessNum)
|
minTimelinessNum != null && Number.isFinite(minTimelinessNum)
|
||||||
@ -427,6 +429,60 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildShippingMethodGroups(
|
||||||
|
products: Array<{
|
||||||
|
code: string;
|
||||||
|
name: string;
|
||||||
|
productId?: number;
|
||||||
|
productGroup: string;
|
||||||
|
routeSort: number;
|
||||||
|
minTimeliness: number | null;
|
||||||
|
}>,
|
||||||
|
groupDictRows: any[],
|
||||||
|
): PriceCheckShippingGroup[] {
|
||||||
|
const groupMeta = new Map<string, { name: string; sort: number }>();
|
||||||
|
for (const row of groupDictRows ?? []) {
|
||||||
|
const code = String(row?.dictCode ?? row?.DictCode ?? '').trim();
|
||||||
|
if (!code) continue;
|
||||||
|
const name = String(row?.dictName ?? row?.DictName ?? '').trim() || code;
|
||||||
|
const sortRaw = Number(row?.dictSort ?? row?.DictSort ?? row?.sort ?? row?.Sort ?? 0);
|
||||||
|
groupMeta.set(code, {
|
||||||
|
name,
|
||||||
|
sort: Number.isFinite(sortRaw) ? sortRaw : 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const grouped = new Map<string, PriceCheckShippingGroup & { sort: number }>();
|
||||||
|
for (const product of products) {
|
||||||
|
const groupCode = product.productGroup || '_ungrouped';
|
||||||
|
const meta = groupMeta.get(groupCode);
|
||||||
|
if (!grouped.has(groupCode)) {
|
||||||
|
grouped.set(groupCode, {
|
||||||
|
groupCode,
|
||||||
|
groupName: meta?.name || (groupCode === '_ungrouped' ? '其他' : groupCode),
|
||||||
|
products: [],
|
||||||
|
sort: meta?.sort ?? Number.MAX_SAFE_INTEGER,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const label = product.name ? `${product.name} ${product.code}` : product.code;
|
||||||
|
grouped.get(groupCode)!.products.push({
|
||||||
|
productId: product.productId ?? 0,
|
||||||
|
productCode: product.code,
|
||||||
|
productName: product.name || product.code,
|
||||||
|
label,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return Array.from(grouped.values())
|
||||||
|
.sort(
|
||||||
|
(a, b) =>
|
||||||
|
a.sort - b.sort ||
|
||||||
|
a.groupName.localeCompare(b.groupName, 'zh') ||
|
||||||
|
a.groupCode.localeCompare(b.groupCode),
|
||||||
|
)
|
||||||
|
.map(({ sort: _sort, ...group }) => group);
|
||||||
|
}
|
||||||
|
|
||||||
/** 与官网线路目录一致:RouteSort → 时效 → 名称 → Id */
|
/** 与官网线路目录一致:RouteSort → 时效 → 名称 → Id */
|
||||||
function compareSalesProductRouteSort(
|
function compareSalesProductRouteSort(
|
||||||
a: {
|
a: {
|
||||||
@ -1689,7 +1745,6 @@
|
|||||||
router.push({ path: '/user/exportQualification' });
|
router.push({ path: '/user/exportQualification' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const singleFormScrollRef = ref<HTMLElement | null>(null);
|
|
||||||
const customerGuideDrawerRef = ref<InstanceType<typeof CustomerGuideDrawer> | null>(null);
|
const customerGuideDrawerRef = ref<InstanceType<typeof CustomerGuideDrawer> | null>(null);
|
||||||
const singlePanelRefs = reactive<Record<string, HTMLElement | null>>({
|
const singlePanelRefs = reactive<Record<string, HTMLElement | null>>({
|
||||||
basic: null,
|
basic: null,
|
||||||
@ -2630,21 +2685,26 @@
|
|||||||
.filter((code: string) => Boolean(code)),
|
.filter((code: string) => Boolean(code)),
|
||||||
);
|
);
|
||||||
|
|
||||||
singleSalesProductOptions.value = (productRes.items ?? [])
|
const placeOrderProducts = (productRes.items ?? [])
|
||||||
.filter((row: any) => {
|
.filter((row: any) => {
|
||||||
const groupCode = String(row?.productGroup ?? row?.ProductGroup ?? '').trim();
|
const groupCode = String(row?.productGroup ?? row?.ProductGroup ?? '').trim();
|
||||||
return domesticPickupGroupCodes.size ? !domesticPickupGroupCodes.has(groupCode) : true;
|
return domesticPickupGroupCodes.size ? !domesticPickupGroupCodes.has(groupCode) : true;
|
||||||
})
|
})
|
||||||
.map(normalizeProductRow)
|
.map(normalizeProductRow)
|
||||||
.filter((p) => p.code)
|
.filter((p) => p.code)
|
||||||
.sort(compareSalesProductRouteSort)
|
.sort(compareSalesProductRouteSort);
|
||||||
.map((p) => ({
|
|
||||||
value: p.code,
|
singleSalesProductOptions.value = placeOrderProducts.map((p) => ({
|
||||||
label: p.name ? `${p.name} ${p.code}` : p.code,
|
value: p.code,
|
||||||
productId: p.productId,
|
label: p.name ? `${p.name} ${p.code}` : p.code,
|
||||||
productName: p.name || p.code,
|
productId: p.productId,
|
||||||
additionalServices: p.additionalServices ?? [],
|
productName: p.name || p.code,
|
||||||
}));
|
additionalServices: p.additionalServices ?? [],
|
||||||
|
}));
|
||||||
|
singleShippingMethodGroups.value = buildShippingMethodGroups(
|
||||||
|
placeOrderProducts,
|
||||||
|
salesProductGroupDictRows ?? [],
|
||||||
|
);
|
||||||
|
|
||||||
singleDomesticPickupProductOptions.value = (productRes.items ?? [])
|
singleDomesticPickupProductOptions.value = (productRes.items ?? [])
|
||||||
.filter((row: any) => {
|
.filter((row: any) => {
|
||||||
@ -2730,6 +2790,7 @@
|
|||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
Message.error(e?.message || '加载下拉选项失败');
|
Message.error(e?.message || '加载下拉选项失败');
|
||||||
singleSalesProductOptions.value = [];
|
singleSalesProductOptions.value = [];
|
||||||
|
singleShippingMethodGroups.value = [];
|
||||||
singleDomesticPickupProductOptions.value = [];
|
singleDomesticPickupProductOptions.value = [];
|
||||||
singleCargoAttributeOptions.value = [];
|
singleCargoAttributeOptions.value = [];
|
||||||
singleExportCustomsModeOptions.value = [];
|
singleExportCustomsModeOptions.value = [];
|
||||||
@ -3445,21 +3506,25 @@
|
|||||||
Message.success('Mock 订单已填入');
|
Message.success('Mock 订单已填入');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pulsePanel(panelEl: HTMLElement) {
|
||||||
|
panelEl.classList.remove('is-focus-pulse');
|
||||||
|
void panelEl.offsetWidth;
|
||||||
|
panelEl.classList.add('is-focus-pulse');
|
||||||
|
window.setTimeout(() => panelEl.classList.remove('is-focus-pulse'), 1200);
|
||||||
|
}
|
||||||
|
|
||||||
function scrollSectionIntoView(section: string) {
|
function scrollSectionIntoView(section: string) {
|
||||||
const scrollEl = singleFormScrollRef.value;
|
|
||||||
const panelEl = singlePanelRefs[section];
|
const panelEl = singlePanelRefs[section];
|
||||||
if (!scrollEl || !panelEl) return;
|
if (!panelEl) return;
|
||||||
|
|
||||||
const nextTop =
|
// 申报区已停靠;基本/收件各自在卡片内滚动,点步骤时滚到顶并轻提示
|
||||||
panelEl.getBoundingClientRect().top -
|
if (section === 'declaration') {
|
||||||
scrollEl.getBoundingClientRect().top +
|
pulsePanel(panelEl);
|
||||||
scrollEl.scrollTop -
|
return;
|
||||||
8;
|
}
|
||||||
|
|
||||||
scrollEl.scrollTo({
|
panelEl.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
top: Math.max(0, nextTop),
|
pulsePanel(panelEl);
|
||||||
behavior: 'smooth',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function focusSingleSection(section: string) {
|
function focusSingleSection(section: string) {
|
||||||
@ -3981,7 +4046,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="single-form-body">
|
<div class="single-form-body">
|
||||||
<div ref="singleFormScrollRef" class="single-form-scroll">
|
<div class="single-form-top">
|
||||||
<div class="single-cards-row">
|
<div class="single-cards-row">
|
||||||
<section
|
<section
|
||||||
class="single-info-card liquid-card"
|
class="single-info-card liquid-card"
|
||||||
@ -4002,20 +4067,13 @@
|
|||||||
@preview="handleViewShippingCustomerGuide"
|
@preview="handleViewShippingCustomerGuide"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<a-select
|
<ShippingMethodTabSelect
|
||||||
v-model="singleForm.productCode"
|
v-model="singleForm.productCode"
|
||||||
allow-search
|
:groups="singleShippingMethodGroups"
|
||||||
placeholder="请选择"
|
|
||||||
:loading="singleReferenceLoading"
|
:loading="singleReferenceLoading"
|
||||||
>
|
placeholder="请选择"
|
||||||
<a-option
|
:show-all-option="false"
|
||||||
v-for="opt in singleSalesProductOptions"
|
/>
|
||||||
:key="opt.value"
|
|
||||||
:value="opt.value"
|
|
||||||
>
|
|
||||||
{{ opt.label }}
|
|
||||||
</a-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="客户单号"
|
label="客户单号"
|
||||||
@ -4576,6 +4634,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="single-info-card liquid-card declaration-card"
|
class="single-info-card liquid-card declaration-card"
|
||||||
@ -4651,10 +4710,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div
|
<div class="single-declaration-table-wrap">
|
||||||
class="single-declaration-table-wrap"
|
|
||||||
:style="{ height: `${DECLARATION_PANEL_HEIGHT}px` }"
|
|
||||||
>
|
|
||||||
<table class="single-declaration-table">
|
<table class="single-declaration-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -4781,7 +4837,6 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -5758,11 +5813,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.declaration-card {
|
.declaration-card {
|
||||||
|
flex: 0 0 clamp(260px, 34vh, 420px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
&.is-focus-pulse {
|
||||||
|
animation: place-order-focus-pulse 1.2s ease;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-declaration-table-wrap {
|
.single-declaration-table-wrap {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
@ -6826,19 +6890,36 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
gap: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-form-scroll {
|
/* 上区定高;基本/收件各自卡片内滚动,互不带走 */
|
||||||
flex: 1;
|
.single-form-top {
|
||||||
|
flex: 1 1 auto;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-cards-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
|
||||||
|
gap: 12px;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-info-card {
|
||||||
|
padding: 14px 16px 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
max-height: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
overscroll-behavior: contain;
|
||||||
flex-direction: column;
|
|
||||||
gap: 12px;
|
|
||||||
padding-right: 2px;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
@ -6852,19 +6933,10 @@
|
|||||||
&::-webkit-scrollbar-thumb:hover {
|
&::-webkit-scrollbar-thumb:hover {
|
||||||
background: var(--color-border-3);
|
background: var(--color-border-3);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.single-cards-row {
|
&.is-focus-pulse {
|
||||||
display: grid;
|
animation: place-order-focus-pulse 1.2s ease;
|
||||||
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
|
}
|
||||||
gap: 12px;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.single-info-card {
|
|
||||||
padding: 14px 16px 12px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-info-card--recipient {
|
.single-info-card--recipient {
|
||||||
@ -6900,6 +6972,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
flex-shrink: 0;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6968,8 +7041,6 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
position: sticky;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7580,8 +7651,19 @@
|
|||||||
min-height: 320px;
|
min-height: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.single-form-top {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.single-cards-row {
|
.single-cards-row {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
height: auto;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-info-card {
|
||||||
|
max-height: none;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.receiver-split {
|
.receiver-split {
|
||||||
|
|||||||
@ -4,13 +4,23 @@ import { IconClose, IconDown, IconSearch } from '@arco-design/web-vue/es/icon'
|
|||||||
import SlidingTabs from '@/components/SlidingTabs/index.vue'
|
import SlidingTabs from '@/components/SlidingTabs/index.vue'
|
||||||
import type { PriceCheckShippingGroup } from '@/api/order'
|
import type { PriceCheckShippingGroup } from '@/api/order'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = withDefaults(
|
||||||
modelValue: string
|
defineProps<{
|
||||||
groups: PriceCheckShippingGroup[]
|
modelValue: string
|
||||||
loading?: boolean
|
groups: PriceCheckShippingGroup[]
|
||||||
placeholder?: string
|
loading?: boolean
|
||||||
disabled?: boolean
|
placeholder?: string
|
||||||
}>()
|
disabled?: boolean
|
||||||
|
/** 下拉顶部「全部渠道」;下单必选场景关掉 */
|
||||||
|
showAllOption?: boolean
|
||||||
|
/** 触发器清空按钮 */
|
||||||
|
allowClear?: boolean
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
showAllOption: true,
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
'update:modelValue': [string]
|
'update:modelValue': [string]
|
||||||
@ -113,6 +123,7 @@ function clearSelection(e: Event) {
|
|||||||
<template>
|
<template>
|
||||||
<a-dropdown
|
<a-dropdown
|
||||||
v-model:popup-visible="popupVisible"
|
v-model:popup-visible="popupVisible"
|
||||||
|
class="shipping-tab-select"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
position="bl"
|
position="bl"
|
||||||
:disabled="disabled || loading"
|
:disabled="disabled || loading"
|
||||||
@ -123,10 +134,10 @@ function clearSelection(e: Event) {
|
|||||||
@click="openPopup"
|
@click="openPopup"
|
||||||
>
|
>
|
||||||
<span class="trigger-text" :class="{ placeholder: !selectedLabel && !modelValue }">
|
<span class="trigger-text" :class="{ placeholder: !selectedLabel && !modelValue }">
|
||||||
{{ selectedLabel || placeholder || '全部渠道' }}
|
{{ selectedLabel || placeholder || (showAllOption ? '全部渠道' : '请选择') }}
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
v-if="modelValue"
|
v-if="allowClear && modelValue"
|
||||||
type="button"
|
type="button"
|
||||||
class="trigger-clear"
|
class="trigger-clear"
|
||||||
aria-label="clear"
|
aria-label="clear"
|
||||||
@ -143,7 +154,7 @@ function clearSelection(e: Event) {
|
|||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
allow-clear
|
allow-clear
|
||||||
size="small"
|
size="small"
|
||||||
:placeholder="placeholder || '搜索渠道名称或代码'"
|
placeholder="搜索渠道名称或代码"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<icon-search />
|
<icon-search />
|
||||||
@ -151,6 +162,7 @@ function clearSelection(e: Event) {
|
|||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
v-if="showAllOption"
|
||||||
type="button"
|
type="button"
|
||||||
class="product-item product-item--all"
|
class="product-item product-item--all"
|
||||||
:class="{ active: !modelValue }"
|
:class="{ active: !modelValue }"
|
||||||
@ -189,6 +201,11 @@ function clearSelection(e: Event) {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.shipping-tab-select {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.shipping-tab-select-trigger {
|
.shipping-tab-select-trigger {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="ai-ask__hint">{{ copy.composeLead }}</p>
|
<p class="ai-ask__hint">{{ copy.composeLead }}</p>
|
||||||
<div class="ai-composer-slot--welcome">
|
<div class="ai-composer-slot--welcome">
|
||||||
<SiteComposer
|
<NanaComposer
|
||||||
v-if="!chatting"
|
v-if="!chatting"
|
||||||
v-model="draft"
|
v-model="draft"
|
||||||
:placeholder="copy.placeholder"
|
:placeholder="copy.placeholder"
|
||||||
@ -117,59 +117,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<div class="ai-messages" :class="{ 'is-active': chatting }" role="log" aria-live="polite">
|
<NanaChatDialog :messages="messages" :typing="typing" :active="chatting">
|
||||||
<div v-for="(msg, index) in messages" :key="index" class="ai-msg-row" :class="'ai-msg-row--' + msg.role">
|
<template #assistant-extra="{ message, isLatest }">
|
||||||
<div class="ai-msg-avatar">
|
<SiteMessageCard
|
||||||
<i v-if="msg.role === 'assistant'" class="si si-truck" aria-hidden="true"></i>
|
v-if="message.card"
|
||||||
<template v-else>{{ copy.you.charAt(0).toUpperCase() }}</template>
|
:card="message.card as any"
|
||||||
|
:is-zh="isZh"
|
||||||
|
@intent="$emit('intent', $event)"
|
||||||
|
@wechat="$emit('wechat')"
|
||||||
|
@choice="$emit('choice', $event)"
|
||||||
|
/>
|
||||||
|
<div v-if="isLatest" class="ai-msg-followups" role="toolbar">
|
||||||
|
<button
|
||||||
|
v-if="routesPending"
|
||||||
|
type="button"
|
||||||
|
class="ai-followup-chip ai-followup-chip--routes"
|
||||||
|
:disabled="busy"
|
||||||
|
@click="$emit('open-routes')"
|
||||||
|
>
|
||||||
|
{{ copy.routesBack }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-for="intent in visibleFollowups"
|
||||||
|
:key="'fu-' + intent.id"
|
||||||
|
type="button"
|
||||||
|
class="ai-followup-chip"
|
||||||
|
:disabled="busy"
|
||||||
|
@click="$emit('intent', intent.id)"
|
||||||
|
>
|
||||||
|
{{ isZh ? intent.zh.title : intent.en.title }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-msg-bubble">
|
</template>
|
||||||
<p v-if="msg.text" class="ai-msg-text">{{ msg.text }}</p>
|
</NanaChatDialog>
|
||||||
<SiteMessageCard
|
|
||||||
v-if="msg.card"
|
|
||||||
:card="msg.card"
|
|
||||||
:is-zh="isZh"
|
|
||||||
@intent="$emit('intent', $event)"
|
|
||||||
@wechat="$emit('wechat')"
|
|
||||||
@choice="$emit('choice', $event)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="typing" class="ai-msg-row ai-msg-row--assistant ai-msg-row--typing">
|
|
||||||
<div class="ai-msg-avatar"><i class="si si-truck" aria-hidden="true"></i></div>
|
|
||||||
<div class="ai-msg-bubble"><span></span><span></span><span></span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-composer-dock">
|
<div class="ai-composer-dock">
|
||||||
<div
|
|
||||||
class="ai-followup"
|
|
||||||
:class="{ 'is-visible': chatting || routesPending }"
|
|
||||||
role="toolbar"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
v-if="routesPending"
|
|
||||||
type="button"
|
|
||||||
class="ai-followup-chip ai-followup-chip--routes"
|
|
||||||
:disabled="busy"
|
|
||||||
@click="$emit('open-routes')"
|
|
||||||
>
|
|
||||||
{{ copy.routesBack }}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-for="intent in SITE_FOLLOWUP_INTENTS"
|
|
||||||
:key="'fu-' + intent.id"
|
|
||||||
type="button"
|
|
||||||
class="ai-followup-chip"
|
|
||||||
:disabled="busy"
|
|
||||||
@click="$emit('intent', intent.id)"
|
|
||||||
>
|
|
||||||
{{ isZh ? intent.zh.title : intent.en.title }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="ai-composer-slot--chat">
|
<div class="ai-composer-slot--chat">
|
||||||
<SiteComposer
|
<NanaComposer
|
||||||
v-if="chatting"
|
v-if="chatting"
|
||||||
|
class="is-docked"
|
||||||
v-model="draft"
|
v-model="draft"
|
||||||
:placeholder="copy.placeholder"
|
:placeholder="copy.placeholder"
|
||||||
:send-label="copy.sendLabel"
|
:send-label="copy.sendLabel"
|
||||||
@ -198,8 +184,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<aside v-if="chatting || historyOpen" class="ai-history-sidebar" :aria-label="copy.historyTitle">
|
<aside
|
||||||
<p class="ai-history-sidebar__title">{{ copy.historyTitle }}</p>
|
class="ai-history-sidebar"
|
||||||
|
:aria-hidden="historyOpen ? 'false' : 'true'"
|
||||||
|
:aria-label="copy.historyTitle"
|
||||||
|
>
|
||||||
|
<div class="ai-history-sidebar__head">
|
||||||
|
<p class="ai-history-sidebar__title">{{ copy.historyTitle }}</p>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="ai-history-sidebar__close"
|
||||||
|
:aria-label="copy.closeHistory"
|
||||||
|
@click="$emit('close-history')"
|
||||||
|
>
|
||||||
|
<i class="si si-x-lg" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<button type="button" class="ai-new-chat-btn" @click="$emit('new-chat')">
|
<button type="button" class="ai-new-chat-btn" @click="$emit('new-chat')">
|
||||||
<i class="si si-plus-lg" aria-hidden="true"></i>
|
<i class="si si-plus-lg" aria-hidden="true"></i>
|
||||||
<span class="ai-new-chat-btn__label">{{ copy.newChat }}</span>
|
<span class="ai-new-chat-btn__label">{{ copy.newChat }}</span>
|
||||||
@ -215,7 +215,6 @@
|
|||||||
role="listitem"
|
role="listitem"
|
||||||
@click="$emit('switch-thread', thread.id)"
|
@click="$emit('switch-thread', thread.id)"
|
||||||
>
|
>
|
||||||
<span class="ai-history-item__icon"><i class="si si-chat" aria-hidden="true"></i></span>
|
|
||||||
<span class="ai-history-item__body">
|
<span class="ai-history-item__body">
|
||||||
<span class="ai-history-item__title">{{ thread.title || copy.newChat }}</span>
|
<span class="ai-history-item__title">{{ thread.title || copy.newChat }}</span>
|
||||||
<span class="ai-history-item__time">{{ formatThreadTime(thread.updatedAt) }}</span>
|
<span class="ai-history-item__time">{{ formatThreadTime(thread.updatedAt) }}</span>
|
||||||
@ -223,13 +222,20 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<button type="button" class="ai-history-backdrop" aria-hidden="true" tabindex="-1" @click="$emit('close-history')"></button>
|
<button
|
||||||
|
type="button"
|
||||||
|
class="ai-history-backdrop"
|
||||||
|
aria-hidden="true"
|
||||||
|
tabindex="-1"
|
||||||
|
@click="$emit('close-history')"
|
||||||
|
></button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||||
import SiteComposer from './SiteComposer.vue';
|
import NanaChatDialog from '@/components/NanaAssistant/NanaChatDialog.vue';
|
||||||
|
import NanaComposer from '@/components/NanaAssistant/NanaComposer.vue';
|
||||||
import SitePartnerMarquee from './SitePartnerMarquee.vue';
|
import SitePartnerMarquee from './SitePartnerMarquee.vue';
|
||||||
import SiteMessageCard from './SiteMessageCard.vue';
|
import SiteMessageCard from './SiteMessageCard.vue';
|
||||||
import SiteIllusIcon from './SiteIllusIcon.vue';
|
import SiteIllusIcon from './SiteIllusIcon.vue';
|
||||||
@ -244,6 +250,9 @@
|
|||||||
} from './lib/site-welcome';
|
} from './lib/site-welcome';
|
||||||
import { ROUTE_DEST_PRESETS } from './lib/portal-catalog';
|
import { ROUTE_DEST_PRESETS } from './lib/portal-catalog';
|
||||||
|
|
||||||
|
/** 会话内跟进只保留前几条,避免底部一排挤占阅读 */
|
||||||
|
const FOLLOWUP_VISIBLE = 3;
|
||||||
|
|
||||||
export type SiteChatMessage = {
|
export type SiteChatMessage = {
|
||||||
role: 'user' | 'assistant';
|
role: 'user' | 'assistant';
|
||||||
text?: string;
|
text?: string;
|
||||||
@ -344,6 +353,8 @@
|
|||||||
set: (value) => emit('update:modelValue', value),
|
set: (value) => emit('update:modelValue', value),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const visibleFollowups = computed(() => SITE_FOLLOWUP_INTENTS.slice(0, FOLLOWUP_VISIBLE));
|
||||||
|
|
||||||
function onHomeDoor(door: (typeof HOME_DOORS)[number]) {
|
function onHomeDoor(door: (typeof HOME_DOORS)[number]) {
|
||||||
emit('intent', door.intentId);
|
emit('intent', door.intentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export const WELCOME_COPY = {
|
|||||||
lanes: 'See lanes',
|
lanes: 'See lanes',
|
||||||
you: 'You',
|
you: 'You',
|
||||||
historyTitle: 'Chat history',
|
historyTitle: 'Chat history',
|
||||||
|
closeHistory: 'Close history',
|
||||||
newChat: 'New chat',
|
newChat: 'New chat',
|
||||||
newChatHint: 'New chat started — ask here',
|
newChatHint: 'New chat started — ask here',
|
||||||
emptyHistory: 'No conversations yet',
|
emptyHistory: 'No conversations yet',
|
||||||
@ -44,6 +45,7 @@ export const WELCOME_COPY = {
|
|||||||
lanes: '看线路',
|
lanes: '看线路',
|
||||||
you: '你',
|
you: '你',
|
||||||
historyTitle: '历史记录',
|
historyTitle: '历史记录',
|
||||||
|
closeHistory: '关闭历史',
|
||||||
newChat: '新会话',
|
newChat: '新会话',
|
||||||
newChatHint: '已开启新会话,在这里提问',
|
newChatHint: '已开启新会话,在这里提问',
|
||||||
emptyHistory: '暂无会话',
|
emptyHistory: '暂无会话',
|
||||||
|
|||||||
@ -1310,58 +1310,58 @@ body.command-home .ai-stage-map--eu {
|
|||||||
z-index: 3;
|
z-index: 3;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 2px;
|
||||||
padding: 4px;
|
padding: 0;
|
||||||
border-radius: 18px;
|
border: none;
|
||||||
border: 1px solid var(--ai-glass-border);
|
border-radius: 0;
|
||||||
background: var(--ai-glass-fill);
|
background: transparent;
|
||||||
backdrop-filter: var(--ai-glass-blur);
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: var(--ai-glass-blur);
|
-webkit-backdrop-filter: none;
|
||||||
box-shadow: var(--ai-glass-shadow);
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-sidebar-toggle,
|
.ai-stage-tools .ai-sidebar-toggle,
|
||||||
.ai-new-chat-ghost {
|
.ai-stage-tools .ai-new-chat-ghost {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
min-height: 34px;
|
min-height: 34px;
|
||||||
padding: 0 12px;
|
padding: 0 10px;
|
||||||
border-radius: 14px;
|
border-radius: 10px;
|
||||||
border: 1px solid transparent;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: none;
|
-webkit-backdrop-filter: none;
|
||||||
|
box-shadow: none;
|
||||||
color: var(--ai-text-2);
|
color: var(--ai-text-2);
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-sidebar-toggle {
|
.ai-stage-tools .ai-sidebar-toggle {
|
||||||
width: 34px;
|
width: 34px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-sidebar-toggle i,
|
.ai-stage-tools .ai-sidebar-toggle i,
|
||||||
.ai-new-chat-ghost i {
|
.ai-stage-tools .ai-new-chat-ghost i {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: var(--ai-text-3);
|
color: var(--ai-text-3);
|
||||||
transition: color 0.2s var(--ai-ease);
|
transition: color 0.2s var(--ai-ease);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-sidebar-toggle:hover,
|
.ai-stage-tools .ai-sidebar-toggle:hover,
|
||||||
.ai-new-chat-ghost:hover {
|
.ai-stage-tools .ai-new-chat-ghost:hover {
|
||||||
color: var(--ai-action);
|
color: var(--ai-action);
|
||||||
border: none;
|
background: transparent;
|
||||||
background: color-mix(in srgb, #fff 86%, #e6edf2);
|
box-shadow: none;
|
||||||
box-shadow: inset 0 3px 8px rgba(15, 23, 42, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-sidebar-toggle:hover i,
|
.ai-stage-tools .ai-sidebar-toggle:hover i,
|
||||||
.ai-new-chat-ghost:hover i {
|
.ai-stage-tools .ai-new-chat-ghost:hover i {
|
||||||
color: var(--ai-action);
|
color: var(--ai-action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1371,18 +1371,25 @@ body.command-home .ai-stage-map--eu {
|
|||||||
left: 12px;
|
left: 12px;
|
||||||
bottom: calc(var(--ai-trust-bar-h) + 10px);
|
bottom: calc(var(--ai-trust-bar-h) + 10px);
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
width: min(268px, calc(86vw - 24px));
|
width: min(280px, calc(86vw - 24px));
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 16px 12px 16px;
|
gap: 10px;
|
||||||
|
padding: 14px 12px 16px;
|
||||||
border-radius: var(--ai-dock-radius);
|
border-radius: var(--ai-dock-radius);
|
||||||
border: none;
|
border: none;
|
||||||
background: color-mix(in srgb, var(--ai-paper) 88%, #e8eef2);
|
background: color-mix(in srgb, var(--ai-paper) 92%, #e8eef2);
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: none;
|
-webkit-backdrop-filter: none;
|
||||||
box-shadow: inset 0 3px 12px rgba(15, 23, 42, 0.1);
|
box-shadow:
|
||||||
transform: translateX(calc(-100% - 16px));
|
inset 0 3px 12px rgba(15, 23, 42, 0.08),
|
||||||
transition: transform 0.28s var(--ai-ease);
|
0 16px 40px rgba(15, 23, 42, 0.1);
|
||||||
|
transform: translateX(calc(-100% - 20px));
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition:
|
||||||
|
transform 0.28s var(--ai-ease),
|
||||||
|
opacity 0.22s var(--ai-ease);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-sidebar > * {
|
.ai-history-sidebar > * {
|
||||||
@ -1390,8 +1397,37 @@ body.command-home .ai-stage-map--eu {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ai-history-sidebar__head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-history-sidebar__close {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--ai-text-3);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-history-sidebar__close:hover {
|
||||||
|
color: var(--ai-action);
|
||||||
|
background: color-mix(in srgb, #fff 86%, #e6edf2);
|
||||||
|
box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
#ai-advisor-shell.ai-history-open .ai-history-sidebar {
|
#ai-advisor-shell.ai-history-open .ai-history-sidebar {
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-backdrop {
|
.ai-history-backdrop {
|
||||||
@ -2373,11 +2409,11 @@ body.command-home .ai-stage-map--eu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-sidebar__title {
|
.ai-history-sidebar__title {
|
||||||
margin: 0 0 10px;
|
margin: 0;
|
||||||
padding: 0 4px;
|
padding: 0 2px;
|
||||||
font-size: 0.7rem;
|
font-size: 0.72rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.08em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--ai-muted);
|
color: var(--ai-muted);
|
||||||
}
|
}
|
||||||
@ -2460,33 +2496,22 @@ body.command-home .ai-stage-map--eu {
|
|||||||
color: var(--ai-action);
|
color: var(--ai-action);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-item__icon {
|
.ai-history-item__body {
|
||||||
flex-shrink: 0;
|
min-width: 0;
|
||||||
display: inline-flex;
|
flex: 1;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 28px;
|
|
||||||
height: 28px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: transparent;
|
|
||||||
color: var(--ai-text-3);
|
|
||||||
font-size: 0.85rem;
|
|
||||||
transition: color 0.2s var(--ai-ease);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-history-item:hover .ai-history-item__icon,
|
|
||||||
.ai-history-item.is-active .ai-history-item__icon {
|
|
||||||
color: var(--ai-action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-item__title {
|
.ai-history-item__title {
|
||||||
display: block;
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
line-clamp: 2;
|
||||||
font-size: 0.84rem;
|
font-size: 0.84rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
line-height: 1.35;
|
||||||
color: var(--ai-ink);
|
color: var(--ai-ink);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
white-space: normal;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-history-item__time {
|
.ai-history-item__time {
|
||||||
@ -2508,6 +2533,11 @@ body.command-home .ai-stage-map--eu {
|
|||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 会话态给顶栏工具留空,避免压住首条消息 */
|
||||||
|
#ai-advisor-shell:has(.ai-stage-tools) .ai-app-main {
|
||||||
|
padding-top: 52px;
|
||||||
|
}
|
||||||
|
|
||||||
.ai-app-main.is-scrolled,
|
.ai-app-main.is-scrolled,
|
||||||
.ai-app-main.is-overflowing,
|
.ai-app-main.is-overflowing,
|
||||||
.ai-app-main.is-scrolled.is-overflowing {
|
.ai-app-main.is-scrolled.is-overflowing {
|
||||||
@ -4254,15 +4284,15 @@ body.command-home .ai-featured-routes__card {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ?? Messages ?? */
|
/* ?? Messages — advisor reading flow ?? */
|
||||||
.ai-messages {
|
.ai-messages {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 18px;
|
gap: 22px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: min(840px, 100%);
|
max-width: min(720px, 100%);
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
padding: 20px 0 12px;
|
padding: 28px 4px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-messages.is-active {
|
.ai-messages.is-active {
|
||||||
@ -4271,8 +4301,8 @@ body.command-home .ai-featured-routes__card {
|
|||||||
|
|
||||||
.ai-msg-row {
|
.ai-msg-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 12px;
|
||||||
align-items: flex-end;
|
align-items: flex-start;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
animation: ai-msg-in 0.3s ease;
|
animation: ai-msg-in 0.3s ease;
|
||||||
}
|
}
|
||||||
@ -4289,87 +4319,117 @@ body.command-home .ai-featured-routes__card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--user {
|
.ai-msg-row--user {
|
||||||
flex-direction: row-reverse;
|
justify-content: flex-end;
|
||||||
align-self: flex-end;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--assistant {
|
.ai-msg-row--assistant {
|
||||||
align-self: flex-start;
|
align-self: stretch;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-avatar {
|
/* Nana 与 FAB 同源:小尺寸头像贴助手阅读流 */
|
||||||
|
.ai-msg-nana.nana-fab-wrap,
|
||||||
|
.ai-msg-row--assistant .nana-fab-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 32px;
|
width: 36px;
|
||||||
height: 32px;
|
height: 36px;
|
||||||
border-radius: 10px;
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-msg-nana .nana-fab__img,
|
||||||
|
.ai-msg-row--assistant .nana-fab__img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(0 3px 8px rgba(45, 140, 140, 0.28));
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-msg-nana .nana-fab__pulse,
|
||||||
|
.ai-msg-row--assistant .nana-fab__pulse {
|
||||||
|
position: absolute;
|
||||||
|
inset: 1px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1.5px solid var(--app-primary-color, #2d8c8c);
|
||||||
|
opacity: 0;
|
||||||
|
animation: nana-pulse 2.4s ease-out infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes nana-pulse {
|
||||||
|
0% {
|
||||||
|
transform: scale(0.9);
|
||||||
|
opacity: 0.55;
|
||||||
|
}
|
||||||
|
70% {
|
||||||
|
transform: scale(1.25);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1.25);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-msg-body {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: center;
|
gap: 12px;
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-avatar {
|
|
||||||
background: var(--ai-primary-soft);
|
|
||||||
color: var(--ai-action);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--user .ai-msg-avatar {
|
|
||||||
background: rgba(var(--ai-navy-rgb), 0.08);
|
|
||||||
color: var(--ai-ink);
|
color: var(--ai-ink);
|
||||||
font-size: 0.72rem;
|
}
|
||||||
font-weight: 700;
|
|
||||||
|
.ai-msg-body--typing {
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
min-height: 36px;
|
||||||
|
padding: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-bubble {
|
.ai-msg-bubble {
|
||||||
max-width: min(680px, 90%);
|
max-width: min(520px, 86%);
|
||||||
padding: 12px 16px;
|
padding: 11px 15px;
|
||||||
border-radius: var(--ai-dock-radius-inner);
|
border-radius: 18px;
|
||||||
font-size: 0.94rem;
|
font-size: 0.94rem;
|
||||||
line-height: 1.6;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--user .ai-msg-bubble {
|
.ai-msg-row--user .ai-msg-bubble {
|
||||||
background: var(--ai-action);
|
background: var(--ai-action);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-bottom-right-radius: 6px;
|
border-bottom-right-radius: 6px;
|
||||||
}
|
box-shadow: 0 8px 20px color-mix(in srgb, var(--ai-action) 18%, transparent);
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-bubble {
|
|
||||||
color: var(--ai-ink);
|
|
||||||
border-bottom-left-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-bubble:has(.ai-card) {
|
|
||||||
padding: 0;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
backdrop-filter: none;
|
|
||||||
-webkit-backdrop-filter: none;
|
|
||||||
overflow: visible;
|
|
||||||
isolation: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-msg-row--assistant .ai-msg-bubble:has(.ai-card)::before {
|
|
||||||
content: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-text {
|
.ai-msg-text {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-text + .ai-card {
|
.ai-msg-row--assistant .ai-msg-text {
|
||||||
margin-top: 12px;
|
font-size: 0.98rem;
|
||||||
|
line-height: 1.68;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
color: var(--ai-ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--typing .ai-msg-bubble {
|
.ai-msg-text + .ai-card,
|
||||||
|
.ai-msg-body > .ai-card {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-msg-followups {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
gap: 8px;
|
||||||
padding: 14px 18px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--typing span {
|
.ai-msg-row--typing .ai-msg-body--typing span {
|
||||||
width: 7px;
|
width: 7px;
|
||||||
height: 7px;
|
height: 7px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -4377,8 +4437,8 @@ body.command-home .ai-featured-routes__card {
|
|||||||
animation: ai-typing 1.2s ease-in-out infinite;
|
animation: ai-typing 1.2s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-msg-row--typing span:nth-child(2) { animation-delay: 0.15s; }
|
.ai-msg-row--typing .ai-msg-body--typing span:nth-child(2) { animation-delay: 0.15s; }
|
||||||
.ai-msg-row--typing span:nth-child(3) { animation-delay: 0.3s; }
|
.ai-msg-row--typing .ai-msg-body--typing span:nth-child(3) { animation-delay: 0.3s; }
|
||||||
|
|
||||||
@keyframes ai-typing {
|
@keyframes ai-typing {
|
||||||
0%, 80%, 100% { opacity: 0.35; transform: scale(0.85); }
|
0%, 80%, 100% { opacity: 0.35; transform: scale(0.85); }
|
||||||
@ -4818,7 +4878,7 @@ body.command-home .ai-welcome-compose__lead {
|
|||||||
|
|
||||||
.ai-composer-wrap.is-docked {
|
.ai-composer-wrap.is-docked {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: min(840px, 100%);
|
max-width: min(720px, 100%);
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
padding: 10px 0 0;
|
padding: 10px 0 0;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user