refactor: simplify ChatView and ApprovalCenterView layout structure
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,21 +1,6 @@
|
||||
<template>
|
||||
<section class="approval-page">
|
||||
<div class="approval-kpis">
|
||||
<article v-for="item in kpis" :key="item.label" class="approval-kpi panel" :style="{ '--accent': item.accent }">
|
||||
<span class="kpi-icon"><i :class="item.icon"></i></span>
|
||||
<div>
|
||||
<p>{{ item.label }}</p>
|
||||
<strong>{{ item.value }} <small>{{ item.unit }}</small></strong>
|
||||
<span :class="item.tone">{{ item.meta }} <i v-if="item.trendIcon" :class="item.trendIcon"></i></span>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<article class="approval-list panel">
|
||||
<header class="list-head">
|
||||
<h2>待审批列表</h2>
|
||||
</header>
|
||||
|
||||
<nav class="status-tabs" aria-label="审批状态">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
@@ -35,32 +20,15 @@
|
||||
<i class="mdi mdi-chevron-down"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-actions">
|
||||
<button class="sort-btn" type="button">
|
||||
<i class="mdi mdi-sort"></i>
|
||||
<span>按提交时间</span>
|
||||
<i class="mdi mdi-chevron-down"></i>
|
||||
</button>
|
||||
<button class="export-btn" type="button">
|
||||
<i class="mdi mdi-download"></i>
|
||||
<span>导出</span>
|
||||
</button>
|
||||
<button class="return-btn" type="button">
|
||||
<i class="mdi mdi-undo"></i>
|
||||
<span>批量退回</span>
|
||||
</button>
|
||||
<button class="approve-btn" type="button">
|
||||
<i class="mdi mdi-check-circle"></i>
|
||||
<span>批量通过</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="hint"><i class="mdi mdi-information-outline"></i> 点击单据行查看审批详情</p>
|
||||
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col><col><col><col><col><col><col><col><col><col><col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>单号</th>
|
||||
@@ -129,13 +97,6 @@ const activeTab = ref('全部待审')
|
||||
const tabs = ['全部待审', '高风险', '即将超时', '已处理']
|
||||
const filters = ['法人主体', '费用类型', '风险等级', '金额区间', '所属部门']
|
||||
|
||||
const kpis = [
|
||||
{ label: '待审批单据', value: 12, unit: '单', meta: '较昨日 +3', tone: 'up bad', trendIcon: 'mdi mdi-arrow-up', icon: 'mdi mdi-clipboard-text-outline', accent: '#059669' },
|
||||
{ label: '高风险单据', value: 4, unit: '单', meta: '较昨日 +1', tone: 'up bad', trendIcon: 'mdi mdi-arrow-up', icon: 'mdi mdi-alert', accent: '#ef4444' },
|
||||
{ label: '即将超时', value: 3, unit: '单', meta: '30 分钟内', tone: 'neutral', icon: 'mdi mdi-clock-outline', accent: '#f59e0b' },
|
||||
{ label: '今日已处理', value: 28, unit: '单', meta: '通过率 86%', tone: 'good', icon: 'mdi mdi-check', accent: '#10b981' }
|
||||
]
|
||||
|
||||
const rows = [
|
||||
{ id: 'RE240712001', applicant: '李文静', avatar: '李', department: '市场部', type: '差旅报销', amount: '¥3,680', time: '07-12 09:20', risk: '中风险', riskTone: 'medium', sla: '4.2h', slaTone: 'safe', node: '财务审批', status: '待审批', statusTone: 'pending' },
|
||||
{ id: 'RE240712002', applicant: '王志强', avatar: '王', department: '销售部', type: '招待费', amount: '¥1,280', time: '07-12 08:15', risk: '低风险', riskTone: 'low', sla: '8.5h', slaTone: 'safe', node: '部门负责人', status: '待审批', statusTone: 'pending' },
|
||||
@@ -160,90 +121,20 @@ const visibleRows = computed(() => {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr);
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
gap: 14px;
|
||||
overflow: hidden;
|
||||
animation: fadeUp 220ms var(--ease) both;
|
||||
}
|
||||
|
||||
.approval-kpis {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.approval-kpi {
|
||||
min-height: 96px;
|
||||
display: grid;
|
||||
grid-template-columns: 54px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 16px 20px;
|
||||
}
|
||||
|
||||
.kpi-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--accent) 14%, white);
|
||||
color: var(--accent);
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.approval-kpi p {
|
||||
color: #334155;
|
||||
font-size: 14px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.approval-kpi strong {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
color: #0f172a;
|
||||
font-size: 26px;
|
||||
font-weight: 850;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.approval-kpi small {
|
||||
color: #0f172a;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.approval-kpi span:not(.kpi-icon) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 7px;
|
||||
color: #64748b;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.approval-kpi .bad i {
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
.approval-kpi .good {
|
||||
color: #059669 !important;
|
||||
}
|
||||
|
||||
.approval-list {
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
|
||||
grid-template-rows: auto auto auto minmax(0, 1fr) auto;
|
||||
padding: 16px 18px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-head h2 {
|
||||
color: #0f172a;
|
||||
font-size: 19px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.status-tabs {
|
||||
display: flex;
|
||||
gap: 28px;
|
||||
@@ -284,8 +175,7 @@ const visibleRows = computed(() => {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.filter-set,
|
||||
.toolbar-actions {
|
||||
.filter-set {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
@@ -293,10 +183,6 @@ const visibleRows = computed(() => {
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.sort-btn,
|
||||
.export-btn,
|
||||
.return-btn,
|
||||
.approve-btn,
|
||||
.page-size {
|
||||
min-height: 38px;
|
||||
display: inline-flex;
|
||||
@@ -308,13 +194,6 @@ const visibleRows = computed(() => {
|
||||
font-size: 14px;
|
||||
font-weight: 750;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.sort-btn,
|
||||
.export-btn,
|
||||
.return-btn,
|
||||
.page-size {
|
||||
border: 1px solid #d7e0ea;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
@@ -325,25 +204,7 @@ const visibleRows = computed(() => {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.sort-btn {
|
||||
min-width: 138px;
|
||||
}
|
||||
|
||||
.approve-btn {
|
||||
border: 0;
|
||||
background: #059669;
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(5, 150, 105, .18);
|
||||
}
|
||||
|
||||
.approve-btn:hover {
|
||||
background: #047857;
|
||||
}
|
||||
|
||||
.filter-btn:hover,
|
||||
.sort-btn:hover,
|
||||
.export-btn:hover,
|
||||
.return-btn:hover,
|
||||
.page-size:hover {
|
||||
border-color: rgba(16, 185, 129, .32);
|
||||
color: #0f9f78;
|
||||
@@ -371,6 +232,7 @@ table {
|
||||
width: 100%;
|
||||
min-width: 1180px;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th,
|
||||
@@ -380,11 +242,17 @@ td {
|
||||
color: #24324a;
|
||||
font-size: 14px;
|
||||
line-height: 1.35;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: #f7fafc;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
@@ -567,10 +435,6 @@ tbody tr:last-child td {
|
||||
}
|
||||
|
||||
@media (max-width: 1320px) {
|
||||
.approval-kpis {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.list-toolbar,
|
||||
.list-foot {
|
||||
grid-template-columns: 1fr;
|
||||
@@ -578,12 +442,7 @@ tbody tr:last-child td {
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.approval-kpis {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.approval-list,
|
||||
.approval-kpi {
|
||||
.approval-list {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@@ -592,16 +451,11 @@ tbody tr:last-child td {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.filter-set,
|
||||
.toolbar-actions {
|
||||
.filter-set {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.sort-btn,
|
||||
.export-btn,
|
||||
.return-btn,
|
||||
.approve-btn,
|
||||
.page-size {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -1,155 +1,173 @@
|
||||
<template>
|
||||
<section class="assistant-view">
|
||||
<div class="assistant-grid">
|
||||
<article class="conversation-panel panel">
|
||||
<header class="panel-head">
|
||||
<h2>今日你可以这样问我</h2>
|
||||
<button class="text-action" type="button" @click="rotatePrompts">
|
||||
<i class="mdi mdi-refresh"></i>
|
||||
<span>换一换</span>
|
||||
</button>
|
||||
</header>
|
||||
<section class="qa-view">
|
||||
<div class="qa-layout">
|
||||
<aside class="left-column">
|
||||
<article class="panel side-panel conversation-list">
|
||||
<header>
|
||||
<h3>问答会话</h3>
|
||||
<button class="outline-action" type="button" @click="emit('draft', '')">
|
||||
<i class="mdi mdi-plus"></i>
|
||||
<span>新建会话</span>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="prompt-grid">
|
||||
<button
|
||||
v-for="prompt in visiblePrompts"
|
||||
:key="prompt.text"
|
||||
class="prompt-card"
|
||||
type="button"
|
||||
@click="applyPrompt(prompt.text)"
|
||||
>
|
||||
<i :class="prompt.icon"></i>
|
||||
<span>{{ prompt.text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="session-scroll">
|
||||
<button
|
||||
v-for="item in sessions"
|
||||
:key="item.title"
|
||||
class="session-row"
|
||||
:class="{ active: item.active }"
|
||||
type="button"
|
||||
@click="applyPrompt(item.title)"
|
||||
>
|
||||
<span><i class="mdi mdi-message-processing-outline"></i></span>
|
||||
<strong>{{ item.title }}</strong>
|
||||
<time>{{ item.time }}</time>
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
</aside>
|
||||
|
||||
<article class="panel chat-panel">
|
||||
<div ref="localMessageList" class="message-stream" aria-live="polite">
|
||||
<div class="message-row user">
|
||||
<div class="message-bubble">
|
||||
<p>今天我最应该关注哪些问题?</p>
|
||||
<time>09:41</time>
|
||||
</div>
|
||||
<span class="chat-avatar user-avatar"><i class="mdi mdi-account-outline"></i></span>
|
||||
</div>
|
||||
|
||||
<div class="message-row assistant">
|
||||
<span class="chat-avatar assistant-avatar"><i class="mdi mdi-sparkles"></i></span>
|
||||
<div class="message-bubble">
|
||||
<p>基于当前数据,你优先关注以下 3 项:</p>
|
||||
<ol>
|
||||
<li>3 笔单据将在 30 分钟内超时;</li>
|
||||
<li>市场部有 2 笔高风险差旅报销;</li>
|
||||
<li>1 笔报销缺少酒店入住清单,建议优先补充。</li>
|
||||
</ol>
|
||||
<time>09:41</time>
|
||||
<div class="talk-row user">
|
||||
<span class="avatar user-avatar">张</span>
|
||||
<div class="talk-content">
|
||||
<header><strong>张明</strong><time>10:32</time></header>
|
||||
<p class="user-question">北京出差,酒店超标报销怎么处理?</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="message-row assistant">
|
||||
<span class="chat-avatar assistant-avatar"><i class="mdi mdi-sparkles"></i></span>
|
||||
<div class="message-bubble">
|
||||
<p>为你生成行动建议:</p>
|
||||
<ul class="action-list">
|
||||
<li><i class="mdi mdi-alert-circle danger"></i><strong>紧急处理:</strong>处理即将超时的 3 笔单据,避免 SLA 逾期。</li>
|
||||
<li><i class="mdi mdi-information-outline warning"></i><strong>风险关注:</strong>审核市场部高风险差旅报销,重点关注差旅与超标费用。</li>
|
||||
<li><i class="mdi mdi-arrow-up-circle info"></i><strong>信息补齐:</strong>提醒申请人补齐酒店入住清单,加快审批进度。</li>
|
||||
<li><i class="mdi mdi-check-circle success"></i><strong>效率优化:</strong>当前审批瓶颈在财务审批,建议分配或优先处理。</li>
|
||||
</ul>
|
||||
<time>09:42</time>
|
||||
<div class="talk-row assistant">
|
||||
<span class="avatar assistant-avatar"><i class="mdi mdi-robot-outline"></i></span>
|
||||
<div class="talk-content">
|
||||
<header><strong>财务AI助手</strong><time>10:32</time></header>
|
||||
<div class="answer-card">
|
||||
<section>
|
||||
<h4>结论</h4>
|
||||
<p>酒店费用超过标准的部分原则上不予报销,特殊情况可申请例外报销。</p>
|
||||
</section>
|
||||
<section>
|
||||
<h4>处理建议</h4>
|
||||
<ul>
|
||||
<li>超标部分由个人自理或按制度退回,保留超标说明和相关凭证。</li>
|
||||
<li>符合公司相关政策的,可提交佐证材料,申请例外报销。</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h4>适用规则</h4>
|
||||
<ul>
|
||||
<li>《差旅报销管理办法(2024版)》第十二条:住宿标准及超标处理</li>
|
||||
<li>《费用报销审批流程》附件1:国内差旅住宿标准</li>
|
||||
</ul>
|
||||
</section>
|
||||
<footer>
|
||||
<span>是否有帮助?</span>
|
||||
<button type="button" aria-label="有帮助"><i class="mdi mdi-thumb-up-outline"></i></button>
|
||||
<button type="button" aria-label="无帮助"><i class="mdi mdi-thumb-down-outline"></i></button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="message in messages" :key="message.id" class="message-row" :class="message.role === 'user' ? 'user' : 'assistant'">
|
||||
<span v-if="message.role !== 'user'" class="chat-avatar assistant-avatar"><i class="mdi mdi-sparkles"></i></span>
|
||||
<div class="message-bubble">
|
||||
<p>{{ message.text }}</p>
|
||||
<div class="talk-row user">
|
||||
<span class="avatar user-avatar">张</span>
|
||||
<div class="talk-content">
|
||||
<header><strong>张明</strong><time>10:35</time></header>
|
||||
<p class="user-question">如果出差地公司名称不一致还能报销吗?</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="talk-row assistant">
|
||||
<span class="avatar assistant-avatar"><i class="mdi mdi-robot-outline"></i></span>
|
||||
<div class="talk-content">
|
||||
<header><strong>财务AI助手</strong><time>10:35</time></header>
|
||||
<div class="answer-card compact">
|
||||
<section>
|
||||
<h4>结论</h4>
|
||||
<p>一般情况下,差旅地与参会公司名称不一致需按异常处理,建议提供情况说明并加盖公章或补充邀请材料。</p>
|
||||
</section>
|
||||
<section>
|
||||
<h4>适用规则</h4>
|
||||
<ul>
|
||||
<li>《发票管理规定及失误销细则》第二章:发票基本要求</li>
|
||||
<li>《差旅报销管理办法》附件1:报销凭证要求</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="message in messages" :key="message.id" class="talk-row" :class="message.role === 'user' ? 'user' : 'assistant'">
|
||||
<span class="avatar" :class="message.role === 'user' ? 'user-avatar' : 'assistant-avatar'">
|
||||
<template v-if="message.role === 'user'">我</template>
|
||||
<i v-else class="mdi mdi-robot-outline"></i>
|
||||
</span>
|
||||
<div class="talk-content">
|
||||
<header>
|
||||
<strong>{{ message.role === 'user' ? '我' : '财务AI助手' }}</strong>
|
||||
<time>刚刚</time>
|
||||
</header>
|
||||
<p :class="message.role === 'user' ? 'user-question' : 'agent-answer'">{{ message.text }}</p>
|
||||
</div>
|
||||
<span v-if="message.role === 'user'" class="chat-avatar user-avatar"><i class="mdi mdi-account-outline"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="composer">
|
||||
<textarea
|
||||
:value="draft"
|
||||
rows="3"
|
||||
placeholder="输入问题,例如:今天的异常报销主要原因是什么?"
|
||||
@input="emit('draft', $event.target.value)"
|
||||
@keydown.ctrl.enter.prevent="emit('send')"
|
||||
></textarea>
|
||||
<div class="composer-actions">
|
||||
<div class="input-tools">
|
||||
<button type="button" aria-label="上传附件" @click="uploadInput?.click()">
|
||||
<i class="mdi mdi-paperclip"></i>
|
||||
</button>
|
||||
<button type="button" aria-label="上传图片" @click="uploadInput?.click()">
|
||||
<i class="mdi mdi-image-outline"></i>
|
||||
</button>
|
||||
<button type="button" aria-label="语音输入">
|
||||
<i class="mdi mdi-microphone"></i>
|
||||
</button>
|
||||
<input ref="uploadInput" class="sr-only" type="file" multiple @change="emit('upload', $event)" />
|
||||
</div>
|
||||
<span class="counter">{{ draft.length }}/2000</span>
|
||||
<button class="send-btn" type="button" aria-label="发送消息" @click="emit('send')">
|
||||
<div class="composer-wrap">
|
||||
<div class="prompt-toolbar">
|
||||
<span>猜你想问</span>
|
||||
<button v-for="prompt in visiblePrompts" :key="prompt.text" type="button" @click="applyPrompt(prompt.text)">
|
||||
<i :class="prompt.icon"></i>
|
||||
{{ prompt.short }}
|
||||
</button>
|
||||
<button class="icon-refresh" type="button" aria-label="换一批问题" @click="rotatePrompts">
|
||||
<i class="mdi mdi-refresh"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="composer">
|
||||
<textarea
|
||||
:value="draft"
|
||||
rows="2"
|
||||
placeholder="请输入你的问题,例如:差旅报销特殊标准是什么?"
|
||||
@input="emit('draft', $event.target.value)"
|
||||
@keydown.ctrl.enter.prevent="emit('send')"
|
||||
></textarea>
|
||||
<button class="send-button" type="button" aria-label="发送问题" @click="emit('send')">
|
||||
<i class="mdi mdi-send"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<aside class="insight-column">
|
||||
<article class="insight-card panel">
|
||||
<aside class="right-column">
|
||||
<article class="panel info-panel hot-top-panel">
|
||||
<header>
|
||||
<h3>A. AI 重点关注</h3>
|
||||
<button type="button">查看全部</button>
|
||||
<h3><i class="mdi mdi-fire"></i> 热门问题 Top10</h3>
|
||||
<button type="button" @click="rotatePrompts">换一批 <i class="mdi mdi-refresh"></i></button>
|
||||
</header>
|
||||
<div class="focus-list">
|
||||
<div v-for="item in focusItems" :key="item.label" class="focus-row">
|
||||
<span :class="['dot-icon', item.tone]"><i :class="item.icon"></i></span>
|
||||
<strong>{{ item.label }}</strong>
|
||||
<span :class="item.tone">{{ item.value }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="insight-card panel">
|
||||
<header>
|
||||
<h3>B. 场景建议</h3>
|
||||
<button type="button">查看全部 <i class="mdi mdi-chevron-right"></i></button>
|
||||
</header>
|
||||
<div class="suggestion-list">
|
||||
<button v-for="item in suggestions" :key="item.text" type="button" @click="applyPrompt(item.text)">
|
||||
<i :class="item.icon"></i>
|
||||
<span>{{ item.text }}</span>
|
||||
<div class="top-question-list">
|
||||
<button v-for="(item, index) in hotQuestions" :key="item" type="button" @click="applyPrompt(item)">
|
||||
<strong>{{ String(index + 1).padStart(2, '0') }}</strong>
|
||||
<span>{{ item }}</span>
|
||||
<i class="mdi mdi-chevron-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="insight-card panel">
|
||||
<article class="panel info-panel similar-panel">
|
||||
<header>
|
||||
<h3>C. 快捷分析</h3>
|
||||
<h3>相似历史问题</h3>
|
||||
<button type="button">查看全部 <i class="mdi mdi-chevron-right"></i></button>
|
||||
</header>
|
||||
<div class="analysis-grid">
|
||||
<button v-for="item in analysisActions" :key="item.text" type="button" @click="applyPrompt(item.text)">
|
||||
<i :class="item.icon"></i>
|
||||
<span>{{ item.text }}</span>
|
||||
<div class="similar-scroll">
|
||||
<button v-for="item in similarQuestions" :key="item.text" class="similar-row" type="button" @click="applyPrompt(item.text)">
|
||||
<span><i class="mdi mdi-file-question-outline"></i>{{ item.text }}</span>
|
||||
<strong>{{ item.score }}</strong>
|
||||
<i class="mdi mdi-chevron-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="insight-card panel">
|
||||
<header>
|
||||
<h3>D. 最近提问 / 常用问题</h3>
|
||||
<button type="button" @click="rotatePrompts">
|
||||
<i class="mdi mdi-refresh"></i>
|
||||
<span>换一换</span>
|
||||
</button>
|
||||
</header>
|
||||
<ul class="recent-list">
|
||||
<li v-for="item in recentQuestions" :key="item">{{ item }}</li>
|
||||
</ul>
|
||||
</article>
|
||||
</aside>
|
||||
</div>
|
||||
</section>
|
||||
@@ -172,50 +190,58 @@ const props = defineProps({
|
||||
const emit = defineEmits(['send', 'upload', 'draft', 'approveCase', 'rejectCase', 'selectCase'])
|
||||
|
||||
const localMessageList = ref(null)
|
||||
const uploadInput = ref(null)
|
||||
const promptPage = ref(0)
|
||||
|
||||
const sessions = [
|
||||
{ title: '北京出差,酒店超标报销怎么处理?', time: '10:32', active: true },
|
||||
{ title: '发票抬头不一致怎么办', time: '09:48' },
|
||||
{ title: '借款冲销流程', time: '昨天' },
|
||||
{ title: '预算占用失败处理', time: '昨天' },
|
||||
{ title: '招待费报销范围', time: '05-11' },
|
||||
{ title: '差旅住宿标准如何匹配城市级别?', time: '05-10' },
|
||||
{ title: '电子发票验真失败如何处理?', time: '05-09' },
|
||||
{ title: '跨部门项目费用怎么归集?', time: '05-08' },
|
||||
{ title: '会议费和招待费如何区分?', time: '05-07' },
|
||||
{ title: '超预算申请需要哪些审批节点?', time: '05-06' },
|
||||
{ title: '海外差旅汇率按哪天计算?', time: '05-05' },
|
||||
{ title: '员工退票手续费是否可报销?', time: '05-04' }
|
||||
]
|
||||
|
||||
const prompts = [
|
||||
{ icon: 'mdi mdi-chart-line', text: '今天有哪些关键指标异常?' },
|
||||
{ icon: 'mdi mdi-file-document-outline-check', text: '哪些单据最需要优先处理?' },
|
||||
{ icon: 'mdi mdi-shield-outline', text: '高风险报销主要集中在哪些部门?' },
|
||||
{ icon: 'mdi mdi-clock-outline', text: '本周审批效率相比昨天如何?' },
|
||||
{ icon: 'mdi mdi-lightbulb-outline', text: '给我当前报销场景的处理建议' },
|
||||
{ icon: 'mdi mdi-office-building', text: '生成一份运营简报' },
|
||||
{ icon: 'mdi mdi-filter-outline', text: '找出即将超时的单据' },
|
||||
{ icon: 'mdi mdi-wallet', text: '分析本月预算执行压力' }
|
||||
{ icon: 'mdi mdi-bed-outline', short: '差旅标准', text: '差旅报销特殊标准是什么?' },
|
||||
{ icon: 'mdi mdi-receipt-text-outline', short: '发票规范', text: '发票丢失如何处理?' },
|
||||
{ icon: 'mdi mdi-cash-refund', short: '借款冲销', text: '借款多久内需要冲销?' },
|
||||
{ icon: 'mdi mdi-file-chart-outline', short: '预算冲突', text: '预算不足如何申请?' },
|
||||
{ icon: 'mdi mdi-shield-check-outline', short: '审批要求', text: '酒店超标后如何申请例外报销?' },
|
||||
{ icon: 'mdi mdi-office-building-marker', short: '住宿标准', text: '差旅住宿标准按什么规则执行?' },
|
||||
{ icon: 'mdi mdi-file-question-outline', short: '材料补齐', text: '报销附件缺失怎么补交?' },
|
||||
{ icon: 'mdi mdi-alert-circle-outline', short: '风险等级', text: '哪些情况会触发中风险?' }
|
||||
]
|
||||
|
||||
const visiblePrompts = computed(() => {
|
||||
const start = (promptPage.value % 2) * 6
|
||||
return prompts.slice(start, start + 6).length === 6 ? prompts.slice(start, start + 6) : prompts.slice(0, 6)
|
||||
})
|
||||
const visiblePrompts = computed(() => prompts.slice((promptPage.value % 2) * 4, (promptPage.value % 2) * 4 + 4))
|
||||
|
||||
const focusItems = [
|
||||
{ icon: 'mdi mdi-star', tone: 'danger', label: '3 单即将超时', value: '30 分钟内超时' },
|
||||
{ icon: 'mdi mdi-alert', tone: 'warning', label: '市场部高风险占比最高', value: '高风险 2 单' },
|
||||
{ icon: 'mdi mdi-swap-horizontal', tone: 'info', label: '重复报销风险 1 笔', value: '待核查' },
|
||||
{ icon: 'mdi mdi-check-circle', tone: 'success', label: '1 笔缺失附件', value: '待补充' }
|
||||
const hotQuestions = [
|
||||
'差旅报销标准是什么?',
|
||||
'酒店超标后如何申请例外报销?',
|
||||
'发票丢失如何处理?',
|
||||
'借款多久内需要冲销?',
|
||||
'预算超支如何申请?',
|
||||
'招待费报销需要哪些凭证?',
|
||||
'发票抬头不一致是否允许报销?',
|
||||
'报销附件缺失怎么补交?',
|
||||
'差旅住宿标准按什么规则执行?',
|
||||
'电子发票验真失败如何处理?'
|
||||
]
|
||||
|
||||
const suggestions = [
|
||||
{ icon: 'mdi mdi-send', text: '优先处理差旅报销(占待审 62%)' },
|
||||
{ icon: 'mdi mdi-file-document-outline-plus', text: '先补齐缺失附件再提交审批' },
|
||||
{ icon: 'mdi mdi-car', text: '对超标出租车费用要求补充说明' }
|
||||
]
|
||||
|
||||
const analysisActions = [
|
||||
{ icon: 'mdi mdi-waveform', text: '异常原因分析' },
|
||||
{ icon: 'mdi mdi-office-building', text: '部门对比' },
|
||||
{ icon: 'mdi mdi-shield-outline', text: '风险趋势' },
|
||||
{ icon: 'mdi mdi-filter-outline', text: '审批瓶颈' }
|
||||
]
|
||||
|
||||
const recentQuestions = [
|
||||
'最近 7 天哪些部门的审批时长最长?',
|
||||
'本月报销金额环比增长最快的是哪个部门?',
|
||||
'有哪些报销类型的超标率最高?',
|
||||
'SLA 未达成的主要原因是什么?'
|
||||
const similarQuestions = [
|
||||
{ text: '酒店超标后如何申请例外报销?', score: '96%' },
|
||||
{ text: '发票抬头不一致是否允许报销?', score: '92%' },
|
||||
{ text: '差旅住宿标准按什么规则执行?', score: '89%' },
|
||||
{ text: '预算不足时能否先提交报销?', score: '86%' },
|
||||
{ text: '电子发票验真失败是否可以先报销?', score: '84%' },
|
||||
{ text: '跨部门项目费用如何归集?', score: '81%' },
|
||||
{ text: '招待费报销需要哪些凭证?', score: '78%' },
|
||||
{ text: '借款冲销逾期会影响报销吗?', score: '76%' }
|
||||
]
|
||||
|
||||
function rotatePrompts() {
|
||||
@@ -229,517 +255,87 @@ function applyPrompt(text) {
|
||||
watch(
|
||||
() => props.messages.length,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
localMessageList.value?.scrollTo({ top: localMessageList.value.scrollHeight, behavior: 'smooth' })
|
||||
})
|
||||
nextTick(() => localMessageList.value?.scrollTo({ top: localMessageList.value.scrollHeight, behavior: 'smooth' }))
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.assistant-view {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
animation: fadeUp 240ms var(--ease) both;
|
||||
}
|
||||
|
||||
.assistant-grid {
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.5fr) minmax(360px, .95fr);
|
||||
gap: 16px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.conversation-panel {
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto auto minmax(0, 1fr) auto;
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-head,
|
||||
.insight-card header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-head h2,
|
||||
.insight-card h3 {
|
||||
color: #0f172a;
|
||||
font-size: 17px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.text-action,
|
||||
.insight-card header button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.text-action:hover,
|
||||
.insight-card header button:hover {
|
||||
color: #10b981;
|
||||
}
|
||||
|
||||
.prompt-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.prompt-card {
|
||||
min-height: 52px;
|
||||
display: grid;
|
||||
grid-template-columns: 24px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 14px;
|
||||
border: 1px solid #dce5ef;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
text-align: left;
|
||||
transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
|
||||
}
|
||||
|
||||
.prompt-card:hover {
|
||||
border-color: rgba(16,185,129,.36);
|
||||
box-shadow: 0 8px 20px rgba(15,23,42,.06);
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.prompt-card i {
|
||||
color: #10b981;
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
.prompt-card:nth-child(4n) i,
|
||||
.prompt-card:nth-child(5n) i {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.prompt-card:nth-child(3n) i {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.prompt-card span {
|
||||
min-width: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 650;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.message-stream {
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 14px;
|
||||
margin-top: 18px;
|
||||
padding: 2px 8px 12px 0;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-gutter: stable;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #b6c4d5 #f1f5f9;
|
||||
}
|
||||
|
||||
.message-stream::-webkit-scrollbar,
|
||||
.insight-column::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.message-stream::-webkit-scrollbar-track,
|
||||
.insight-column::-webkit-scrollbar-track {
|
||||
border-radius: 999px;
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
.message-stream::-webkit-scrollbar-thumb,
|
||||
.insight-column::-webkit-scrollbar-thumb {
|
||||
border-radius: 999px;
|
||||
background: #b6c4d5;
|
||||
}
|
||||
|
||||
.message-row {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.message-row.assistant {
|
||||
grid-template-columns: 38px minmax(0, .74fr);
|
||||
}
|
||||
|
||||
.message-row.user {
|
||||
grid-template-columns: minmax(0, .4fr) 38px;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.chat-avatar {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 999px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.assistant-avatar {
|
||||
background: #dff7ee;
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
background: #dff7ee;
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.message-bubble {
|
||||
position: relative;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #dce5ef;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
font-size: 14px;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.message-row.user .message-bubble {
|
||||
background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(16,185,129,.07));
|
||||
border-color: rgba(16,185,129,.22);
|
||||
}
|
||||
|
||||
.message-bubble p,
|
||||
.message-bubble ol,
|
||||
.message-bubble ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.message-bubble ol {
|
||||
padding-left: 18px;
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.action-list {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.action-list li {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.action-list i {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.danger { color: #ef4444; }
|
||||
.warning { color: #f59e0b; }
|
||||
.info { color: #3b82f6; }
|
||||
.success { color: #10b981; }
|
||||
|
||||
.message-bubble time {
|
||||
float: right;
|
||||
margin-left: 14px;
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.composer {
|
||||
min-height: 94px;
|
||||
display: grid;
|
||||
grid-template-rows: minmax(48px, 1fr) auto;
|
||||
border: 1px solid #d7e0ea;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.composer textarea {
|
||||
width: 100%;
|
||||
min-height: 52px;
|
||||
resize: none;
|
||||
border: 0;
|
||||
padding: 14px 16px 6px;
|
||||
color: #0f172a;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.composer textarea::placeholder {
|
||||
color: #91a2b5;
|
||||
}
|
||||
|
||||
.composer textarea:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.composer-actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 0 10px 10px 12px;
|
||||
}
|
||||
|
||||
.input-tools {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.input-tools button,
|
||||
.send-btn {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.input-tools button {
|
||||
background: transparent;
|
||||
color: #42526b;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.input-tools button:hover {
|
||||
background: #f1f5f9;
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.counter {
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
background: #10b981;
|
||||
color: #fff;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.send-btn:hover {
|
||||
background: #0ea672;
|
||||
}
|
||||
|
||||
.insight-column {
|
||||
min-height: 0;
|
||||
max-height: 100%;
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 12px;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding-right: 4px;
|
||||
scrollbar-gutter: stable;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #b6c4d5 #f1f5f9;
|
||||
}
|
||||
|
||||
.insight-card {
|
||||
padding: 18px 20px;
|
||||
}
|
||||
|
||||
.focus-list {
|
||||
display: grid;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.focus-row {
|
||||
min-height: 34px;
|
||||
display: grid;
|
||||
grid-template-columns: 24px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
border-bottom: 1px solid #eef2f7;
|
||||
color: #334155;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.focus-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.dot-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 999px;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.dot-icon.danger { background: #ef4444; color: #fff; }
|
||||
.dot-icon.warning { background: #f59e0b; color: #fff; }
|
||||
.dot-icon.info { background: #3b82f6; color: #fff; }
|
||||
.dot-icon.success { background: #10b981; color: #fff; }
|
||||
|
||||
.focus-row strong {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.focus-row > span:last-child {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.suggestion-list {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.suggestion-list button {
|
||||
min-height: 42px;
|
||||
display: grid;
|
||||
grid-template-columns: 22px minmax(0, 1fr) 16px;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.suggestion-list button:hover,
|
||||
.analysis-grid button:hover {
|
||||
border-color: rgba(16,185,129,.32);
|
||||
color: #0f9f78;
|
||||
}
|
||||
|
||||
.suggestion-list i:first-child {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.suggestion-list button:nth-child(2) i:first-child {
|
||||
color: #10b981;
|
||||
}
|
||||
|
||||
.suggestion-list button:nth-child(3) i:first-child {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.analysis-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.analysis-grid button {
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.analysis-grid i {
|
||||
color: #10b981;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.recent-list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin: 14px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.recent-list li {
|
||||
position: relative;
|
||||
padding-left: 16px;
|
||||
color: #334155;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.recent-list li::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: .62em;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 999px;
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.qa-view { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; overflow: hidden; animation: fadeUp 240ms var(--ease) both; }
|
||||
.qa-layout { height: 100%; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr) 395px; gap: 14px; overflow: hidden; }
|
||||
.left-column, .right-column { height: 100%; min-height: 0; overflow: hidden; }
|
||||
.left-column { display: grid; grid-template-rows: minmax(0, 1fr); }
|
||||
.right-column { display: grid; grid-template-rows: minmax(0, 1.06fr) minmax(0, .94fr); gap: 12px; }
|
||||
.side-panel, .info-panel { min-height: 0; padding: 16px 20px; overflow: hidden; }
|
||||
.conversation-list, .info-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
|
||||
.side-panel header, .info-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
|
||||
.side-panel h3, .info-panel h3 { display: inline-flex; align-items: center; gap: 8px; color: #0f172a; font-size: 17px; font-weight: 850; }
|
||||
.outline-action, .info-panel header button { height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8e3ed; border-radius: 8px; background: #fff; color: #0f9f78; font-size: 13px; font-weight: 750; white-space: nowrap; }
|
||||
.outline-action { padding: 0 12px; }
|
||||
.info-panel header button { border: 0; color: #64748b; }
|
||||
.session-scroll, .top-question-list, .similar-scroll { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
|
||||
.session-scroll { display: grid; align-content: start; gap: 4px; padding-right: 4px; }
|
||||
.session-row { width: 100%; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #334155; text-align: left; }
|
||||
.session-row.active, .session-row:hover { background: #eaf8f1; color: #0f8f68; }
|
||||
.session-row span { color: #10b981; }
|
||||
.session-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
|
||||
.session-row time { color: #94a3b8; font-size: 12px; }
|
||||
.chat-panel { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
|
||||
.message-stream { min-height: 0; display: grid; align-content: start; gap: 16px; padding: 16px 18px 8px; overflow-y: auto; scrollbar-width: thin; }
|
||||
.talk-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; }
|
||||
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; color: #fff; font-size: 15px; font-weight: 850; }
|
||||
.user-avatar { background: linear-gradient(135deg, #26364d, #61748a); }
|
||||
.assistant-avatar { background: #10b981; font-size: 20px; }
|
||||
.talk-content header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
|
||||
.talk-content header strong { color: #334155; font-size: 14px; font-weight: 800; }
|
||||
.talk-content header time { color: #94a3b8; font-size: 12px; }
|
||||
.user-question { display: inline-block; margin: 0; padding: 9px 16px; border-radius: 8px; background: #e8f5ef; color: #334155; font-size: 14px; line-height: 1.5; }
|
||||
.answer-card, .agent-answer { max-width: 760px; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; color: #334155; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
|
||||
.answer-card { display: grid; gap: 10px; padding: 13px 18px; }
|
||||
.answer-card.compact { gap: 10px; }
|
||||
.answer-card h4 { margin: 0 0 5px; color: #10a272; font-size: 13px; font-weight: 850; }
|
||||
.answer-card p, .answer-card ul { margin: 0; font-size: 14px; line-height: 1.58; }
|
||||
.answer-card ul { padding-left: 18px; }
|
||||
.answer-card footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #64748b; font-size: 12px; }
|
||||
.answer-card footer button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #64748b; }
|
||||
.answer-card footer button:hover { background: #f1f5f9; color: #0f9f78; }
|
||||
.agent-answer { margin: 0; padding: 12px 16px; font-size: 14px; line-height: 1.65; }
|
||||
.composer-wrap { border-top: 1px solid #eef2f7; padding: 10px 14px 12px; background: #fff; }
|
||||
.prompt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; overflow-x: auto; }
|
||||
.prompt-toolbar span { flex: 0 0 auto; color: #64748b; font-size: 13px; font-weight: 800; }
|
||||
.prompt-toolbar button { height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff; color: #334155; font-size: 13px; font-weight: 750; }
|
||||
.prompt-toolbar button i { color: #10b981; }
|
||||
.prompt-toolbar .icon-refresh { width: 34px; padding: 0; justify-content: center; }
|
||||
.composer { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: 10px; padding: 8px; border: 1px solid #cbd8e5; border-radius: 8px; background: linear-gradient(180deg, #fff, #fbfdff); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
|
||||
.composer:focus-within { border-color: rgba(16, 185, 129, .58); background: #fff; box-shadow: 0 0 0 3px rgba(16, 185, 129, .11), 0 10px 24px rgba(15, 23, 42, .06); }
|
||||
.composer textarea { height: 48px; min-height: 48px; resize: none; border: 0; padding: 5px 8px; background: transparent; color: #0f172a; font-size: 14px; line-height: 1.55; }
|
||||
.composer textarea::placeholder { color: #94a3b8; }
|
||||
.composer textarea:focus { outline: none; }
|
||||
.send-button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #10b981; color: #fff; font-size: 20px; box-shadow: 0 8px 18px rgba(16, 185, 129, .20); transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
|
||||
.send-button:hover { background: #0ea672; box-shadow: 0 10px 22px rgba(16, 185, 129, .24); }
|
||||
.send-button:active { transform: scale(.96); }
|
||||
.hot-top-panel h3 i { color: #ef4444; }
|
||||
.top-question-list { display: grid; align-content: start; gap: 8px; padding-right: 4px; }
|
||||
.top-question-list button { min-height: 42px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 14px; align-items: center; gap: 10px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #334155; text-align: left; }
|
||||
.top-question-list button:hover { border-color: rgba(16, 185, 129, .32); color: #0f9f78; }
|
||||
.top-question-list strong { color: #10b981; font-size: 13px; font-weight: 850; font-variant-numeric: tabular-nums; }
|
||||
.top-question-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 750; }
|
||||
.top-question-list i { color: #94a3b8; }
|
||||
.similar-panel { display: grid; }
|
||||
.similar-scroll { display: grid; align-content: start; padding-right: 4px; }
|
||||
.similar-row { min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) 48px 14px; align-items: center; gap: 10px; border: 0; border-top: 1px solid #eef2f7; background: transparent; color: #334155; text-align: left; }
|
||||
.similar-row:first-child { border-top: 0; }
|
||||
.similar-row span { min-width: 0; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
|
||||
.similar-row span i { color: #64748b; font-size: 17px; }
|
||||
.similar-row strong { height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #e8f8f0; color: #15945f; font-size: 13px; font-weight: 850; }
|
||||
.similar-row > i { color: #94a3b8; }
|
||||
@media (max-width: 1480px) { .qa-layout { grid-template-columns: 300px minmax(0, 1fr) 360px; } }
|
||||
@media (max-width: 1280px) {
|
||||
.assistant-grid {
|
||||
grid-template-columns: 1fr;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.insight-column {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
.qa-layout { grid-template-columns: 1fr; overflow-y: auto; }
|
||||
.left-column, .right-column { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.prompt-grid,
|
||||
.insight-column,
|
||||
.analysis-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.conversation-panel,
|
||||
.insight-card {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.message-row.assistant,
|
||||
.message-row.user {
|
||||
grid-template-columns: 34px minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.message-row.user {
|
||||
grid-template-columns: minmax(0, 1fr) 34px;
|
||||
}
|
||||
.left-column, .right-column { grid-template-columns: 1fr; }
|
||||
.composer { grid-template-columns: minmax(0, 1fr) 48px; }
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user