index.vue 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245
  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. url("../assets//images/bg666.png");
  1284. background-position:
  1285. center center,
  1286. center bottom;
  1287. background-repeat: no-repeat, no-repeat;
  1288. background-size:
  1289. cover,
  1290. 100% auto;
  1291. background-attachment: fixed, fixed;
  1292. }
  1293. :global([data-theme="dark"] .portal-home) {
  1294. --portal-text: #eaf1ff;
  1295. --portal-text-muted: rgba(234, 241, 255, 0.95);
  1296. --portal-text-soft: #8a9ab0;
  1297. --portal-title: #f4f7ff;
  1298. --portal-subtitle: rgba(188, 205, 255, 0.82);
  1299. --portal-line: rgba(97, 129, 206, 0.28);
  1300. --portal-card: rgba(10, 19, 43, 0.8);
  1301. --portal-card-2: rgba(12, 24, 52, 0.92);
  1302. --portal-card-3: rgba(17, 25, 48, 0.8);
  1303. --portal-card-4: rgba(15, 24, 45, 0.82);
  1304. --portal-nav-bg: rgba(10, 19, 43, 0.8);
  1305. --portal-nav-hover: rgba(28, 40, 72, 0.8);
  1306. --portal-input-bg: rgba(255, 255, 255, 0.08);
  1307. --portal-input-hover: rgba(255, 255, 255, 0.12);
  1308. --portal-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  1309. --portal-shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.38);
  1310. --portal-accent: #6e7dff;
  1311. --portal-accent-2: #8d4dff;
  1312. --portal-accent-soft: rgba(110, 125, 255, 0.16);
  1313. --portal-todo-bg: #070e20;
  1314. --portal-todo-hover: rgba(28, 40, 72, 0.8);
  1315. --portal-number-todo: #f56c6c;
  1316. --portal-number-done: #ffffff;
  1317. color: var(--portal-text);
  1318. background:
  1319. radial-gradient(
  1320. circle at 18% 12%,
  1321. rgba(79, 82, 221, 0.34),
  1322. transparent 22%
  1323. ),
  1324. radial-gradient(circle at 82% 20%, rgba(28, 95, 255, 0.2), transparent 20%),
  1325. radial-gradient(
  1326. circle at 50% 100%,
  1327. rgba(103, 46, 255, 0.16),
  1328. transparent 28%
  1329. ),
  1330. linear-gradient(180deg, #040814 0%, #060d1d 46%, #040814 100%);
  1331. background-image:
  1332. linear-gradient(rgba(5, 11, 26, 0.62), rgba(5, 11, 26, 0.82)),
  1333. url("../assets//images/bg666.png");
  1334. }
  1335. .hero-banner {
  1336. position: relative;
  1337. min-height: 310px;
  1338. border: 1px solid var(--portal-line);
  1339. border-radius: 10px;
  1340. background:
  1341. linear-gradient(135deg, var(--portal-accent-soft), transparent 32%),
  1342. linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1343. box-shadow:
  1344. var(--portal-shadow-strong),
  1345. inset 0 1px 0 rgba(255, 255, 255, 0.06);
  1346. overflow: hidden;
  1347. }
  1348. .hero-banner::before {
  1349. content: "";
  1350. position: absolute;
  1351. inset: 0;
  1352. background:
  1353. linear-gradient(120deg, rgba(128, 77, 255, 0.14) 0%, transparent 26%),
  1354. radial-gradient(
  1355. circle at 20% 36%,
  1356. rgba(123, 84, 255, 0.22),
  1357. transparent 22%
  1358. ),
  1359. radial-gradient(
  1360. circle at 74% 52%,
  1361. rgba(54, 170, 255, 0.18),
  1362. transparent 24%
  1363. ),
  1364. linear-gradient(
  1365. 90deg,
  1366. rgba(255, 255, 255, 0.04),
  1367. transparent 40%,
  1368. rgba(255, 255, 255, 0.02)
  1369. );
  1370. pointer-events: none;
  1371. }
  1372. .hero-copy {
  1373. position: relative;
  1374. z-index: 2;
  1375. }
  1376. .hero-script {
  1377. display: none;
  1378. }
  1379. .hero-text {
  1380. margin-top: 0;
  1381. color: var(--portal-text);
  1382. font-size: 46px;
  1383. font-weight: 800;
  1384. line-height: 1.2;
  1385. letter-spacing: 0.02em;
  1386. text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  1387. max-width: 540px;
  1388. }
  1389. .hero-visual {
  1390. position: absolute;
  1391. inset: 0;
  1392. min-height: 310px;
  1393. }
  1394. .hero-visual::after {
  1395. content: "";
  1396. position: absolute;
  1397. inset: 0;
  1398. background:
  1399. linear-gradient(90deg, rgba(5, 11, 26, 0.18) 0%, transparent 28%),
  1400. linear-gradient(
  1401. 180deg,
  1402. transparent 0%,
  1403. rgba(5, 11, 26, 0.04) 56%,
  1404. rgba(5, 11, 26, 0.18) 100%
  1405. );
  1406. pointer-events: none;
  1407. }
  1408. .carousel-container {
  1409. position: relative;
  1410. height: 310px;
  1411. overflow: hidden;
  1412. }
  1413. .platform-block {
  1414. /* display: flex; */
  1415. overflow: hidden;
  1416. border: 1px solid var(--portal-line);
  1417. border-radius: 8px;
  1418. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1419. box-shadow:
  1420. var(--portal-shadow),
  1421. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1422. }
  1423. .platform-block__header {
  1424. display: flex;
  1425. align-items: center;
  1426. justify-content: flex-start;
  1427. flex: 0 0 190px;
  1428. width: 190px;
  1429. min-width: 190px;
  1430. min-height: 48px;
  1431. padding: 0 20px 0 0px;
  1432. box-sizing: border-box;
  1433. background: linear-gradient(90deg, var(--portal-accent-soft), transparent);
  1434. }
  1435. .platform-block__title-wrap {
  1436. display: flex;
  1437. flex-direction: column;
  1438. align-items: baseline;
  1439. gap: 18px;
  1440. min-width: 0;
  1441. flex: 1;
  1442. }
  1443. .platform-block__title {
  1444. color: var(--portal-title);
  1445. font-size: 15px;
  1446. font-weight: 800;
  1447. min-width: 0;
  1448. flex: 0 1 auto;
  1449. white-space: nowrap;
  1450. overflow: hidden;
  1451. text-overflow: ellipsis;
  1452. letter-spacing: 0.02em;
  1453. }
  1454. .platform-block__subtitle {
  1455. color: var(--portal-subtitle);
  1456. font-size: 13px;
  1457. font-weight: 500;
  1458. flex: 0 0 auto;
  1459. white-space: nowrap;
  1460. }
  1461. .platform-block__watermark {
  1462. color: rgba(119, 145, 214, 0.24);
  1463. font-size: 42px;
  1464. font-weight: 800;
  1465. line-height: 1;
  1466. letter-spacing: 0.08em;
  1467. }
  1468. .platform-app {
  1469. display: flex;
  1470. width: 100%;
  1471. min-width: 0;
  1472. min-height: 40px;
  1473. align-items: center;
  1474. justify-content: flex-start;
  1475. gap: 6px;
  1476. border: 1px solid var(--portal-line);
  1477. border-radius: 10px;
  1478. padding: 0 8px;
  1479. background: var(--portal-card-3);
  1480. font-size: 14px;
  1481. cursor: pointer;
  1482. transition:
  1483. transform 0.2s ease,
  1484. box-shadow 0.2s ease,
  1485. background 0.2s ease;
  1486. }
  1487. .platform-app:hover {
  1488. transform: translateY(-2px);
  1489. border-color: rgba(133, 163, 255, 0.45);
  1490. box-shadow: 0 10px 26px rgba(34, 54, 110, 0.18);
  1491. }
  1492. .platform-app--active {
  1493. background: linear-gradient(
  1494. 90deg,
  1495. rgba(76, 103, 224, 0.32),
  1496. var(--portal-card)
  1497. );
  1498. color: var(--portal-title);
  1499. border-color: rgba(129, 145, 255, 0.44);
  1500. box-shadow: inset 0 0 0 1px rgba(159, 173, 255, 0.08);
  1501. }
  1502. .platform-app--ghost {
  1503. background: var(--portal-card-4);
  1504. color: var(--portal-text);
  1505. }
  1506. .platform-app__icon {
  1507. display: inline-flex;
  1508. align-items: center;
  1509. justify-content: center;
  1510. flex: 0 0 28px;
  1511. color: var(--portal-accent-2);
  1512. filter: drop-shadow(0 0 8px rgba(90, 122, 255, 0.24));
  1513. }
  1514. .platform-app__label {
  1515. min-width: auto;
  1516. flex: 1;
  1517. white-space: nowrap;
  1518. overflow: visible;
  1519. text-overflow: clip;
  1520. font-size: 13px;
  1521. line-height: 1;
  1522. color: var(--portal-text);
  1523. white-space: nowrap;
  1524. overflow: hidden;
  1525. text-overflow: ellipsis;
  1526. }
  1527. .platform-block > .grid {
  1528. flex: 1;
  1529. align-content: start;
  1530. }
  1531. .portal-mobile-shortcuts {
  1532. display: grid;
  1533. grid-template-columns: repeat(3, minmax(0, 1fr));
  1534. gap: 8px;
  1535. }
  1536. .portal-mobile-shortcut {
  1537. min-width: 0;
  1538. border: 1px solid var(--portal-line);
  1539. border-radius: 12px;
  1540. padding: 10px 8px;
  1541. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1542. color: var(--portal-text);
  1543. font-size: 13px;
  1544. font-weight: 600;
  1545. box-shadow: var(--portal-shadow);
  1546. }
  1547. .side-card {
  1548. overflow: hidden;
  1549. border: 1px solid var(--portal-line);
  1550. border-radius: 14px;
  1551. background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  1552. box-shadow:
  1553. var(--portal-shadow),
  1554. inset 0 1px 0 rgba(255, 255, 255, 0.04);
  1555. }
  1556. .side-card--content {
  1557. padding-top: 10px;
  1558. }
  1559. .side-card__header {
  1560. display: flex;
  1561. align-items: center;
  1562. justify-content: space-between;
  1563. min-height: 20px;
  1564. padding-right: 10px;
  1565. /* border-radius: 999px; */
  1566. /* background: rgba(28, 39, 72, 0.86); */
  1567. border-bottom: 1px solid var(--portal-line);
  1568. }
  1569. .notice-badge {
  1570. position: relative;
  1571. display: inline-flex;
  1572. align-items: center;
  1573. justify-content: center;
  1574. height: 25px;
  1575. min-width: 70px;
  1576. color: var(--portal-title);
  1577. font-size: 14px;
  1578. }
  1579. .news.notice-badge {
  1580. position: relative;
  1581. display: inline-flex;
  1582. align-items: center;
  1583. justify-content: center;
  1584. height: 25px;
  1585. min-width: 70px;
  1586. color: var(--portal-title);
  1587. font-size: 14px;
  1588. border-bottom: 2px solid var(--portal-accent);
  1589. }
  1590. .notice-tabs {
  1591. display: inline-flex;
  1592. align-items: center;
  1593. gap: 8px;
  1594. }
  1595. .notice-tab {
  1596. height: 25px;
  1597. min-width: 68px;
  1598. padding: 0 14px;
  1599. border: 0;
  1600. border-radius: 999px;
  1601. background: transparent;
  1602. color: var(--portal-subtitle);
  1603. font-size: 14px;
  1604. cursor: pointer;
  1605. transition:
  1606. background 0.2s ease,
  1607. color 0.2s ease;
  1608. }
  1609. .notice-tab--active {
  1610. position: relative;
  1611. color: var(--portal-title);
  1612. }
  1613. .notice-tab--active::before {
  1614. content: "";
  1615. position: absolute;
  1616. left: 50%;
  1617. bottom: -2px;
  1618. width: 90%;
  1619. height: 2px;
  1620. transform: translateX(-50%);
  1621. border-radius: 999px;
  1622. background: linear-gradient(
  1623. to right,
  1624. #5f3abf 0%,
  1625. #7044c5 30%,
  1626. #7044c5 40%,
  1627. rgba(255, 255, 255, 0.7) 50%,
  1628. #7044c5 60%,
  1629. #7044c5 70%,
  1630. #5f3abf 100%
  1631. );
  1632. box-shadow: 0 0 12px rgba(112, 120, 255, 0.95);
  1633. }
  1634. .notice-badge::after {
  1635. content: "";
  1636. position: absolute;
  1637. top: 0;
  1638. right: -15px;
  1639. }
  1640. .side-card__more {
  1641. display: inline-flex;
  1642. align-items: center;
  1643. justify-content: center;
  1644. border: 0;
  1645. background: transparent;
  1646. color: var(--portal-subtitle);
  1647. cursor: pointer;
  1648. font-size: 12px;
  1649. }
  1650. .notice-item {
  1651. /* background: rgba(14, 22, 42, 0.88); */
  1652. padding: 8px 14px;
  1653. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1654. border-radius: 12px;
  1655. }
  1656. .notice-item:hover {
  1657. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1658. transition: all 0.2s ease;
  1659. transform: translateY(-1px);
  1660. }
  1661. .notice-item__title,
  1662. .notice-item__desc {
  1663. color: var(--portal-text);
  1664. font-size: 13px;
  1665. line-height: 1.5;
  1666. display: -webkit-box;
  1667. -webkit-box-orient: vertical;
  1668. -webkit-line-clamp: 1;
  1669. overflow: hidden;
  1670. }
  1671. .panel-title {
  1672. padding: 0 16px;
  1673. color: var(--portal-title);
  1674. font-size: 15px;
  1675. font-weight: 700;
  1676. }
  1677. .todo-item {
  1678. border: 1px solid var(--portal-line);
  1679. background: var(--portal-card-4);
  1680. padding: 8px 14px;
  1681. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1682. }
  1683. .todo-item__tag {
  1684. display: inline-flex;
  1685. align-items: center;
  1686. border-radius: 999px;
  1687. padding: 2px 8px;
  1688. font-size: 11px;
  1689. white-space: nowrap;
  1690. }
  1691. .news-mini {
  1692. display: flex;
  1693. align-items: center;
  1694. gap: 12px;
  1695. border: 1px solid var(--portal-line);
  1696. background: var(--portal-card-4);
  1697. padding: 5px 12px;
  1698. box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
  1699. border-radius: 12px;
  1700. }
  1701. .news-mini:hover {
  1702. box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  1703. transition: all 0.2s ease;
  1704. transform: translateY(-1px);
  1705. }
  1706. .placeholder-panel {
  1707. display: flex;
  1708. height: 100%;
  1709. padding: 16px;
  1710. justify-content: start;
  1711. color: var(--portal-title);
  1712. font-size: 16px;
  1713. font-weight: 600;
  1714. letter-spacing: 0.08em;
  1715. }
  1716. @media (max-width: 1279px) {
  1717. .hero-text {
  1718. font-size: 34px;
  1719. max-width: 420px;
  1720. }
  1721. .hero-visual {
  1722. min-height: 260px;
  1723. }
  1724. }
  1725. @media (max-width: 767px) {
  1726. .platform-block {
  1727. display: block;
  1728. }
  1729. .platform-block__header {
  1730. width: 100%;
  1731. min-width: 0;
  1732. padding: 0 16px 0 18px;
  1733. flex: none;
  1734. justify-content: flex-start;
  1735. }
  1736. .platform-block__title-wrap {
  1737. gap: 12px;
  1738. flex-wrap: wrap;
  1739. }
  1740. .platform-block__title {
  1741. font-size: 16px;
  1742. }
  1743. .platform-block__subtitle {
  1744. font-size: 12px;
  1745. }
  1746. .platform-block__watermark {
  1747. font-size: 34px;
  1748. }
  1749. .hero-banner {
  1750. min-height: 240px;
  1751. }
  1752. .carousel-container {
  1753. height: 240px;
  1754. }
  1755. .carousel-caption {
  1756. left: 22px;
  1757. right: 22px;
  1758. top: 50%;
  1759. transform: translateY(-50%);
  1760. }
  1761. .hero-text {
  1762. font-size: 24px;
  1763. max-width: 100%;
  1764. }
  1765. }
  1766. .carousel-indicators {
  1767. display: flex;
  1768. gap: 10px;
  1769. z-index: 30;
  1770. }
  1771. .carousel-indicators span {
  1772. width: 36px;
  1773. height: 4px;
  1774. border-radius: 999px;
  1775. cursor: pointer;
  1776. transition: all 0.25s ease;
  1777. box-shadow: 0 0 16px rgba(112, 103, 255, 0.35);
  1778. }
  1779. .carousel-slide {
  1780. position: absolute;
  1781. inset: 0;
  1782. width: 100%;
  1783. height: 100%;
  1784. }
  1785. .hero-visual img {
  1786. width: 100%;
  1787. height: 100%;
  1788. object-fit: cover;
  1789. display: block;
  1790. filter: saturate(1.12) contrast(1.06);
  1791. }
  1792. .carousel-caption {
  1793. position: absolute;
  1794. left: 80px;
  1795. top: 44%;
  1796. z-index: 2;
  1797. transform: translateY(-50%);
  1798. text-align: left;
  1799. }
  1800. .carousel-container::before {
  1801. content: "";
  1802. position: absolute;
  1803. inset: auto 0 0;
  1804. height: 120px;
  1805. background: linear-gradient(180deg, transparent, rgba(5, 11, 26, 0.2));
  1806. z-index: 1;
  1807. pointer-events: none;
  1808. }
  1809. :deep(.portal-home .el-dialog) {
  1810. border-radius: 16px;
  1811. }
  1812. .top-nav-bar {
  1813. display: flex;
  1814. align-items: center;
  1815. justify-content: space-between;
  1816. padding: 5px 24px;
  1817. background: var(--portal-nav-bg);
  1818. backdrop-filter: blur(10px);
  1819. -webkit-backdrop-filter: blur(10px);
  1820. border: 1px solid var(--portal-line);
  1821. border-radius: 8px;
  1822. margin-bottom: 10px;
  1823. box-shadow: var(--portal-shadow);
  1824. }
  1825. .nav-title {
  1826. color: var(--portal-title);
  1827. font-size: 14px;
  1828. font-weight: 600;
  1829. letter-spacing: 0.08em;
  1830. }
  1831. .search-container {
  1832. display: flex;
  1833. align-items: center;
  1834. gap: 8px;
  1835. position: relative;
  1836. width: 320px;
  1837. height: 36px;
  1838. border-radius: 20px;
  1839. background: var(--portal-input-bg);
  1840. border: 1px solid var(--portal-line);
  1841. overflow: hidden;
  1842. transition: all 0.2s ease;
  1843. }
  1844. .search-container:hover {
  1845. background: var(--portal-input-hover);
  1846. border-color: rgba(109, 137, 213, 0.4);
  1847. }
  1848. .search-icon {
  1849. flex-shrink: 0;
  1850. font-size: 18px;
  1851. color: var(--portal-text-soft);
  1852. margin-left: 12px;
  1853. }
  1854. .search-input {
  1855. flex: 1;
  1856. border: none;
  1857. background: transparent;
  1858. outline: none;
  1859. font-size: 14px;
  1860. color: var(--portal-text);
  1861. padding: 0;
  1862. margin: 0;
  1863. }
  1864. .shortcut-key {
  1865. position: absolute;
  1866. right: 12px;
  1867. top: 50%;
  1868. transform: translateY(-50%);
  1869. font-size: 12px;
  1870. color: var(--portal-text-soft);
  1871. font-family: "Courier New", monospace;
  1872. }
  1873. .quick-access {
  1874. display: flex;
  1875. gap: 16px;
  1876. }
  1877. .quick-btn {
  1878. display: flex;
  1879. align-items: center;
  1880. gap: 8px;
  1881. padding: 8px 12px;
  1882. /* border: 1px solid rgba(109, 137, 213, 0.16); */
  1883. border-radius: 12px;
  1884. /* background: rgba(17, 25, 48, 0.8); */
  1885. color: var(--portal-text);
  1886. font-size: 13px;
  1887. cursor: pointer;
  1888. transition:
  1889. background 0.2s ease,
  1890. border-color 0.2s ease,
  1891. transform 0.2s ease;
  1892. }
  1893. .quick-btn--dropdown {
  1894. border: none;
  1895. background: transparent;
  1896. outline: none;
  1897. }
  1898. .quick-btn--dropdown:focus-visible {
  1899. outline: none;
  1900. }
  1901. .quick-btn:hover {
  1902. background: var(--portal-nav-hover);
  1903. border-color: rgba(109, 137, 213, 0.4);
  1904. transform: translateY(-1px);
  1905. }
  1906. .btn-icon {
  1907. font-size: 16px;
  1908. color: var(--portal-accent-2);
  1909. }
  1910. .btn-label {
  1911. white-space: nowrap;
  1912. }
  1913. .quick-btn__arrow {
  1914. font-size: 16px;
  1915. color: var(--portal-text-soft);
  1916. }
  1917. .quick-btn__meta {
  1918. color: var(--portal-text-soft);
  1919. }
  1920. .quick-btn__count {
  1921. font-weight: 700;
  1922. }
  1923. .quick-btn__count--todo {
  1924. color: var(--portal-number-todo);
  1925. }
  1926. .quick-btn__count--done {
  1927. color: var(--portal-number-done);
  1928. }
  1929. .aside-btn {
  1930. color: var(--portal-text-soft);
  1931. }
  1932. .badge {
  1933. display: inline-flex;
  1934. align-items: center;
  1935. justify-content: center;
  1936. width: 18px;
  1937. height: 18px;
  1938. border-radius: 50%;
  1939. background: #f56c6c;
  1940. color: white;
  1941. font-size: 10px;
  1942. font-weight: 600;
  1943. }
  1944. .quick-todo-bar {
  1945. display: flex;
  1946. gap: 16px;
  1947. padding: 8px 16px;
  1948. background: var(--portal-todo-bg);
  1949. backdrop-filter: blur(10px);
  1950. border: 1px solid var(--portal-line);
  1951. -webkit-backdrop-filter: blur(10px);
  1952. border-radius: 8px;
  1953. box-shadow: var(--portal-shadow);
  1954. /* margin-bottom: 16px; */
  1955. }
  1956. .quick-todo-btn {
  1957. display: flex;
  1958. flex: 1;
  1959. flex-direction: column;
  1960. align-items: flex-start;
  1961. justify-content: center;
  1962. gap: 8px;
  1963. border: none;
  1964. background: transparent;
  1965. padding: 0;
  1966. color: inherit;
  1967. cursor: pointer;
  1968. outline: none;
  1969. }
  1970. .quick-todo-btn--center {
  1971. align-items: center;
  1972. }
  1973. .quick-todo-btn:hover {
  1974. transform: translateY(-1px);
  1975. }
  1976. .todo-item {
  1977. display: flex;
  1978. align-items: center;
  1979. gap: 8px;
  1980. flex: 1;
  1981. padding: 8px 12px;
  1982. border-radius: 8px;
  1983. transition: all 0.2s ease;
  1984. cursor: pointer;
  1985. }
  1986. .todo-item:hover {
  1987. background: var(--portal-todo-hover);
  1988. transform: translateY(-1px);
  1989. border-color: rgba(109, 137, 213, 0.2);
  1990. }
  1991. .number {
  1992. font-size: 18px;
  1993. font-weight: 700;
  1994. color: var(--portal-number-todo);
  1995. min-width: 24px;
  1996. text-align: center;
  1997. }
  1998. .label {
  1999. font-size: 12px;
  2000. color: var(--portal-text);
  2001. white-space: nowrap;
  2002. }
  2003. .icon {
  2004. font-size: 14px;
  2005. color: var(--portal-accent-2);
  2006. }
  2007. /* 下拉菜单主体 */
  2008. :deep(.el-dropdown-menu) {
  2009. background-color: rgba(0, 0, 0, 0.75) !important;
  2010. border: none !important;
  2011. border-radius: 5px;
  2012. box-shadow: none !important; /* 关键:去除阴影导致的“白边”视觉效果 */
  2013. padding: 0 !important;
  2014. }
  2015. /* 菜单项 */
  2016. :deep(.el-dropdown-menu__item) {
  2017. background: #192a5b !important;
  2018. color: #fff !important; /* 确保文字颜色可见 */
  2019. padding: 0 !important;
  2020. margin: 0 !important;
  2021. border: none !important;
  2022. }
  2023. :deep(.el-dropdown-menu__item):hover {
  2024. background: #182342 !important;
  2025. color: #fff !important;
  2026. }
  2027. :deep(.el-dropdown-menu) {
  2028. border: 0px solid #00487f !important;
  2029. padding: 0px !important;
  2030. background: #182342 !important;
  2031. }
  2032. :deep(.el-scrollbar, .el-popper.el-dropdown__popper) {
  2033. background: #192a5b !important;
  2034. padding: 0 !important;
  2035. margin: 0 !important;
  2036. border: none !important;
  2037. }
  2038. </style>