index.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246
  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, watch, 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 { useThemeStore } from "@/stores/useThemeStore";
  555. import { getAccessToken } from "@/utils/auth";
  556. import { deleteUserCache } from "@hooks/useCache";
  557. import { manualLogoutKey, reloginCancelKey } from "@/config/axios/service";
  558. import banner1 from "@/assets/images/banner1.png";
  559. import banner2 from "@/assets/images/banner2.png";
  560. import banner4 from "@/assets/images/banner4.png";
  561. import oaimage from "@/assets/images/oa.png";
  562. import crmimage from "@/assets/images/crm.png";
  563. import ehrimage from "@/assets/images/ehr.png";
  564. import scmimage from "@/assets/images/scm.png";
  565. import erpimage from "@/assets/images/fm.png";
  566. import driveimage from "@/assets/images/drive.png";
  567. import pmsimage from "@/assets/images/pms.jpeg";
  568. import zhonghangimage from "@/assets/images/中航.png";
  569. import lianyouimage from "@/assets/images/lianyou.png";
  570. import qhseimage from "@/assets/images/qhse.png";
  571. import zuanjingimage from "@/assets/images/zuanjing.jpeg";
  572. import yalieimage from "@/assets/images/yalie.png";
  573. import zhuqiimage from "@/assets/images/zhuqi.png";
  574. import pmimage from "@/assets/images/pm.png";
  575. import dataimage from "@/assets/images/data2.png";
  576. import thinkimage from "@/assets/images/think.png";
  577. import aiimage from "@/assets/images/ai.png";
  578. import agentimage from "@/assets/images/icon2.png";
  579. import videoimage from "@/assets/images/video.png";
  580. import fileagent from "@/assets/images/fileagent.png";
  581. import zhiduagent from "@/assets/images/zhiduagent.png";
  582. import jishuimage2 from "@/assets/images/jishuimage.png";
  583. import zhanlueimage from "@/assets/images/zhanlue.png"; // 战略解码
  584. import safeimage from "@/assets/images/safe.png"; // 安全合规管理
  585. import zuzhiimage from "@/assets/images/zuzhi.png";
  586. import youimage from "@/assets/images/youcnag.png"; // ai智能体
  587. import hongpan from "@/assets/images/pan.png"; // ai智能体
  588. import ask from "@/assets/images/ask.png";
  589. import degitial from "@/assets/images/degitial.png";
  590. import banner2_white from "@/assets/images/banner2_white.png";
  591. import banner1_white from "@/assets/images/banner1_white.png";
  592. type PortalApp = {
  593. label: string;
  594. icon?: string;
  595. image?: string;
  596. active?: boolean;
  597. };
  598. type PortalSection = {
  599. code: string;
  600. title: string;
  601. subtitle: string;
  602. height: string;
  603. apps?: PortalApp[];
  604. };
  605. type NoticeItem = {
  606. id?: string | number;
  607. title?: string;
  608. desc?: string;
  609. docsubject?: string;
  610. };
  611. const router = useRouter();
  612. const userStore = useUserStore();
  613. const themeStore = useThemeStore();
  614. const todoPanelTitle = "待办中心";
  615. const newsPanelTitle = "新闻中心";
  616. const noticeTabs = [
  617. { key: "redHead", label: "红头文件" },
  618. { key: "notice", label: "通知公告" },
  619. ] as const;
  620. type NoticeTabKey = (typeof noticeTabs)[number]["key"];
  621. const portalSections: PortalSection[] = [
  622. {
  623. code: "数",
  624. title: "数字化运营平台",
  625. subtitle: "高效协同 · 战略洞察",
  626. height: "220px",
  627. apps: [
  628. {
  629. label: "OA办公",
  630. image: oaimage,
  631. active: true,
  632. },
  633. { label: "客户管理(CRM)", image: crmimage },
  634. { label: "人力资源(EHR)", image: ehrimage },
  635. { label: "供应商管理(SRM)", image: scmimage },
  636. { label: "经营驾驶舱(MC)", image: driveimage },
  637. { label: "项目管理(PM)", image: pmimage },
  638. { label: "开发需求管理", image: jishuimage2 },
  639. { label: "鸿盘", image: hongpan },
  640. { label: "财务管理(FM)", image: erpimage },
  641. { label: "技术研发管理(R&D)", image: jishuimage2 },
  642. { label: "战略解码与执行", image: zhanlueimage },
  643. { label: "组织资产管理", image: zuzhiimage },
  644. { label: "风控合规管理", image: safeimage },
  645. ],
  646. },
  647. {
  648. code: "智",
  649. title: "智慧指挥平台",
  650. subtitle: "高效协同 · 战略洞察",
  651. height: "210px",
  652. apps: [
  653. { label: "设备管理(PMS)", image: pmsimage, active: true },
  654. { label: "中航北斗", image: zhonghangimage },
  655. { label: "质量安全管理(QHSE)", image: qhseimage },
  656. { label: "智慧连油", image: lianyouimage },
  657. { label: "智慧注气", image: zhuqiimage },
  658. { label: "视频中心(VCS)", image: videoimage },
  659. { label: "智能钻井", image: zuanjingimage },
  660. { label: "智慧压裂", image: yalieimage },
  661. { label: "数字油藏", image: youimage },
  662. ],
  663. },
  664. {
  665. code: "AI",
  666. title: "Chat BI平台",
  667. subtitle: "数据智能 · 决策驱动",
  668. height: "160px",
  669. apps: [
  670. { label: "全局数据治理(数据中台)", image: dataimage, active: true },
  671. { label: "智能决策", image: thinkimage },
  672. { label: "行业AI大模型", image: aiimage },
  673. { label: "AI智能体(智能交互)", image: agentimage },
  674. { label: "工艺文件智能体", image: fileagent },
  675. { label: "集团制度智能体", image: zhiduagent },
  676. { label: "智能问数", image: ask },
  677. { label: "瑞小智(数字人)", image: degitial },
  678. ],
  679. },
  680. ];
  681. let boldLabes = ref([
  682. "OA办公",
  683. "客户管理(CRM)",
  684. "设备管理(PMS)",
  685. "中航北斗",
  686. "智慧连油",
  687. "质量安全管理(QHSE)",
  688. "智慧注气",
  689. "视频中心(VCS)",
  690. "开发需求管理",
  691. "经营驾驶舱(MC)",
  692. "项目管理(PM)",
  693. "鸿盘",
  694. "智能钻井",
  695. "供应商管理(SRM)",
  696. ]);
  697. const searchKeyword = ref("");
  698. // 2. 实现搜索处理函数
  699. const handleSearch = () => {
  700. if (!searchKeyword.value.trim()) return;
  701. console.log("执行搜索:", searchKeyword.value);
  702. // 如果需要跳转到独立搜索页,可以在这里添加 router.push
  703. };
  704. const handleQuickAccessCommand = (command: string) => {
  705. const routeMap: Record<string, string> = {
  706. "todo-oa": "/todo-list?type=oa",
  707. "todo-crm": "/crm-todo-list?type=crm",
  708. "done-oa": "/oa-done-list?type=oa",
  709. "done-crm": "/crm-done-list?type=crm",
  710. "todo-srm": "/srm-todo-list?type=srm",
  711. "done-srm": "/srm-done-list?type=srm",
  712. };
  713. const target = routeMap[command];
  714. if (target) {
  715. router.push(target);
  716. }
  717. };
  718. const filteredSections = computed(() => {
  719. const keyword = searchKeyword.value.trim().toLowerCase();
  720. // 如果没有关键词,返回原始数据
  721. if (!keyword) {
  722. return portalSections;
  723. }
  724. // 过滤逻辑:遍历每个板块,保留匹配的应用
  725. return portalSections
  726. .map((section) => {
  727. if (!section.apps) return { ...section, apps: [] };
  728. const matchedApps = section.apps.filter((app) =>
  729. app.label.toLowerCase().includes(keyword),
  730. );
  731. return {
  732. ...section,
  733. apps: matchedApps,
  734. };
  735. })
  736. .filter((section) => section.apps && section.apps.length > 0); // 移除没有匹配应用的空板块
  737. });
  738. watch(
  739. () => themeStore.theme,
  740. () => {
  741. if (themeStore.theme === "light") {
  742. slides.value = [
  743. {
  744. image: banner2_white,
  745. text: "数字化转型,驱动未来增长",
  746. },
  747. {
  748. image: banner1_white,
  749. text: "保持热爱,奔赴目标!",
  750. },
  751. {
  752. image: banner1_white,
  753. text: "智慧平台,赋能高效协同",
  754. },
  755. ];
  756. } else {
  757. slides.value = [
  758. {
  759. image: banner2,
  760. text: "数字化转型,驱动未来增长",
  761. },
  762. {
  763. image: banner1,
  764. text: "保持热爱,奔赴目标!",
  765. },
  766. {
  767. image: banner1,
  768. text: "智慧平台,赋能高效协同",
  769. },
  770. ];
  771. }
  772. },
  773. );
  774. // 添加轮播数据
  775. const slides = ref([
  776. {
  777. image: themeStore.theme === "light" ? banner2_white : banner2,
  778. text: "数字化转型,驱动未来增长",
  779. },
  780. {
  781. image: themeStore.theme === "light" ? banner1_white : banner1,
  782. text: "保持热爱,奔赴目标!",
  783. },
  784. {
  785. image: themeStore.theme === "light" ? banner1_white : banner1,
  786. text: "智慧平台,赋能高效协同",
  787. },
  788. ]);
  789. // 当前索引
  790. const currentIndex = ref(0);
  791. let slideTimer: ReturnType<typeof setInterval> | null = null;
  792. // 下一页
  793. const nextSlide = () => {
  794. currentIndex.value = (currentIndex.value + 1) % slides.value.length;
  795. };
  796. const activeNoticeTab = ref<NoticeTabKey>("redHead");
  797. const noticeListMap = ref<Record<NoticeTabKey, NoticeItem[]>>({
  798. notice: [],
  799. redHead: [],
  800. });
  801. const newsList = ref([]);
  802. const currentNoticeList = computed(
  803. () => noticeListMap.value[activeNoticeTab.value] ?? [],
  804. );
  805. let todo = ref(0);
  806. let done = ref(0);
  807. let oatodo = ref(0);
  808. let oadone = ref(0);
  809. let crmtodo = ref(0);
  810. let crmdone = ref(0);
  811. let srmtodo = ref(0);
  812. let srmdone = ref(0);
  813. const loadHomeData = async () => {
  814. await loadNoticeList(activeNoticeTab.value);
  815. if (!userStore.getUser.username) return;
  816. const [oaRes, crmRes, crmDoneRes, newsRes] = await Promise.all([
  817. getOATasks({
  818. id: userStore.getUser.username,
  819. pageNum: 1,
  820. pageSize: 10,
  821. }),
  822. await getCRMTasks({
  823. id: userStore.getUser.username,
  824. type: "pending",
  825. pageNum: 1,
  826. pageSize: 10,
  827. }),
  828. await getCRMTasks({
  829. id: userStore.getUser.username,
  830. type: "approved",
  831. pageNum: 1,
  832. pageSize: 10,
  833. }),
  834. // await getSRMTasks({
  835. // id: userStore.getUser.username,
  836. // pageNum: 1,
  837. // pageSize: 10,
  838. // }),
  839. getNews({
  840. pageNum: 1,
  841. pageSize: 10,
  842. }),
  843. ]);
  844. oaTasks.value = oaRes.todoList.slice(0, 3);
  845. todo.value = Number(oaRes.todoCount) + crmRes.todoCount;
  846. done.value = Number(oaRes.doneCount) + crmDoneRes.todoCount;
  847. oatodo.value = oaRes.todoCount;
  848. oadone.value = oaRes.doneCount;
  849. crmtodo.value = crmRes.todoCount;
  850. crmdone.value = crmDoneRes.todoCount;
  851. // srmtodo.value = srmRes.todoCount;
  852. // srmdone.value = srmRes.doneCount;
  853. newsList.value = newsRes.list.slice(0, 3);
  854. };
  855. const loadNoticeList = async (tabKey: NoticeTabKey) => {
  856. const requestApi = tabKey === "notice" ? getNotices : getRedHeadFiles;
  857. const res = await requestApi({
  858. pageNum: 1,
  859. pageSize: 10,
  860. });
  861. noticeListMap.value[tabKey] = (res?.list || []).slice(0, 3);
  862. };
  863. let currentTabKey = ref<NoticeTabKey>("redHead");
  864. const handleNoticeTabChange = async (tabKey: NoticeTabKey) => {
  865. activeNoticeTab.value = tabKey;
  866. currentTabKey.value = tabKey;
  867. // if (noticeListMap.value[tabKey].length) return;
  868. if (userStore.getUser.username) {
  869. await loadNoticeList(tabKey);
  870. }
  871. };
  872. const handleNoticeMoreClick = () => {
  873. router.push({
  874. path: "/notice-redhead",
  875. query: {
  876. tabKey: currentTabKey.value,
  877. },
  878. });
  879. };
  880. const protectedOpen = (url: string) => {
  881. if (userStore.getUser.username && getAccessToken()) {
  882. window.open(url, "_blank");
  883. } else {
  884. router.push({ path: "/login" });
  885. }
  886. };
  887. let dialogVisible = ref(false);
  888. const confirmSrm = async () => {
  889. dialogVisible.value = false;
  890. if (userStore.getUser.username && getAccessToken()) {
  891. const res = await srmLogin({
  892. username: userStore.getUser.username,
  893. });
  894. if (res) {
  895. window.open(
  896. `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
  897. "_blank",
  898. );
  899. }
  900. } else {
  901. router.push({ path: "/login" });
  902. }
  903. };
  904. const handlePortalAppClick = async (app: PortalApp) => {
  905. if (!app.label) return;
  906. if (app.label === "项目管理(PM)") {
  907. protectedOpen(
  908. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=yyhy`,
  909. );
  910. }
  911. if (app.label === "OA办公") {
  912. if (userStore.getUser.username && getAccessToken()) {
  913. const res = await ssoLogin({ username: userStore.getUser.username });
  914. if (res) {
  915. window.open(
  916. `https://yfoa.keruioil.com/wui/index.html?ssoToken=${res}#/main`,
  917. "_blank",
  918. );
  919. }
  920. } else {
  921. router.push({ path: "/login" });
  922. }
  923. }
  924. if (app.label === "客户管理(CRM)") {
  925. protectedOpen(
  926. `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
  927. );
  928. }
  929. if (app.label === "设备管理(PMS)") {
  930. protectedOpen(
  931. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}`,
  932. );
  933. }
  934. if (app.label === "中航北斗") {
  935. protectedOpen("https://zhbdgps.cn");
  936. }
  937. if (app.label === "智慧连油") {
  938. protectedOpen(
  939. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=zhly`,
  940. );
  941. }
  942. if (app.label === "智慧注气") {
  943. protectedOpen(
  944. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=znzq`,
  945. );
  946. }
  947. if (app.label === "视频中心(VCS)") {
  948. protectedOpen(
  949. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=spzx`,
  950. );
  951. }
  952. if (app.label === "质量安全管理(QHSE)") {
  953. protectedOpen(
  954. `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=qhse`,
  955. );
  956. }
  957. if (app.label === "经营驾驶舱(MC)") {
  958. if (userStore.getUser.username && getAccessToken()) {
  959. const res = await getMCSsoToken();
  960. if (res) {
  961. window.open(
  962. `https://report.deepoil.cc/webroot/decision/v10/entry/access/9fb42908-894a-4373-a6be-ce046a42851d?preview=true&page_number=1&ssoToken=${res}`,
  963. "_blank",
  964. );
  965. }
  966. } else {
  967. router.push({ path: "/login" });
  968. }
  969. }
  970. if (app.label === "开发需求管理") {
  971. if (userStore.getUser.username && getAccessToken()) {
  972. const res = await zentaoSsoLogin({
  973. username: userStore.getUser.username,
  974. });
  975. if (res) {
  976. window.open(
  977. `http://project.deepoil.cc/zentao/api.php?m=user&f=apilogin&account=${res.jobNumber}&code=${res.code}&time=${res.timestamp}&token=${res.token}`,
  978. "_blank",
  979. );
  980. }
  981. } else {
  982. router.push({ path: "/login" });
  983. }
  984. }
  985. if (app.label === "供应商管理(SRM)") {
  986. // ElMessageBox.confirm("即将跳转到供应商管理系统,是否继续?", "提示", {
  987. // confirmButtonText: "继续",
  988. // cancelButtonText: "取消",
  989. // }).then(async () => {});
  990. dialogVisible.value = true;
  991. // if (userStore.getUser.username && getAccessToken()) {
  992. // const res = await srmLogin({
  993. // username: userStore.getUser.username,
  994. // });
  995. // if (res) {
  996. // window.open(
  997. // `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
  998. // "_blank",
  999. // );
  1000. // }
  1001. // } else {
  1002. // router.push({ path: "/login" });
  1003. // }
  1004. }
  1005. if (app.label === "智能钻井") {
  1006. if (userStore.getUser.username && getAccessToken()) {
  1007. window.open(`http://172.21.0.224:8001/#/login`, "_blank");
  1008. } else {
  1009. router.push({ path: "/login" });
  1010. }
  1011. }
  1012. if (app.label === "鸿盘") {
  1013. if (userStore.getUser.username && getAccessToken()) {
  1014. window.open(`https://pan.keruioil.com:52180`, "_blank");
  1015. } else {
  1016. router.push({ path: "/login" });
  1017. }
  1018. }
  1019. };
  1020. async function loginWithDingTalk() {
  1021. const ddCorpId = import.meta.env.VITE_DD_CORPID;
  1022. const ddClientId = import.meta.env.VITE_DD_CLIENTID;
  1023. if (!ddCorpId || !ddClientId) return false;
  1024. return await new Promise<boolean>((resolve) => {
  1025. dd.requestAuthCode({
  1026. corpId: ddCorpId,
  1027. clientId: ddClientId,
  1028. success: async (res: any) => {
  1029. try {
  1030. const { code } = res;
  1031. const response = await axios.post(
  1032. import.meta.env.BASE_URL + "/admin-api/system/auth/h5SocialLogin",
  1033. {
  1034. code,
  1035. type: 20,
  1036. state: new Date().getTime(),
  1037. },
  1038. {
  1039. headers: {
  1040. "Content-Type": "application/json",
  1041. "tenant-id": 1,
  1042. },
  1043. },
  1044. );
  1045. deleteUserCache();
  1046. userStore.resetState();
  1047. authUtil.setToken(response.data.data);
  1048. sessionStorage.removeItem(manualLogoutKey);
  1049. sessionStorage.removeItem(reloginCancelKey);
  1050. await userStore.setUserInfoAction();
  1051. resolve(true);
  1052. } catch (error) {
  1053. console.log("dingTalk login error :>> ", error);
  1054. resolve(false);
  1055. }
  1056. },
  1057. fail: (err: any) => {
  1058. console.log("err :>> ", err);
  1059. resolve(false);
  1060. },
  1061. });
  1062. });
  1063. }
  1064. async function dingTalkAutoLogin() {
  1065. const ua = window.navigator.userAgent.toLowerCase();
  1066. if (
  1067. (ua.includes("dingtalk") || ua.includes("dingtalkwork")) &&
  1068. !userStore.getUser.username &&
  1069. !getAccessToken()
  1070. ) {
  1071. return await loginWithDingTalk();
  1072. }
  1073. return false;
  1074. }
  1075. const getTagClass = (tag: string) => {
  1076. return tag === "0"
  1077. ? "bg-[#2e1e6d] text-white/90"
  1078. : tag === "1"
  1079. ? "bg-[#2e1e6d] text-white/90"
  1080. : tag === "2"
  1081. ? "bg-[#2e1e6d] text-white/90"
  1082. : "bg-[#2e1e6d] text-white/90";
  1083. };
  1084. const getTagName = (tag: string) => {
  1085. return tag === "0"
  1086. ? "正常"
  1087. : tag === "1"
  1088. ? "重要"
  1089. : tag === "2"
  1090. ? "紧急"
  1091. : "正常";
  1092. };
  1093. let oaTasks = ref([]);
  1094. onMounted(async () => {
  1095. slideTimer = setInterval(nextSlide, 5000);
  1096. await dingTalkAutoLogin();
  1097. await loadHomeData();
  1098. });
  1099. const handleNoticeItemClick = async (notice: any) => {
  1100. const res = await ssoLogin({
  1101. username: userStore.getUser.username,
  1102. });
  1103. if (res) {
  1104. const ua = window.navigator.userAgent.toLowerCase();
  1105. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1106. dd.biz.util.openLink({
  1107. url:
  1108. "https://yfoa.keruioil.com/wui/index.html" +
  1109. "?ssoToken=" +
  1110. res +
  1111. "#/main", // 先跳你的 SSO 链接
  1112. onSuccess: () => {
  1113. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1114. setTimeout(() => {
  1115. dd.biz.util.openLink({
  1116. url: `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`,
  1117. });
  1118. }, 100);
  1119. },
  1120. });
  1121. } else {
  1122. const loading = ElLoading.service({
  1123. lock: true,
  1124. text: "正在跳转,请稍候...",
  1125. background: "rgba(0, 0, 0, 0.7)",
  1126. });
  1127. const newTab = window.open("", "_blank");
  1128. newTab.location.href =
  1129. "https://yfoa.keruioil.com/wui/index.html" +
  1130. "?ssoToken=" +
  1131. res +
  1132. "#/main";
  1133. setTimeout(function () {
  1134. newTab.location.href = `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`;
  1135. setTimeout(() => {
  1136. loading.close();
  1137. }, 500);
  1138. }, 100);
  1139. }
  1140. }
  1141. };
  1142. const handleTask = async (row: any) => {
  1143. const res = await ssoLogin({
  1144. username: userStore.getUser.username,
  1145. });
  1146. if (res) {
  1147. const ua = window.navigator.userAgent.toLowerCase();
  1148. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1149. dd.biz.util.openLink({
  1150. url:
  1151. "https://yfoa.keruioil.com/wui/index.html" +
  1152. "?ssoToken=" +
  1153. res +
  1154. "#/main", // 先跳你的 SSO 链接
  1155. onSuccess: () => {
  1156. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1157. setTimeout(() => {
  1158. dd.biz.util.openLink({
  1159. url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`,
  1160. });
  1161. }, 100);
  1162. },
  1163. });
  1164. } else {
  1165. const loading = ElLoading.service({
  1166. lock: true,
  1167. text: "正在跳转,请稍候...",
  1168. background: "rgba(0, 0, 0, 0.7)",
  1169. });
  1170. const newTab = window.open("", "_blank");
  1171. newTab.location.href =
  1172. "https://yfoa.keruioil.com/wui/index.html" +
  1173. "?ssoToken=" +
  1174. res +
  1175. "#/main";
  1176. setTimeout(function () {
  1177. newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
  1178. setTimeout(() => {
  1179. loading.close();
  1180. }, 500);
  1181. }, 100);
  1182. }
  1183. }
  1184. };
  1185. const openConsult = async () => {
  1186. const res = await ssoLogin({
  1187. username: userStore.getUser.username,
  1188. });
  1189. if (res) {
  1190. const ua = window.navigator.userAgent.toLowerCase();
  1191. if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
  1192. dd.biz.util.openLink({
  1193. url:
  1194. "https://yfoa.keruioil.com/wui/index.html" +
  1195. "?ssoToken=" +
  1196. res +
  1197. "#/main", // 先跳你的 SSO 链接
  1198. onSuccess: () => {
  1199. // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
  1200. setTimeout(() => {
  1201. dd.biz.util.openLink({
  1202. url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`,
  1203. });
  1204. }, 100);
  1205. },
  1206. });
  1207. } else {
  1208. const loading = ElLoading.service({
  1209. lock: true,
  1210. text: "正在跳转,请稍候...",
  1211. background: "rgba(0, 0, 0, 0.7)",
  1212. });
  1213. const newTab = window.open("", "_blank");
  1214. newTab.location.href =
  1215. "https://yfoa.keruioil.com/wui/index.html" +
  1216. "?ssoToken=" +
  1217. res +
  1218. "#/main";
  1219. setTimeout(function () {
  1220. newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`;
  1221. setTimeout(() => {
  1222. loading.close();
  1223. }, 500);
  1224. }, 100);
  1225. }
  1226. }
  1227. };
  1228. const goNews = () => {
  1229. router.push("/news");
  1230. };
  1231. onUnmounted(() => {
  1232. if (slideTimer) {
  1233. clearInterval(slideTimer);
  1234. slideTimer = null;
  1235. }
  1236. });
  1237. </script>
  1238. <style scoped>
  1239. .portal-home {
  1240. --portal-text: #17345f;
  1241. --portal-text-muted: #5f6f83;
  1242. --portal-text-soft: #7f8fa6;
  1243. --portal-title: #163867;
  1244. --portal-subtitle: rgba(61, 92, 135, 0.86);
  1245. --portal-line: rgba(126, 156, 201, 0.24);
  1246. --portal-card: rgba(255, 255, 255, 0.82);
  1247. --portal-card-2: rgba(248, 251, 255, 0.94);
  1248. --portal-card-3: rgba(240, 246, 255, 0.88);
  1249. --portal-card-4: rgba(231, 239, 251, 0.92);
  1250. --portal-nav-bg: rgba(255, 255, 255, 0.72);
  1251. --portal-nav-hover: rgba(219, 232, 252, 0.8);
  1252. --portal-input-bg: rgba(255, 255, 255, 0.7);
  1253. --portal-input-hover: rgba(255, 255, 255, 0.92);
  1254. --portal-shadow: 0 18px 40px rgba(23, 52, 95, 0.12);
  1255. --portal-shadow-strong: 0 24px 60px rgba(23, 52, 95, 0.16);
  1256. --portal-accent: #245edb;
  1257. --portal-accent-2: #4e8cff;
  1258. --portal-accent-soft: rgba(36, 94, 219, 0.14);
  1259. --portal-todo-bg: rgba(242, 247, 255, 0.94);
  1260. --portal-todo-hover: rgba(228, 238, 252, 0.95);
  1261. --portal-number-todo: #e15a5a;
  1262. --portal-number-done: #2da04d;
  1263. color: var(--portal-text);
  1264. background:
  1265. radial-gradient(
  1266. circle at 18% 12%,
  1267. rgba(83, 126, 255, 0.14),
  1268. transparent 22%
  1269. ),
  1270. radial-gradient(
  1271. circle at 82% 20%,
  1272. rgba(71, 148, 255, 0.14),
  1273. transparent 20%
  1274. ),
  1275. radial-gradient(
  1276. circle at 50% 100%,
  1277. rgba(97, 142, 247, 0.12),
  1278. transparent 28%
  1279. ),
  1280. linear-gradient(180deg, #eef3f9 0%, #f7faff 46%, #eef3f9 100%);
  1281. background-image:
  1282. /* linear-gradient(rgba(245, 249, 255, 0.82), rgba(237, 244, 253, 0.92)), */
  1283. linear-gradient(rgba(245, 249, 255, 0.9), rgba(218, 233, 251, 0.82)),
  1284. url("../assets//images/bg666.png");
  1285. background-position:
  1286. center center,
  1287. center bottom;
  1288. background-repeat: no-repeat, no-repeat;
  1289. background-size:
  1290. cover,
  1291. 100% auto;
  1292. background-attachment: fixed, fixed;
  1293. }
  1294. :global([data-theme="dark"] .portal-home) {
  1295. --portal-text: #eaf1ff;
  1296. --portal-text-muted: rgba(234, 241, 255, 0.95);
  1297. --portal-text-soft: #8a9ab0;
  1298. --portal-title: #f4f7ff;
  1299. --portal-subtitle: rgba(188, 205, 255, 0.82);
  1300. --portal-line: rgba(97, 129, 206, 0.28);
  1301. --portal-card: rgba(10, 19, 43, 0.8);
  1302. --portal-card-2: rgba(12, 24, 52, 0.92);
  1303. --portal-card-3: rgba(17, 25, 48, 0.8);
  1304. --portal-card-4: rgba(15, 24, 45, 0.82);
  1305. --portal-nav-bg: rgba(10, 19, 43, 0.8);
  1306. --portal-nav-hover: rgba(28, 40, 72, 0.8);
  1307. --portal-input-bg: rgba(255, 255, 255, 0.08);
  1308. --portal-input-hover: rgba(255, 255, 255, 0.12);
  1309. --portal-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  1310. --portal-shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.38);
  1311. --portal-accent: #6e7dff;
  1312. --portal-accent-2: #8d4dff;
  1313. --portal-accent-soft: rgba(110, 125, 255, 0.16);
  1314. --portal-todo-bg: #070e20;
  1315. --portal-todo-hover: rgba(28, 40, 72, 0.8);
  1316. --portal-number-todo: #f56c6c;
  1317. --portal-number-done: #ffffff;
  1318. color: var(--portal-text);
  1319. background:
  1320. radial-gradient(
  1321. circle at 18% 12%,
  1322. rgba(79, 82, 221, 0.34),
  1323. transparent 22%
  1324. ),
  1325. radial-gradient(circle at 82% 20%, rgba(28, 95, 255, 0.2), transparent 20%),
  1326. radial-gradient(
  1327. circle at 50% 100%,
  1328. rgba(103, 46, 255, 0.16),
  1329. transparent 28%
  1330. ),
  1331. linear-gradient(180deg, #040814 0%, #060d1d 46%, #040814 100%);
  1332. background-image:
  1333. linear-gradient(rgba(5, 11, 26, 0.62), rgba(5, 11, 26, 0.82)),
  1334. url("../assets//images/bg666.png");
  1335. }
  1336. .hero-banner {
  1337. position: relative;
  1338. min-height: 310px;
  1339. border: 1px solid var(--portal-line);
  1340. border-radius: 10px;
  1341. background:
  1342. linear-gradient(135deg, var(--portal-accent-soft), transparent 32%),
  1343. linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1344. box-shadow:
  1345. var(--portal-shadow-strong),
  1346. inset 0 1px 0 rgba(255, 255, 255, 0.06);
  1347. overflow: hidden;
  1348. }
  1349. .hero-banner::before {
  1350. content: "";
  1351. position: absolute;
  1352. inset: 0;
  1353. background:
  1354. linear-gradient(120deg, rgba(128, 77, 255, 0.14) 0%, transparent 26%),
  1355. radial-gradient(
  1356. circle at 20% 36%,
  1357. rgba(123, 84, 255, 0.22),
  1358. transparent 22%
  1359. ),
  1360. radial-gradient(
  1361. circle at 74% 52%,
  1362. rgba(54, 170, 255, 0.18),
  1363. transparent 24%
  1364. ),
  1365. linear-gradient(
  1366. 90deg,
  1367. rgba(255, 255, 255, 0.04),
  1368. transparent 40%,
  1369. rgba(255, 255, 255, 0.02)
  1370. );
  1371. pointer-events: none;
  1372. }
  1373. .hero-copy {
  1374. position: relative;
  1375. z-index: 2;
  1376. }
  1377. .hero-script {
  1378. display: none;
  1379. }
  1380. .hero-text {
  1381. margin-top: 0;
  1382. color: var(--portal-text);
  1383. font-size: 46px;
  1384. font-weight: 800;
  1385. line-height: 1.2;
  1386. letter-spacing: 0.02em;
  1387. text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  1388. max-width: 540px;
  1389. }
  1390. .hero-visual {
  1391. position: absolute;
  1392. inset: 0;
  1393. min-height: 310px;
  1394. }
  1395. .hero-visual::after {
  1396. content: "";
  1397. position: absolute;
  1398. inset: 0;
  1399. background:
  1400. linear-gradient(90deg, rgba(5, 11, 26, 0.18) 0%, transparent 28%),
  1401. linear-gradient(
  1402. 180deg,
  1403. transparent 0%,
  1404. rgba(5, 11, 26, 0.04) 56%,
  1405. rgba(5, 11, 26, 0.18) 100%
  1406. );
  1407. pointer-events: none;
  1408. }
  1409. .carousel-container {
  1410. position: relative;
  1411. height: 310px;
  1412. overflow: hidden;
  1413. }
  1414. .platform-block {
  1415. /* display: flex; */
  1416. overflow: hidden;
  1417. border: 1px solid var(--portal-line);
  1418. border-radius: 8px;
  1419. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1420. box-shadow:
  1421. var(--portal-shadow),
  1422. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1423. }
  1424. .platform-block__header {
  1425. display: flex;
  1426. align-items: center;
  1427. justify-content: flex-start;
  1428. flex: 0 0 190px;
  1429. width: 190px;
  1430. min-width: 190px;
  1431. min-height: 48px;
  1432. padding: 0 20px 0 0px;
  1433. box-sizing: border-box;
  1434. background: linear-gradient(90deg, var(--portal-accent-soft), transparent);
  1435. }
  1436. .platform-block__title-wrap {
  1437. display: flex;
  1438. flex-direction: column;
  1439. align-items: baseline;
  1440. gap: 18px;
  1441. min-width: 0;
  1442. flex: 1;
  1443. }
  1444. .platform-block__title {
  1445. color: var(--portal-title);
  1446. font-size: 15px;
  1447. font-weight: 800;
  1448. min-width: 0;
  1449. flex: 0 1 auto;
  1450. white-space: nowrap;
  1451. overflow: hidden;
  1452. text-overflow: ellipsis;
  1453. letter-spacing: 0.02em;
  1454. }
  1455. .platform-block__subtitle {
  1456. color: var(--portal-subtitle);
  1457. font-size: 13px;
  1458. font-weight: 500;
  1459. flex: 0 0 auto;
  1460. white-space: nowrap;
  1461. }
  1462. .platform-block__watermark {
  1463. color: rgba(119, 145, 214, 0.24);
  1464. font-size: 42px;
  1465. font-weight: 800;
  1466. line-height: 1;
  1467. letter-spacing: 0.08em;
  1468. }
  1469. .platform-app {
  1470. display: flex;
  1471. width: 100%;
  1472. min-width: 0;
  1473. min-height: 40px;
  1474. align-items: center;
  1475. justify-content: flex-start;
  1476. gap: 6px;
  1477. border: 1px solid var(--portal-line);
  1478. border-radius: 10px;
  1479. padding: 0 8px;
  1480. background: var(--portal-card-3);
  1481. font-size: 14px;
  1482. cursor: pointer;
  1483. transition:
  1484. transform 0.2s ease,
  1485. box-shadow 0.2s ease,
  1486. background 0.2s ease;
  1487. }
  1488. .platform-app:hover {
  1489. transform: translateY(-2px);
  1490. border-color: rgba(133, 163, 255, 0.45);
  1491. box-shadow: 0 10px 26px rgba(34, 54, 110, 0.18);
  1492. }
  1493. .platform-app--active {
  1494. background: linear-gradient(
  1495. 90deg,
  1496. rgba(76, 103, 224, 0.5),
  1497. var(--portal-card)
  1498. );
  1499. color: var(--portal-title);
  1500. border-color: rgba(129, 145, 255, 0.44);
  1501. box-shadow: inset 0 0 0 1px rgba(159, 173, 255, 0.08);
  1502. }
  1503. .platform-app--ghost {
  1504. background: var(--portal-card-4);
  1505. color: var(--portal-text);
  1506. }
  1507. .platform-app__icon {
  1508. display: inline-flex;
  1509. align-items: center;
  1510. justify-content: center;
  1511. flex: 0 0 28px;
  1512. color: var(--portal-accent-2);
  1513. filter: drop-shadow(0 0 8px rgba(90, 122, 255, 0.24));
  1514. }
  1515. .platform-app__label {
  1516. min-width: auto;
  1517. flex: 1;
  1518. white-space: nowrap;
  1519. overflow: visible;
  1520. text-overflow: clip;
  1521. font-size: 13px;
  1522. line-height: 1;
  1523. color: var(--portal-text);
  1524. white-space: nowrap;
  1525. overflow: hidden;
  1526. text-overflow: ellipsis;
  1527. }
  1528. .platform-block > .grid {
  1529. flex: 1;
  1530. align-content: start;
  1531. }
  1532. .portal-mobile-shortcuts {
  1533. display: grid;
  1534. grid-template-columns: repeat(3, minmax(0, 1fr));
  1535. gap: 8px;
  1536. }
  1537. .portal-mobile-shortcut {
  1538. min-width: 0;
  1539. border: 1px solid var(--portal-line);
  1540. border-radius: 12px;
  1541. padding: 10px 8px;
  1542. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1543. color: var(--portal-text);
  1544. font-size: 13px;
  1545. font-weight: 600;
  1546. box-shadow: var(--portal-shadow);
  1547. }
  1548. .side-card {
  1549. overflow: hidden;
  1550. border: 1px solid var(--portal-line);
  1551. border-radius: 14px;
  1552. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1553. box-shadow:
  1554. var(--portal-shadow),
  1555. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1556. }
  1557. .side-card--content {
  1558. padding-top: 10px;
  1559. }
  1560. .side-card__header {
  1561. display: flex;
  1562. align-items: center;
  1563. justify-content: space-between;
  1564. min-height: 20px;
  1565. padding-right: 10px;
  1566. /* border-radius: 999px; */
  1567. /* background: rgba(28, 39, 72, 0.86); */
  1568. border-bottom: 1px solid var(--portal-line);
  1569. }
  1570. .notice-badge {
  1571. position: relative;
  1572. display: inline-flex;
  1573. align-items: center;
  1574. justify-content: center;
  1575. height: 25px;
  1576. min-width: 70px;
  1577. color: var(--portal-title);
  1578. font-size: 14px;
  1579. }
  1580. .news.notice-badge {
  1581. position: relative;
  1582. display: inline-flex;
  1583. align-items: center;
  1584. justify-content: center;
  1585. height: 25px;
  1586. min-width: 70px;
  1587. color: var(--portal-title);
  1588. font-size: 14px;
  1589. border-bottom: 2px solid var(--portal-accent);
  1590. }
  1591. .notice-tabs {
  1592. display: inline-flex;
  1593. align-items: center;
  1594. gap: 8px;
  1595. }
  1596. .notice-tab {
  1597. height: 25px;
  1598. min-width: 68px;
  1599. padding: 0 14px;
  1600. border: 0;
  1601. border-radius: 999px;
  1602. background: transparent;
  1603. color: var(--portal-subtitle);
  1604. font-size: 14px;
  1605. cursor: pointer;
  1606. transition:
  1607. background 0.2s ease,
  1608. color 0.2s ease;
  1609. }
  1610. .notice-tab--active {
  1611. position: relative;
  1612. color: var(--portal-title);
  1613. }
  1614. .notice-tab--active::before {
  1615. content: "";
  1616. position: absolute;
  1617. left: 50%;
  1618. bottom: -2px;
  1619. width: 90%;
  1620. height: 2px;
  1621. transform: translateX(-50%);
  1622. border-radius: 999px;
  1623. background: linear-gradient(
  1624. to right,
  1625. #5f3abf 0%,
  1626. #7044c5 30%,
  1627. #7044c5 40%,
  1628. rgba(255, 255, 255, 0.7) 50%,
  1629. #7044c5 60%,
  1630. #7044c5 70%,
  1631. #5f3abf 100%
  1632. );
  1633. box-shadow: 0 0 12px rgba(112, 120, 255, 0.95);
  1634. }
  1635. .notice-badge::after {
  1636. content: "";
  1637. position: absolute;
  1638. top: 0;
  1639. right: -15px;
  1640. }
  1641. .side-card__more {
  1642. display: inline-flex;
  1643. align-items: center;
  1644. justify-content: center;
  1645. border: 0;
  1646. background: transparent;
  1647. color: var(--portal-subtitle);
  1648. cursor: pointer;
  1649. font-size: 12px;
  1650. }
  1651. .notice-item {
  1652. /* background: rgba(14, 22, 42, 0.88); */
  1653. padding: 8px 14px;
  1654. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1655. border-radius: 12px;
  1656. }
  1657. .notice-item:hover {
  1658. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1659. transition: all 0.2s ease;
  1660. transform: translateY(-1px);
  1661. }
  1662. .notice-item__title,
  1663. .notice-item__desc {
  1664. color: var(--portal-text);
  1665. font-size: 13px;
  1666. line-height: 1.5;
  1667. display: -webkit-box;
  1668. -webkit-box-orient: vertical;
  1669. -webkit-line-clamp: 1;
  1670. overflow: hidden;
  1671. }
  1672. .panel-title {
  1673. padding: 0 16px;
  1674. color: var(--portal-title);
  1675. font-size: 15px;
  1676. font-weight: 700;
  1677. }
  1678. .todo-item {
  1679. border: 1px solid var(--portal-line);
  1680. background: var(--portal-card-4);
  1681. padding: 8px 14px;
  1682. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1683. }
  1684. .todo-item__tag {
  1685. display: inline-flex;
  1686. align-items: center;
  1687. border-radius: 999px;
  1688. padding: 2px 8px;
  1689. font-size: 11px;
  1690. white-space: nowrap;
  1691. }
  1692. .news-mini {
  1693. display: flex;
  1694. align-items: center;
  1695. gap: 12px;
  1696. border: 1px solid var(--portal-line);
  1697. background: var(--portal-card-4);
  1698. padding: 5px 12px;
  1699. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1700. border-radius: 12px;
  1701. }
  1702. .news-mini:hover {
  1703. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1704. transition: all 0.2s ease;
  1705. transform: translateY(-1px);
  1706. }
  1707. .placeholder-panel {
  1708. display: flex;
  1709. height: 100%;
  1710. padding: 16px;
  1711. justify-content: start;
  1712. color: var(--portal-title);
  1713. font-size: 16px;
  1714. font-weight: 600;
  1715. letter-spacing: 0.08em;
  1716. }
  1717. @media (max-width: 1279px) {
  1718. .hero-text {
  1719. font-size: 34px;
  1720. max-width: 420px;
  1721. }
  1722. .hero-visual {
  1723. min-height: 260px;
  1724. }
  1725. }
  1726. @media (max-width: 767px) {
  1727. .platform-block {
  1728. display: block;
  1729. }
  1730. .platform-block__header {
  1731. width: 100%;
  1732. min-width: 0;
  1733. padding: 0 16px 0 18px;
  1734. flex: none;
  1735. justify-content: flex-start;
  1736. }
  1737. .platform-block__title-wrap {
  1738. gap: 12px;
  1739. flex-wrap: wrap;
  1740. }
  1741. .platform-block__title {
  1742. font-size: 16px;
  1743. }
  1744. .platform-block__subtitle {
  1745. font-size: 12px;
  1746. }
  1747. .platform-block__watermark {
  1748. font-size: 34px;
  1749. }
  1750. .hero-banner {
  1751. min-height: 240px;
  1752. }
  1753. .carousel-container {
  1754. height: 240px;
  1755. }
  1756. .carousel-caption {
  1757. left: 22px;
  1758. right: 22px;
  1759. top: 50%;
  1760. transform: translateY(-50%);
  1761. }
  1762. .hero-text {
  1763. font-size: 24px;
  1764. max-width: 100%;
  1765. }
  1766. }
  1767. .carousel-indicators {
  1768. display: flex;
  1769. gap: 10px;
  1770. z-index: 30;
  1771. }
  1772. .carousel-indicators span {
  1773. width: 36px;
  1774. height: 4px;
  1775. border-radius: 999px;
  1776. cursor: pointer;
  1777. transition: all 0.25s ease;
  1778. box-shadow: 0 0 16px rgba(112, 103, 255, 0.35);
  1779. }
  1780. .carousel-slide {
  1781. position: absolute;
  1782. inset: 0;
  1783. width: 100%;
  1784. height: 100%;
  1785. }
  1786. .hero-visual img {
  1787. width: 100%;
  1788. height: 100%;
  1789. object-fit: cover;
  1790. display: block;
  1791. filter: saturate(1.12) contrast(1.06);
  1792. }
  1793. .carousel-caption {
  1794. position: absolute;
  1795. left: 80px;
  1796. top: 44%;
  1797. z-index: 2;
  1798. transform: translateY(-50%);
  1799. text-align: left;
  1800. }
  1801. .carousel-container::before {
  1802. content: "";
  1803. position: absolute;
  1804. inset: auto 0 0;
  1805. height: 120px;
  1806. background: linear-gradient(180deg, transparent, rgba(5, 11, 26, 0.2));
  1807. z-index: 1;
  1808. pointer-events: none;
  1809. }
  1810. :deep(.portal-home .el-dialog) {
  1811. border-radius: 16px;
  1812. }
  1813. .top-nav-bar {
  1814. display: flex;
  1815. align-items: center;
  1816. justify-content: space-between;
  1817. padding: 5px 24px;
  1818. background: var(--portal-nav-bg);
  1819. backdrop-filter: blur(10px);
  1820. -webkit-backdrop-filter: blur(10px);
  1821. border: 1px solid var(--portal-line);
  1822. border-radius: 8px;
  1823. margin-bottom: 10px;
  1824. box-shadow: var(--portal-shadow);
  1825. }
  1826. .nav-title {
  1827. color: var(--portal-title);
  1828. font-size: 14px;
  1829. font-weight: 600;
  1830. letter-spacing: 0.08em;
  1831. }
  1832. .search-container {
  1833. display: flex;
  1834. align-items: center;
  1835. gap: 8px;
  1836. position: relative;
  1837. width: 320px;
  1838. height: 36px;
  1839. border-radius: 20px;
  1840. background: var(--portal-input-bg);
  1841. border: 1px solid var(--portal-line);
  1842. overflow: hidden;
  1843. transition: all 0.2s ease;
  1844. }
  1845. .search-container:hover {
  1846. background: var(--portal-input-hover);
  1847. border-color: rgba(109, 137, 213, 0.4);
  1848. }
  1849. .search-icon {
  1850. flex-shrink: 0;
  1851. font-size: 18px;
  1852. color: var(--portal-text-soft);
  1853. margin-left: 12px;
  1854. }
  1855. .search-input {
  1856. flex: 1;
  1857. border: none;
  1858. background: transparent;
  1859. outline: none;
  1860. font-size: 14px;
  1861. color: var(--portal-text);
  1862. padding: 0;
  1863. margin: 0;
  1864. }
  1865. .shortcut-key {
  1866. position: absolute;
  1867. right: 12px;
  1868. top: 50%;
  1869. transform: translateY(-50%);
  1870. font-size: 12px;
  1871. color: var(--portal-text-soft);
  1872. font-family: "Courier New", monospace;
  1873. }
  1874. .quick-access {
  1875. display: flex;
  1876. gap: 16px;
  1877. }
  1878. .quick-btn {
  1879. display: flex;
  1880. align-items: center;
  1881. gap: 8px;
  1882. padding: 8px 12px;
  1883. /* border: 1px solid rgba(109, 137, 213, 0.16); */
  1884. border-radius: 12px;
  1885. /* background: rgba(17, 25, 48, 0.8); */
  1886. color: var(--portal-text);
  1887. font-size: 13px;
  1888. cursor: pointer;
  1889. transition:
  1890. background 0.2s ease,
  1891. border-color 0.2s ease,
  1892. transform 0.2s ease;
  1893. }
  1894. .quick-btn--dropdown {
  1895. border: none;
  1896. background: transparent;
  1897. outline: none;
  1898. }
  1899. .quick-btn--dropdown:focus-visible {
  1900. outline: none;
  1901. }
  1902. .quick-btn:hover {
  1903. background: var(--portal-nav-hover);
  1904. border-color: rgba(109, 137, 213, 0.4);
  1905. transform: translateY(-1px);
  1906. }
  1907. .btn-icon {
  1908. font-size: 16px;
  1909. color: var(--portal-accent-2);
  1910. }
  1911. .btn-label {
  1912. white-space: nowrap;
  1913. }
  1914. .quick-btn__arrow {
  1915. font-size: 16px;
  1916. color: var(--portal-text-soft);
  1917. }
  1918. .quick-btn__meta {
  1919. color: var(--portal-text-soft);
  1920. }
  1921. .quick-btn__count {
  1922. font-weight: 700;
  1923. }
  1924. .quick-btn__count--todo {
  1925. color: var(--portal-number-todo);
  1926. }
  1927. .quick-btn__count--done {
  1928. color: var(--portal-number-done);
  1929. }
  1930. .aside-btn {
  1931. color: var(--portal-text-soft);
  1932. }
  1933. .badge {
  1934. display: inline-flex;
  1935. align-items: center;
  1936. justify-content: center;
  1937. width: 18px;
  1938. height: 18px;
  1939. border-radius: 50%;
  1940. background: #f56c6c;
  1941. color: white;
  1942. font-size: 10px;
  1943. font-weight: 600;
  1944. }
  1945. .quick-todo-bar {
  1946. display: flex;
  1947. gap: 16px;
  1948. padding: 8px 16px;
  1949. background: var(--portal-todo-bg);
  1950. backdrop-filter: blur(10px);
  1951. border: 1px solid var(--portal-line);
  1952. -webkit-backdrop-filter: blur(10px);
  1953. border-radius: 8px;
  1954. box-shadow: var(--portal-shadow);
  1955. /* margin-bottom: 16px; */
  1956. }
  1957. .quick-todo-btn {
  1958. display: flex;
  1959. flex: 1;
  1960. flex-direction: column;
  1961. align-items: flex-start;
  1962. justify-content: center;
  1963. gap: 8px;
  1964. border: none;
  1965. background: transparent;
  1966. padding: 0;
  1967. color: inherit;
  1968. cursor: pointer;
  1969. outline: none;
  1970. }
  1971. .quick-todo-btn--center {
  1972. align-items: center;
  1973. }
  1974. .quick-todo-btn:hover {
  1975. transform: translateY(-1px);
  1976. }
  1977. .todo-item {
  1978. display: flex;
  1979. align-items: center;
  1980. gap: 8px;
  1981. flex: 1;
  1982. padding: 8px 12px;
  1983. border-radius: 8px;
  1984. transition: all 0.2s ease;
  1985. cursor: pointer;
  1986. }
  1987. .todo-item:hover {
  1988. background: var(--portal-todo-hover);
  1989. transform: translateY(-1px);
  1990. border-color: rgba(109, 137, 213, 0.2);
  1991. }
  1992. .number {
  1993. font-size: 18px;
  1994. font-weight: 700;
  1995. color: var(--portal-number-todo);
  1996. min-width: 24px;
  1997. text-align: center;
  1998. }
  1999. .label {
  2000. font-size: 12px;
  2001. color: var(--portal-text);
  2002. white-space: nowrap;
  2003. }
  2004. .icon {
  2005. font-size: 14px;
  2006. color: var(--portal-accent-2);
  2007. }
  2008. /* 下拉菜单主体 */
  2009. :deep(.el-dropdown-menu) {
  2010. background-color: rgba(0, 0, 0, 0.75) !important;
  2011. border: none !important;
  2012. border-radius: 5px;
  2013. box-shadow: none !important; /* 关键:去除阴影导致的“白边”视觉效果 */
  2014. padding: 0 !important;
  2015. }
  2016. /* 菜单项 */
  2017. :deep(.el-dropdown-menu__item) {
  2018. background: #192a5b !important;
  2019. color: #fff !important; /* 确保文字颜色可见 */
  2020. padding: 0 !important;
  2021. margin: 0 !important;
  2022. border: none !important;
  2023. }
  2024. :deep(.el-dropdown-menu__item):hover {
  2025. background: #182342 !important;
  2026. color: #fff !important;
  2027. }
  2028. :deep(.el-dropdown-menu) {
  2029. border: 0px solid #00487f !important;
  2030. padding: 0px !important;
  2031. background: #182342 !important;
  2032. }
  2033. :deep(.el-scrollbar, .el-popper.el-dropdown__popper) {
  2034. background: #192a5b !important;
  2035. padding: 0 !important;
  2036. margin: 0 !important;
  2037. border: none !important;
  2038. }
  2039. </style>