index.vue 64 KB

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