TopBar.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423
  1. <template>
  2. <header class="top-bar">
  3. <div class="breadcrumb">
  4. <span class="breadcrumb-item">领存智贸</span>
  5. <i class="fas fa-chevron-right breadcrumb-separator"></i>
  6. <span class="breadcrumb-item active">{{ pageTitle }}</span>
  7. </div>
  8. <div class="top-actions">
  9. <!-- Quick Actions -->
  10. <div class="action-btn" @click="showQuickActions = !showQuickActions" style="position: relative;">
  11. <i class="fas fa-plus"></i>
  12. <!-- Quick Actions Menu -->
  13. <transition name="fade">
  14. <div v-if="showQuickActions" class="task-menu show" style="top: 100%; right: 0; position: absolute; margin-top: 8px;">
  15. <div class="task-menu-item" @click.stop="openModal('marketing')">
  16. <div class="task-menu-icon marketing"><i class="fas fa-paper-plane"></i></div>
  17. <div class="task-menu-text">
  18. <h4>创建营销活动</h4>
  19. <p>多渠道自动触达客户</p>
  20. </div>
  21. </div>
  22. </div>
  23. </transition>
  24. </div>
  25. <!-- Notifications -->
  26. <div class="action-btn notification-btn" @click="toggleNotifications" :class="{ active: showNotifications }">
  27. <i class="fas fa-bell"></i>
  28. <span v-if="unreadCount > 0" class="notification-badge">{{ unreadCount > 99 ? '99+' : unreadCount }}</span>
  29. </div>
  30. <!-- Help -->
  31. <div class="action-btn" @click="toggleHelp" :class="{ active: showHelp }">
  32. <i class="fas fa-question-circle"></i>
  33. </div>
  34. </div>
  35. <!-- Notification Panel -->
  36. <transition name="slide-fade">
  37. <div v-if="showNotifications" class="notification-panel">
  38. <!-- Panel Header -->
  39. <div class="panel-header">
  40. <div class="panel-title">
  41. <i class="fas fa-bell"></i>
  42. 消息中心
  43. <span class="unread-count">{{ unreadCount }}条未读</span>
  44. </div>
  45. <div class="panel-actions">
  46. <button class="action-text" @click="markAllAsRead">全部已读</button>
  47. <button class="action-text" @click="showSettings = true">
  48. <i class="fas fa-cog"></i>
  49. </button>
  50. </div>
  51. </div>
  52. <!-- Filter Tabs -->
  53. <div class="panel-tabs">
  54. <div
  55. v-for="tab in notificationTabs"
  56. :key="tab.key"
  57. class="panel-tab"
  58. :class="{ active: activeTab === tab.key }"
  59. @click="activeTab = tab.key"
  60. >
  61. <i :class="tab.icon"></i>
  62. {{ tab.label }}
  63. <span v-if="tab.count > 0" class="tab-count">{{ tab.count }}</span>
  64. </div>
  65. </div>
  66. <!-- Notification List -->
  67. <div class="notification-list" ref="notificationList">
  68. <template v-if="filteredNotifications.length > 0">
  69. <div
  70. v-for="notification in filteredNotifications"
  71. :key="notification.id"
  72. class="notification-item"
  73. :class="{ unread: !notification.read, [notification.type]: true }"
  74. @click="handleNotificationClick(notification)"
  75. >
  76. <div class="notification-icon" :style="{ background: getIconBg(notification.type), color: getIconColor(notification.type) }">
  77. <i :class="notification.icon"></i>
  78. </div>
  79. <div class="notification-content">
  80. <div class="notification-title">{{ notification.title }}</div>
  81. <div class="notification-desc">{{ notification.description }}</div>
  82. <div class="notification-meta">
  83. <span class="notification-time">{{ notification.time }}</span>
  84. <span v-if="notification.source" class="notification-source">
  85. <i :class="notification.sourceIcon"></i>
  86. {{ notification.source }}
  87. </span>
  88. </div>
  89. </div>
  90. <div class="notification-actions">
  91. <button v-if="!notification.read" class="mark-read-btn" @click.stop="markAsRead(notification.id)">
  92. <i class="fas fa-check"></i>
  93. </button>
  94. <button class="more-btn" @click.stop="showNotificationMenu($event, notification)">
  95. <i class="fas fa-ellipsis-v"></i>
  96. </button>
  97. </div>
  98. </div>
  99. </template>
  100. <template v-else>
  101. <div class="empty-state">
  102. <i class="fas fa-inbox"></i>
  103. <p>暂无消息</p>
  104. </div>
  105. </template>
  106. </div>
  107. <!-- Panel Footer -->
  108. <div class="panel-footer">
  109. <button class="btn btn-secondary btn-sm" @click="viewAllNotifications">
  110. <i class="fas fa-list"></i> 查看全部消息
  111. </button>
  112. <button class="btn btn-primary btn-sm" @click="showNotifications = false">
  113. 关闭
  114. </button>
  115. </div>
  116. </div>
  117. </transition>
  118. <!-- Backdrop -->
  119. <div v-if="showNotifications" class="notification-backdrop" @click="showNotifications = false"></div>
  120. <!-- Help Panel -->
  121. <transition name="slide-fade">
  122. <div v-if="showHelp" class="help-panel">
  123. <!-- Panel Header -->
  124. <div class="panel-header">
  125. <div class="panel-title">
  126. <i class="fas fa-question-circle"></i>
  127. 帮助中心
  128. </div>
  129. <button class="modal-close" @click="showHelp = false">
  130. <i class="fas fa-times"></i>
  131. </button>
  132. </div>
  133. <!-- Search -->
  134. <div class="help-search">
  135. <i class="fas fa-search"></i>
  136. <input type="text" v-model="helpSearchQuery" placeholder="搜索帮助文档...">
  137. </div>
  138. <!-- Quick Links -->
  139. <div class="help-section">
  140. <div class="section-title">🚀 快速入门</div>
  141. <div class="quick-links">
  142. <div class="quick-link-card" @click="openHelpArticle('quickstart')">
  143. <div class="quick-link-icon"><i class="fas fa-rocket"></i></div>
  144. <div class="quick-link-content">
  145. <div class="quick-link-title">新手指南</div>
  146. <div class="quick-link-desc">5分钟快速上手</div>
  147. </div>
  148. </div>
  149. <div class="quick-link-card" @click="openHelpArticle('ai-brain')">
  150. <div class="quick-link-icon"><i class="fas fa-brain"></i></div>
  151. <div class="quick-link-content">
  152. <div class="quick-link-title">企业大脑</div>
  153. <div class="quick-link-desc">AI对话式操作</div>
  154. </div>
  155. </div>
  156. <div class="quick-link-card" @click="openHelpArticle('prospect')">
  157. <div class="quick-link-icon"><i class="fas fa-crosshairs"></i></div>
  158. <div class="quick-link-content">
  159. <div class="quick-link-title">自动寻客</div>
  160. <div class="quick-link-desc">智能挖掘潜客</div>
  161. </div>
  162. </div>
  163. <div class="quick-link-card" @click="openHelpArticle('marketing')">
  164. <div class="quick-link-icon"><i class="fas fa-paper-plane"></i></div>
  165. <div class="quick-link-content">
  166. <div class="quick-link-title">自动营销</div>
  167. <div class="quick-link-desc">多渠道触达</div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <!-- FAQ -->
  173. <div class="help-section">
  174. <div class="section-title">❓ 常见问题</div>
  175. <div class="faq-list">
  176. <div
  177. v-for="(faq, index) in filteredFaqs"
  178. :key="index"
  179. class="faq-item"
  180. :class="{ expanded: expandedFaq === index }"
  181. @click="toggleFaq(index)"
  182. >
  183. <div class="faq-question">
  184. <i class="fas fa-chevron-right"></i>
  185. {{ faq.question }}
  186. </div>
  187. <div class="faq-answer" v-html="faq.answer"></div>
  188. </div>
  189. </div>
  190. </div>
  191. <!-- Version Info -->
  192. <div class="help-footer">
  193. <div class="version-info">
  194. <span class="version-badge">v2.3.0</span>
  195. <span>领存智贸 AI CRM</span>
  196. </div>
  197. <div class="footer-links">
  198. <a href="#" @click.prevent="showChangelog">更新日志</a>
  199. </div>
  200. </div>
  201. </div>
  202. </transition>
  203. <!-- Help Backdrop -->
  204. <div v-if="showHelp" class="help-backdrop" @click="showHelp = false"></div>
  205. <!-- Notification Detail Modal -->
  206. <transition name="fade">
  207. <div v-if="selectedNotification" class="modal-overlay" @click.self="selectedNotification = null">
  208. <div class="modal notification-detail-modal">
  209. <div class="modal-header">
  210. <div class="modal-title">
  211. <div class="title-icon" :style="{ background: getIconBg(selectedNotification.type), color: getIconColor(selectedNotification.type) }">
  212. <i :class="selectedNotification.icon"></i>
  213. </div>
  214. <span>{{ selectedNotification.title }}</span>
  215. </div>
  216. <button class="modal-close" @click="selectedNotification = null">
  217. <i class="fas fa-times"></i>
  218. </button>
  219. </div>
  220. <div class="modal-body">
  221. <div class="detail-time">
  222. <i class="fas fa-clock"></i>
  223. {{ selectedNotification.time }}
  224. </div>
  225. <div class="detail-content" v-html="selectedNotification.detail"></div>
  226. <!-- Quick Actions -->
  227. <div v-if="selectedNotification.actions" class="detail-actions">
  228. <button
  229. v-for="action in selectedNotification.actions"
  230. :key="action.label"
  231. class="btn"
  232. :class="action.primary ? 'btn-primary' : 'btn-secondary'"
  233. @click="handleAction(action)"
  234. >
  235. <i :class="action.icon"></i>
  236. {{ action.label }}
  237. </button>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. </transition>
  243. <!-- AI智能寻客弹窗 -->
  244. <transition name="fade">
  245. <div v-if="showProspectModal" class="modal-overlay" @click.self="showProspectModal = false">
  246. <div class="modal business-modal">
  247. <div class="modal-header">
  248. <div class="modal-title">
  249. <div class="title-icon" style="background: rgba(99, 102, 241, 0.2); color: var(--primary);">
  250. <i class="fas fa-search"></i>
  251. </div>
  252. <span>创建AI智能寻客任务</span>
  253. </div>
  254. <button class="modal-close" @click="showProspectModal = false">
  255. <i class="fas fa-times"></i>
  256. </button>
  257. </div>
  258. <div class="modal-body">
  259. <div class="form-group">
  260. <label><i class="fas fa-tag"></i> 任务名称</label>
  261. <div class="input-with-icon">
  262. <i class="fas fa-pen"></i>
  263. <input type="text" v-model="prospectForm.name" placeholder="例如:中东SSD进口商寻客" class="form-input">
  264. </div>
  265. <div class="form-help">
  266. <i class="fas fa-info-circle"></i>
  267. <span>给任务起个清晰的名称,方便后续管理</span>
  268. </div>
  269. </div>
  270. <div class="form-row">
  271. <div class="form-group">
  272. <label><i class="fas fa-map-marker-alt"></i> 目标地区</label>
  273. <select v-model="prospectForm.region" class="form-select">
  274. <option value="middle_east">中东地区</option>
  275. <option value="europe">欧洲地区</option>
  276. <option value="north_america">北美地区</option>
  277. <option value="southeast_asia">东南亚地区</option>
  278. <option value="south_america">南美地区</option>
  279. </select>
  280. </div>
  281. <div class="form-group">
  282. <label><i class="fas fa-box"></i> 产品类型</label>
  283. <select v-model="prospectForm.product" class="form-select">
  284. <option value="ssd">固态硬盘 SSD</option>
  285. <option value="hdd">机械硬盘 HDD</option>
  286. <option value="memory">内存条</option>
  287. <option value="flash">闪存卡</option>
  288. </select>
  289. </div>
  290. </div>
  291. <div class="form-group">
  292. <label><i class="fas fa-dollar-sign"></i> 最小年采购额</label>
  293. <select v-model="prospectForm.minPurchase" class="form-select">
  294. <option value="50000">$50,000+</option>
  295. <option value="100000">$100,000+</option>
  296. <option value="500000">$500,000+</option>
  297. <option value="1000000">$1,000,000+</option>
  298. </select>
  299. </div>
  300. <div class="form-group">
  301. <label><i class="fas fa-bullseye"></i> 寻客渠道 <span style="font-weight:400;color:var(--text-muted);">(多选)</span></label>
  302. <div class="checkbox-group">
  303. <label class="checkbox-item">
  304. <input type="checkbox" v-model="prospectForm.channels" value="linkedin">
  305. <span><i class="fab fa-linkedin"></i> LinkedIn</span>
  306. </label>
  307. <label class="checkbox-item">
  308. <input type="checkbox" v-model="prospectForm.channels" value="email">
  309. <span><i class="fas fa-envelope"></i> 企业邮箱</span>
  310. </label>
  311. <label class="checkbox-item">
  312. <input type="checkbox" v-model="prospectForm.channels" value="website">
  313. <span><i class="fas fa-globe"></i> 官网访客</span>
  314. </label>
  315. <label class="checkbox-item">
  316. <input type="checkbox" v-model="prospectForm.channels" value="trade">
  317. <span><i class="fas fa-handshake"></i> 展会数据</span>
  318. </label>
  319. </div>
  320. </div>
  321. <div class="form-group">
  322. <label class="toggle-label">
  323. <input type="checkbox" v-model="prospectForm.autoFollowUp">
  324. <span class="toggle-switch"></span>
  325. <span>找到潜客后自动启动营销跟进</span>
  326. </label>
  327. </div>
  328. <div class="form-actions">
  329. <button class="btn btn-secondary" @click="showProspectModal = false">取消</button>
  330. <button class="btn btn-primary" @click="createProspectTask">
  331. <i class="fas fa-rocket"></i> 开始寻客
  332. </button>
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. </transition>
  338. <!-- 创建营销活动弹窗 -->
  339. <transition name="fade">
  340. <div v-if="showMarketingModal" class="modal-overlay" @click.self="showMarketingModal = false">
  341. <div class="modal business-modal">
  342. <div class="modal-header">
  343. <div class="modal-title">
  344. <div class="title-icon" style="background: rgba(16, 185, 129, 0.2); color: var(--success);">
  345. <i class="fas fa-paper-plane"></i>
  346. </div>
  347. <span>创建营销活动</span>
  348. </div>
  349. <button class="modal-close" @click="showMarketingModal = false">
  350. <i class="fas fa-times"></i>
  351. </button>
  352. </div>
  353. <div class="modal-body">
  354. <div class="form-group">
  355. <label><i class="fas fa-tag"></i> 活动名称</label>
  356. <div class="input-with-icon">
  357. <i class="fas fa-pen"></i>
  358. <input type="text" v-model="marketingForm.name" placeholder="例如:中东新客户开发" class="form-input">
  359. </div>
  360. </div>
  361. <div class="form-row">
  362. <div class="form-group">
  363. <label><i class="fas fa-users"></i> 目标客户群</label>
  364. <select v-model="marketingForm.targetGroup" class="form-select">
  365. <option value="new_prospects">本月新增潜客</option>
  366. <option value="high_score">高评分潜客 (80分以上)</option>
  367. <option value="uncontacted">未联系潜客</option>
  368. <option value="dormant">沉睡客户唤醒</option>
  369. <option value="custom">自定义分组</option>
  370. </select>
  371. </div>
  372. <div class="form-group">
  373. <label><i class="fas fa-stream"></i> 营销序列</label>
  374. <select v-model="marketingForm.sequence" class="form-select">
  375. <option value="new_customer">新客户开发序列</option>
  376. <option value="follow_up">跟进培育序列</option>
  377. <option value="reactivation">客户唤醒序列</option>
  378. <option value="promotion">促销推广序列</option>
  379. </select>
  380. </div>
  381. </div>
  382. <div class="form-group">
  383. <label>营销渠道</label>
  384. <div class="checkbox-group">
  385. <label class="checkbox-item">
  386. <input type="checkbox" v-model="marketingForm.channels" value="email">
  387. <span><i class="fas fa-envelope"></i> 邮件营销</span>
  388. </label>
  389. <label class="checkbox-item">
  390. <input type="checkbox" v-model="marketingForm.channels" value="linkedin">
  391. <span><i class="fab fa-linkedin"></i> LinkedIn</span>
  392. </label>
  393. <label class="checkbox-item">
  394. <input type="checkbox" v-model="marketingForm.channels" value="whatsapp">
  395. <span><i class="fab fa-whatsapp"></i> WhatsApp</span>
  396. </label>
  397. </div>
  398. </div>
  399. <div class="form-group">
  400. <label>发送时间</label>
  401. <div class="radio-group">
  402. <label class="radio-item">
  403. <input type="radio" v-model="marketingForm.schedule" value="immediate">
  404. <span>立即开始</span>
  405. </label>
  406. <label class="radio-item">
  407. <input type="radio" v-model="marketingForm.schedule" value="tomorrow">
  408. <span>明天上午10点</span>
  409. </label>
  410. <label class="radio-item">
  411. <input type="radio" v-model="marketingForm.schedule" value="custom">
  412. <span>自定义时间</span>
  413. </label>
  414. </div>
  415. </div>
  416. <div class="form-group">
  417. <label class="toggle-label">
  418. <input type="checkbox" v-model="marketingForm.aiOptimize">
  419. <span class="toggle-switch"></span>
  420. <span>启用AI优化(自动选择最佳发送时间和内容)</span>
  421. </label>
  422. </div>
  423. <div class="form-actions">
  424. <button class="btn btn-secondary" @click="showMarketingModal = false">取消</button>
  425. <button class="btn btn-primary" @click="createMarketingCampaign">
  426. <i class="fas fa-paper-plane"></i> 创建活动
  427. </button>
  428. </div>
  429. </div>
  430. </div>
  431. </div>
  432. </transition>
  433. <!-- 生成分析报告弹窗 -->
  434. <transition name="fade">
  435. <div v-if="showReportModal" class="modal-overlay" @click.self="showReportModal = false">
  436. <div class="modal business-modal">
  437. <div class="modal-header">
  438. <div class="modal-title">
  439. <div class="title-icon" style="background: rgba(245, 158, 11, 0.2); color: var(--warning);">
  440. <i class="fas fa-chart-bar"></i>
  441. </div>
  442. <span>生成分析报告</span>
  443. </div>
  444. <button class="modal-close" @click="showReportModal = false">
  445. <i class="fas fa-times"></i>
  446. </button>
  447. </div>
  448. <div class="modal-body">
  449. <div class="form-group">
  450. <label><i class="fas fa-tag"></i> 报告名称</label>
  451. <div class="input-with-icon">
  452. <i class="fas fa-pen"></i>
  453. <input type="text" v-model="reportForm.name" placeholder="例如:2026年3月业务分析报告" class="form-input">
  454. </div>
  455. </div>
  456. <div class="form-row">
  457. <div class="form-group">
  458. <label>报告类型</label>
  459. <select v-model="reportForm.type" class="form-select">
  460. <option value="weekly">周报</option>
  461. <option value="monthly">月报</option>
  462. <option value="quarterly">季报</option>
  463. <option value="custom">自定义时间段</option>
  464. </select>
  465. </div>
  466. <div class="form-group">
  467. <label>数据范围</label>
  468. <select v-model="reportForm.scope" class="form-select">
  469. <option value="all">全部业务</option>
  470. <option value="prospect">寻客数据</option>
  471. <option value="marketing">营销数据</option>
  472. <option value="sales">销售数据</option>
  473. <option value="customer">客户数据</option>
  474. </select>
  475. </div>
  476. </div>
  477. <div class="form-group">
  478. <label><i class="fas fa-layer-group"></i> 分析维度 <span style="font-weight:400;color:var(--text-muted);">(多选)</span></label>
  479. <div class="checkbox-group">
  480. <label class="checkbox-item">
  481. <input type="checkbox" v-model="reportForm.metrics" value="revenue">
  482. <span><i class="fas fa-dollar-sign"></i> 营收分析</span>
  483. </label>
  484. <label class="checkbox-item">
  485. <input type="checkbox" v-model="reportForm.metrics" value="conversion">
  486. <span><i class="fas fa-chart-line"></i> 转化漏斗</span>
  487. </label>
  488. <label class="checkbox-item">
  489. <input type="checkbox" v-model="reportForm.metrics" value="pipeline">
  490. <span><i class="fas fa-tasks"></i> 商机管道</span>
  491. </label>
  492. <label class="checkbox-item">
  493. <input type="checkbox" v-model="reportForm.metrics" value="customer">
  494. <span><i class="fas fa-users"></i> 客户画像</span>
  495. </label>
  496. <label class="checkbox-item">
  497. <input type="checkbox" v-model="reportForm.metrics" value="marketing">
  498. <span><i class="fas fa-paper-plane"></i> 营销效果</span>
  499. </label>
  500. <label class="checkbox-item">
  501. <input type="checkbox" v-model="reportForm.metrics" value="trend">
  502. <span><i class="fas fa-chart-area"></i> 趋势预测</span>
  503. </label>
  504. </div>
  505. </div>
  506. <div class="form-row">
  507. <div class="form-group">
  508. <label><i class="fas fa-file-alt"></i> 报告格式</label>
  509. <div class="radio-group">
  510. <label class="radio-item">
  511. <input type="radio" v-model="reportForm.format" value="pdf">
  512. <span><i class="fas fa-file-pdf"></i> PDF</span>
  513. </label>
  514. <label class="radio-item">
  515. <input type="radio" v-model="reportForm.format" value="excel">
  516. <span><i class="fas fa-file-excel"></i> Excel</span>
  517. </label>
  518. <label class="radio-item">
  519. <input type="radio" v-model="reportForm.format" value="ppt">
  520. <span><i class="fas fa-file-powerpoint"></i> PPT</span>
  521. </label>
  522. </div>
  523. </div>
  524. </div>
  525. <div class="form-group">
  526. <label class="toggle-label">
  527. <input type="checkbox" v-model="reportForm.includeAI">
  528. <span class="toggle-switch"></span>
  529. <span>包含AI洞察和建议</span>
  530. </label>
  531. </div>
  532. <div class="form-group" v-if="reportForm.includeAI">
  533. <div class="ai-features">
  534. <div class="ai-feature-item">
  535. <i class="fas fa-lightbulb"></i>
  536. <span>智能发现业务机会和风险点</span>
  537. </div>
  538. <div class="ai-feature-item">
  539. <i class="fas fa-chart-line"></i>
  540. <span>基于历史数据的趋势预测</span>
  541. </div>
  542. <div class="ai-feature-item">
  543. <i class="fas fa-bullseye"></i>
  544. <span>可执行的优化建议</span>
  545. </div>
  546. </div>
  547. </div>
  548. <div class="form-actions">
  549. <button class="btn btn-secondary" @click="showReportModal = false">取消</button>
  550. <button class="btn btn-primary" @click="generateReport">
  551. <i class="fas fa-magic"></i> 生成报告
  552. </button>
  553. </div>
  554. </div>
  555. </div>
  556. </div>
  557. </transition>
  558. </header>
  559. <AddMarketing ref="addMarketingRef" />
  560. <div v-if="showSettings" class="modal-overlay" @click.self="showSettings = false">
  561. <div class="modal create-modal">
  562. <div class="modal-header">
  563. <div class="modal-title"><i class="fas fa-bell"></i> 通知设置</div>
  564. <button class="modal-close" @click="showSettings = false"><i class="fas fa-times"></i></button>
  565. </div>
  566. <div class="modal-body">
  567. <div class="settings-list">
  568. <div class="settings-item" style="padding-top: 0;">
  569. <div class="item-icon" style="background: rgba(99, 102, 241, 0.2); color: var(--primary);">
  570. <i class="fas fa-envelope"></i>
  571. </div>
  572. <div class="item-content">
  573. <div class="item-title">邮件通知</div>
  574. <div class="item-desc">重要通知发送到邮箱</div>
  575. </div>
  576. <div class="item-action">
  577. <el-switch v-model="settings.emailNotify" style="--el-switch-on-color: #13ce66;" />
  578. </div>
  579. </div>
  580. <div class="settings-item">
  581. <div class="item-icon" style="background: rgba(16, 185, 129, 0.2); color: var(--success);">
  582. <i class="fas fa-reply"></i>
  583. </div>
  584. <div class="item-content">
  585. <div class="item-title">客户回复提醒</div>
  586. <div class="item-desc">客户回复邮件、消息时即时提醒</div>
  587. </div>
  588. <div class="item-action">
  589. <el-switch v-model="settings.replyNotify" style="--el-switch-on-color: #13ce66;" />
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. </div>
  596. </template>
  597. <script setup>
  598. import { ref, computed, onMounted } from 'vue'
  599. import { useRoute } from 'vue-router'
  600. import AddMarketing from '../addMarketing.vue'
  601. import { getNoReadCount } from '@/api/layout'
  602. const route = useRoute()
  603. const showQuickActions = ref(false)
  604. const showNotifications = ref(false)
  605. const showHelp = ref(false)
  606. const showSettings = ref(false)
  607. // 业务创建弹窗
  608. const showProspectModal = ref(false)
  609. const showMarketingModal = ref(false)
  610. const showReportModal = ref(false)
  611. const settings = ref({
  612. emailNotify: true,
  613. replyNotify: true
  614. })
  615. // 寻客表单
  616. const prospectForm = ref({
  617. name: '',
  618. region: 'middle_east',
  619. product: 'ssd',
  620. minPurchase: '100000',
  621. channels: ['linkedin', 'email'],
  622. autoFollowUp: true
  623. })
  624. // 营销表单
  625. const marketingForm = ref({
  626. name: '',
  627. targetGroup: 'new_prospects',
  628. sequence: 'new_customer',
  629. channels: ['email', 'linkedin'],
  630. schedule: 'immediate',
  631. aiOptimize: true
  632. })
  633. // 报告表单
  634. const reportForm = ref({
  635. name: '',
  636. type: 'weekly',
  637. scope: 'all',
  638. metrics: ['revenue', 'conversion', 'pipeline'],
  639. format: 'pdf',
  640. includeAI: true,
  641. schedule: null
  642. })
  643. const activeTab = ref('all')
  644. const selectedNotification = ref(null)
  645. const notificationList = ref(null)
  646. const helpSearchQuery = ref('')
  647. const expandedFaq = ref(null)
  648. const pageTitle = computed(() => {
  649. const titles = {
  650. '/': '企业大脑',
  651. '/prospect': '自动寻客',
  652. '/marketing': '自动营销',
  653. '/customers': '客户池',
  654. '/opportunities': '商机管理',
  655. '/orders': '订单跟进',
  656. '/analysis': '经营分析',
  657. '/market': '市场情报',
  658. '/strategy': 'AI策略中心',
  659. '/risk': '风险风控',
  660. '/knowledge': '知识库',
  661. '/settings': '设置'
  662. }
  663. return titles[route.path] || '企业大脑'
  664. })
  665. const addMarketingRef = ref()
  666. const openModal = (type) => {
  667. showQuickActions.value = false
  668. addMarketingRef.value.open()
  669. // if (type === 'prospect') {
  670. // showProspectModal.value = true
  671. // } else if (type === 'marketing') {
  672. // showMarketingModal.value = true
  673. // } else if (type === 'analysis') {
  674. // showReportModal.value = true
  675. // }
  676. }
  677. // 创建寻客任务
  678. const createProspectTask = () => {
  679. if (!prospectForm.value.name.trim()) {
  680. alert('请输入任务名称')
  681. return
  682. }
  683. console.log('创建寻客任务:', prospectForm.value)
  684. showProspectModal.value = false
  685. // 重置表单
  686. prospectForm.value = {
  687. name: '',
  688. region: 'middle_east',
  689. product: 'ssd',
  690. minPurchase: '100000',
  691. channels: ['linkedin', 'email'],
  692. autoFollowUp: true
  693. }
  694. // 可以添加成功提示
  695. alert('寻客任务已创建,AI开始全网挖掘潜客...')
  696. }
  697. // 创建营销活动
  698. const createMarketingCampaign = () => {
  699. if (!marketingForm.value.name.trim()) {
  700. alert('请输入活动名称')
  701. return
  702. }
  703. console.log('创建营销活动:', marketingForm.value)
  704. showMarketingModal.value = false
  705. // 重置表单
  706. marketingForm.value = {
  707. name: '',
  708. targetGroup: 'new_prospects',
  709. sequence: 'new_customer',
  710. channels: ['email', 'linkedin'],
  711. schedule: 'immediate',
  712. aiOptimize: true
  713. }
  714. alert('营销活动已创建,系统将自动执行营销序列...')
  715. }
  716. // 生成分析报告
  717. const generateReport = () => {
  718. if (!reportForm.value.name.trim()) {
  719. alert('请输入报告名称')
  720. return
  721. }
  722. console.log('生成报告:', reportForm.value)
  723. showReportModal.value = false
  724. // 重置表单
  725. reportForm.value = {
  726. name: '',
  727. type: 'weekly',
  728. scope: 'all',
  729. metrics: ['revenue', 'conversion', 'pipeline'],
  730. format: 'pdf',
  731. includeAI: true,
  732. schedule: null
  733. }
  734. alert('报告生成中,完成后将发送至您的邮箱...')
  735. }
  736. const toggleNotifications = () => {
  737. showNotifications.value = !showNotifications.value
  738. if (showNotifications.value) showHelp.value = false
  739. }
  740. const toggleHelp = () => {
  741. showHelp.value = !showHelp.value
  742. if (showHelp.value) showNotifications.value = false
  743. }
  744. // Notification data
  745. const notifications = ref([
  746. // 客户回复
  747. {
  748. id: 1,
  749. type: 'reply',
  750. icon: 'fas fa-reply',
  751. title: 'Riyadh Tech 回复了邮件',
  752. description: '对方对您的产品报价表示感兴趣,希望进一步了解交期和付款方式',
  753. detail: '<p>客户 Ahmed Al-Rashid 回复了您的报价邮件:</p><blockquote style="border-left:3px solid var(--primary);padding-left:12px;margin:12px 0;color:var(--text-secondary);">您好,我们对贵公司的SSD产品很感兴趣。请问MOQ是多少?交期大概多久?付款方式有哪些?</blockquote><p>建议尽快回复客户,可以提供详细的报价单和公司介绍。</p>',
  754. time: '5分钟前',
  755. source: '邮件',
  756. sourceIcon: 'fas fa-envelope',
  757. read: false,
  758. actions: [
  759. { label: '立即回复', icon: 'fas fa-reply', primary: true },
  760. { label: '查看邮件', icon: 'fas fa-envelope-open' },
  761. ]
  762. },
  763. {
  764. id: 2,
  765. type: 'reply',
  766. icon: 'fab fa-whatsapp',
  767. title: 'Dubai Storage WhatsApp 已读',
  768. description: '您发送的消息已被查看,对方正在输入中...',
  769. detail: '<p>客户 Mohammed Khan 已读您的 WhatsApp 消息,显示对方正在输入回复。</p><p>消息内容:关于企业级SSD采购的询价</p>',
  770. time: '15分钟前',
  771. source: 'WhatsApp',
  772. sourceIcon: 'fab fa-whatsapp',
  773. read: false
  774. },
  775. {
  776. id: 3,
  777. type: 'reply',
  778. icon: 'fab fa-linkedin',
  779. title: 'LinkedIn 好友请求被接受',
  780. description: 'Kuwait Data Systems 的 CIO Faisal 接受了您的好友请求',
  781. detail: '<p>Faisal Al-Mutairi (CTO @ Kuwait Data Systems) 接受了您的 LinkedIn 连接请求。</p><p>建议:发送个性化感谢消息,介绍公司和产品。</p>',
  782. time: '1小时前',
  783. source: 'LinkedIn',
  784. sourceIcon: 'fab fa-linkedin',
  785. read: true
  786. },
  787. // 风险预警
  788. {
  789. id: 4,
  790. type: 'risk',
  791. icon: 'fas fa-exclamation-triangle',
  792. title: '⚠️ 高风险预警:客户信用下调',
  793. description: 'ABC Corp 信用评级从 A 下调至 B,建议提高预付款比例',
  794. detail: '<p><strong>风险等级:高</strong></p><p>客户 ABC Corp 的信用评级发生变动:</p><ul><li>原评级:A</li><li>新评级:B</li><li>原因:近期财务状况恶化</li></ul><p><strong>建议措施:</strong></p><ul><li>提高预付款比例至 50%</li><li>缩短付款周期</li><li>关注后续订单风险</li></ul>',
  795. time: '30分钟前',
  796. source: '风控系统',
  797. sourceIcon: 'fas fa-shield-alt',
  798. read: false,
  799. actions: [
  800. { label: '查看详情', icon: 'fas fa-info-circle', primary: true },
  801. { label: '调整付款条件', icon: 'fas fa-edit' }
  802. ]
  803. },
  804. {
  805. id: 5,
  806. type: 'risk',
  807. icon: 'fas fa-gavel',
  808. title: '欧盟能效新规即将生效',
  809. description: '2026年7月生效,涉及SSD产品能效认证要求',
  810. detail: '<p><strong>法规更新提醒</strong></p><p>欧盟委员会发布新的能效认证要求,将于2026年7月1日正式生效。</p><p><strong>影响范围:</strong></p><ul><li>所有出口欧盟的SSD产品</li><li>需要提供能效测试报告</li><li>认证周期约30天</li></ul><p><strong>建议:</strong>提前准备相关认证材料。</p>',
  811. time: '2小时前',
  812. source: '市场情报',
  813. sourceIcon: 'fas fa-globe',
  814. read: false
  815. },
  816. // AI情报
  817. {
  818. id: 6,
  819. type: 'ai',
  820. icon: 'fas fa-robot',
  821. title: '🤖 AI发现新商机',
  822. description: '识别到新加坡 Digital Hub 近期频繁访问官网定价页面',
  823. detail: '<p><strong>AI商机分析报告</strong></p><p>客户行为分析:</p><ul><li>过去7天访问定价页面 12 次</li><li>查看企业级SSD产品详情 8 次</li><li>下载产品手册 2 次</li></ul><p><strong>AI建议:</strong>该客户意向度高,建议尽快主动联系。</p>',
  824. time: '45分钟前',
  825. source: 'AI大脑',
  826. sourceIcon: 'fas fa-brain',
  827. read: false,
  828. actions: [
  829. { label: '立即联系', icon: 'fas fa-phone', primary: true },
  830. { label: '发送报价', icon: 'fas fa-file-invoice' }
  831. ]
  832. },
  833. {
  834. id: 7,
  835. type: 'ai',
  836. icon: 'fas fa-lightbulb',
  837. title: '💡 AI策略建议',
  838. description: '基于近期数据分析,建议调整中东地区邮件发送时间',
  839. detail: '<p><strong>策略优化建议</strong></p><p>AI分析了过去30天的邮件数据,发现:</p><ul><li>中东客户最佳回复时段:晚上8-10点</li><li>当前发送时段:上午10点</li><li>预计调整后回复率提升:52%</li></ul><p>是否应用此策略?</p>',
  840. time: '3小时前',
  841. source: 'AI策略中心',
  842. sourceIcon: 'fas fa-lightbulb',
  843. read: true,
  844. actions: [
  845. { label: '应用策略', icon: 'fas fa-check', primary: true },
  846. { label: '查看详情', icon: 'fas fa-chart-bar' }
  847. ]
  848. },
  849. // 营销报告
  850. {
  851. id: 8,
  852. type: 'marketing',
  853. icon: 'fas fa-chart-line',
  854. title: '📊 周度营销报告已生成',
  855. description: '本周发送邮件 1,247 封,打开率 42%,回复率 18%',
  856. detail: '<p><strong>本周营销数据汇总</strong></p><table style="width:100%;border-collapse:collapse;margin:12px 0;"><tr style="border-bottom:1px solid var(--border)"><td style="padding:8px 0;">邮件发送</td><td style="text-align:right;font-weight:600;">1,247 封</td></tr><tr style="border-bottom:1px solid var(--border)"><td style="padding:8px 0;">打开率</td><td style="text-align:right;font-weight:600;color:var(--success)">42% (+8%)</td></tr><tr style="border-bottom:1px solid var(--border)"><td style="padding:8px 0;">回复率</td><td style="text-align:right;font-weight:600;color:var(--success)">18% (+5%)</td></tr><tr><td style="padding:8px 0;">新增商机</td><td style="text-align:right;font-weight:600;">23 个</td></tr></table><p>详细报告已发送至您的邮箱。</p>',
  857. time: '今天 09:00',
  858. source: '自动报告',
  859. sourceIcon: 'fas fa-file-alt',
  860. read: true,
  861. actions: [
  862. { label: '查看完整报告', icon: 'fas fa-file-pdf', primary: true }
  863. ]
  864. },
  865. {
  866. id: 9,
  867. type: 'marketing',
  868. icon: 'fas fa-check-circle',
  869. title: '✅ 营销活动完成',
  870. description: '中东潜客开发活动已完成,共触达 156 位客户',
  871. detail: '<p><strong>活动执行报告</strong></p><p>活动名称:中东潜客开发</p><p>执行时间:2026-03-12 ~ 2026-03-19</p><p><strong>执行结果:</strong></p><ul><li>目标客户:156 位</li><li>邮件送达:152 封 (97%)</li><li>邮件打开:68 封 (45%)</li><li>客户回复:12 封 (8%)</li><li>意向客户:5 位</li></ul>',
  872. time: '昨天 18:30',
  873. source: '营销系统',
  874. sourceIcon: 'fas fa-paper-plane',
  875. read: true
  876. },
  877. // 寻客通知
  878. {
  879. id: 10,
  880. type: 'prospect',
  881. icon: 'fas fa-user-plus',
  882. title: '🎯 发现 12 个高匹配潜客',
  883. description: '基于您的历史成交客户,AI 推荐 12 个相似潜客',
  884. detail: '<p><strong>AI寻客报告</strong></p><p>寻客条件:中东地区 + SSD进口商</p><p><strong>推荐潜客 TOP 3:</strong></p><ol><li>Riyadh Tech Distribution (92分)</li><li>Dubai Storage Solutions (88分)</li><li>Saudi Digital Hub (76分)</li></ol><p>点击查看完整列表。</p>',
  885. time: '今天 14:30',
  886. source: '自动寻客',
  887. sourceIcon: 'fas fa-crosshairs',
  888. read: false,
  889. actions: [
  890. { label: '查看潜客列表', icon: 'fas fa-list', primary: true },
  891. { label: '发送营销邮件', icon: 'fas fa-paper-plane' }
  892. ]
  893. },
  894. {
  895. id: 11,
  896. type: 'prospect',
  897. icon: 'fas fa-search',
  898. title: '寻客任务更新',
  899. description: '欧洲企业级存储寻客任务进度 75%,已发现 45 家目标公司',
  900. detail: '<p><strong>任务进度更新</strong></p><p>任务名称:欧洲企业级存储寻客</p><p>当前进度:75%</p><p><strong>已发现:</strong></p><ul><li>目标公司:45 家</li><li>关键人信息:28 位</li><li>高匹配度:12 家</li></ul>',
  901. time: '今天 11:20',
  902. source: '寻客任务',
  903. sourceIcon: 'fas fa-tasks',
  904. read: true
  905. },
  906. // 系统通知
  907. {
  908. id: 12,
  909. type: 'system',
  910. icon: 'fas fa-cog',
  911. title: '系统更新通知',
  912. description: '领存智贸 AI 已更新至 v2.3,新增策略自进化功能',
  913. detail: '<p><strong>版本更新 v2.3</strong></p><p><strong>新增功能:</strong></p><ul><li>AI策略自进化 - 自动测试优化营销策略</li><li>智能跟进提醒 - 基于客户行为预测最佳跟进时机</li><li>知识库问答优化 - 支持更多行业知识</li></ul><p><strong>优化:</strong></p><ul><li>邮件生成速度提升 30%</li><li>潜客匹配准确率提升 15%</li></ul>',
  914. time: '昨天 10:00',
  915. source: '系统',
  916. sourceIcon: 'fas fa-server',
  917. read: true
  918. }
  919. ])
  920. // Computed
  921. const notificationTabs = computed(() => [
  922. { key: 'all', label: '全部', icon: 'fas fa-inbox', count: notifications.value.filter(n => !n.read).length },
  923. { key: 'reply', label: '客户回复', icon: 'fas fa-reply', count: notifications.value.filter(n => n.type === 'reply' && !n.read).length },
  924. { key: 'marketing', label: '营销报告', icon: 'fas fa-chart-line', count: notifications.value.filter(n => n.type === 'marketing' && !n.read).length }
  925. ])
  926. const unreadCount = computed(() => notifications.value.filter(n => !n.read).length)
  927. const filteredNotifications = computed(() => {
  928. if (activeTab.value === 'all') return notifications.value
  929. return notifications.value.filter(n => n.type === activeTab.value)
  930. })
  931. // Methods
  932. const getIconBg = (type) => {
  933. const map = {
  934. reply: 'rgba(99, 102, 241, 0.2)',
  935. risk: 'rgba(239, 68, 68, 0.2)',
  936. ai: 'rgba(139, 92, 246, 0.2)',
  937. marketing: 'rgba(16, 185, 129, 0.2)',
  938. prospect: 'rgba(245, 158, 11, 0.2)',
  939. system: 'rgba(148, 163, 184, 0.2)'
  940. }
  941. return map[type] || 'rgba(99, 102, 241, 0.2)'
  942. }
  943. const getIconColor = (type) => {
  944. const map = {
  945. reply: 'var(--primary)',
  946. risk: 'var(--danger)',
  947. ai: 'var(--secondary)',
  948. marketing: 'var(--success)',
  949. prospect: 'var(--warning)',
  950. system: 'var(--text-secondary)'
  951. }
  952. return map[type] || 'var(--primary)'
  953. }
  954. const handleNotificationClick = (notification) => {
  955. if (!notification.read) {
  956. notification.read = true
  957. }
  958. selectedNotification.value = notification
  959. }
  960. const markAsRead = (id) => {
  961. const notification = notifications.value.find(n => n.id === id)
  962. if (notification) {
  963. notification.read = true
  964. }
  965. }
  966. const markAllAsRead = () => {
  967. notifications.value.forEach(n => n.read = true)
  968. }
  969. const viewAllNotifications = () => {
  970. showNotifications.value = false
  971. // Navigate to notifications page
  972. }
  973. const showNotificationMenu = (event, notification) => {
  974. // Show context menu
  975. }
  976. const handleAction = (action) => {
  977. console.log('Action:', action)
  978. selectedNotification.value = null
  979. }
  980. // Help Center
  981. const faqs = ref([
  982. {
  983. question: '如何使用AI企业大脑进行智能寻客?',
  984. answer: '<p>在"企业大脑"对话框中直接输入您的需求,例如:</p><ul><li>"帮我找中东地区的SSD进口商"</li><li>"寻找年采购额超过100万的潜客"</li><li>"推荐与ABC公司类似的客户"</li></ul><p>AI会自动分析并推荐高匹配度潜客。</p>'
  985. },
  986. {
  987. question: '邮件营销如何设置自动跟进?',
  988. answer: '<p>创建营销活动时,系统会自动生成SOP序列:</p><ol><li>Day 1: 首次触达邮件</li><li>Day 3: 未打开则重发</li><li>Day 7: 发送跟进内容</li></ol><p>您也可以在"自动营销"中自定义跟进节奏。</p>'
  989. },
  990. {
  991. question: '如何提高邮件打开率和回复率?',
  992. answer: '<p>AI策略中心已分析出最佳实践:</p><ul><li>发送时间:周二上午10点效果最佳</li><li>标题优化:包含具体数字提升42%</li><li>个性化:根据客户官网内容定制开场</li><li>跟进时机:第3天和第7天是最佳时机</li></ul>'
  993. },
  994. {
  995. question: '如何管理客户信息和跟进记录?',
  996. answer: '<p>客户池支持完整的客户生命周期管理:</p><ul><li>自动同步邮件、WhatsApp、LinkedIn沟通记录</li><li>客户标签和评分系统</li><li>商机阶段追踪</li><li>订单和付款管理</li></ul>'
  997. },
  998. {
  999. question: 'AI策略中心是如何工作的?',
  1000. answer: '<p>AI策略中心通过分析您的业务数据:</p><ol><li>分析邮件发送和回复数据</li><li>识别最优触达时机和话术</li><li>自动生成策略建议</li><li>支持一键应用策略</li></ol><p>系统会持续学习并优化策略。</p>'
  1001. },
  1002. {
  1003. question: '如何配置邮件和社交媒体账号?',
  1004. answer: '<p>前往"设置" → "账号绑定":</p><ul><li>邮件:支持Gmail、Outlook、企业邮箱</li><li>WhatsApp:绑定WhatsApp Business账号</li><li>LinkedIn:绑定LinkedIn个人或企业账号</li></ul><p>绑定后系统会自动同步沟通记录。</p>'
  1005. }
  1006. ])
  1007. const filteredFaqs = computed(() => {
  1008. if (!helpSearchQuery.value) return faqs.value
  1009. const query = helpSearchQuery.value.toLowerCase()
  1010. return faqs.value.filter(f =>
  1011. f.question.toLowerCase().includes(query) ||
  1012. f.answer.toLowerCase().includes(query)
  1013. )
  1014. })
  1015. const toggleFaq = (index) => {
  1016. expandedFaq.value = expandedFaq.value === index ? null : index
  1017. }
  1018. const openHelpArticle = (article) => {
  1019. console.log('Open article:', article)
  1020. showHelp.value = false
  1021. }
  1022. const openChat = () => {
  1023. console.log('Open chat support')
  1024. showHelp.value = false
  1025. }
  1026. const sendFeedback = () => {
  1027. console.log('Send feedback')
  1028. showHelp.value = false
  1029. }
  1030. const openDocs = () => {
  1031. window.open('https://docs.lingcunai.com', '_blank')
  1032. showHelp.value = false
  1033. }
  1034. const showChangelog = () => {
  1035. console.log('Show changelog')
  1036. }
  1037. const showTerms = () => {
  1038. console.log('Show terms')
  1039. }
  1040. const showPrivacy = () => {
  1041. console.log('Show privacy')
  1042. }
  1043. onMounted(() => {
  1044. getNoReadCount().then(res => {
  1045. console.log('Unread notifications count:', res)
  1046. })
  1047. })
  1048. </script>
  1049. <style scoped>
  1050. .top-bar {
  1051. display: flex;
  1052. align-items: center;
  1053. justify-content: space-between;
  1054. padding: 12px 24px;
  1055. background: var(--bg-card);
  1056. border-bottom: 1px solid var(--border);
  1057. position: relative;
  1058. }
  1059. .breadcrumb {
  1060. display: flex;
  1061. align-items: center;
  1062. gap: 8px;
  1063. font-size: 13px;
  1064. }
  1065. .breadcrumb-item {
  1066. color: var(--text-secondary);
  1067. }
  1068. .breadcrumb-item.active {
  1069. color: var(--text-primary);
  1070. }
  1071. .breadcrumb-separator {
  1072. color: var(--text-muted);
  1073. font-size: 10px;
  1074. }
  1075. .top-actions {
  1076. display: flex;
  1077. align-items: center;
  1078. gap: 12px;
  1079. }
  1080. .action-btn {
  1081. width: 36px;
  1082. height: 36px;
  1083. background: var(--bg-hover);
  1084. border: 1px solid var(--border);
  1085. border-radius: 8px;
  1086. display: flex;
  1087. align-items: center;
  1088. justify-content: center;
  1089. cursor: pointer;
  1090. color: var(--text-secondary);
  1091. transition: all 0.2s;
  1092. position: relative;
  1093. }
  1094. .action-btn:hover {
  1095. background: var(--border);
  1096. color: var(--text-primary);
  1097. }
  1098. .action-btn.active {
  1099. background: var(--primary);
  1100. color: white;
  1101. border-color: var(--primary);
  1102. }
  1103. /* Notification Badge */
  1104. .notification-badge {
  1105. position: absolute;
  1106. top: -4px;
  1107. right: -4px;
  1108. min-width: 18px;
  1109. height: 18px;
  1110. background: var(--danger);
  1111. color: white;
  1112. font-size: 10px;
  1113. font-weight: 600;
  1114. border-radius: 9px;
  1115. display: flex;
  1116. align-items: center;
  1117. justify-content: center;
  1118. padding: 0 4px;
  1119. }
  1120. /* Notification Panel */
  1121. .notification-backdrop {
  1122. position: fixed;
  1123. top: 0;
  1124. left: 0;
  1125. right: 0;
  1126. bottom: 0;
  1127. z-index: 999;
  1128. }
  1129. .notification-panel {
  1130. position: absolute;
  1131. top: 100%;
  1132. right: 24px;
  1133. width: 420px;
  1134. max-height: 600px;
  1135. background: var(--bg-card);
  1136. border: 1px solid var(--border);
  1137. border-radius: 12px;
  1138. box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  1139. display: flex;
  1140. flex-direction: column;
  1141. z-index: 1000;
  1142. margin-top: 8px;
  1143. }
  1144. .slide-fade-enter-active,
  1145. .slide-fade-leave-active {
  1146. transition: all 0.2s ease;
  1147. }
  1148. .slide-fade-enter-from,
  1149. .slide-fade-leave-to {
  1150. opacity: 0;
  1151. transform: translateY(-10px);
  1152. }
  1153. /* Panel Header */
  1154. .panel-header {
  1155. display: flex;
  1156. justify-content: space-between;
  1157. align-items: center;
  1158. padding: 16px;
  1159. border-bottom: 1px solid var(--border);
  1160. }
  1161. .panel-title {
  1162. display: flex;
  1163. align-items: center;
  1164. gap: 8px;
  1165. font-size: 15px;
  1166. font-weight: 600;
  1167. }
  1168. .panel-title i {
  1169. color: var(--primary);
  1170. }
  1171. .unread-count {
  1172. font-size: 11px;
  1173. padding: 2px 8px;
  1174. background: rgba(99, 102, 241, 0.2);
  1175. color: var(--primary);
  1176. border-radius: 10px;
  1177. }
  1178. .panel-actions {
  1179. display: flex;
  1180. gap: 8px;
  1181. }
  1182. .action-text {
  1183. background: none;
  1184. border: none;
  1185. color: var(--text-secondary);
  1186. font-size: 12px;
  1187. cursor: pointer;
  1188. padding: 4px 8px;
  1189. border-radius: 4px;
  1190. }
  1191. .action-text:hover {
  1192. background: var(--bg-hover);
  1193. color: var(--text-primary);
  1194. }
  1195. /* Panel Tabs */
  1196. .panel-tabs {
  1197. display: flex;
  1198. gap: 4px;
  1199. padding: 8px 12px;
  1200. border-bottom: 1px solid var(--border);
  1201. overflow-x: auto;
  1202. }
  1203. .panel-tab {
  1204. display: flex;
  1205. align-items: center;
  1206. gap: 6px;
  1207. padding: 6px 12px;
  1208. border-radius: 16px;
  1209. font-size: 12px;
  1210. cursor: pointer;
  1211. white-space: nowrap;
  1212. color: var(--text-secondary);
  1213. transition: all 0.2s;
  1214. }
  1215. .panel-tab:hover {
  1216. background: var(--bg-hover);
  1217. }
  1218. .panel-tab.active {
  1219. background: var(--primary);
  1220. color: white;
  1221. }
  1222. .panel-tab i {
  1223. font-size: 11px;
  1224. }
  1225. .tab-count {
  1226. font-size: 10px;
  1227. padding: 1px 5px;
  1228. background: rgba(255, 255, 255, 0.2);
  1229. border-radius: 8px;
  1230. }
  1231. .panel-tab:not(.active) .tab-count {
  1232. background: var(--bg-hover);
  1233. }
  1234. /* Notification List */
  1235. .notification-list {
  1236. flex: 1;
  1237. overflow-y: auto;
  1238. max-height: 400px;
  1239. }
  1240. .notification-item {
  1241. display: flex;
  1242. gap: 12px;
  1243. padding: 14px 16px;
  1244. border-bottom: 1px solid var(--border);
  1245. cursor: pointer;
  1246. transition: background 0.2s;
  1247. }
  1248. .notification-item:hover {
  1249. background: var(--bg-hover);
  1250. }
  1251. .notification-item.unread {
  1252. background: rgba(99, 102, 241, 0.05);
  1253. }
  1254. .notification-item.unread:hover {
  1255. background: rgba(99, 102, 241, 0.1);
  1256. }
  1257. .notification-icon {
  1258. width: 36px;
  1259. height: 36px;
  1260. border-radius: 10px;
  1261. display: flex;
  1262. align-items: center;
  1263. justify-content: center;
  1264. font-size: 14px;
  1265. flex-shrink: 0;
  1266. }
  1267. .notification-content {
  1268. flex: 1;
  1269. min-width: 0;
  1270. }
  1271. .notification-title {
  1272. font-size: 13px;
  1273. font-weight: 600;
  1274. margin-bottom: 4px;
  1275. display: -webkit-box;
  1276. -webkit-line-clamp: 1;
  1277. -webkit-box-orient: vertical;
  1278. overflow: hidden;
  1279. }
  1280. .notification-desc {
  1281. font-size: 12px;
  1282. color: var(--text-secondary);
  1283. margin-bottom: 6px;
  1284. display: -webkit-box;
  1285. -webkit-line-clamp: 2;
  1286. -webkit-box-orient: vertical;
  1287. overflow: hidden;
  1288. }
  1289. .notification-meta {
  1290. display: flex;
  1291. align-items: center;
  1292. gap: 12px;
  1293. font-size: 11px;
  1294. color: var(--text-muted);
  1295. }
  1296. .notification-source {
  1297. display: flex;
  1298. align-items: center;
  1299. gap: 4px;
  1300. }
  1301. .notification-actions {
  1302. display: flex;
  1303. flex-direction: column;
  1304. gap: 4px;
  1305. opacity: 0;
  1306. transition: opacity 0.2s;
  1307. }
  1308. .notification-item:hover .notification-actions {
  1309. opacity: 1;
  1310. }
  1311. .mark-read-btn,
  1312. .more-btn {
  1313. width: 28px;
  1314. height: 28px;
  1315. background: var(--bg-hover);
  1316. border: none;
  1317. border-radius: 6px;
  1318. color: var(--text-secondary);
  1319. cursor: pointer;
  1320. display: flex;
  1321. align-items: center;
  1322. justify-content: center;
  1323. font-size: 12px;
  1324. }
  1325. .mark-read-btn:hover {
  1326. background: var(--success);
  1327. color: white;
  1328. }
  1329. .more-btn:hover {
  1330. background: var(--border);
  1331. color: var(--text-primary);
  1332. }
  1333. /* Empty State */
  1334. .empty-state {
  1335. display: flex;
  1336. flex-direction: column;
  1337. align-items: center;
  1338. justify-content: center;
  1339. padding: 48px;
  1340. color: var(--text-muted);
  1341. }
  1342. .empty-state i {
  1343. font-size: 48px;
  1344. margin-bottom: 16px;
  1345. opacity: 0.3;
  1346. }
  1347. .empty-state p {
  1348. font-size: 14px;
  1349. }
  1350. /* Panel Footer */
  1351. .panel-footer {
  1352. display: flex;
  1353. justify-content: space-between;
  1354. padding: 12px 16px;
  1355. border-top: 1px solid var(--border);
  1356. }
  1357. /* Task Menu */
  1358. .task-menu {
  1359. width: 320px;
  1360. background: var(--bg-card);
  1361. border: 1px solid var(--border);
  1362. border-radius: 12px;
  1363. padding: 8px;
  1364. z-index: 100;
  1365. }
  1366. .task-menu.show {
  1367. display: block;
  1368. }
  1369. .task-menu-item {
  1370. display: flex;
  1371. gap: 12px;
  1372. padding: 12px;
  1373. border-radius: 8px;
  1374. cursor: pointer;
  1375. }
  1376. .task-menu-item:hover {
  1377. background: var(--bg-hover);
  1378. }
  1379. .task-menu-icon {
  1380. width: 40px;
  1381. height: 40px;
  1382. border-radius: 10px;
  1383. display: flex;
  1384. align-items: center;
  1385. justify-content: center;
  1386. font-size: 18px;
  1387. }
  1388. .task-menu-icon.prospect {
  1389. background: rgba(99, 102, 241, 0.2);
  1390. color: var(--primary);
  1391. }
  1392. .task-menu-icon.marketing {
  1393. background: rgba(16, 185, 129, 0.2);
  1394. color: var(--success);
  1395. }
  1396. .task-menu-icon.analysis {
  1397. background: rgba(245, 158, 11, 0.2);
  1398. color: var(--warning);
  1399. }
  1400. .task-menu-text h4 {
  1401. font-size: 13px;
  1402. font-weight: 600;
  1403. margin-bottom: 2px;
  1404. }
  1405. .task-menu-text p {
  1406. font-size: 11px;
  1407. color: var(--text-secondary);
  1408. }
  1409. /* Modal */
  1410. .modal-overlay {
  1411. position: fixed;
  1412. top: 0;
  1413. left: 0;
  1414. right: 0;
  1415. bottom: 0;
  1416. background: rgba(0, 0, 0, 0.7);
  1417. display: flex;
  1418. align-items: center;
  1419. justify-content: center;
  1420. z-index: 2000;
  1421. padding: 20px;
  1422. }
  1423. .modal {
  1424. background: var(--bg-card);
  1425. border-radius: 16px;
  1426. width: 100%;
  1427. max-width: 600px;
  1428. overflow: hidden;
  1429. }
  1430. .notification-detail-modal {
  1431. max-width: 550px;
  1432. }
  1433. .modal-header {
  1434. display: flex;
  1435. justify-content: space-between;
  1436. align-items: center;
  1437. padding: 20px;
  1438. border-bottom: 1px solid var(--border);
  1439. }
  1440. .modal-title {
  1441. display: flex;
  1442. align-items: center;
  1443. gap: 12px;
  1444. font-size: 16px;
  1445. font-weight: 600;
  1446. }
  1447. .title-icon {
  1448. width: 36px;
  1449. height: 36px;
  1450. border-radius: 10px;
  1451. display: flex;
  1452. align-items: center;
  1453. justify-content: center;
  1454. font-size: 14px;
  1455. }
  1456. .modal-close {
  1457. width: 32px;
  1458. height: 32px;
  1459. background: var(--bg-hover);
  1460. border: none;
  1461. border-radius: 8px;
  1462. color: var(--text-secondary);
  1463. cursor: pointer;
  1464. display: flex;
  1465. align-items: center;
  1466. justify-content: center;
  1467. }
  1468. .modal-close:hover {
  1469. background: var(--border);
  1470. color: var(--text-primary);
  1471. }
  1472. .modal-body {
  1473. padding: 20px;
  1474. }
  1475. .detail-time {
  1476. display: flex;
  1477. align-items: center;
  1478. gap: 6px;
  1479. font-size: 12px;
  1480. color: var(--text-muted);
  1481. margin-bottom: 16px;
  1482. }
  1483. .detail-content {
  1484. font-size: 14px;
  1485. line-height: 1.7;
  1486. color: var(--text-secondary);
  1487. }
  1488. .detail-content p {
  1489. margin-bottom: 12px;
  1490. }
  1491. .detail-content ul,
  1492. .detail-content ol {
  1493. margin: 12px 0;
  1494. padding-left: 24px;
  1495. }
  1496. .detail-content li {
  1497. margin-bottom: 6px;
  1498. }
  1499. .detail-actions {
  1500. display: flex;
  1501. gap: 12px;
  1502. margin-top: 20px;
  1503. padding-top: 20px;
  1504. border-top: 1px solid var(--border);
  1505. }
  1506. .fade-enter-active,
  1507. .fade-leave-active {
  1508. transition: opacity 0.2s ease;
  1509. }
  1510. .fade-enter-from,
  1511. .fade-leave-to {
  1512. opacity: 0;
  1513. }
  1514. /* Help Panel */
  1515. .help-backdrop {
  1516. position: fixed;
  1517. top: 0;
  1518. left: 0;
  1519. right: 0;
  1520. bottom: 0;
  1521. z-index: 999;
  1522. }
  1523. .help-panel {
  1524. position: absolute;
  1525. top: 100%;
  1526. right: 24px;
  1527. width: 420px;
  1528. max-height: calc(100vh - 80px);
  1529. background: var(--bg-card);
  1530. border: 1px solid var(--border);
  1531. border-radius: 12px;
  1532. box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  1533. display: flex;
  1534. flex-direction: column;
  1535. z-index: 1000;
  1536. margin-top: 8px;
  1537. overflow-y: auto;
  1538. }
  1539. .slide-fade-enter-active,
  1540. .slide-fade-leave-active {
  1541. transition: all 0.2s ease;
  1542. }
  1543. .slide-fade-enter-from,
  1544. .slide-fade-leave-to {
  1545. opacity: 0;
  1546. transform: translateY(-10px);
  1547. }
  1548. /* Panel Header */
  1549. .panel-header {
  1550. display: flex;
  1551. justify-content: space-between;
  1552. align-items: center;
  1553. padding: 16px 20px;
  1554. border-bottom: 1px solid var(--border);
  1555. position: sticky;
  1556. top: 0;
  1557. z-index: 10;
  1558. }
  1559. .panel-title {
  1560. display: flex;
  1561. align-items: center;
  1562. gap: 8px;
  1563. font-size: 15px;
  1564. font-weight: 600;
  1565. }
  1566. .panel-title i {
  1567. color: var(--primary);
  1568. }
  1569. .modal-close {
  1570. width: 28px;
  1571. height: 28px;
  1572. background: var(--bg-hover);
  1573. border: none;
  1574. border-radius: 6px;
  1575. color: var(--text-secondary);
  1576. cursor: pointer;
  1577. display: flex;
  1578. align-items: center;
  1579. justify-content: center;
  1580. }
  1581. .modal-close:hover {
  1582. background: var(--border);
  1583. color: var(--text-primary);
  1584. }
  1585. /* Help Search */
  1586. .help-search {
  1587. padding: 12px 16px;
  1588. position: relative;
  1589. border-bottom: 1px solid var(--border);
  1590. }
  1591. .help-search i {
  1592. position: absolute;
  1593. left: 28px;
  1594. top: 50%;
  1595. transform: translateY(-50%);
  1596. color: var(--text-muted);
  1597. font-size: 12px;
  1598. }
  1599. .help-search input {
  1600. width: 100%;
  1601. padding: 10px 12px 10px 36px;
  1602. background: var(--bg-hover);
  1603. border: 1px solid var(--border);
  1604. border-radius: 8px;
  1605. color: var(--text-primary);
  1606. font-size: 13px;
  1607. }
  1608. .help-search input:focus {
  1609. outline: none;
  1610. border-color: var(--primary);
  1611. }
  1612. /* Help Section */
  1613. .help-section {
  1614. padding: 16px;
  1615. border-bottom: 1px solid var(--border);
  1616. }
  1617. .help-section:last-child {
  1618. border-bottom: none;
  1619. }
  1620. .section-title {
  1621. font-size: 13px;
  1622. font-weight: 600;
  1623. margin-bottom: 12px;
  1624. color: var(--text-primary);
  1625. }
  1626. /* Quick Links */
  1627. .quick-links {
  1628. display: grid;
  1629. grid-template-columns: repeat(2, 1fr);
  1630. gap: 10px;
  1631. }
  1632. .quick-link-card {
  1633. display: flex;
  1634. align-items: center;
  1635. gap: 10px;
  1636. padding: 12px;
  1637. background: var(--bg-hover);
  1638. border-radius: 10px;
  1639. cursor: pointer;
  1640. transition: all 0.2s;
  1641. }
  1642. .quick-link-card:hover {
  1643. background: var(--border);
  1644. transform: translateY(-1px);
  1645. }
  1646. .quick-link-icon {
  1647. width: 36px;
  1648. height: 36px;
  1649. border-radius: 8px;
  1650. background: rgba(99, 102, 241, 0.2);
  1651. display: flex;
  1652. align-items: center;
  1653. justify-content: center;
  1654. color: var(--primary);
  1655. font-size: 14px;
  1656. }
  1657. .quick-link-title {
  1658. font-size: 12px;
  1659. font-weight: 600;
  1660. margin-bottom: 2px;
  1661. }
  1662. .quick-link-desc {
  1663. font-size: 10px;
  1664. color: var(--text-muted);
  1665. }
  1666. /* FAQ List */
  1667. .faq-list {
  1668. display: flex;
  1669. flex-direction: column;
  1670. gap: 8px;
  1671. }
  1672. .faq-item {
  1673. background: var(--bg-hover);
  1674. border-radius: 8px;
  1675. overflow: hidden;
  1676. cursor: pointer;
  1677. }
  1678. .faq-question {
  1679. display: flex;
  1680. align-items: center;
  1681. gap: 8px;
  1682. padding: 12px;
  1683. font-size: 12px;
  1684. font-weight: 500;
  1685. transition: all 0.2s;
  1686. }
  1687. .faq-question i {
  1688. font-size: 10px;
  1689. color: var(--text-muted);
  1690. transition: transform 0.2s;
  1691. }
  1692. .faq-item.expanded .faq-question i {
  1693. transform: rotate(90deg);
  1694. }
  1695. .faq-item:hover .faq-question {
  1696. background: var(--border);
  1697. }
  1698. .faq-answer {
  1699. max-height: 0;
  1700. overflow: hidden;
  1701. transition: max-height 0.3s ease;
  1702. font-size: 11px;
  1703. color: var(--text-secondary);
  1704. line-height: 1.6;
  1705. }
  1706. .faq-item.expanded .faq-answer {
  1707. max-height: 300px;
  1708. padding: 0 12px 12px;
  1709. }
  1710. .faq-answer p {
  1711. margin-bottom: 8px;
  1712. }
  1713. .faq-answer ul,
  1714. .faq-answer ol {
  1715. margin: 8px 0;
  1716. padding-left: 16px;
  1717. }
  1718. .faq-answer li {
  1719. margin-bottom: 4px;
  1720. }
  1721. /* Support Options */
  1722. .support-options {
  1723. display: flex;
  1724. flex-direction: column;
  1725. gap: 8px;
  1726. }
  1727. .support-item {
  1728. display: flex;
  1729. align-items: center;
  1730. gap: 12px;
  1731. padding: 12px;
  1732. background: var(--bg-hover);
  1733. border-radius: 8px;
  1734. cursor: pointer;
  1735. transition: all 0.2s;
  1736. }
  1737. .support-item:hover {
  1738. background: var(--border);
  1739. }
  1740. .support-item i {
  1741. font-size: 18px;
  1742. color: var(--primary);
  1743. width: 24px;
  1744. text-align: center;
  1745. }
  1746. .support-title {
  1747. font-size: 12px;
  1748. font-weight: 600;
  1749. margin-bottom: 2px;
  1750. }
  1751. .support-desc {
  1752. font-size: 10px;
  1753. color: var(--text-muted);
  1754. }
  1755. /* Help Footer */
  1756. .help-footer {
  1757. padding: 12px 16px;
  1758. border-top: 1px solid var(--border);
  1759. background: var(--bg-hover);
  1760. }
  1761. .version-info {
  1762. display: flex;
  1763. align-items: center;
  1764. gap: 8px;
  1765. font-size: 11px;
  1766. color: var(--text-muted);
  1767. margin-bottom: 8px;
  1768. }
  1769. .version-badge {
  1770. padding: 2px 8px;
  1771. background: var(--primary);
  1772. color: white;
  1773. border-radius: 10px;
  1774. font-size: 10px;
  1775. font-weight: 600;
  1776. }
  1777. .footer-links {
  1778. display: flex;
  1779. gap: 16px;
  1780. }
  1781. .footer-links a {
  1782. font-size: 11px;
  1783. color: var(--text-secondary);
  1784. text-decoration: none;
  1785. }
  1786. .footer-links a:hover {
  1787. color: var(--primary);
  1788. }
  1789. /* Business Modal Styles - Optimized */
  1790. .business-modal {
  1791. max-width: 520px;
  1792. animation: modalSlideIn 0.3s ease;
  1793. }
  1794. @keyframes modalSlideIn {
  1795. from {
  1796. opacity: 0;
  1797. transform: translateY(-20px) scale(0.98);
  1798. }
  1799. to {
  1800. opacity: 1;
  1801. transform: translateY(0) scale(1);
  1802. }
  1803. }
  1804. .business-modal .modal-header {
  1805. background: linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  1806. padding: 24px 24px 20px;
  1807. border-bottom: 1px solid var(--border);
  1808. }
  1809. .business-modal .modal-header .title-icon {
  1810. width: 44px;
  1811. height: 44px;
  1812. border-radius: 12px;
  1813. font-size: 20px;
  1814. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  1815. }
  1816. .business-modal .modal-header span {
  1817. font-size: 18px;
  1818. font-weight: 600;
  1819. }
  1820. .business-modal .modal-body {
  1821. max-height: 70vh;
  1822. overflow-y: auto;
  1823. padding: 24px;
  1824. }
  1825. /* Form Styles - Enhanced */
  1826. .form-group {
  1827. margin-bottom: 24px;
  1828. }
  1829. .form-group label {
  1830. display: block;
  1831. font-size: 13px;
  1832. font-weight: 600;
  1833. margin-bottom: 10px;
  1834. color: var(--text-primary);
  1835. display: flex;
  1836. align-items: center;
  1837. gap: 6px;
  1838. }
  1839. .form-group label::after {
  1840. content: '';
  1841. flex: 1;
  1842. height: 1px;
  1843. background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
  1844. margin-left: 10px;
  1845. }
  1846. .form-input {
  1847. width: 100%;
  1848. padding: 12px 16px;
  1849. background: var(--bg-dark);
  1850. border: 1px solid var(--border);
  1851. border-radius: 10px;
  1852. color: var(--text-primary);
  1853. font-size: 14px;
  1854. transition: all 0.2s ease;
  1855. }
  1856. .form-input:hover {
  1857. border-color: var(--text-secondary);
  1858. }
  1859. .form-input:focus {
  1860. outline: none;
  1861. border-color: var(--primary);
  1862. box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.1);
  1863. background: var(--bg-card);
  1864. }
  1865. .form-input::placeholder {
  1866. color: var(--text-muted);
  1867. font-size: 13px;
  1868. }
  1869. .form-select {
  1870. width: 100%;
  1871. padding: 12px 16px;
  1872. background: var(--bg-dark);
  1873. border: 1px solid var(--border);
  1874. border-radius: 10px;
  1875. color: var(--text-primary);
  1876. font-size: 14px;
  1877. cursor: pointer;
  1878. transition: all 0.2s ease;
  1879. appearance: none;
  1880. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  1881. background-repeat: no-repeat;
  1882. background-position: right 14px center;
  1883. padding-right: 40px;
  1884. }
  1885. .form-select:hover {
  1886. border-color: var(--text-secondary);
  1887. }
  1888. .form-select:focus {
  1889. outline: none;
  1890. border-color: var(--primary);
  1891. box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  1892. background: var(--bg-card);
  1893. }
  1894. .form-row {
  1895. display: grid;
  1896. grid-template-columns: 1fr 1fr;
  1897. gap: 20px;
  1898. }
  1899. /* Checkbox & Radio Styles - Modern */
  1900. .checkbox-group,
  1901. .radio-group {
  1902. display: flex;
  1903. flex-wrap: wrap;
  1904. gap: 12px;
  1905. }
  1906. .checkbox-item,
  1907. .radio-item {
  1908. display: flex;
  1909. align-items: center;
  1910. gap: 8px;
  1911. padding: 10px 14px;
  1912. background: var(--bg-dark);
  1913. border: 1px solid var(--border);
  1914. border-radius: 10px;
  1915. cursor: pointer;
  1916. font-size: 13px;
  1917. transition: all 0.2s ease;
  1918. position: relative;
  1919. overflow: hidden;
  1920. }
  1921. .checkbox-item::before,
  1922. .radio-item::before {
  1923. content: '';
  1924. position: absolute;
  1925. top: 0;
  1926. left: 0;
  1927. right: 0;
  1928. bottom: 0;
  1929. background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  1930. opacity: 0;
  1931. transition: opacity 0.2s ease;
  1932. }
  1933. .checkbox-item:hover,
  1934. .radio-item:hover {
  1935. border-color: var(--primary);
  1936. transform: translateY(-1px);
  1937. box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  1938. }
  1939. .checkbox-item input,
  1940. .radio-item input {
  1941. display: none;
  1942. }
  1943. .checkbox-item span,
  1944. .radio-item span {
  1945. display: flex;
  1946. align-items: center;
  1947. gap: 8px;
  1948. position: relative;
  1949. z-index: 1;
  1950. }
  1951. .checkbox-item:has(input:checked),
  1952. .radio-item:has(input:checked) {
  1953. background: var(--bg-card);
  1954. border-color: var(--primary);
  1955. color: var(--primary);
  1956. box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
  1957. }
  1958. .checkbox-item:has(input:checked)::before,
  1959. .radio-item:has(input:checked)::before {
  1960. opacity: 0.08;
  1961. }
  1962. /* Toggle Switch - Enhanced */
  1963. .toggle-label {
  1964. display: flex;
  1965. align-items: center;
  1966. gap: 14px;
  1967. cursor: pointer;
  1968. font-size: 14px;
  1969. color: var(--text-secondary);
  1970. padding: 16px;
  1971. background: var(--bg-dark);
  1972. border-radius: 12px;
  1973. border: 1px solid var(--border);
  1974. transition: all 0.2s ease;
  1975. }
  1976. .toggle-label:hover {
  1977. border-color: var(--primary);
  1978. background: var(--bg-hover);
  1979. }
  1980. .toggle-label input {
  1981. display: none;
  1982. }
  1983. .toggle-switch {
  1984. width: 48px;
  1985. height: 26px;
  1986. background: var(--border);
  1987. border-radius: 13px;
  1988. position: relative;
  1989. transition: all 0.3s ease;
  1990. flex-shrink: 0;
  1991. }
  1992. .toggle-switch::after {
  1993. content: '';
  1994. position: absolute;
  1995. top: 3px;
  1996. left: 3px;
  1997. width: 20px;
  1998. height: 20px;
  1999. background: white;
  2000. border-radius: 50%;
  2001. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  2002. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  2003. }
  2004. .toggle-label input:checked + .toggle-switch {
  2005. background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  2006. }
  2007. .toggle-label input:checked + .toggle-switch::after {
  2008. left: 25px;
  2009. }
  2010. /* Form Actions - Enhanced */
  2011. .form-actions {
  2012. display: flex;
  2013. justify-content: flex-end;
  2014. gap: 12px;
  2015. padding-top: 24px;
  2016. border-top: 1px solid var(--border);
  2017. margin-top: 8px;
  2018. }
  2019. .form-actions .btn {
  2020. padding: 12px 24px;
  2021. font-size: 14px;
  2022. font-weight: 500;
  2023. border-radius: 10px;
  2024. transition: all 0.2s ease;
  2025. }
  2026. .form-actions .btn-primary {
  2027. background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  2028. border: none;
  2029. box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  2030. }
  2031. .form-actions .btn-primary:hover {
  2032. transform: translateY(-1px);
  2033. box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  2034. }
  2035. .form-actions .btn-secondary {
  2036. background: var(--bg-hover);
  2037. border: 1px solid var(--border);
  2038. }
  2039. .form-actions .btn-secondary:hover {
  2040. background: var(--border);
  2041. border-color: var(--text-secondary);
  2042. }
  2043. /* AI Features Section - Enhanced */
  2044. .ai-features {
  2045. background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  2046. border: 1px solid rgba(99, 102, 241, 0.2);
  2047. border-radius: 12px;
  2048. padding: 18px;
  2049. margin-top: 4px;
  2050. }
  2051. .ai-feature-item {
  2052. display: flex;
  2053. align-items: center;
  2054. gap: 12px;
  2055. font-size: 13px;
  2056. color: var(--text-secondary);
  2057. margin-bottom: 12px;
  2058. padding: 8px 0;
  2059. border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  2060. }
  2061. .ai-feature-item:last-child {
  2062. margin-bottom: 0;
  2063. border-bottom: none;
  2064. }
  2065. .ai-feature-item i {
  2066. color: var(--primary);
  2067. width: 20px;
  2068. font-size: 14px;
  2069. }
  2070. /* Section Divider */
  2071. .form-section {
  2072. position: relative;
  2073. margin: 28px 0;
  2074. }
  2075. .form-section::before {
  2076. content: '';
  2077. position: absolute;
  2078. left: 0;
  2079. right: 0;
  2080. top: 50%;
  2081. height: 1px;
  2082. background: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  2083. }
  2084. .form-section-title {
  2085. position: relative;
  2086. display: inline-block;
  2087. padding: 0 16px;
  2088. background: var(--bg-card);
  2089. font-size: 12px;
  2090. font-weight: 600;
  2091. color: var(--text-muted);
  2092. text-transform: uppercase;
  2093. letter-spacing: 0.5px;
  2094. }
  2095. /* Help Text */
  2096. .form-help {
  2097. font-size: 12px;
  2098. color: var(--text-muted);
  2099. margin-top: 8px;
  2100. display: flex;
  2101. align-items: center;
  2102. gap: 6px;
  2103. }
  2104. .form-help i {
  2105. font-size: 11px;
  2106. }
  2107. /* Input with Icon */
  2108. .input-with-icon {
  2109. position: relative;
  2110. }
  2111. .input-with-icon .form-input {
  2112. padding-left: 44px;
  2113. }
  2114. .input-with-icon i {
  2115. position: absolute;
  2116. left: 16px;
  2117. top: 50%;
  2118. transform: translateY(-50%);
  2119. color: var(--text-muted);
  2120. font-size: 14px;
  2121. }
  2122. .settings-item {
  2123. display: flex;
  2124. align-items: center;
  2125. gap: 14px;
  2126. padding: 14px 0;
  2127. cursor: pointer;
  2128. }
  2129. .item-icon {
  2130. width: 40px;
  2131. height: 40px;
  2132. border-radius: 10px;
  2133. display: flex;
  2134. align-items: center;
  2135. justify-content: center;
  2136. font-size: 16px;
  2137. flex-shrink: 0;
  2138. }
  2139. .item-content {
  2140. flex: 1;
  2141. min-width: 0;
  2142. }
  2143. .item-title {
  2144. font-size: 14px;
  2145. font-weight: 500;
  2146. margin-bottom: 2px;
  2147. }
  2148. .item-desc {
  2149. font-size: 12px;
  2150. color: var(--text-secondary);
  2151. }
  2152. .item-action {
  2153. display: flex;
  2154. align-items: center;
  2155. gap: 8px;
  2156. flex-shrink: 0;
  2157. }
  2158. /* Responsive */
  2159. @media (max-width: 640px) {
  2160. .business-modal {
  2161. max-width: 100%;
  2162. margin: 16px;
  2163. }
  2164. .form-row {
  2165. grid-template-columns: 1fr;
  2166. gap: 16px;
  2167. }
  2168. .checkbox-group,
  2169. .radio-group {
  2170. flex-direction: column;
  2171. }
  2172. .checkbox-item,
  2173. .radio-item {
  2174. width: 100%;
  2175. }
  2176. }
  2177. </style>