index.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201
  1. <template>
  2. <div class="portal-home min-h-screen">
  3. <Header />
  4. <main class="px-5 md:px-20 pb-8 pt-20">
  5. <section class="hero-banner overflow-hidden rounded-[6px] relative">
  6. <div class="">
  7. <!-- 轮播容器 -->
  8. <div class="carousel-container relative h-[50%]">
  9. <!-- 轮播项 -->
  10. <div
  11. class="carousel-slide absolute inset-0 transition-opacity duration-500 ease-in-out"
  12. v-for="(slide, index) in slides"
  13. :key="index"
  14. v-show="currentIndex === index"
  15. :class="{
  16. 'opacity-100': currentIndex === index,
  17. 'opacity-0': currentIndex !== index,
  18. 'z-10': currentIndex === index,
  19. 'z-0 pointer-events-none': currentIndex !== index,
  20. }"
  21. >
  22. <div class="hero-copy carousel-caption">
  23. <p class="hero-text mt-6 text-[30px]!">
  24. {{ slide.text }}
  25. </p>
  26. </div>
  27. <!-- 轮播背景图 -->
  28. <div class="hero-visual absolute inset-0">
  29. <img
  30. :src="slide.image"
  31. alt="Banner"
  32. class="w-full h-full object-cover"
  33. />
  34. </div>
  35. </div>
  36. <!-- 指示器 -->
  37. <div
  38. class="carousel-indicators absolute bottom-4 left-1/2 z-30 flex transform -translate-x-1/2 space-x-2"
  39. >
  40. <span
  41. v-for="(_, i) in slides"
  42. :key="i"
  43. @click="currentIndex = i"
  44. :class="{
  45. 'bg-[#0c4eb5]': currentIndex === i,
  46. 'bg-[#2f333c]/50': currentIndex !== i,
  47. }"
  48. class="w-3 h-3 rounded-full transition-colors"
  49. ></span>
  50. </div>
  51. </div>
  52. </div>
  53. </section>
  54. <section class="portal-mobile-shortcuts mt-3 md:hidden!">
  55. <button
  56. type="button"
  57. class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
  58. @click="router.push('/flow')"
  59. >
  60. <img src="../assets//images/flow.png" alt="" class="w-10 h-10" />
  61. 流程门户
  62. </button>
  63. <button
  64. v-hasPermi="['portal:dashboard:view']"
  65. type="button"
  66. class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
  67. @click="router.push('/drive')"
  68. >
  69. <img src="../assets//images/driveicon.png" alt="" class="w-10 h-10" />
  70. 驾驶舱门户
  71. </button>
  72. <button
  73. type="button"
  74. class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
  75. >
  76. <img src="../assets//images/report.png" alt="" class="w-10 h-10" />
  77. 报表门户
  78. </button>
  79. </section>
  80. <section class="mt-3 grid gap-4 xl:grid-cols-[1.74fr_0.74fr] grid-cols-1">
  81. <div class="space-y-4">
  82. <div class="top-nav-bar">
  83. <!-- 左侧标题 -->
  84. <!-- <div class="nav-title">统一入口,快速直达</div> -->
  85. <!-- 中间搜索框 -->
  86. <div class="search-container hidden! md:flex!">
  87. <Icon icon="mdi:magnify" class="search-icon" />
  88. <input
  89. v-model="searchKeyword"
  90. type="text"
  91. placeholder="搜索应用、流程、数据..."
  92. class="search-input"
  93. @keyup.enter="handleSearch"
  94. />
  95. <span class="shortcut-key">⌘K</span>
  96. </div>
  97. <!-- 右侧快捷入口 -->
  98. <div class="quick-access">
  99. <el-dropdown
  100. trigger="click"
  101. popper-class="quick-access-dropdown"
  102. @command="handleQuickAccessCommand"
  103. >
  104. <button type="button" class="quick-btn quick-btn--dropdown">
  105. <img src="../assets//images//td.png" class="w-5 h-5" alt="" />
  106. <span class="btn-label quick-btn__meta">我的待办</span>
  107. <span class="quick-btn__count quick-btn__count--todo">{{
  108. todo
  109. }}</span>
  110. <!-- <Icon icon="mdi:chevron-down" class="quick-btn__arrow" /> -->
  111. </button>
  112. <template #dropdown>
  113. <el-dropdown-menu>
  114. <el-dropdown-item command="todo-oa">
  115. <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
  116. <span>OA</span>
  117. <span>{{ oatodo }}</span>
  118. </div>
  119. </el-dropdown-item>
  120. <el-dropdown-item command="todo-crm">
  121. <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
  122. <span>CRM</span>
  123. <span>{{ crmtodo }}</span>
  124. </div>
  125. </el-dropdown-item>
  126. <el-dropdown-item command="todo-srm">
  127. <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
  128. <span>SRM</span>
  129. <span>{{ srmtodo }}</span>
  130. </div>
  131. </el-dropdown-item>
  132. </el-dropdown-menu>
  133. </template>
  134. </el-dropdown>
  135. <el-dropdown
  136. trigger="click"
  137. popper-class="quick-access-dropdown"
  138. @command="handleQuickAccessCommand"
  139. >
  140. <button type="button" class="quick-btn quick-btn--dropdown">
  141. <Icon icon="mdi:check" class="btn-icon" />
  142. <span class="btn-label quick-btn__meta">我的已办</span>
  143. <span
  144. class="p-2 inline-block quick-btn__count quick-btn__count--done"
  145. >{{ done }}</span
  146. >
  147. <!-- <Icon icon="mdi:chevron-down" class="quick-btn__arrow" /> -->
  148. </button>
  149. <template #dropdown>
  150. <el-dropdown-menu>
  151. <el-dropdown-item command="done-oa">
  152. <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
  153. <span>OA</span>
  154. <span>{{ oadone }}</span>
  155. </div>
  156. </el-dropdown-item>
  157. <el-dropdown-item command="done-crm">
  158. <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
  159. <span>CRM</span>
  160. <span>{{ crmdone }}</span>
  161. </div></el-dropdown-item
  162. >
  163. <el-dropdown-item command="done-srm">
  164. <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
  165. <span>SRM</span>
  166. <span>{{ srmdone }}</span>
  167. </div></el-dropdown-item
  168. >
  169. </el-dropdown-menu>
  170. </template>
  171. </el-dropdown>
  172. </div>
  173. </div>
  174. <article
  175. v-for="section in filteredSections"
  176. :key="section.code"
  177. class="platform-block rounded-sm md:flex"
  178. :style="{ minHeight: section.height }"
  179. >
  180. <div class="platform-block__header">
  181. <img
  182. v-if="section.title === '数字化运营平台'"
  183. src="../assets//images/icon.png"
  184. alt=""
  185. class="w-20 h-20"
  186. />
  187. <img
  188. v-if="section.title === '智慧指挥平台'"
  189. src="../assets//images/icon2.png"
  190. alt=""
  191. class="w-20 h-20"
  192. />
  193. <img
  194. v-if="section.title === 'Chat BI平台'"
  195. src="../assets//images/icon3.png"
  196. alt=""
  197. class="w-20 h-20"
  198. />
  199. <div class="platform-block__title-wrap">
  200. <p class="platform-block__title">{{ section.title }}</p>
  201. <span class="platform-block__subtitle">{{
  202. section.subtitle
  203. }}</span>
  204. </div>
  205. </div>
  206. <div
  207. v-if="section.apps?.length"
  208. class="grid grid-cols-[repeat(2,minmax(0,1fr))] gap-2 p-6 px-3 md:px-4 md:grid-cols-[repeat(3,minmax(0,1fr))] xl:grid-cols-[repeat(3,minmax(0,1fr))]"
  209. >
  210. <button
  211. v-for="(app, appIndex) in section.apps"
  212. :key="`${section.code}-${appIndex}-${app.label}`"
  213. type="button"
  214. :class="[
  215. 'platform-app',
  216. boldLabes.includes(app.label)
  217. ? 'platform-app--active'
  218. : 'platform-app--ghost',
  219. ]"
  220. @click="handlePortalAppClick(app)"
  221. >
  222. <span class="platform-app__icon">
  223. <img
  224. v-if="app.image"
  225. :src="app.image"
  226. :alt="app.label"
  227. class="h-7 w-7 object-contain rounded-md"
  228. />
  229. <Icon
  230. v-else
  231. :icon="app.icon || 'mdi:dots-grid'"
  232. class="text-[24px]"
  233. />
  234. </span>
  235. <span
  236. class="platform-app__label md:text-sm text-[12px] text-left"
  237. >{{ app.label }}</span
  238. >
  239. </button>
  240. </div>
  241. </article>
  242. </div>
  243. <aside class="space-y-4">
  244. <section class="side-card side-card--notice rounded-md p-2">
  245. <div class="side-card__header w-[95%] ml-[8px]">
  246. <div class="notice-tabs">
  247. <button
  248. v-for="tab in noticeTabs"
  249. :key="tab.key"
  250. type="button"
  251. :class="[
  252. 'notice-tab',
  253. activeNoticeTab === tab.key ? 'notice-tab--active' : '',
  254. ]"
  255. @click="handleNoticeTabChange(tab.key)"
  256. >
  257. {{ tab.label }}
  258. </button>
  259. </div>
  260. <button
  261. type="button"
  262. class="side-card__more"
  263. @click="handleNoticeMoreClick"
  264. >
  265. 更多
  266. <Icon icon="mingcute:right-line" class="text-[18px]" />
  267. </button>
  268. </div>
  269. <div class="space-y-2 p-2 pt-3">
  270. <div
  271. v-if="!userStore.getUser.username"
  272. class="flex h-full items-center justify-center"
  273. >
  274. <div class="text-[#8a9ab0] pt-5">登录后查看</div>
  275. </div>
  276. <div
  277. v-if="!currentNoticeList.length && userStore.getUser.username"
  278. class="flex h-[120px] items-center justify-center text-[#8a9ab0]"
  279. >
  280. 暂无数据
  281. </div>
  282. <article
  283. v-if="userStore.getUser.username"
  284. v-for="notice in currentNoticeList"
  285. :key="notice.id"
  286. class="notice-item cursor-pointer"
  287. @click="handleNoticeItemClick(notice)"
  288. >
  289. <div class="notice-item__desc">{{ notice.docsubject }}</div>
  290. <div class="date text-[12px] text-[#9cadc0]">
  291. {{ notice.docvaliddate }}
  292. </div>
  293. </article>
  294. </div>
  295. </section>
  296. <section
  297. class="side-card side-card--notice rounded-md p-2"
  298. :style="{ minHeight: '190px' }"
  299. >
  300. <div class="side-card__header w-[91%] ml-[15px]">
  301. <div class="notice-badge px-2 pb-2">{{ todoPanelTitle }}</div>
  302. <button
  303. type="button"
  304. class="side-card__more"
  305. @click="router.push('/todo-list')"
  306. >
  307. 全部任务
  308. <Icon icon="mingcute:right-line" class="text-[18px]" />
  309. </button>
  310. </div>
  311. <div class="space-y-2 p-4 pt-2">
  312. <div
  313. v-if="!userStore.getUser.username"
  314. class="flex h-full items-center justify-center"
  315. >
  316. <div class="text-[#8a9ab0] pt-10">登录后查看</div>
  317. </div>
  318. <div
  319. v-if="!oaTasks.length && userStore.getUser.username"
  320. class="flex h-full items-center justify-center"
  321. >
  322. <div class="text-[#8a9ab0] pt-10">暂无待办</div>
  323. </div>
  324. <article
  325. v-if="userStore.getUser.username"
  326. v-for="task in oaTasks"
  327. :key="task.requestId"
  328. @click="handleTask(task)"
  329. class="todo-item rounded-md cursor-pointer"
  330. >
  331. <div class="flex min-w-0 items-start justify-between gap-3">
  332. <div class="min-w-0">
  333. <div class="truncate text-[14px] font-semibold">
  334. {{ task.requestName }}
  335. </div>
  336. <div class="mt-1 text-[12px] text-[#8a9ab0]">
  337. 创建人:{{ task.creatorName }} · {{ task.createTime }}
  338. </div>
  339. </div>
  340. <span
  341. :class="['todo-item__tag', getTagClass(task.requesLevel)]"
  342. >{{ getTagName(task.requesLevel) }}</span
  343. >
  344. </div>
  345. </article>
  346. <div class="quick-todo-bar">
  347. <el-dropdown
  348. trigger="click"
  349. popper-class="quick-access-dropdown"
  350. @command="handleQuickAccessCommand"
  351. >
  352. <button type="button" class="quick-todo-btn">
  353. <div class="number">{{ todo }}</div>
  354. <div class="flex gap-2 items-center">
  355. <div class="!text-[10px] aside-btn">我的待办</div>
  356. <Icon
  357. icon="mdi:clipboard-text-outline"
  358. color="#7f2c33"
  359. class="icon"
  360. />
  361. </div>
  362. </button>
  363. <template #dropdown>
  364. <el-dropdown-menu>
  365. <el-dropdown-item command="todo-oa">
  366. <div
  367. class="p-2 flex items-center gap-3 text-[#f56c6c]!"
  368. >
  369. <span>OA</span>
  370. <span>{{ oatodo }}</span>
  371. </div>
  372. </el-dropdown-item>
  373. <el-dropdown-item command="todo-crm">
  374. <div
  375. class="p-2 flex items-center gap-3 text-[#f56c6c]!"
  376. >
  377. <span>CRM</span>
  378. <span>{{ crmtodo }}</span>
  379. </div>
  380. </el-dropdown-item>
  381. <el-dropdown-item command="todo-srm">
  382. <div
  383. class="p-2 flex items-center gap-3 text-[#e43c2f]!"
  384. >
  385. <span>SRM</span>
  386. <span>{{ srmtodo }}</span>
  387. </div>
  388. </el-dropdown-item>
  389. </el-dropdown-menu>
  390. </template>
  391. </el-dropdown>
  392. <el-dropdown
  393. trigger="click"
  394. popper-class="quick-access-dropdown"
  395. @command="handleQuickAccessCommand"
  396. >
  397. <button
  398. type="button"
  399. class="quick-todo-btn quick-todo-btn--center"
  400. >
  401. <div class="number text-[#2d8767]!">{{ done }}</div>
  402. <div class="flex gap-2 items-center pl-2">
  403. <div class="!text-[10px] aside-btn">已完成</div>
  404. <Icon
  405. icon="mdi:check-circle-outline"
  406. color="#2d8767"
  407. class="icon"
  408. />
  409. </div>
  410. </button>
  411. <template #dropdown>
  412. <el-dropdown-menu>
  413. <el-dropdown-item command="done-oa">
  414. <div
  415. class="p-2 flex items-center gap-3 text-[#2d8767]!"
  416. >
  417. <span>OA</span>
  418. <span>{{ oadone }}</span>
  419. </div>
  420. </el-dropdown-item>
  421. <el-dropdown-item command="done-crm">
  422. <div
  423. class="p-2 flex items-center gap-3 text-[#2d8767]!"
  424. >
  425. <span>CRM</span>
  426. <span>{{ crmdone }}</span>
  427. </div>
  428. </el-dropdown-item>
  429. <el-dropdown-item command="done-srm">
  430. <div
  431. class="p-2 flex items-center gap-3 text-[#2d8767]!"
  432. >
  433. <span>SRM</span>
  434. <span>{{ srmdone }}</span>
  435. </div>
  436. </el-dropdown-item>
  437. </el-dropdown-menu>
  438. </template>
  439. </el-dropdown>
  440. </div>
  441. </div>
  442. </section>
  443. <section
  444. class="side-card side-card--content p-2 rounded-md"
  445. :style="{ minHeight: '180px' }"
  446. >
  447. <div class="side-card__header w-[90%] ml-[15px]">
  448. <div class="news notice-badge pb-2">{{ newsPanelTitle }}</div>
  449. <button type="button" class="side-card__more" @click="goNews">
  450. 更多
  451. <Icon icon="mingcute:right-line" class="text-[18px]" />
  452. </button>
  453. </div>
  454. <div class="space-y-2 p-4 pt-2">
  455. <div
  456. v-if="!userStore.getUser.username"
  457. class="flex h-full items-center justify-center"
  458. >
  459. <div class="text-[#8a9ab0] pt-10">登录后查看</div>
  460. </div>
  461. <div
  462. v-if="!newsList.length && userStore.getUser.username"
  463. class="flex h-full items-center justify-center"
  464. >
  465. <div class="text-[#8a9ab0] pt-10">暂无新闻</div>
  466. </div>
  467. <article
  468. v-for="news in newsList"
  469. :key="news.id"
  470. class="news-mini cursor-pointer rounded-md"
  471. @click="handleNoticeItemClick(news)"
  472. >
  473. <div class="min-w-0 flex-1">
  474. <div
  475. class="line-clamp-1 text-[13px] font-semibold leading-[1.45]"
  476. >
  477. {{ news.docsubject }}
  478. </div>
  479. <div class="mt-2 text-[12px] text-[#9cadc0]">
  480. {{ news.docvaliddate }}
  481. </div>
  482. </div>
  483. </article>
  484. </div>
  485. </section>
  486. <section
  487. v-if="userStore.getUser.username"
  488. class="side-card side-card--placeholder rounded-md"
  489. :style="{ minHeight: '78px', backgroundColor: '#3575e4' }"
  490. >
  491. <div class="placeholder-panel flex flex-col text-left">
  492. <!-- <div class="text-sm">需要帮助?</div> -->
  493. <div class="text-[10px]">遇到系统操作问题,需要帮助</div>
  494. <div
  495. class="bg-[#79ebfa] text-sm text-center text-[#004098] py-1 px-2 rounded-full mt-2 w-[30%] cursor-pointer"
  496. @click="openConsult"
  497. >
  498. 立即咨询
  499. </div>
  500. </div>
  501. </section>
  502. </aside>
  503. </section>
  504. </main>
  505. <el-dialog v-model="dialogVisible" title="提示" width="500">
  506. <template #header="{ close, titleId, titleClass }">
  507. <div class="my-header">
  508. <h4 :id="titleId" class="flex gap-2 items-center">
  509. <Icon
  510. :icon="'si:warning-line'"
  511. color="#ef6c1a"
  512. size="16"
  513. class="text-[20px]"
  514. /><span class="text-black">提示</span>
  515. </h4>
  516. </div>
  517. </template>
  518. <span class="text-black">SRM系统尚未正式上线使用</span>
  519. <template #footer>
  520. <div class="dialog-footer">
  521. <el-button @click="dialogVisible = false">取消</el-button>
  522. <el-button type="primary" color="#063e8d" @click="confirmSrm">
  523. 继续访问
  524. </el-button>
  525. </div>
  526. </template>
  527. </el-dialog>
  528. <Footer />
  529. </div>
  530. </template>
  531. <script setup lang="ts">
  532. import { computed, onMounted, onUnmounted, reactive, ref } from "vue";
  533. import * as authUtil from "@/utils/auth";
  534. import * as dd from "dingtalk-jsapi";
  535. import Header from "@components/home/header.vue";
  536. import Footer from "@components/home/Footer.vue";
  537. import { useRouter } from "vue-router";
  538. import axios from "axios";
  539. import { Icon } from "@iconify/vue";
  540. import { ElLoading, ElMessageBox } from "element-plus";
  541. import {
  542. getMCSsoToken,
  543. ssoLogin,
  544. zentaoSsoLogin,
  545. getOATasks,
  546. getCRMTasks,
  547. getSRMTasks,
  548. getNotices,
  549. getRedHeadFiles,
  550. getNews,
  551. srmLogin,
  552. } from "@/api/user";
  553. import { useUserStore } from "@/stores/useUserStore";
  554. import { getAccessToken } from "@/utils/auth";
  555. import { deleteUserCache } from "@hooks/useCache";
  556. import { manualLogoutKey, reloginCancelKey } from "@/config/axios/service";
  557. import banner1 from "@/assets/images/banner1.png";
  558. import banner2 from "@/assets/images/banner2.png";
  559. import banner4 from "@/assets/images/banner4.png";
  560. import oaimage from "@/assets/images/oa.png";
  561. import crmimage from "@/assets/images/crm.png";
  562. import ehrimage from "@/assets/images/ehr.png";
  563. import scmimage from "@/assets/images/scm.png";
  564. import erpimage from "@/assets/images/fm.png";
  565. import driveimage from "@/assets/images/drive.png";
  566. import pmsimage from "@/assets/images/pms.jpeg";
  567. import zhonghangimage from "@/assets/images/中航.png";
  568. import lianyouimage from "@/assets/images/lianyou.png";
  569. import qhseimage from "@/assets/images/qhse.png";
  570. import zuanjingimage from "@/assets/images/zuanjing.jpeg";
  571. import yalieimage from "@/assets/images/yalie.png";
  572. import zhuqiimage from "@/assets/images/zhuqi.png";
  573. import pmimage from "@/assets/images/pm.png";
  574. import dataimage from "@/assets/images/data2.png";
  575. import thinkimage from "@/assets/images/think.png";
  576. import aiimage from "@/assets/images/ai.png";
  577. import agentimage from "@/assets/images/icon2.png";
  578. import videoimage from "@/assets/images/video.png";
  579. import fileagent from "@/assets/images/fileagent.png";
  580. import zhiduagent from "@/assets/images/zhiduagent.png";
  581. import jishuimage2 from "@/assets/images/jishuimage.png";
  582. import zhanlueimage from "@/assets/images/zhanlue.png"; // 战略解码
  583. import safeimage from "@/assets/images/safe.png"; // 安全合规管理
  584. import zuzhiimage from "@/assets/images/zuzhi.png";
  585. import youimage from "@/assets/images/youcnag.png"; // ai智能体
  586. import hongpan from "@/assets/images/pan.png"; // ai智能体
  587. import ask from "@/assets/images/ask.png";
  588. import degitial from "@/assets/images/degitial.png";
  589. type PortalApp = {
  590. label: string;
  591. icon?: string;
  592. image?: string;
  593. active?: boolean;
  594. };
  595. type PortalSection = {
  596. code: string;
  597. title: string;
  598. subtitle: string;
  599. height: string;
  600. apps?: PortalApp[];
  601. };
  602. type NoticeItem = {
  603. id?: string | number;
  604. title?: string;
  605. desc?: string;
  606. docsubject?: string;
  607. };
  608. const router = useRouter();
  609. const userStore = useUserStore();
  610. const todoPanelTitle = "待办中心";
  611. const newsPanelTitle = "新闻中心";
  612. const noticeTabs = [
  613. { key: "redHead", label: "红头文件" },
  614. { key: "notice", label: "通知公告" },
  615. ] as const;
  616. type NoticeTabKey = (typeof noticeTabs)[number]["key"];
  617. const portalSections: PortalSection[] = [
  618. {
  619. code: "数",
  620. title: "数字化运营平台",
  621. subtitle: "高效协同 · 战略洞察",
  622. height: "220px",
  623. apps: [
  624. {
  625. label: "OA办公",
  626. image: oaimage,
  627. active: true,
  628. },
  629. { label: "客户管理(CRM)", image: crmimage },
  630. { label: "人力资源(EHR)", image: ehrimage },
  631. { label: "供应商管理(SRM)", image: scmimage },
  632. { label: "经营驾驶舱(MC)", image: driveimage },
  633. { label: "项目管理(PM)", image: pmimage },
  634. { label: "开发需求管理", image: jishuimage2 },
  635. { label: "鸿盘", image: hongpan },
  636. { label: "财务管理(FM)", image: erpimage },
  637. { label: "技术研发管理(R&D)", image: jishuimage2 },
  638. { label: "战略解码与执行", image: zhanlueimage },
  639. { label: "组织资产管理", image: zuzhiimage },
  640. { label: "风控合规管理", image: safeimage },
  641. ],
  642. },
  643. {
  644. code: "智",
  645. title: "智慧指挥平台",
  646. subtitle: "高效协同 · 战略洞察",
  647. height: "210px",
  648. apps: [
  649. { label: "设备管理(PMS)", image: pmsimage, active: true },
  650. { label: "中航北斗", image: zhonghangimage },
  651. { label: "质量安全管理(QHSE)", image: qhseimage },
  652. { label: "智慧连油", image: lianyouimage },
  653. { label: "智慧注气", image: zhuqiimage },
  654. { label: "视频中心(VCS)", image: videoimage },
  655. { label: "智能钻井", image: zuanjingimage },
  656. { label: "智慧压裂", image: yalieimage },
  657. { label: "数字油藏", image: youimage },
  658. ],
  659. },
  660. {
  661. code: "AI",
  662. title: "Chat BI平台",
  663. subtitle: "数据智能 · 决策驱动",
  664. height: "160px",
  665. apps: [
  666. { label: "全局数据治理(数据中台)", image: dataimage, active: true },
  667. { label: "智能决策", image: thinkimage },
  668. { label: "行业AI大模型", image: aiimage },
  669. { label: "AI智能体(智能交互)", image: agentimage },
  670. { label: "工艺文件智能体", image: fileagent },
  671. { label: "集团制度智能体", image: zhiduagent },
  672. { label: "智能问数", image: ask },
  673. { label: "瑞小智(数字人)", image: degitial },
  674. ],
  675. },
  676. ];
  677. let boldLabes = ref([
  678. "OA办公",
  679. "客户管理(CRM)",
  680. "设备管理(PMS)",
  681. "中航北斗",
  682. "智慧连油",
  683. "质量安全管理(QHSE)",
  684. "智慧注气",
  685. "视频中心(VCS)",
  686. "开发需求管理",
  687. "经营驾驶舱(MC)",
  688. "项目管理(PM)",
  689. "鸿盘",
  690. "智能钻井",
  691. "供应商管理(SRM)",
  692. ]);
  693. const searchKeyword = ref("");
  694. // 2. 实现搜索处理函数
  695. const handleSearch = () => {
  696. if (!searchKeyword.value.trim()) return;
  697. console.log("执行搜索:", searchKeyword.value);
  698. // 如果需要跳转到独立搜索页,可以在这里添加 router.push
  699. };
  700. const handleQuickAccessCommand = (command: string) => {
  701. const routeMap: Record<string, string> = {
  702. "todo-oa": "/todo-list?type=oa",
  703. "todo-crm": "/crm-todo-list?type=crm",
  704. "done-oa": "/oa-done-list?type=oa",
  705. "done-crm": "/crm-done-list?type=crm",
  706. "todo-srm": "/srm-todo-list?type=srm",
  707. "done-srm": "/srm-done-list?type=srm",
  708. };
  709. const target = routeMap[command];
  710. if (target) {
  711. router.push(target);
  712. }
  713. };
  714. const filteredSections = computed(() => {
  715. const keyword = searchKeyword.value.trim().toLowerCase();
  716. // 如果没有关键词,返回原始数据
  717. if (!keyword) {
  718. return portalSections;
  719. }
  720. // 过滤逻辑:遍历每个板块,保留匹配的应用
  721. return portalSections
  722. .map((section) => {
  723. if (!section.apps) return { ...section, apps: [] };
  724. const matchedApps = section.apps.filter((app) =>
  725. app.label.toLowerCase().includes(keyword),
  726. );
  727. return {
  728. ...section,
  729. apps: matchedApps,
  730. };
  731. })
  732. .filter((section) => section.apps && section.apps.length > 0); // 移除没有匹配应用的空板块
  733. });
  734. // 添加轮播数据
  735. const slides = ref([
  736. {
  737. image: banner2,
  738. text: "数字化转型,驱动未来增长",
  739. },
  740. {
  741. image: banner1,
  742. text: "保持热爱,奔赴目标!",
  743. },
  744. {
  745. image: banner4,
  746. text: "智慧平台,赋能高效协同",
  747. },
  748. ]);
  749. // 当前索引
  750. const currentIndex = ref(0);
  751. let slideTimer: ReturnType<typeof setInterval> | null = null;
  752. // 下一页
  753. const nextSlide = () => {
  754. currentIndex.value = (currentIndex.value + 1) % slides.value.length;
  755. };
  756. const activeNoticeTab = ref<NoticeTabKey>("redHead");
  757. const noticeListMap = ref<Record<NoticeTabKey, NoticeItem[]>>({
  758. notice: [],
  759. redHead: [],
  760. });
  761. const newsList = ref([]);
  762. const currentNoticeList = computed(
  763. () => noticeListMap.value[activeNoticeTab.value] ?? [],
  764. );
  765. let todo = ref(0);
  766. let done = ref(0);
  767. let oatodo = ref(0);
  768. let oadone = ref(0);
  769. let crmtodo = ref(0);
  770. let crmdone = ref(0);
  771. let srmtodo = ref(0);
  772. let srmdone = ref(0);
  773. const loadHomeData = async () => {
  774. await loadNoticeList(activeNoticeTab.value);
  775. if (!userStore.getUser.username) return;
  776. const [oaRes, crmRes, crmDoneRes, newsRes] = await Promise.all([
  777. getOATasks({
  778. id: userStore.getUser.username,
  779. pageNum: 1,
  780. pageSize: 10,
  781. }),
  782. await getCRMTasks({
  783. id: userStore.getUser.username,
  784. type: "pending",
  785. pageNum: 1,
  786. pageSize: 10,
  787. }),
  788. await getCRMTasks({
  789. id: userStore.getUser.username,
  790. type: "approved",
  791. pageNum: 1,
  792. pageSize: 10,
  793. }),
  794. // await getSRMTasks({
  795. // id: userStore.getUser.username,
  796. // pageNum: 1,
  797. // pageSize: 10,
  798. // }),
  799. getNews({
  800. pageNum: 1,
  801. pageSize: 10,
  802. }),
  803. ]);
  804. oaTasks.value = oaRes.todoList.slice(0, 3);
  805. todo.value = Number(oaRes.todoCount) + crmRes.todoCount;
  806. done.value = Number(oaRes.doneCount) + crmDoneRes.todoCount;
  807. oatodo.value = oaRes.todoCount;
  808. oadone.value = oaRes.doneCount;
  809. crmtodo.value = crmRes.todoCount;
  810. crmdone.value = crmDoneRes.todoCount;
  811. // srmtodo.value = srmRes.todoCount;
  812. // srmdone.value = srmRes.doneCount;
  813. newsList.value = newsRes.list.slice(0, 3);
  814. };
  815. const loadNoticeList = async (tabKey: NoticeTabKey) => {
  816. const requestApi = tabKey === "notice" ? getNotices : getRedHeadFiles;
  817. const res = await requestApi({
  818. pageNum: 1,
  819. pageSize: 10,
  820. });
  821. noticeListMap.value[tabKey] = (res?.list || []).slice(0, 3);
  822. };
  823. let currentTabKey = ref<NoticeTabKey>("redHead");
  824. const handleNoticeTabChange = async (tabKey: NoticeTabKey) => {
  825. activeNoticeTab.value = tabKey;
  826. currentTabKey.value = tabKey;
  827. // if (noticeListMap.value[tabKey].length) return;
  828. if (userStore.getUser.username) {
  829. await loadNoticeList(tabKey);
  830. }
  831. };
  832. const handleNoticeMoreClick = () => {
  833. router.push({
  834. path: "/notice-redhead",
  835. query: {
  836. tabKey: currentTabKey.value,
  837. },
  838. });
  839. };
  840. const protectedOpen = (url: string) => {
  841. if (userStore.getUser.username && getAccessToken()) {
  842. window.open(url, "_blank");
  843. } else {
  844. router.push({ path: "/login" });
  845. }
  846. };
  847. let dialogVisible = ref(false);
  848. const confirmSrm = async () => {
  849. dialogVisible.value = false;
  850. if (userStore.getUser.username && getAccessToken()) {
  851. const res = await srmLogin({
  852. username: userStore.getUser.username,
  853. });
  854. if (res) {
  855. window.open(
  856. `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
  857. "_blank",
  858. );
  859. }
  860. } else {
  861. router.push({ path: "/login" });
  862. }
  863. };
  864. const handlePortalAppClick = async (app: PortalApp) => {
  865. if (!app.label) return;
  866. if (app.label === "项目管理(PM)") {
  867. protectedOpen(
  868. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=yyhy`,
  869. );
  870. }
  871. if (app.label === "OA办公") {
  872. if (userStore.getUser.username && getAccessToken()) {
  873. const res = await ssoLogin({ username: userStore.getUser.username });
  874. if (res) {
  875. window.open(
  876. `https://yfoa.keruioil.com/wui/index.html?ssoToken=${res}#/main`,
  877. "_blank",
  878. );
  879. }
  880. } else {
  881. router.push({ path: "/login" });
  882. }
  883. }
  884. if (app.label === "客户管理(CRM)") {
  885. protectedOpen(
  886. `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
  887. );
  888. }
  889. if (app.label === "设备管理(PMS)") {
  890. protectedOpen(
  891. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}`,
  892. );
  893. }
  894. if (app.label === "中航北斗") {
  895. protectedOpen("https://zhbdgps.cn");
  896. }
  897. if (app.label === "智慧连油") {
  898. protectedOpen(
  899. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=zhly`,
  900. );
  901. }
  902. if (app.label === "智慧注气") {
  903. protectedOpen(
  904. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=znzq`,
  905. );
  906. }
  907. if (app.label === "视频中心(VCS)") {
  908. protectedOpen(
  909. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=spzx`,
  910. );
  911. }
  912. if (app.label === "质量安全管理(QHSE)") {
  913. protectedOpen(
  914. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=qhse`,
  915. );
  916. }
  917. if (app.label === "经营驾驶舱(MC)") {
  918. if (userStore.getUser.username && getAccessToken()) {
  919. const res = await getMCSsoToken();
  920. if (res) {
  921. window.open(
  922. `https://report.deepoil.cc/webroot/decision/v10/entry/access/9fb42908-894a-4373-a6be-ce046a42851d?preview=true&page_number=1&ssoToken=${res}`,
  923. "_blank",
  924. );
  925. }
  926. } else {
  927. router.push({ path: "/login" });
  928. }
  929. }
  930. if (app.label === "开发需求管理") {
  931. if (userStore.getUser.username && getAccessToken()) {
  932. const res = await zentaoSsoLogin({
  933. username: userStore.getUser.username,
  934. });
  935. if (res) {
  936. window.open(
  937. `http://project.deepoil.cc/zentao/api.php?m=user&f=apilogin&account=${res.jobNumber}&code=${res.code}&time=${res.timestamp}&token=${res.token}`,
  938. "_blank",
  939. );
  940. }
  941. } else {
  942. router.push({ path: "/login" });
  943. }
  944. }
  945. if (app.label === "供应商管理(SRM)") {
  946. // ElMessageBox.confirm("即将跳转到供应商管理系统,是否继续?", "提示", {
  947. // confirmButtonText: "继续",
  948. // cancelButtonText: "取消",
  949. // }).then(async () => {});
  950. dialogVisible.value = true;
  951. // if (userStore.getUser.username && getAccessToken()) {
  952. // const res = await srmLogin({
  953. // username: userStore.getUser.username,
  954. // });
  955. // if (res) {
  956. // window.open(
  957. // `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
  958. // "_blank",
  959. // );
  960. // }
  961. // } else {
  962. // router.push({ path: "/login" });
  963. // }
  964. }
  965. if (app.label === "智能钻井") {
  966. if (userStore.getUser.username && getAccessToken()) {
  967. window.open(`http://172.21.0.224:8001/#/login`, "_blank");
  968. } else {
  969. router.push({ path: "/login" });
  970. }
  971. }
  972. if (app.label === "鸿盘") {
  973. if (userStore.getUser.username && getAccessToken()) {
  974. window.open(`https://pan.keruioil.com:52180`, "_blank");
  975. } else {
  976. router.push({ path: "/login" });
  977. }
  978. }
  979. };
  980. async function loginWithDingTalk() {
  981. const ddCorpId = import.meta.env.VITE_DD_CORPID;
  982. const ddClientId = import.meta.env.VITE_DD_CLIENTID;
  983. if (!ddCorpId || !ddClientId) return false;
  984. return await new Promise<boolean>((resolve) => {
  985. dd.requestAuthCode({
  986. corpId: ddCorpId,
  987. clientId: ddClientId,
  988. success: async (res: any) => {
  989. try {
  990. const { code } = res;
  991. const response = await axios.post(
  992. import.meta.env.BASE_URL + "/admin-api/system/auth/h5SocialLogin",
  993. {
  994. code,
  995. type: 20,
  996. state: new Date().getTime(),
  997. },
  998. {
  999. headers: {
  1000. "Content-Type": "application/json",
  1001. "tenant-id": 1,
  1002. },
  1003. },
  1004. );
  1005. deleteUserCache();
  1006. userStore.resetState();
  1007. authUtil.setToken(response.data.data);
  1008. sessionStorage.removeItem(manualLogoutKey);
  1009. sessionStorage.removeItem(reloginCancelKey);
  1010. await userStore.setUserInfoAction();
  1011. resolve(true);
  1012. } catch (error) {
  1013. console.log("dingTalk login error :>> ", error);
  1014. resolve(false);
  1015. }
  1016. },
  1017. fail: (err: any) => {
  1018. console.log("err :>> ", err);
  1019. resolve(false);
  1020. },
  1021. });
  1022. });
  1023. }
  1024. async function dingTalkAutoLogin() {
  1025. const ua = window.navigator.userAgent.toLowerCase();
  1026. if (
  1027. (ua.includes("dingtalk") || ua.includes("dingtalkwork")) &&
  1028. !userStore.getUser.username &&
  1029. !getAccessToken()
  1030. ) {
  1031. return await loginWithDingTalk();
  1032. }
  1033. return false;
  1034. }
  1035. const getTagClass = (tag: string) => {
  1036. return tag === "0"
  1037. ? "bg-[#2e1e6d] text-[#3f74ff]"
  1038. : tag === "1"
  1039. ? "bg-[#2e1e6d] text-[#ff5d66]"
  1040. : tag === "2"
  1041. ? "bg-[#2e1e6d] text-[#6f7f94]"
  1042. : "bg-[#2e1e6d] text-[#3f74ff]";
  1043. };
  1044. const getTagName = (tag: string) => {
  1045. return tag === "0"
  1046. ? "正常"
  1047. : tag === "1"
  1048. ? "重要"
  1049. : tag === "2"
  1050. ? "紧急"
  1051. : "正常";
  1052. };
  1053. let oaTasks = ref([]);
  1054. onMounted(async () => {
  1055. slideTimer = setInterval(nextSlide, 5000);
  1056. await dingTalkAutoLogin();
  1057. await loadHomeData();
  1058. });
  1059. const handleNoticeItemClick = async (notice: any) => {
  1060. const res = await ssoLogin({
  1061. username: userStore.getUser.username,
  1062. });
  1063. if (res) {
  1064. const ua = window.navigator.userAgent.toLowerCase();
  1065. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1066. dd.biz.util.openLink({
  1067. url:
  1068. "https://yfoa.keruioil.com/wui/index.html" +
  1069. "?ssoToken=" +
  1070. res +
  1071. "#/main", // 先跳你的 SSO 链接
  1072. onSuccess: () => {
  1073. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1074. setTimeout(() => {
  1075. dd.biz.util.openLink({
  1076. url: `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`,
  1077. });
  1078. }, 100);
  1079. },
  1080. });
  1081. } else {
  1082. const loading = ElLoading.service({
  1083. lock: true,
  1084. text: "正在跳转,请稍候...",
  1085. background: "rgba(0, 0, 0, 0.7)",
  1086. });
  1087. const newTab = window.open("", "_blank");
  1088. newTab.location.href =
  1089. "https://yfoa.keruioil.com/wui/index.html" +
  1090. "?ssoToken=" +
  1091. res +
  1092. "#/main";
  1093. setTimeout(function () {
  1094. newTab.location.href = `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`;
  1095. setTimeout(() => {
  1096. loading.close();
  1097. }, 500);
  1098. }, 100);
  1099. }
  1100. }
  1101. };
  1102. const handleTask = async (row: any) => {
  1103. const res = await ssoLogin({
  1104. username: userStore.getUser.username,
  1105. });
  1106. if (res) {
  1107. const ua = window.navigator.userAgent.toLowerCase();
  1108. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1109. dd.biz.util.openLink({
  1110. url:
  1111. "https://yfoa.keruioil.com/wui/index.html" +
  1112. "?ssoToken=" +
  1113. res +
  1114. "#/main", // 先跳你的 SSO 链接
  1115. onSuccess: () => {
  1116. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1117. setTimeout(() => {
  1118. dd.biz.util.openLink({
  1119. url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`,
  1120. });
  1121. }, 100);
  1122. },
  1123. });
  1124. } else {
  1125. const loading = ElLoading.service({
  1126. lock: true,
  1127. text: "正在跳转,请稍候...",
  1128. background: "rgba(0, 0, 0, 0.7)",
  1129. });
  1130. const newTab = window.open("", "_blank");
  1131. newTab.location.href =
  1132. "https://yfoa.keruioil.com/wui/index.html" +
  1133. "?ssoToken=" +
  1134. res +
  1135. "#/main";
  1136. setTimeout(function () {
  1137. newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
  1138. setTimeout(() => {
  1139. loading.close();
  1140. }, 500);
  1141. }, 100);
  1142. }
  1143. }
  1144. };
  1145. const openConsult = async () => {
  1146. const res = await ssoLogin({
  1147. username: userStore.getUser.username,
  1148. });
  1149. if (res) {
  1150. const ua = window.navigator.userAgent.toLowerCase();
  1151. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1152. dd.biz.util.openLink({
  1153. url:
  1154. "https://yfoa.keruioil.com/wui/index.html" +
  1155. "?ssoToken=" +
  1156. res +
  1157. "#/main", // 先跳你的 SSO 链接
  1158. onSuccess: () => {
  1159. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1160. setTimeout(() => {
  1161. dd.biz.util.openLink({
  1162. url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`,
  1163. });
  1164. }, 100);
  1165. },
  1166. });
  1167. } else {
  1168. const loading = ElLoading.service({
  1169. lock: true,
  1170. text: "正在跳转,请稍候...",
  1171. background: "rgba(0, 0, 0, 0.7)",
  1172. });
  1173. const newTab = window.open("", "_blank");
  1174. newTab.location.href =
  1175. "https://yfoa.keruioil.com/wui/index.html" +
  1176. "?ssoToken=" +
  1177. res +
  1178. "#/main";
  1179. setTimeout(function () {
  1180. newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`;
  1181. setTimeout(() => {
  1182. loading.close();
  1183. }, 500);
  1184. }, 100);
  1185. }
  1186. }
  1187. };
  1188. const goNews = () => {
  1189. router.push("/news");
  1190. };
  1191. onUnmounted(() => {
  1192. if (slideTimer) {
  1193. clearInterval(slideTimer);
  1194. slideTimer = null;
  1195. }
  1196. });
  1197. </script>
  1198. <style scoped>
  1199. .portal-home {
  1200. --portal-text: #17345f;
  1201. --portal-text-muted: #5f6f83;
  1202. --portal-text-soft: #7f8fa6;
  1203. --portal-title: #163867;
  1204. --portal-subtitle: rgba(61, 92, 135, 0.86);
  1205. --portal-line: rgba(126, 156, 201, 0.24);
  1206. --portal-card: rgba(255, 255, 255, 0.82);
  1207. --portal-card-2: rgba(248, 251, 255, 0.94);
  1208. --portal-card-3: rgba(240, 246, 255, 0.88);
  1209. --portal-card-4: rgba(231, 239, 251, 0.92);
  1210. --portal-nav-bg: rgba(255, 255, 255, 0.72);
  1211. --portal-nav-hover: rgba(219, 232, 252, 0.8);
  1212. --portal-input-bg: rgba(255, 255, 255, 0.7);
  1213. --portal-input-hover: rgba(255, 255, 255, 0.92);
  1214. --portal-shadow: 0 18px 40px rgba(23, 52, 95, 0.12);
  1215. --portal-shadow-strong: 0 24px 60px rgba(23, 52, 95, 0.16);
  1216. --portal-accent: #245edb;
  1217. --portal-accent-2: #4e8cff;
  1218. --portal-accent-soft: rgba(36, 94, 219, 0.14);
  1219. --portal-todo-bg: rgba(242, 247, 255, 0.94);
  1220. --portal-todo-hover: rgba(228, 238, 252, 0.95);
  1221. --portal-number-todo: #e15a5a;
  1222. --portal-number-done: #2da04d;
  1223. color: var(--portal-text);
  1224. background:
  1225. radial-gradient(
  1226. circle at 18% 12%,
  1227. rgba(83, 126, 255, 0.14),
  1228. transparent 22%
  1229. ),
  1230. radial-gradient(
  1231. circle at 82% 20%,
  1232. rgba(71, 148, 255, 0.14),
  1233. transparent 20%
  1234. ),
  1235. radial-gradient(
  1236. circle at 50% 100%,
  1237. rgba(97, 142, 247, 0.12),
  1238. transparent 28%
  1239. ),
  1240. linear-gradient(180deg, #eef3f9 0%, #f7faff 46%, #eef3f9 100%);
  1241. background-image:
  1242. linear-gradient(rgba(245, 249, 255, 0.82), rgba(237, 244, 253, 0.92)),
  1243. url("../assets//images/bg666.png");
  1244. background-position:
  1245. center center,
  1246. center bottom;
  1247. background-repeat: no-repeat, no-repeat;
  1248. background-size:
  1249. cover,
  1250. 100% auto;
  1251. background-attachment: fixed, fixed;
  1252. }
  1253. :global([data-theme="dark"] .portal-home) {
  1254. --portal-text: #eaf1ff;
  1255. --portal-text-muted: rgba(234, 241, 255, 0.95);
  1256. --portal-text-soft: #8a9ab0;
  1257. --portal-title: #f4f7ff;
  1258. --portal-subtitle: rgba(188, 205, 255, 0.82);
  1259. --portal-line: rgba(97, 129, 206, 0.28);
  1260. --portal-card: rgba(10, 19, 43, 0.8);
  1261. --portal-card-2: rgba(12, 24, 52, 0.92);
  1262. --portal-card-3: rgba(17, 25, 48, 0.8);
  1263. --portal-card-4: rgba(15, 24, 45, 0.82);
  1264. --portal-nav-bg: rgba(10, 19, 43, 0.8);
  1265. --portal-nav-hover: rgba(28, 40, 72, 0.8);
  1266. --portal-input-bg: rgba(255, 255, 255, 0.08);
  1267. --portal-input-hover: rgba(255, 255, 255, 0.12);
  1268. --portal-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  1269. --portal-shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.38);
  1270. --portal-accent: #6e7dff;
  1271. --portal-accent-2: #8d4dff;
  1272. --portal-accent-soft: rgba(110, 125, 255, 0.16);
  1273. --portal-todo-bg: #070e20;
  1274. --portal-todo-hover: rgba(28, 40, 72, 0.8);
  1275. --portal-number-todo: #f56c6c;
  1276. --portal-number-done: #ffffff;
  1277. color: var(--portal-text);
  1278. background:
  1279. radial-gradient(
  1280. circle at 18% 12%,
  1281. rgba(79, 82, 221, 0.34),
  1282. transparent 22%
  1283. ),
  1284. radial-gradient(circle at 82% 20%, rgba(28, 95, 255, 0.2), transparent 20%),
  1285. radial-gradient(
  1286. circle at 50% 100%,
  1287. rgba(103, 46, 255, 0.16),
  1288. transparent 28%
  1289. ),
  1290. linear-gradient(180deg, #040814 0%, #060d1d 46%, #040814 100%);
  1291. background-image:
  1292. linear-gradient(rgba(5, 11, 26, 0.62), rgba(5, 11, 26, 0.82)),
  1293. url("../assets//images/bg666.png");
  1294. }
  1295. .hero-banner {
  1296. position: relative;
  1297. min-height: 310px;
  1298. border: 1px solid var(--portal-line);
  1299. border-radius: 10px;
  1300. background:
  1301. linear-gradient(135deg, var(--portal-accent-soft), transparent 32%),
  1302. linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1303. box-shadow:
  1304. var(--portal-shadow-strong),
  1305. inset 0 1px 0 rgba(255, 255, 255, 0.06);
  1306. overflow: hidden;
  1307. }
  1308. .hero-banner::before {
  1309. content: "";
  1310. position: absolute;
  1311. inset: 0;
  1312. background:
  1313. linear-gradient(120deg, rgba(128, 77, 255, 0.14) 0%, transparent 26%),
  1314. radial-gradient(
  1315. circle at 20% 36%,
  1316. rgba(123, 84, 255, 0.22),
  1317. transparent 22%
  1318. ),
  1319. radial-gradient(
  1320. circle at 74% 52%,
  1321. rgba(54, 170, 255, 0.18),
  1322. transparent 24%
  1323. ),
  1324. linear-gradient(
  1325. 90deg,
  1326. rgba(255, 255, 255, 0.04),
  1327. transparent 40%,
  1328. rgba(255, 255, 255, 0.02)
  1329. );
  1330. pointer-events: none;
  1331. }
  1332. .hero-copy {
  1333. position: relative;
  1334. z-index: 2;
  1335. }
  1336. .hero-script {
  1337. display: none;
  1338. }
  1339. .hero-text {
  1340. margin-top: 0;
  1341. color: var(--portal-text-muted);
  1342. font-size: 46px;
  1343. font-weight: 800;
  1344. line-height: 1.2;
  1345. letter-spacing: 0.02em;
  1346. text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  1347. max-width: 540px;
  1348. }
  1349. .hero-visual {
  1350. position: absolute;
  1351. inset: 0;
  1352. min-height: 310px;
  1353. }
  1354. .hero-visual::after {
  1355. content: "";
  1356. position: absolute;
  1357. inset: 0;
  1358. background:
  1359. linear-gradient(90deg, rgba(5, 11, 26, 0.18) 0%, transparent 28%),
  1360. linear-gradient(
  1361. 180deg,
  1362. transparent 0%,
  1363. rgba(5, 11, 26, 0.04) 56%,
  1364. rgba(5, 11, 26, 0.18) 100%
  1365. );
  1366. pointer-events: none;
  1367. }
  1368. .carousel-container {
  1369. position: relative;
  1370. height: 310px;
  1371. overflow: hidden;
  1372. }
  1373. .platform-block {
  1374. /* display: flex; */
  1375. overflow: hidden;
  1376. border: 1px solid var(--portal-line);
  1377. border-radius: 8px;
  1378. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1379. box-shadow:
  1380. var(--portal-shadow),
  1381. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1382. }
  1383. .platform-block__header {
  1384. display: flex;
  1385. align-items: center;
  1386. justify-content: flex-start;
  1387. flex: 0 0 190px;
  1388. width: 190px;
  1389. min-width: 190px;
  1390. min-height: 48px;
  1391. padding: 0 20px 0 0px;
  1392. box-sizing: border-box;
  1393. background: linear-gradient(90deg, var(--portal-accent-soft), transparent);
  1394. }
  1395. .platform-block__title-wrap {
  1396. display: flex;
  1397. flex-direction: column;
  1398. align-items: baseline;
  1399. gap: 18px;
  1400. min-width: 0;
  1401. flex: 1;
  1402. }
  1403. .platform-block__title {
  1404. color: var(--portal-title);
  1405. font-size: 15px;
  1406. font-weight: 800;
  1407. min-width: 0;
  1408. flex: 0 1 auto;
  1409. white-space: nowrap;
  1410. overflow: hidden;
  1411. text-overflow: ellipsis;
  1412. letter-spacing: 0.02em;
  1413. }
  1414. .platform-block__subtitle {
  1415. color: var(--portal-subtitle);
  1416. font-size: 13px;
  1417. font-weight: 500;
  1418. flex: 0 0 auto;
  1419. white-space: nowrap;
  1420. }
  1421. .platform-block__watermark {
  1422. color: rgba(119, 145, 214, 0.24);
  1423. font-size: 42px;
  1424. font-weight: 800;
  1425. line-height: 1;
  1426. letter-spacing: 0.08em;
  1427. }
  1428. .platform-app {
  1429. display: flex;
  1430. width: 100%;
  1431. min-width: 0;
  1432. min-height: 40px;
  1433. align-items: center;
  1434. justify-content: flex-start;
  1435. gap: 6px;
  1436. border: 1px solid var(--portal-line);
  1437. border-radius: 10px;
  1438. padding: 0 8px;
  1439. background: var(--portal-card-3);
  1440. font-size: 14px;
  1441. cursor: pointer;
  1442. transition:
  1443. transform 0.2s ease,
  1444. box-shadow 0.2s ease,
  1445. background 0.2s ease;
  1446. }
  1447. .platform-app:hover {
  1448. transform: translateY(-2px);
  1449. border-color: rgba(133, 163, 255, 0.45);
  1450. box-shadow: 0 10px 26px rgba(34, 54, 110, 0.18);
  1451. }
  1452. .platform-app--active {
  1453. background: linear-gradient(
  1454. 90deg,
  1455. rgba(76, 103, 224, 0.32),
  1456. var(--portal-card)
  1457. );
  1458. color: var(--portal-title);
  1459. border-color: rgba(129, 145, 255, 0.44);
  1460. box-shadow: inset 0 0 0 1px rgba(159, 173, 255, 0.08);
  1461. }
  1462. .platform-app--ghost {
  1463. background: var(--portal-card-4);
  1464. color: var(--portal-text);
  1465. }
  1466. .platform-app__icon {
  1467. display: inline-flex;
  1468. align-items: center;
  1469. justify-content: center;
  1470. flex: 0 0 28px;
  1471. color: var(--portal-accent-2);
  1472. filter: drop-shadow(0 0 8px rgba(90, 122, 255, 0.24));
  1473. }
  1474. .platform-app__label {
  1475. min-width: auto;
  1476. flex: 1;
  1477. white-space: nowrap;
  1478. overflow: visible;
  1479. text-overflow: clip;
  1480. font-size: 13px;
  1481. line-height: 1;
  1482. color: var(--portal-text);
  1483. white-space: nowrap;
  1484. overflow: hidden;
  1485. text-overflow: ellipsis;
  1486. }
  1487. .platform-block > .grid {
  1488. flex: 1;
  1489. align-content: start;
  1490. }
  1491. .portal-mobile-shortcuts {
  1492. display: grid;
  1493. grid-template-columns: repeat(3, minmax(0, 1fr));
  1494. gap: 8px;
  1495. }
  1496. .portal-mobile-shortcut {
  1497. min-width: 0;
  1498. border: 1px solid var(--portal-line);
  1499. border-radius: 12px;
  1500. padding: 10px 8px;
  1501. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1502. color: var(--portal-text);
  1503. font-size: 13px;
  1504. font-weight: 600;
  1505. box-shadow: var(--portal-shadow);
  1506. }
  1507. .side-card {
  1508. overflow: hidden;
  1509. border: 1px solid var(--portal-line);
  1510. border-radius: 14px;
  1511. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1512. box-shadow:
  1513. var(--portal-shadow),
  1514. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1515. }
  1516. .side-card--content {
  1517. padding-top: 10px;
  1518. }
  1519. .side-card__header {
  1520. display: flex;
  1521. align-items: center;
  1522. justify-content: space-between;
  1523. min-height: 20px;
  1524. padding-right: 10px;
  1525. /* border-radius: 999px; */
  1526. /* background: rgba(28, 39, 72, 0.86); */
  1527. border-bottom: 1px solid var(--portal-line);
  1528. }
  1529. .notice-badge {
  1530. position: relative;
  1531. display: inline-flex;
  1532. align-items: center;
  1533. justify-content: center;
  1534. height: 25px;
  1535. min-width: 70px;
  1536. color: var(--portal-title);
  1537. font-size: 14px;
  1538. }
  1539. .news.notice-badge {
  1540. position: relative;
  1541. display: inline-flex;
  1542. align-items: center;
  1543. justify-content: center;
  1544. height: 25px;
  1545. min-width: 70px;
  1546. color: var(--portal-title);
  1547. font-size: 14px;
  1548. border-bottom: 2px solid var(--portal-accent);
  1549. }
  1550. .notice-tabs {
  1551. display: inline-flex;
  1552. align-items: center;
  1553. gap: 8px;
  1554. }
  1555. .notice-tab {
  1556. height: 25px;
  1557. min-width: 68px;
  1558. padding: 0 14px;
  1559. border: 0;
  1560. border-radius: 999px;
  1561. background: transparent;
  1562. color: var(--portal-subtitle);
  1563. font-size: 14px;
  1564. cursor: pointer;
  1565. transition:
  1566. background 0.2s ease,
  1567. color 0.2s ease;
  1568. }
  1569. .notice-tab--active {
  1570. position: relative;
  1571. color: var(--portal-title);
  1572. }
  1573. .notice-tab--active::before {
  1574. content: "";
  1575. position: absolute;
  1576. left: 50%;
  1577. bottom: -2px;
  1578. width: 90%;
  1579. height: 2px;
  1580. transform: translateX(-50%);
  1581. border-radius: 999px;
  1582. background: linear-gradient(
  1583. to right,
  1584. #5f3abf 0%,
  1585. #7044c5 30%,
  1586. #7044c5 40%,
  1587. rgba(255, 255, 255, 0.7) 50%,
  1588. #7044c5 60%,
  1589. #7044c5 70%,
  1590. #5f3abf 100%
  1591. );
  1592. box-shadow: 0 0 12px rgba(112, 120, 255, 0.95);
  1593. }
  1594. .notice-badge::after {
  1595. content: "";
  1596. position: absolute;
  1597. top: 0;
  1598. right: -15px;
  1599. }
  1600. .side-card__more {
  1601. display: inline-flex;
  1602. align-items: center;
  1603. justify-content: center;
  1604. border: 0;
  1605. background: transparent;
  1606. color: var(--portal-subtitle);
  1607. cursor: pointer;
  1608. font-size: 12px;
  1609. }
  1610. .notice-item {
  1611. /* background: rgba(14, 22, 42, 0.88); */
  1612. padding: 8px 14px;
  1613. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1614. border-radius: 12px;
  1615. }
  1616. .notice-item:hover {
  1617. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1618. transition: all 0.2s ease;
  1619. transform: translateY(-1px);
  1620. }
  1621. .notice-item__title,
  1622. .notice-item__desc {
  1623. color: var(--portal-text);
  1624. font-size: 13px;
  1625. line-height: 1.5;
  1626. display: -webkit-box;
  1627. -webkit-box-orient: vertical;
  1628. -webkit-line-clamp: 1;
  1629. overflow: hidden;
  1630. }
  1631. .panel-title {
  1632. padding: 0 16px;
  1633. color: var(--portal-title);
  1634. font-size: 15px;
  1635. font-weight: 700;
  1636. }
  1637. .todo-item {
  1638. border: 1px solid var(--portal-line);
  1639. background: var(--portal-card-4);
  1640. padding: 8px 14px;
  1641. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1642. }
  1643. .todo-item__tag {
  1644. display: inline-flex;
  1645. align-items: center;
  1646. border-radius: 999px;
  1647. padding: 2px 8px;
  1648. font-size: 11px;
  1649. white-space: nowrap;
  1650. }
  1651. .news-mini {
  1652. display: flex;
  1653. align-items: center;
  1654. gap: 12px;
  1655. border: 1px solid var(--portal-line);
  1656. background: var(--portal-card-4);
  1657. padding: 5px 12px;
  1658. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1659. border-radius: 12px;
  1660. }
  1661. .news-mini:hover {
  1662. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1663. transition: all 0.2s ease;
  1664. transform: translateY(-1px);
  1665. }
  1666. .placeholder-panel {
  1667. display: flex;
  1668. height: 100%;
  1669. padding: 16px;
  1670. justify-content: start;
  1671. color: var(--portal-title);
  1672. font-size: 16px;
  1673. font-weight: 600;
  1674. letter-spacing: 0.08em;
  1675. }
  1676. @media (max-width: 1279px) {
  1677. .hero-text {
  1678. font-size: 34px;
  1679. max-width: 420px;
  1680. }
  1681. .hero-visual {
  1682. min-height: 260px;
  1683. }
  1684. }
  1685. @media (max-width: 767px) {
  1686. .platform-block {
  1687. display: block;
  1688. }
  1689. .platform-block__header {
  1690. width: 100%;
  1691. min-width: 0;
  1692. padding: 0 16px 0 18px;
  1693. flex: none;
  1694. justify-content: flex-start;
  1695. }
  1696. .platform-block__title-wrap {
  1697. gap: 12px;
  1698. flex-wrap: wrap;
  1699. }
  1700. .platform-block__title {
  1701. font-size: 16px;
  1702. }
  1703. .platform-block__subtitle {
  1704. font-size: 12px;
  1705. }
  1706. .platform-block__watermark {
  1707. font-size: 34px;
  1708. }
  1709. .hero-banner {
  1710. min-height: 240px;
  1711. }
  1712. .carousel-container {
  1713. height: 240px;
  1714. }
  1715. .carousel-caption {
  1716. left: 22px;
  1717. right: 22px;
  1718. top: 50%;
  1719. transform: translateY(-50%);
  1720. }
  1721. .hero-text {
  1722. font-size: 24px;
  1723. max-width: 100%;
  1724. }
  1725. }
  1726. .carousel-indicators {
  1727. display: flex;
  1728. gap: 10px;
  1729. z-index: 30;
  1730. }
  1731. .carousel-indicators span {
  1732. width: 36px;
  1733. height: 4px;
  1734. border-radius: 999px;
  1735. cursor: pointer;
  1736. transition: all 0.25s ease;
  1737. box-shadow: 0 0 16px rgba(112, 103, 255, 0.35);
  1738. }
  1739. .carousel-slide {
  1740. position: absolute;
  1741. inset: 0;
  1742. width: 100%;
  1743. height: 100%;
  1744. }
  1745. .hero-visual img {
  1746. width: 100%;
  1747. height: 100%;
  1748. object-fit: cover;
  1749. display: block;
  1750. filter: saturate(1.12) contrast(1.06);
  1751. }
  1752. .carousel-caption {
  1753. position: absolute;
  1754. left: 80px;
  1755. top: 44%;
  1756. z-index: 2;
  1757. transform: translateY(-50%);
  1758. text-align: left;
  1759. }
  1760. .carousel-container::before {
  1761. content: "";
  1762. position: absolute;
  1763. inset: auto 0 0;
  1764. height: 120px;
  1765. background: linear-gradient(180deg, transparent, rgba(5, 11, 26, 0.2));
  1766. z-index: 1;
  1767. pointer-events: none;
  1768. }
  1769. :deep(.portal-home .el-dialog) {
  1770. border-radius: 16px;
  1771. }
  1772. .top-nav-bar {
  1773. display: flex;
  1774. align-items: center;
  1775. justify-content: space-between;
  1776. padding: 5px 24px;
  1777. background: var(--portal-nav-bg);
  1778. backdrop-filter: blur(10px);
  1779. -webkit-backdrop-filter: blur(10px);
  1780. border: 1px solid var(--portal-line);
  1781. border-radius: 8px;
  1782. margin-bottom: 10px;
  1783. box-shadow: var(--portal-shadow);
  1784. }
  1785. .nav-title {
  1786. color: var(--portal-title);
  1787. font-size: 14px;
  1788. font-weight: 600;
  1789. letter-spacing: 0.08em;
  1790. }
  1791. .search-container {
  1792. display: flex;
  1793. align-items: center;
  1794. gap: 8px;
  1795. position: relative;
  1796. width: 320px;
  1797. height: 36px;
  1798. border-radius: 20px;
  1799. background: var(--portal-input-bg);
  1800. border: 1px solid var(--portal-line);
  1801. overflow: hidden;
  1802. transition: all 0.2s ease;
  1803. }
  1804. .search-container:hover {
  1805. background: var(--portal-input-hover);
  1806. border-color: rgba(109, 137, 213, 0.4);
  1807. }
  1808. .search-icon {
  1809. flex-shrink: 0;
  1810. font-size: 18px;
  1811. color: var(--portal-text-soft);
  1812. margin-left: 12px;
  1813. }
  1814. .search-input {
  1815. flex: 1;
  1816. border: none;
  1817. background: transparent;
  1818. outline: none;
  1819. font-size: 14px;
  1820. color: var(--portal-text);
  1821. padding: 0;
  1822. margin: 0;
  1823. }
  1824. .shortcut-key {
  1825. position: absolute;
  1826. right: 12px;
  1827. top: 50%;
  1828. transform: translateY(-50%);
  1829. font-size: 12px;
  1830. color: var(--portal-text-soft);
  1831. font-family: "Courier New", monospace;
  1832. }
  1833. .quick-access {
  1834. display: flex;
  1835. gap: 16px;
  1836. }
  1837. .quick-btn {
  1838. display: flex;
  1839. align-items: center;
  1840. gap: 8px;
  1841. padding: 8px 12px;
  1842. /* border: 1px solid rgba(109, 137, 213, 0.16); */
  1843. border-radius: 12px;
  1844. /* background: rgba(17, 25, 48, 0.8); */
  1845. color: var(--portal-text);
  1846. font-size: 13px;
  1847. cursor: pointer;
  1848. transition:
  1849. background 0.2s ease,
  1850. border-color 0.2s ease,
  1851. transform 0.2s ease;
  1852. }
  1853. .quick-btn--dropdown {
  1854. border: none;
  1855. background: transparent;
  1856. outline: none;
  1857. }
  1858. .quick-btn--dropdown:focus-visible {
  1859. outline: none;
  1860. }
  1861. .quick-btn:hover {
  1862. background: var(--portal-nav-hover);
  1863. border-color: rgba(109, 137, 213, 0.4);
  1864. transform: translateY(-1px);
  1865. }
  1866. .btn-icon {
  1867. font-size: 16px;
  1868. color: var(--portal-accent-2);
  1869. }
  1870. .btn-label {
  1871. white-space: nowrap;
  1872. }
  1873. .quick-btn__arrow {
  1874. font-size: 16px;
  1875. color: var(--portal-text-soft);
  1876. }
  1877. .quick-btn__meta {
  1878. color: var(--portal-text-soft);
  1879. }
  1880. .quick-btn__count {
  1881. font-weight: 700;
  1882. }
  1883. .quick-btn__count--todo {
  1884. color: var(--portal-number-todo);
  1885. }
  1886. .quick-btn__count--done {
  1887. color: var(--portal-number-done);
  1888. }
  1889. .aside-btn {
  1890. color: var(--portal-text-soft);
  1891. }
  1892. .badge {
  1893. display: inline-flex;
  1894. align-items: center;
  1895. justify-content: center;
  1896. width: 18px;
  1897. height: 18px;
  1898. border-radius: 50%;
  1899. background: #f56c6c;
  1900. color: white;
  1901. font-size: 10px;
  1902. font-weight: 600;
  1903. }
  1904. .quick-todo-bar {
  1905. display: flex;
  1906. gap: 16px;
  1907. padding: 8px 16px;
  1908. background: var(--portal-todo-bg);
  1909. backdrop-filter: blur(10px);
  1910. border: 1px solid var(--portal-line);
  1911. -webkit-backdrop-filter: blur(10px);
  1912. border-radius: 8px;
  1913. box-shadow: var(--portal-shadow);
  1914. /* margin-bottom: 16px; */
  1915. }
  1916. .quick-todo-btn {
  1917. display: flex;
  1918. flex: 1;
  1919. flex-direction: column;
  1920. align-items: flex-start;
  1921. justify-content: center;
  1922. gap: 8px;
  1923. border: none;
  1924. background: transparent;
  1925. padding: 0;
  1926. color: inherit;
  1927. cursor: pointer;
  1928. outline: none;
  1929. }
  1930. .quick-todo-btn--center {
  1931. align-items: center;
  1932. }
  1933. .quick-todo-btn:hover {
  1934. transform: translateY(-1px);
  1935. }
  1936. .todo-item {
  1937. display: flex;
  1938. align-items: center;
  1939. gap: 8px;
  1940. flex: 1;
  1941. padding: 8px 12px;
  1942. border-radius: 8px;
  1943. transition: all 0.2s ease;
  1944. cursor: pointer;
  1945. }
  1946. .todo-item:hover {
  1947. background: var(--portal-todo-hover);
  1948. transform: translateY(-1px);
  1949. border-color: rgba(109, 137, 213, 0.2);
  1950. }
  1951. .number {
  1952. font-size: 18px;
  1953. font-weight: 700;
  1954. color: var(--portal-number-todo);
  1955. min-width: 24px;
  1956. text-align: center;
  1957. }
  1958. .label {
  1959. font-size: 12px;
  1960. color: var(--portal-text);
  1961. white-space: nowrap;
  1962. }
  1963. .icon {
  1964. font-size: 14px;
  1965. color: var(--portal-accent-2);
  1966. }
  1967. /* 下拉菜单主体 */
  1968. :deep(.el-dropdown-menu) {
  1969. background-color: rgba(0, 0, 0, 0.75) !important;
  1970. border: none !important;
  1971. border-radius: 5px;
  1972. box-shadow: none !important; /* 关键:去除阴影导致的“白边”视觉效果 */
  1973. padding: 0 !important;
  1974. }
  1975. /* 菜单项 */
  1976. :deep(.el-dropdown-menu__item) {
  1977. background: #192a5b !important;
  1978. color: #fff !important; /* 确保文字颜色可见 */
  1979. padding: 0 !important;
  1980. margin: 0 !important;
  1981. border: none !important;
  1982. }
  1983. :deep(.el-dropdown-menu__item):hover {
  1984. background: #182342 !important;
  1985. color: #fff !important;
  1986. }
  1987. :deep(.el-dropdown-menu) {
  1988. border: 0px solid #00487f !important;
  1989. padding: 0px !important;
  1990. background: #182342 !important;
  1991. }
  1992. :deep(.el-scrollbar, .el-popper.el-dropdown__popper) {
  1993. background: #192a5b !important;
  1994. padding: 0 !important;
  1995. margin: 0 !important;
  1996. border: none !important;
  1997. }
  1998. </style>