CustomerService.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912
  1. <template>
  2. <div class="container">
  3. <el-card class="main-card" :body-style="{ padding: 0 }">
  4. <div class="header">
  5. <div class="toggle-link" @click="sidebarVisible = !sidebarVisible">
  6. ≡ {{ sidebarVisible ? '收起配置' : '展开配置' }}
  7. </div>
  8. <h1 class="title">智能客服</h1>
  9. </div>
  10. <div class="content-wrapper">
  11. <div class="main-content">
  12. <aside v-if="sidebarVisible" class="sidebar" :class="{ disabled: showChat }">
  13. <div class="collapse-section">
  14. <div class="collapse-header" @click="basicExpanded = !basicExpanded">
  15. <span>基础设置</span>
  16. <el-icon class="arrow">
  17. <ArrowUp v-if="basicExpanded" />
  18. <ArrowDown v-else />
  19. </el-icon>
  20. </div>
  21. <div v-if="basicExpanded" class="collapse-content">
  22. <el-form label-position="top" size="default">
  23. <el-form-item label="语言">
  24. <el-select v-model="config.language" style="width: 100%">
  25. <el-option label="中文" value="中文" />
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item label="TTS">
  29. <el-select v-model="config.tts" style="width: 100%">
  30. <el-option label="Minimax" value="Minimax" />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item label="背景音">
  34. <el-select v-model="config.bgSound" style="width: 100%">
  35. <el-option label="客服中心" value="客服中心" />
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="断句模式">
  39. <el-radio-group v-model="config.punctuation" style="width: 100%">
  40. <el-radio-button value="semantic">语义断句</el-radio-button>
  41. <el-radio-button value="normal">普通断句</el-radio-button>
  42. </el-radio-group>
  43. </el-form-item>
  44. <el-form-item label="打断模式">
  45. <el-radio-group v-model="config.interrupt" style="width: 100%">
  46. <el-radio-button value="smart">智能打断</el-radio-button>
  47. <el-radio-button value="manual">手动打断</el-radio-button>
  48. </el-radio-group>
  49. </el-form-item>
  50. </el-form>
  51. </div>
  52. </div>
  53. <div class="collapse-section">
  54. <div class="collapse-header" @click="otherExpanded = !otherExpanded">
  55. <span>其他设置</span>
  56. <el-icon class="arrow">
  57. <ArrowUp v-if="otherExpanded" />
  58. <ArrowDown v-else />
  59. </el-icon>
  60. </div>
  61. <div v-if="otherExpanded" class="collapse-content">
  62. <el-form label-position="top" size="default">
  63. <el-form-item label="打断时长">
  64. <div class="slider-value">{{ config.interruptTime }}ms</div>
  65. <el-slider
  66. v-model="config.interruptTime"
  67. :min="100"
  68. :max="500"
  69. :step="10"
  70. />
  71. <div class="slider-labels">
  72. <span>更灵敏</span>
  73. <span>更稳定</span>
  74. </div>
  75. </el-form-item>
  76. <el-form-item label="VAD 时长">
  77. <div class="slider-value">{{ config.vadTime }}ms</div>
  78. <el-slider
  79. v-model="config.vadTime"
  80. :min="100"
  81. :max="800"
  82. :step="10"
  83. />
  84. <div class="slider-labels">
  85. <span>更快</span>
  86. <span>更慢</span>
  87. </div>
  88. </el-form-item>
  89. </el-form>
  90. </div>
  91. </div>
  92. </aside>
  93. <main class="right-panel" v-if="!showChat" @wheel="handleWheel">
  94. <div class="agents-container">
  95. <div class="agents-list">
  96. <div
  97. v-for="agent in paginatedAgents"
  98. :key="agent.id"
  99. class="agent-card"
  100. :class="{ selected: selectedAgent === agent.id }"
  101. @click="selectedAgent = agent.id"
  102. >
  103. <div class="avatar" :class="agent.gender"></div>
  104. <div class="gender-icon" :class="agent.gender">{{ agent.gender === 'female' ? '♀' : '♂' }}</div>
  105. <div class="agent-name">{{ agent.name }}</div>
  106. </div>
  107. </div>
  108. <div class="pagination-dots" v-if="totalPages > 1">
  109. <span
  110. v-for="page in totalPages"
  111. :key="page"
  112. class="dot"
  113. :class="{ active: currentPage === page - 1 }"
  114. @click="currentPage = page - 1"
  115. ></span>
  116. </div>
  117. </div>
  118. <div class="agents-footer">
  119. <el-button type="primary" round size="large" class="start-btn" @click="showChat = true">
  120. 开始对话
  121. </el-button>
  122. </div>
  123. </main>
  124. <main class="right-panel chat-panel" v-else>
  125. <div class="chat-content">
  126. <div class="message ai-message">
  127. <div class="message-text">
  128. 你好,我是你的腾讯云音视频 AI 助手!你可以问我:
  129. <div class="quick-questions">
  130. <div class="question-item">😴 我最近总是失眠,有什么办法可以解决吗?</div>
  131. <div class="question-item">🛏️ 怎么改善晚上睡不着、早上睡不醒的问题?</div>
  132. <div class="question-item">🚀 超过半小时才睡着是正常的吗?</div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="message user-message">
  137. <div class="message-text">
  138. 你好,我是你的睡眠顾问,专门帮人解决睡眠问题的,方便聊几句吗?
  139. <el-icon class="pause-icon"><VideoPlay /></el-icon>
  140. </div>
  141. </div>
  142. </div>
  143. <div class="chat-footer">
  144. <el-button class="keyboard-btn" @click="isTextInput = !isTextInput">
  145. <el-icon><ChatDotRound v-if="!isTextInput" /><Microphone v-else /></el-icon>
  146. </el-button>
  147. <el-input v-if="isTextInput" placeholder="输入消息..." class="text-input" />
  148. <div v-else class="voice-input-btn" @click="isMicMuted = !isMicMuted">
  149. <el-icon class="mic-icon" :class="{ muted: isMicMuted }">
  150. <Microphone v-if="!isMicMuted" />
  151. <Mute v-else />
  152. </el-icon>
  153. <div class="input-placeholder"></div>
  154. </div>
  155. <el-button class="hangup-btn" @click="showChat = false">
  156. <el-icon><PhoneFilled /></el-icon>
  157. </el-button>
  158. </div>
  159. </main>
  160. </div>
  161. </div>
  162. </el-card>
  163. </div>
  164. </template>
  165. <script setup>
  166. import { ref, computed } from 'vue'
  167. import { ArrowUp, ArrowDown, Microphone, PhoneFilled, VideoPlay, ChatDotRound, Mute } from '@element-plus/icons-vue'
  168. const showChat = ref(false)
  169. const isTextInput = ref(false)
  170. const isMicMuted = ref(false)
  171. const sidebarVisible = ref(true)
  172. const basicExpanded = ref(true)
  173. const otherExpanded = ref(false)
  174. const currentPage = ref(0)
  175. const agents = ref([
  176. { id: 1, name: '客服 001 号', gender: 'female' },
  177. { id: 2, name: '客服 002 号', gender: 'male' },
  178. { id: 3, name: '客服 003 号', gender: 'female' },
  179. { id: 4, name: '客服 004 号', gender: 'male' },
  180. { id: 5, name: '客服 005 号', gender: 'female' },
  181. { id: 6, name: '客服 006 号', gender: 'male' },
  182. { id: 7, name: '客服 007 号', gender: 'female' },
  183. { id: 8, name: '客服 008 号', gender: 'male' },
  184. { id: 9, name: '客服 009 号', gender: 'female' },
  185. { id: 10, name: '客服 010 号', gender: 'male' },
  186. { id: 11, name: '客服 011 号', gender: 'female' },
  187. { id: 12, name: '客服 012 号', gender: 'male' },
  188. { id: 13, name: '客服 013 号', gender: 'female' },
  189. { id: 14, name: '客服 014 号', gender: 'male' },
  190. { id: 15, name: '客服 015 号', gender: 'female' },
  191. { id: 16, name: '客服 016 号', gender: 'male' },
  192. { id: 17, name: '客服 017 号', gender: 'female' },
  193. { id: 18, name: '客服 018 号', gender: 'male' },
  194. { id: 19, name: '客服 019 号', gender: 'female' },
  195. { id: 20, name: '客服 020 号', gender: 'male' }
  196. ])
  197. const config = ref({
  198. language: '中文',
  199. tts: 'Minimax',
  200. bgSound: '客服中心',
  201. punctuation: 'semantic',
  202. interrupt: 'smart',
  203. interruptTime: 200,
  204. vadTime: 400
  205. })
  206. const selectedAgent = ref(1)
  207. const pageSize = 6
  208. const totalPages = computed(() => Math.ceil(agents.value.length / pageSize))
  209. const paginatedAgents = computed(() => {
  210. const start = currentPage.value * pageSize
  211. return agents.value.slice(start, start + pageSize)
  212. })
  213. const handleWheel = (e) => {
  214. e.preventDefault()
  215. // 支持垂直滚动(上下)和水平滚动(左右)
  216. const delta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY
  217. if (delta > 0 && currentPage.value < totalPages.value - 1) {
  218. currentPage.value++
  219. } else if (delta < 0 && currentPage.value > 0) {
  220. currentPage.value--
  221. }
  222. }
  223. </script>
  224. <style scoped>
  225. :global(html),
  226. :global(body) {
  227. height: 100%;
  228. overflow: hidden;
  229. margin: 0;
  230. }
  231. :global(#app) {
  232. height: 100%;
  233. overflow: hidden;
  234. }
  235. .container {
  236. min-height: 100vh;
  237. height: 100vh;
  238. background: linear-gradient(to bottom, #bfdbfe, #dbeafe, #e0f2fe);
  239. display: flex;
  240. align-items: flex-start;
  241. justify-content: center;
  242. padding: 16px;
  243. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  244. position: relative;
  245. overflow: hidden;
  246. box-sizing: border-box;
  247. }
  248. .container::before {
  249. content: '';
  250. position: absolute;
  251. top: -50%;
  252. right: -20%;
  253. width: 80%;
  254. height: 100%;
  255. background: linear-gradient(135deg, rgba(147, 197, 253, 0.3) 0%, rgba(191, 219, 254, 0.2) 100%);
  256. transform: rotate(-15deg);
  257. border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  258. box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  259. z-index: -1;
  260. }
  261. .container::after {
  262. content: '';
  263. position: absolute;
  264. bottom: -30%;
  265. left: -10%;
  266. width: 60%;
  267. height: 80%;
  268. background: linear-gradient(225deg, rgba(191, 219, 254, 0.25) 0%, rgba(224, 242, 254, 0.15) 100%);
  269. transform: rotate(25deg);
  270. border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  271. box-shadow: 0 8px 32px rgba(96, 165, 250, 0.12);
  272. z-index: -1;
  273. }
  274. .main-card {
  275. width: 100%;
  276. max-width: 1200px;
  277. border-radius: 24px !important;
  278. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  279. height: calc(100vh - 117px);
  280. display: flex;
  281. flex-direction: column;
  282. overflow: hidden;
  283. box-sizing: border-box;
  284. }
  285. :deep(.main-card .el-card__body) {
  286. height: 100%;
  287. display: flex;
  288. flex-direction: column;
  289. min-height: 0;
  290. }
  291. .header {
  292. padding: 16px 20px;
  293. text-align: center;
  294. border-bottom: 1px solid #e5e7eb;
  295. background: white;
  296. border-radius: 24px 24px 0 0;
  297. position: relative;
  298. }
  299. .toggle-link {
  300. position: absolute;
  301. left: 20px;
  302. top: 50%;
  303. transform: translateY(-50%);
  304. color: #9ca3af;
  305. font-size: 14px;
  306. cursor: pointer;
  307. user-select: none;
  308. transition: color 0.2s;
  309. }
  310. .toggle-link:hover {
  311. color: #6b7280;
  312. }
  313. .title {
  314. font-size: 20px;
  315. font-weight: 500;
  316. color: #1f2937;
  317. margin: 0;
  318. }
  319. .content-wrapper {
  320. position: relative;
  321. background: white;
  322. border-radius: 0 0 24px 24px;
  323. flex: 1;
  324. display: flex;
  325. min-height: 0;
  326. overflow: hidden;
  327. }
  328. .toggle-btn {
  329. position: absolute;
  330. top: 16px;
  331. left: 16px;
  332. z-index: 10;
  333. }
  334. .main-content {
  335. display: flex;
  336. gap: 8px;
  337. padding: 0 12px 0 12px;
  338. flex: 1;
  339. height: auto;
  340. min-height: 0;
  341. max-height: none;
  342. align-items: stretch;
  343. overflow: hidden;
  344. }
  345. .sidebar {
  346. width: 320px;
  347. flex-shrink: 0;
  348. padding: 20px;
  349. background: #ffffff;
  350. border-radius: 8px;
  351. height: 100%;
  352. overflow-y: auto;
  353. min-height: 0;
  354. max-height: 100%;
  355. box-sizing: border-box;
  356. }
  357. .sidebar.disabled :deep(.el-form) {
  358. opacity: 0.5;
  359. pointer-events: none;
  360. }
  361. .right-panel {
  362. flex: 1 1 0;
  363. display: flex;
  364. flex-direction: column;
  365. align-items: stretch;
  366. justify-content: flex-start;
  367. padding: 0;
  368. background: #f9fafb;
  369. border-radius: 8px;
  370. height: 100%;
  371. overflow: hidden;
  372. min-width: 0;
  373. position: relative;
  374. }
  375. .time-info {
  376. align-self: flex-end;
  377. color: #9ca3af;
  378. margin-bottom: 40px;
  379. font-size: 13px;
  380. }
  381. .agents-container {
  382. flex: 0 0 auto;
  383. width: 100%;
  384. display: flex;
  385. flex-direction: column;
  386. align-items: center;
  387. padding-top: 36px;
  388. padding-bottom: 0;
  389. overflow: visible;
  390. min-height: 0;
  391. position: relative;
  392. }
  393. .agents-container .pagination-dots {
  394. position: absolute;
  395. top: calc(36px + 220px + 16px + 220px + 24px);
  396. left: 50%;
  397. transform: translateX(-50%);
  398. z-index: 10;
  399. }
  400. .agents-footer {
  401. display: flex;
  402. flex-direction: column;
  403. align-items: center;
  404. padding: 0;
  405. flex-shrink: 0;
  406. position: absolute;
  407. left: 50%;
  408. transform: translateX(-50%);
  409. top: calc(36px + 220px + 16px + 220px + 24px + 40px);
  410. }
  411. .agents-list {
  412. display: grid;
  413. grid-template-columns: repeat(3, 220px);
  414. gap: 16px;
  415. width: 100%;
  416. max-width: 100%;
  417. padding: 0 12px;
  418. margin-top: 0;
  419. margin-bottom: 0;
  420. justify-content: center;
  421. }
  422. .agent-card {
  423. width: 220px;
  424. height: 220px;
  425. padding: 10px;
  426. border: 2px solid #e5e7eb;
  427. border-radius: 12px;
  428. text-align: center;
  429. cursor: pointer;
  430. position: relative;
  431. transition: all 0.3s ease;
  432. background: white;
  433. box-sizing: border-box;
  434. display: flex;
  435. flex-direction: column;
  436. align-items: center;
  437. justify-content: center;
  438. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  439. }
  440. .agent-card:hover {
  441. border-color: #3b82f6;
  442. transform: translateY(-4px);
  443. box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
  444. }
  445. .agent-card.selected {
  446. border-color: #3b82f6;
  447. background: #eff6ff;
  448. box-shadow: 0 0 0 1px #3b82f6, 0 8px 20px rgba(59, 130, 246, 0.2);
  449. }
  450. .delete-btn {
  451. position: absolute;
  452. top: 8px;
  453. right: 8px;
  454. width: 24px;
  455. height: 24px;
  456. border-radius: 50%;
  457. background: rgba(239, 68, 68, 0.9);
  458. color: white;
  459. display: flex;
  460. align-items: center;
  461. justify-content: center;
  462. opacity: 0;
  463. transition: opacity 0.2s;
  464. z-index: 10;
  465. }
  466. .agent-card:hover .delete-btn {
  467. opacity: 1;
  468. }
  469. .delete-btn:hover {
  470. background: rgba(220, 38, 38, 1);
  471. }
  472. .agent-card:hover {
  473. border-color: #3b82f6;
  474. transform: translateY(-4px);
  475. box-shadow: 0 12px 32px rgba(59, 130, 246, 0.25);
  476. }
  477. .agent-card.selected {
  478. border-color: #3b82f6;
  479. background: #eff6ff;
  480. box-shadow: 0 0 0 1px #3b82f6, 0 8px 24px rgba(59, 130, 246, 0.2);
  481. }
  482. .add-card {
  483. border: 2px dashed #d1d5db;
  484. background: transparent;
  485. display: flex;
  486. flex-direction: column;
  487. align-items: center;
  488. justify-content: center;
  489. min-height: 120px;
  490. }
  491. .add-card:hover {
  492. border-color: #3b82f6;
  493. background: #f9fafb;
  494. transform: translateY(-4px);
  495. }
  496. .add-icon {
  497. font-size: 36px;
  498. color: #9ca3af;
  499. margin-bottom: 8px;
  500. }
  501. .add-card:hover .add-icon {
  502. color: #3b82f6;
  503. }
  504. .add-text {
  505. font-size: 14px;
  506. color: #6b7280;
  507. font-weight: 500;
  508. }
  509. .add-card:hover .add-text {
  510. color: #3b82f6;
  511. }
  512. .avatar {
  513. width: 45px;
  514. height: 45px;
  515. border-radius: 50%;
  516. margin: 0 auto 6px;
  517. }
  518. .avatar.female {
  519. background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  520. }
  521. .avatar.male {
  522. background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  523. }
  524. .gender-icon {
  525. position: absolute;
  526. top: 42px;
  527. right: calc(50% - 26px);
  528. width: 16px;
  529. height: 16px;
  530. border-radius: 50%;
  531. display: flex;
  532. align-items: center;
  533. justify-content: center;
  534. color: white;
  535. font-weight: 600;
  536. font-size: 9px;
  537. }
  538. .gender-icon.female {
  539. background: #ec4899;
  540. }
  541. .gender-icon.male {
  542. background: #3b82f6;
  543. }
  544. .agent-name {
  545. font-size: 12px;
  546. color: #1f2937;
  547. font-weight: 500;
  548. }
  549. .start-btn {
  550. font-size: 16px;
  551. padding: 12px 48px;
  552. align-self: center;
  553. margin: 0;
  554. }
  555. .pagination-dots {
  556. display: flex;
  557. gap: 8px;
  558. justify-content: center;
  559. align-items: center;
  560. padding: 0;
  561. flex-shrink: 0;
  562. }
  563. .pagination-dots .dot {
  564. width: 8px;
  565. height: 8px;
  566. border-radius: 50%;
  567. background: #d1d5db;
  568. cursor: pointer;
  569. transition: all 0.3s;
  570. }
  571. .pagination-dots .dot:hover {
  572. background: #9ca3af;
  573. }
  574. .pagination-dots .dot.active {
  575. width: 24px;
  576. border-radius: 4px;
  577. background: #3b82f6;
  578. }
  579. .slider-value {
  580. font-size: 14px;
  581. color: #1f2937;
  582. margin-bottom: 8px;
  583. font-weight: 500;
  584. }
  585. .slider-labels {
  586. display: flex;
  587. justify-content: space-between;
  588. font-size: 12px;
  589. color: #9ca3af;
  590. margin-top: 4px;
  591. }
  592. /* 自定义折叠组件样式 */
  593. .collapse-section {
  594. margin-bottom: 0;
  595. }
  596. .collapse-header {
  597. display: flex;
  598. justify-content: flex-start;
  599. align-items: center;
  600. padding: 16px 0;
  601. cursor: pointer;
  602. user-select: none;
  603. font-weight: 600;
  604. font-size: 15px;
  605. color: #1f2937;
  606. }
  607. .collapse-header:hover {
  608. color: #3b82f6;
  609. }
  610. .collapse-header .arrow {
  611. font-size: 14px;
  612. color: #6b7280;
  613. margin-left: 8px;
  614. }
  615. .collapse-content {
  616. padding-bottom: 16px;
  617. }
  618. /* Element Plus 样式覆盖 */
  619. :deep(.el-collapse) {
  620. border: none;
  621. }
  622. :deep(.el-collapse-item) {
  623. margin-bottom: 0;
  624. }
  625. :deep(.el-collapse-item__header) {
  626. font-weight: 600;
  627. font-size: 15px;
  628. color: #1f2937;
  629. border: none;
  630. padding: 16px 0;
  631. height: auto;
  632. line-height: 1.5;
  633. background: transparent;
  634. justify-content: flex-start;
  635. }
  636. :deep(.el-collapse-item__arrow) {
  637. font-size: 14px;
  638. color: #6b7280;
  639. margin-left: 8px;
  640. margin-right: 0;
  641. }
  642. :deep(.el-collapse-item__arrow.is-active) {
  643. transform: rotate(180deg);
  644. }
  645. :deep(.el-collapse-item__wrap) {
  646. border: none;
  647. background: transparent;
  648. }
  649. :deep(.el-collapse-item__content) {
  650. padding: 0 0 16px 0;
  651. color: inherit;
  652. }
  653. :deep(.el-form-item) {
  654. margin-bottom: 20px;
  655. }
  656. :deep(.el-form-item__label) {
  657. color: #9ca3af;
  658. font-size: 13px;
  659. margin-bottom: 8px;
  660. }
  661. :deep(.el-select) {
  662. width: 100%;
  663. }
  664. :deep(.el-radio-group) {
  665. width: 100%;
  666. display: flex;
  667. }
  668. :deep(.el-radio-button) {
  669. flex: 1;
  670. }
  671. :deep(.el-radio-button__inner) {
  672. width: 100%;
  673. border-radius: 6px;
  674. }
  675. :deep(.el-slider__runway) {
  676. height: 4px;
  677. background-color: #e5e7eb;
  678. }
  679. :deep(.el-slider__bar) {
  680. background-color: #3b82f6;
  681. }
  682. :deep(.el-slider__button) {
  683. width: 16px;
  684. height: 16px;
  685. border: 2px solid #3b82f6;
  686. }
  687. :deep(.el-button--primary) {
  688. background-color: #3b82f6;
  689. border-color: #3b82f6;
  690. }
  691. :deep(.el-button--primary:hover) {
  692. background-color: #2563eb;
  693. border-color: #2563eb;
  694. }
  695. /* 对话界面样式 */
  696. .chat-panel {
  697. display: flex;
  698. flex-direction: column;
  699. padding: 0;
  700. height: 100%;
  701. }
  702. .chat-content {
  703. flex: 1;
  704. overflow-y: auto;
  705. padding: 20px 20px 20px 20px;
  706. }
  707. .message {
  708. margin-bottom: 16px;
  709. margin-left: 0;
  710. }
  711. .ai-message .message-text {
  712. background: white;
  713. padding: 16px;
  714. border-radius: 12px;
  715. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  716. }
  717. .user-message {
  718. display: flex;
  719. justify-content: flex-start;
  720. }
  721. .user-message .message-text {
  722. background: white;
  723. padding: 16px;
  724. border-radius: 12px;
  725. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  726. position: relative;
  727. }
  728. .quick-questions {
  729. margin-top: 12px;
  730. }
  731. .question-item {
  732. padding: 8px 0;
  733. font-size: 14px;
  734. color: #333;
  735. }
  736. .pause-icon {
  737. position: absolute;
  738. right: 12px;
  739. bottom: 12px;
  740. color: #3b82f6;
  741. }
  742. .chat-footer {
  743. padding: 20px 16px;
  744. background: white;
  745. border-top: 1px solid #e5e7eb;
  746. display: flex;
  747. align-items: center;
  748. gap: 16px;
  749. flex-shrink: 0;
  750. }
  751. .keyboard-btn {
  752. width: 48px;
  753. height: 48px;
  754. border: 1px solid #e5e7eb;
  755. background: white;
  756. flex-shrink: 0;
  757. border-radius: 50%;
  758. padding: 0;
  759. min-width: 48px;
  760. }
  761. .voice-input-btn {
  762. flex: 1;
  763. display: flex;
  764. align-items: center;
  765. gap: 16px;
  766. min-height: 48px;
  767. background: white;
  768. border: 1px solid #e5e7eb;
  769. border-radius: 24px;
  770. padding: 0 20px;
  771. }
  772. .mic-icon {
  773. font-size: 24px;
  774. color: #6b7280;
  775. flex-shrink: 0;
  776. }
  777. .text-input {
  778. flex: 1;
  779. }
  780. .input-placeholder {
  781. flex: 1;
  782. height: 2px;
  783. border-bottom: 2px dotted #d1d5db;
  784. }
  785. .hangup-btn {
  786. width: 56px;
  787. height: 56px;
  788. background: #ef4444;
  789. border: none;
  790. color: white;
  791. flex-shrink: 0;
  792. border-radius: 50%;
  793. padding: 0;
  794. min-width: 56px;
  795. }
  796. .hangup-btn:hover {
  797. background: #dc2626;
  798. }
  799. </style>