index.vue 66 KB

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