| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246 |
- <template>
- <div class="portal-home min-h-screen">
- <Header />
- <main class="px-5 md:px-20 pb-8 pt-20">
- <section class="hero-banner overflow-hidden rounded-[6px] relative">
- <div class="">
- <!-- 轮播容器 -->
- <div class="carousel-container relative h-[50%]">
- <!-- 轮播项 -->
- <div
- class="carousel-slide absolute inset-0 transition-opacity duration-500 ease-in-out"
- v-for="(slide, index) in slides"
- :key="index"
- v-show="currentIndex === index"
- :class="{
- 'opacity-100': currentIndex === index,
- 'opacity-0': currentIndex !== index,
- 'z-10': currentIndex === index,
- 'z-0 pointer-events-none': currentIndex !== index,
- }"
- >
- <div class="hero-copy carousel-caption">
- <p class="hero-text mt-6 text-[30px]!">
- {{ slide.text }}
- </p>
- </div>
- <!-- 轮播背景图 -->
- <div class="hero-visual absolute inset-0">
- <img
- :src="slide.image"
- alt="Banner"
- class="w-full h-full object-cover"
- />
- </div>
- </div>
- <!-- 指示器 -->
- <div
- class="carousel-indicators absolute bottom-4 left-1/2 z-30 flex transform -translate-x-1/2 space-x-2"
- >
- <span
- v-for="(_, i) in slides"
- :key="i"
- @click="currentIndex = i"
- :class="{
- 'bg-[#0c4eb5]': currentIndex === i,
- 'bg-[#2f333c]/50': currentIndex !== i,
- }"
- class="w-3 h-3 rounded-full transition-colors"
- ></span>
- </div>
- </div>
- </div>
- </section>
- <section class="portal-mobile-shortcuts mt-3 md:hidden!">
- <button
- type="button"
- class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
- @click="router.push('/flow')"
- >
- <img src="../assets//images/flow.png" alt="" class="w-10 h-10" />
- 流程门户
- </button>
- <button
- v-hasPermi="['portal:dashboard:view']"
- type="button"
- class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
- @click="router.push('/drive')"
- >
- <img src="../assets//images/driveicon.png" alt="" class="w-10 h-10" />
- 驾驶舱门户
- </button>
- <button
- type="button"
- class="portal-mobile-shortcut flex flex-col items-center justify-center cursor-pointer"
- >
- <img src="../assets//images/report.png" alt="" class="w-10 h-10" />
- 报表门户
- </button>
- </section>
- <section class="mt-3 grid gap-4 xl:grid-cols-[1.74fr_0.74fr] grid-cols-1">
- <div class="space-y-4">
- <div class="top-nav-bar">
- <!-- 左侧标题 -->
- <!-- <div class="nav-title">统一入口,快速直达</div> -->
- <!-- 中间搜索框 -->
- <div class="search-container hidden! md:flex!">
- <Icon icon="mdi:magnify" class="search-icon" />
- <input
- v-model="searchKeyword"
- type="text"
- placeholder="搜索应用、流程、数据..."
- class="search-input"
- @keyup.enter="handleSearch"
- />
- <span class="shortcut-key">⌘K</span>
- </div>
- <!-- 右侧快捷入口 -->
- <div class="quick-access">
- <el-dropdown
- trigger="click"
- popper-class="quick-access-dropdown"
- @command="handleQuickAccessCommand"
- >
- <button type="button" class="quick-btn quick-btn--dropdown">
- <img src="../assets//images//td.png" class="w-5 h-5" alt="" />
- <span class="btn-label quick-btn__meta">我的待办</span>
- <span class="quick-btn__count quick-btn__count--todo">{{
- todo
- }}</span>
- <!-- <Icon icon="mdi:chevron-down" class="quick-btn__arrow" /> -->
- </button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item command="todo-oa">
- <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
- <span>OA</span>
- <span>{{ oatodo }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="todo-crm">
- <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
- <span>CRM</span>
- <span>{{ crmtodo }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="todo-srm">
- <div class="p-2 flex items-center gap-3 text-[#e43c2f]!">
- <span>SRM</span>
- <span>{{ srmtodo }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-dropdown
- trigger="click"
- popper-class="quick-access-dropdown"
- @command="handleQuickAccessCommand"
- >
- <button type="button" class="quick-btn quick-btn--dropdown">
- <Icon icon="mdi:check" class="btn-icon" />
- <span class="btn-label quick-btn__meta">我的已办</span>
- <span
- class="p-2 inline-block quick-btn__count quick-btn__count--done"
- >{{ done }}</span
- >
- <!-- <Icon icon="mdi:chevron-down" class="quick-btn__arrow" /> -->
- </button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item command="done-oa">
- <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
- <span>OA</span>
- <span>{{ oadone }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="done-crm">
- <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
- <span>CRM</span>
- <span>{{ crmdone }}</span>
- </div></el-dropdown-item
- >
- <el-dropdown-item command="done-srm">
- <div class="p-2 flex items-center gap-3 text-[#2da04d]!">
- <span>SRM</span>
- <span>{{ srmdone }}</span>
- </div></el-dropdown-item
- >
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- </div>
- <article
- v-for="section in filteredSections"
- :key="section.code"
- class="platform-block rounded-sm md:flex"
- :style="{ minHeight: section.height }"
- >
- <div class="platform-block__header">
- <img
- v-if="section.title === '数字化运营平台'"
- src="../assets//images/icon.png"
- alt=""
- class="w-20 h-20"
- />
- <img
- v-if="section.title === '智慧指挥平台'"
- src="../assets//images/icon2.png"
- alt=""
- class="w-20 h-20"
- />
- <img
- v-if="section.title === 'Chat BI平台'"
- src="../assets//images/icon3.png"
- alt=""
- class="w-20 h-20"
- />
- <div class="platform-block__title-wrap">
- <p class="platform-block__title">{{ section.title }}</p>
- <span class="platform-block__subtitle">{{
- section.subtitle
- }}</span>
- </div>
- </div>
- <div
- v-if="section.apps?.length"
- 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))]"
- >
- <button
- v-for="(app, appIndex) in section.apps"
- :key="`${section.code}-${appIndex}-${app.label}`"
- type="button"
- :class="[
- 'platform-app',
- boldLabes.includes(app.label)
- ? 'platform-app--active'
- : 'platform-app--ghost',
- ]"
- @click="handlePortalAppClick(app)"
- >
- <span class="platform-app__icon">
- <img
- v-if="app.image"
- :src="app.image"
- :alt="app.label"
- class="h-7 w-7 object-contain rounded-md"
- />
- <Icon
- v-else
- :icon="app.icon || 'mdi:dots-grid'"
- class="text-[24px]"
- />
- </span>
- <span
- class="platform-app__label md:text-sm text-[12px] text-left"
- >{{ app.label }}</span
- >
- </button>
- </div>
- </article>
- </div>
- <aside class="space-y-4">
- <section class="side-card side-card--notice rounded-md p-2">
- <div class="side-card__header w-[95%] ml-[8px]">
- <div class="notice-tabs">
- <button
- v-for="tab in noticeTabs"
- :key="tab.key"
- type="button"
- :class="[
- 'notice-tab',
- activeNoticeTab === tab.key ? 'notice-tab--active' : '',
- ]"
- @click="handleNoticeTabChange(tab.key)"
- >
- {{ tab.label }}
- </button>
- </div>
- <button
- type="button"
- class="side-card__more"
- @click="handleNoticeMoreClick"
- >
- 更多
- <Icon icon="mingcute:right-line" class="text-[18px]" />
- </button>
- </div>
- <div class="space-y-2 p-2 pt-3">
- <div
- v-if="!userStore.getUser.username"
- class="flex h-full items-center justify-center"
- >
- <div class="text-[#8a9ab0] pt-5">登录后查看</div>
- </div>
- <div
- v-if="!currentNoticeList.length && userStore.getUser.username"
- class="flex h-[120px] items-center justify-center text-[#8a9ab0]"
- >
- 暂无数据
- </div>
- <article
- v-if="userStore.getUser.username"
- v-for="notice in currentNoticeList"
- :key="notice.id"
- class="notice-item cursor-pointer"
- @click="handleNoticeItemClick(notice)"
- >
- <div class="notice-item__desc">{{ notice.docsubject }}</div>
- <div class="date text-[12px] text-[#9cadc0]">
- {{ notice.docvaliddate }}
- </div>
- </article>
- </div>
- </section>
- <section
- class="side-card side-card--notice rounded-md p-2"
- :style="{ minHeight: '190px' }"
- >
- <div class="side-card__header w-[91%] ml-[15px]">
- <div class="notice-badge px-2 pb-2">{{ todoPanelTitle }}</div>
- <button
- type="button"
- class="side-card__more"
- @click="router.push('/todo-list')"
- >
- 全部任务
- <Icon icon="mingcute:right-line" class="text-[18px]" />
- </button>
- </div>
- <div class="space-y-2 p-4 pt-2">
- <div
- v-if="!userStore.getUser.username"
- class="flex h-full items-center justify-center"
- >
- <div class="text-[#8a9ab0] pt-10">登录后查看</div>
- </div>
- <div
- v-if="!oaTasks.length && userStore.getUser.username"
- class="flex h-full items-center justify-center"
- >
- <div class="text-[#8a9ab0] pt-10">暂无待办</div>
- </div>
- <article
- v-if="userStore.getUser.username"
- v-for="task in oaTasks"
- :key="task.requestId"
- @click="handleTask(task)"
- class="todo-item rounded-md cursor-pointer"
- >
- <div class="flex min-w-0 items-start justify-between gap-3">
- <div class="min-w-0">
- <div class="truncate text-[14px] font-semibold">
- {{ task.requestName }}
- </div>
- <div class="mt-1 text-[12px] text-[#8a9ab0]">
- 创建人:{{ task.creatorName }} · {{ task.createTime }}
- </div>
- </div>
- <span
- :class="['todo-item__tag', getTagClass(task.requesLevel)]"
- >{{ getTagName(task.requesLevel) }}</span
- >
- </div>
- </article>
- <div class="quick-todo-bar">
- <el-dropdown
- trigger="click"
- popper-class="quick-access-dropdown"
- @command="handleQuickAccessCommand"
- >
- <button type="button" class="quick-todo-btn">
- <div class="number">{{ todo }}</div>
- <div class="flex gap-2 items-center">
- <div class="!text-[10px] aside-btn">我的待办</div>
- <Icon
- icon="mdi:clipboard-text-outline"
- color="#7f2c33"
- class="icon"
- />
- </div>
- </button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item command="todo-oa">
- <div
- class="p-2 flex items-center gap-3 text-[#f56c6c]!"
- >
- <span>OA</span>
- <span>{{ oatodo }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="todo-crm">
- <div
- class="p-2 flex items-center gap-3 text-[#f56c6c]!"
- >
- <span>CRM</span>
- <span>{{ crmtodo }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="todo-srm">
- <div
- class="p-2 flex items-center gap-3 text-[#e43c2f]!"
- >
- <span>SRM</span>
- <span>{{ srmtodo }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-dropdown
- trigger="click"
- popper-class="quick-access-dropdown"
- @command="handleQuickAccessCommand"
- >
- <button
- type="button"
- class="quick-todo-btn quick-todo-btn--center"
- >
- <div class="number text-[#2d8767]!">{{ done }}</div>
- <div class="flex gap-2 items-center pl-2">
- <div class="!text-[10px] aside-btn">已完成</div>
- <Icon
- icon="mdi:check-circle-outline"
- color="#2d8767"
- class="icon"
- />
- </div>
- </button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item command="done-oa">
- <div
- class="p-2 flex items-center gap-3 text-[#2d8767]!"
- >
- <span>OA</span>
- <span>{{ oadone }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="done-crm">
- <div
- class="p-2 flex items-center gap-3 text-[#2d8767]!"
- >
- <span>CRM</span>
- <span>{{ crmdone }}</span>
- </div>
- </el-dropdown-item>
- <el-dropdown-item command="done-srm">
- <div
- class="p-2 flex items-center gap-3 text-[#2d8767]!"
- >
- <span>SRM</span>
- <span>{{ srmdone }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- </div>
- </section>
- <section
- class="side-card side-card--content p-2 rounded-md"
- :style="{ minHeight: '180px' }"
- >
- <div class="side-card__header w-[90%] ml-[15px]">
- <div class="news notice-badge pb-2">{{ newsPanelTitle }}</div>
- <button type="button" class="side-card__more" @click="goNews">
- 更多
- <Icon icon="mingcute:right-line" class="text-[18px]" />
- </button>
- </div>
- <div class="space-y-2 p-4 pt-2">
- <div
- v-if="!userStore.getUser.username"
- class="flex h-full items-center justify-center"
- >
- <div class="text-[#8a9ab0] pt-10">登录后查看</div>
- </div>
- <div
- v-if="!newsList.length && userStore.getUser.username"
- class="flex h-full items-center justify-center"
- >
- <div class="text-[#8a9ab0] pt-10">暂无新闻</div>
- </div>
- <article
- v-for="news in newsList"
- :key="news.id"
- class="news-mini cursor-pointer rounded-md"
- @click="handleNoticeItemClick(news)"
- >
- <div class="min-w-0 flex-1">
- <div
- class="line-clamp-1 text-[13px] font-semibold leading-[1.45]"
- >
- {{ news.docsubject }}
- </div>
- <div class="mt-2 text-[12px] text-[#9cadc0]">
- {{ news.docvaliddate }}
- </div>
- </div>
- </article>
- </div>
- </section>
- <section
- v-if="userStore.getUser.username"
- class="side-card side-card--placeholder rounded-md"
- :style="{ minHeight: '78px', backgroundColor: '#3575e4' }"
- >
- <div class="placeholder-panel flex flex-col text-left">
- <!-- <div class="text-sm">需要帮助?</div> -->
- <div class="text-[10px]">遇到系统操作问题,需要帮助</div>
- <div
- class="bg-[#79ebfa] text-sm text-center text-[#004098] py-1 px-2 rounded-full mt-2 w-[30%] cursor-pointer"
- @click="openConsult"
- >
- 立即咨询
- </div>
- </div>
- </section>
- </aside>
- </section>
- </main>
- <el-dialog v-model="dialogVisible" title="提示" width="500">
- <template #header="{ close, titleId, titleClass }">
- <div class="my-header">
- <h4 :id="titleId" class="flex gap-2 items-center">
- <Icon
- :icon="'si:warning-line'"
- color="#ef6c1a"
- size="16"
- class="text-[20px]"
- /><span class="text-black">提示</span>
- </h4>
- </div>
- </template>
- <span class="text-black">SRM系统尚未正式上线使用</span>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialogVisible = false">取消</el-button>
- <el-button type="primary" color="#063e8d" @click="confirmSrm">
- 继续访问
- </el-button>
- </div>
- </template>
- </el-dialog>
- <Footer />
- </div>
- </template>
- <script setup lang="ts">
- import { computed, onMounted, onUnmounted, watch, ref } from "vue";
- import * as authUtil from "@/utils/auth";
- import * as dd from "dingtalk-jsapi";
- import Header from "@components/home/header.vue";
- import Footer from "@components/home/Footer.vue";
- import { useRouter } from "vue-router";
- import axios from "axios";
- import { Icon } from "@iconify/vue";
- import { ElLoading, ElMessageBox } from "element-plus";
- import {
- getMCSsoToken,
- ssoLogin,
- zentaoSsoLogin,
- getOATasks,
- getCRMTasks,
- getSRMTasks,
- getNotices,
- getRedHeadFiles,
- getNews,
- srmLogin,
- } from "@/api/user";
- import { useUserStore } from "@/stores/useUserStore";
- import { useThemeStore } from "@/stores/useThemeStore";
- import { getAccessToken } from "@/utils/auth";
- import { deleteUserCache } from "@hooks/useCache";
- import { manualLogoutKey, reloginCancelKey } from "@/config/axios/service";
- import banner1 from "@/assets/images/banner1.png";
- import banner2 from "@/assets/images/banner2.png";
- import banner4 from "@/assets/images/banner4.png";
- import oaimage from "@/assets/images/oa.png";
- import crmimage from "@/assets/images/crm.png";
- import ehrimage from "@/assets/images/ehr.png";
- import scmimage from "@/assets/images/scm.png";
- import erpimage from "@/assets/images/fm.png";
- import driveimage from "@/assets/images/drive.png";
- import pmsimage from "@/assets/images/pms.jpeg";
- import zhonghangimage from "@/assets/images/中航.png";
- import lianyouimage from "@/assets/images/lianyou.png";
- import qhseimage from "@/assets/images/qhse.png";
- import zuanjingimage from "@/assets/images/zuanjing.jpeg";
- import yalieimage from "@/assets/images/yalie.png";
- import zhuqiimage from "@/assets/images/zhuqi.png";
- import pmimage from "@/assets/images/pm.png";
- import dataimage from "@/assets/images/data2.png";
- import thinkimage from "@/assets/images/think.png";
- import aiimage from "@/assets/images/ai.png";
- import agentimage from "@/assets/images/icon2.png";
- import videoimage from "@/assets/images/video.png";
- import fileagent from "@/assets/images/fileagent.png";
- import zhiduagent from "@/assets/images/zhiduagent.png";
- import jishuimage2 from "@/assets/images/jishuimage.png";
- import zhanlueimage from "@/assets/images/zhanlue.png"; // 战略解码
- import safeimage from "@/assets/images/safe.png"; // 安全合规管理
- import zuzhiimage from "@/assets/images/zuzhi.png";
- import youimage from "@/assets/images/youcnag.png"; // ai智能体
- import hongpan from "@/assets/images/pan.png"; // ai智能体
- import ask from "@/assets/images/ask.png";
- import degitial from "@/assets/images/degitial.png";
- import banner2_white from "@/assets/images/banner2_white.png";
- import banner1_white from "@/assets/images/banner1_white.png";
- type PortalApp = {
- label: string;
- icon?: string;
- image?: string;
- active?: boolean;
- };
- type PortalSection = {
- code: string;
- title: string;
- subtitle: string;
- height: string;
- apps?: PortalApp[];
- };
- type NoticeItem = {
- id?: string | number;
- title?: string;
- desc?: string;
- docsubject?: string;
- };
- const router = useRouter();
- const userStore = useUserStore();
- const themeStore = useThemeStore();
- const todoPanelTitle = "待办中心";
- const newsPanelTitle = "新闻中心";
- const noticeTabs = [
- { key: "redHead", label: "红头文件" },
- { key: "notice", label: "通知公告" },
- ] as const;
- type NoticeTabKey = (typeof noticeTabs)[number]["key"];
- const portalSections: PortalSection[] = [
- {
- code: "数",
- title: "数字化运营平台",
- subtitle: "高效协同 · 战略洞察",
- height: "220px",
- apps: [
- {
- label: "OA办公",
- image: oaimage,
- active: true,
- },
- { label: "客户管理(CRM)", image: crmimage },
- { label: "人力资源(EHR)", image: ehrimage },
- { label: "供应商管理(SRM)", image: scmimage },
- { label: "经营驾驶舱(MC)", image: driveimage },
- { label: "项目管理(PM)", image: pmimage },
- { label: "开发需求管理", image: jishuimage2 },
- { label: "鸿盘", image: hongpan },
- { label: "财务管理(FM)", image: erpimage },
- { label: "技术研发管理(R&D)", image: jishuimage2 },
- { label: "战略解码与执行", image: zhanlueimage },
- { label: "组织资产管理", image: zuzhiimage },
- { label: "风控合规管理", image: safeimage },
- ],
- },
- {
- code: "智",
- title: "智慧指挥平台",
- subtitle: "高效协同 · 战略洞察",
- height: "210px",
- apps: [
- { label: "设备管理(PMS)", image: pmsimage, active: true },
- { label: "中航北斗", image: zhonghangimage },
- { label: "质量安全管理(QHSE)", image: qhseimage },
- { label: "智慧连油", image: lianyouimage },
- { label: "智慧注气", image: zhuqiimage },
- { label: "视频中心(VCS)", image: videoimage },
- { label: "智能钻井", image: zuanjingimage },
- { label: "智慧压裂", image: yalieimage },
- { label: "数字油藏", image: youimage },
- ],
- },
- {
- code: "AI",
- title: "Chat BI平台",
- subtitle: "数据智能 · 决策驱动",
- height: "160px",
- apps: [
- { label: "全局数据治理(数据中台)", image: dataimage, active: true },
- { label: "智能决策", image: thinkimage },
- { label: "行业AI大模型", image: aiimage },
- { label: "AI智能体(智能交互)", image: agentimage },
- { label: "工艺文件智能体", image: fileagent },
- { label: "集团制度智能体", image: zhiduagent },
- { label: "智能问数", image: ask },
- { label: "瑞小智(数字人)", image: degitial },
- ],
- },
- ];
- let boldLabes = ref([
- "OA办公",
- "客户管理(CRM)",
- "设备管理(PMS)",
- "中航北斗",
- "智慧连油",
- "质量安全管理(QHSE)",
- "智慧注气",
- "视频中心(VCS)",
- "开发需求管理",
- "经营驾驶舱(MC)",
- "项目管理(PM)",
- "鸿盘",
- "智能钻井",
- "供应商管理(SRM)",
- ]);
- const searchKeyword = ref("");
- // 2. 实现搜索处理函数
- const handleSearch = () => {
- if (!searchKeyword.value.trim()) return;
- console.log("执行搜索:", searchKeyword.value);
- // 如果需要跳转到独立搜索页,可以在这里添加 router.push
- };
- const handleQuickAccessCommand = (command: string) => {
- const routeMap: Record<string, string> = {
- "todo-oa": "/todo-list?type=oa",
- "todo-crm": "/crm-todo-list?type=crm",
- "done-oa": "/oa-done-list?type=oa",
- "done-crm": "/crm-done-list?type=crm",
- "todo-srm": "/srm-todo-list?type=srm",
- "done-srm": "/srm-done-list?type=srm",
- };
- const target = routeMap[command];
- if (target) {
- router.push(target);
- }
- };
- const filteredSections = computed(() => {
- const keyword = searchKeyword.value.trim().toLowerCase();
- // 如果没有关键词,返回原始数据
- if (!keyword) {
- return portalSections;
- }
- // 过滤逻辑:遍历每个板块,保留匹配的应用
- return portalSections
- .map((section) => {
- if (!section.apps) return { ...section, apps: [] };
- const matchedApps = section.apps.filter((app) =>
- app.label.toLowerCase().includes(keyword),
- );
- return {
- ...section,
- apps: matchedApps,
- };
- })
- .filter((section) => section.apps && section.apps.length > 0); // 移除没有匹配应用的空板块
- });
- watch(
- () => themeStore.theme,
- () => {
- if (themeStore.theme === "light") {
- slides.value = [
- {
- image: banner2_white,
- text: "数字化转型,驱动未来增长",
- },
- {
- image: banner1_white,
- text: "保持热爱,奔赴目标!",
- },
- {
- image: banner1_white,
- text: "智慧平台,赋能高效协同",
- },
- ];
- } else {
- slides.value = [
- {
- image: banner2,
- text: "数字化转型,驱动未来增长",
- },
- {
- image: banner1,
- text: "保持热爱,奔赴目标!",
- },
- {
- image: banner1,
- text: "智慧平台,赋能高效协同",
- },
- ];
- }
- },
- );
- // 添加轮播数据
- const slides = ref([
- {
- image: themeStore.theme === "light" ? banner2_white : banner2,
- text: "数字化转型,驱动未来增长",
- },
- {
- image: themeStore.theme === "light" ? banner1_white : banner1,
- text: "保持热爱,奔赴目标!",
- },
- {
- image: themeStore.theme === "light" ? banner1_white : banner1,
- text: "智慧平台,赋能高效协同",
- },
- ]);
- // 当前索引
- const currentIndex = ref(0);
- let slideTimer: ReturnType<typeof setInterval> | null = null;
- // 下一页
- const nextSlide = () => {
- currentIndex.value = (currentIndex.value + 1) % slides.value.length;
- };
- const activeNoticeTab = ref<NoticeTabKey>("redHead");
- const noticeListMap = ref<Record<NoticeTabKey, NoticeItem[]>>({
- notice: [],
- redHead: [],
- });
- const newsList = ref([]);
- const currentNoticeList = computed(
- () => noticeListMap.value[activeNoticeTab.value] ?? [],
- );
- let todo = ref(0);
- let done = ref(0);
- let oatodo = ref(0);
- let oadone = ref(0);
- let crmtodo = ref(0);
- let crmdone = ref(0);
- let srmtodo = ref(0);
- let srmdone = ref(0);
- const loadHomeData = async () => {
- await loadNoticeList(activeNoticeTab.value);
- if (!userStore.getUser.username) return;
- const [oaRes, crmRes, crmDoneRes, newsRes] = await Promise.all([
- getOATasks({
- id: userStore.getUser.username,
- pageNum: 1,
- pageSize: 10,
- }),
- await getCRMTasks({
- id: userStore.getUser.username,
- type: "pending",
- pageNum: 1,
- pageSize: 10,
- }),
- await getCRMTasks({
- id: userStore.getUser.username,
- type: "approved",
- pageNum: 1,
- pageSize: 10,
- }),
- // await getSRMTasks({
- // id: userStore.getUser.username,
- // pageNum: 1,
- // pageSize: 10,
- // }),
- getNews({
- pageNum: 1,
- pageSize: 10,
- }),
- ]);
- oaTasks.value = oaRes.todoList.slice(0, 3);
- todo.value = Number(oaRes.todoCount) + crmRes.todoCount;
- done.value = Number(oaRes.doneCount) + crmDoneRes.todoCount;
- oatodo.value = oaRes.todoCount;
- oadone.value = oaRes.doneCount;
- crmtodo.value = crmRes.todoCount;
- crmdone.value = crmDoneRes.todoCount;
- // srmtodo.value = srmRes.todoCount;
- // srmdone.value = srmRes.doneCount;
- newsList.value = newsRes.list.slice(0, 3);
- };
- const loadNoticeList = async (tabKey: NoticeTabKey) => {
- const requestApi = tabKey === "notice" ? getNotices : getRedHeadFiles;
- const res = await requestApi({
- pageNum: 1,
- pageSize: 10,
- });
- noticeListMap.value[tabKey] = (res?.list || []).slice(0, 3);
- };
- let currentTabKey = ref<NoticeTabKey>("redHead");
- const handleNoticeTabChange = async (tabKey: NoticeTabKey) => {
- activeNoticeTab.value = tabKey;
- currentTabKey.value = tabKey;
- // if (noticeListMap.value[tabKey].length) return;
- if (userStore.getUser.username) {
- await loadNoticeList(tabKey);
- }
- };
- const handleNoticeMoreClick = () => {
- router.push({
- path: "/notice-redhead",
- query: {
- tabKey: currentTabKey.value,
- },
- });
- };
- const protectedOpen = (url: string) => {
- if (userStore.getUser.username && getAccessToken()) {
- window.open(url, "_blank");
- } else {
- router.push({ path: "/login" });
- }
- };
- let dialogVisible = ref(false);
- const confirmSrm = async () => {
- dialogVisible.value = false;
- if (userStore.getUser.username && getAccessToken()) {
- const res = await srmLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- window.open(
- `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
- "_blank",
- );
- }
- } else {
- router.push({ path: "/login" });
- }
- };
- const handlePortalAppClick = async (app: PortalApp) => {
- if (!app.label) return;
- if (app.label === "项目管理(PM)") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=yyhy`,
- );
- }
- if (app.label === "OA办公") {
- if (userStore.getUser.username && getAccessToken()) {
- const res = await ssoLogin({ username: userStore.getUser.username });
- if (res) {
- window.open(
- `https://yfoa.keruioil.com/wui/index.html?ssoToken=${res}#/main`,
- "_blank",
- );
- }
- } else {
- router.push({ path: "/login" });
- }
- }
- if (app.label === "客户管理(CRM)") {
- protectedOpen(
- `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
- );
- }
- if (app.label === "设备管理(PMS)") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}`,
- );
- }
- if (app.label === "中航北斗") {
- protectedOpen("https://zhbdgps.cn");
- }
- if (app.label === "智慧连油") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=zhly`,
- );
- }
- if (app.label === "智慧注气") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=znzq`,
- );
- }
- if (app.label === "视频中心(VCS)") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=spzx`,
- );
- }
- if (app.label === "质量安全管理(QHSE)") {
- protectedOpen(
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}&source=qhse`,
- );
- }
- if (app.label === "经营驾驶舱(MC)") {
- if (userStore.getUser.username && getAccessToken()) {
- const res = await getMCSsoToken();
- if (res) {
- window.open(
- `https://report.deepoil.cc/webroot/decision/v10/entry/access/9fb42908-894a-4373-a6be-ce046a42851d?preview=true&page_number=1&ssoToken=${res}`,
- "_blank",
- );
- }
- } else {
- router.push({ path: "/login" });
- }
- }
- if (app.label === "开发需求管理") {
- if (userStore.getUser.username && getAccessToken()) {
- const res = await zentaoSsoLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- window.open(
- `http://project.deepoil.cc/zentao/api.php?m=user&f=apilogin&account=${res.jobNumber}&code=${res.code}&time=${res.timestamp}&token=${res.token}`,
- "_blank",
- );
- }
- } else {
- router.push({ path: "/login" });
- }
- }
- if (app.label === "供应商管理(SRM)") {
- // ElMessageBox.confirm("即将跳转到供应商管理系统,是否继续?", "提示", {
- // confirmButtonText: "继续",
- // cancelButtonText: "取消",
- // }).then(async () => {});
- dialogVisible.value = true;
- // if (userStore.getUser.username && getAccessToken()) {
- // const res = await srmLogin({
- // username: userStore.getUser.username,
- // });
- // if (res) {
- // window.open(
- // `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
- // "_blank",
- // );
- // }
- // } else {
- // router.push({ path: "/login" });
- // }
- }
- if (app.label === "智能钻井") {
- if (userStore.getUser.username && getAccessToken()) {
- window.open(`http://172.21.0.224:8001/#/login`, "_blank");
- } else {
- router.push({ path: "/login" });
- }
- }
- if (app.label === "鸿盘") {
- if (userStore.getUser.username && getAccessToken()) {
- window.open(`https://pan.keruioil.com:52180`, "_blank");
- } else {
- router.push({ path: "/login" });
- }
- }
- };
- async function loginWithDingTalk() {
- const ddCorpId = import.meta.env.VITE_DD_CORPID;
- const ddClientId = import.meta.env.VITE_DD_CLIENTID;
- if (!ddCorpId || !ddClientId) return false;
- return await new Promise<boolean>((resolve) => {
- dd.requestAuthCode({
- corpId: ddCorpId,
- clientId: ddClientId,
- success: async (res: any) => {
- try {
- const { code } = res;
- const response = await axios.post(
- import.meta.env.BASE_URL + "/admin-api/system/auth/h5SocialLogin",
- {
- code,
- type: 20,
- state: new Date().getTime(),
- },
- {
- headers: {
- "Content-Type": "application/json",
- "tenant-id": 1,
- },
- },
- );
- deleteUserCache();
- userStore.resetState();
- authUtil.setToken(response.data.data);
- sessionStorage.removeItem(manualLogoutKey);
- sessionStorage.removeItem(reloginCancelKey);
- await userStore.setUserInfoAction();
- resolve(true);
- } catch (error) {
- console.log("dingTalk login error :>> ", error);
- resolve(false);
- }
- },
- fail: (err: any) => {
- console.log("err :>> ", err);
- resolve(false);
- },
- });
- });
- }
- async function dingTalkAutoLogin() {
- const ua = window.navigator.userAgent.toLowerCase();
- if (
- (ua.includes("dingtalk") || ua.includes("dingtalkwork")) &&
- !userStore.getUser.username &&
- !getAccessToken()
- ) {
- return await loginWithDingTalk();
- }
- return false;
- }
- const getTagClass = (tag: string) => {
- return tag === "0"
- ? "bg-[#2e1e6d] text-white/90"
- : tag === "1"
- ? "bg-[#2e1e6d] text-white/90"
- : tag === "2"
- ? "bg-[#2e1e6d] text-white/90"
- : "bg-[#2e1e6d] text-white/90";
- };
- const getTagName = (tag: string) => {
- return tag === "0"
- ? "正常"
- : tag === "1"
- ? "重要"
- : tag === "2"
- ? "紧急"
- : "正常";
- };
- let oaTasks = ref([]);
- onMounted(async () => {
- slideTimer = setInterval(nextSlide, 5000);
- await dingTalkAutoLogin();
- await loadHomeData();
- });
- const handleNoticeItemClick = async (notice: any) => {
- const res = await ssoLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- const ua = window.navigator.userAgent.toLowerCase();
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
- dd.biz.util.openLink({
- url:
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main", // 先跳你的 SSO 链接
- onSuccess: () => {
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
- setTimeout(() => {
- dd.biz.util.openLink({
- url: `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`,
- });
- }, 100);
- },
- });
- } else {
- const loading = ElLoading.service({
- lock: true,
- text: "正在跳转,请稍候...",
- background: "rgba(0, 0, 0, 0.7)",
- });
- const newTab = window.open("", "_blank");
- newTab.location.href =
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main";
- setTimeout(function () {
- newTab.location.href = `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`;
- setTimeout(() => {
- loading.close();
- }, 500);
- }, 100);
- }
- }
- };
- const handleTask = async (row: any) => {
- const res = await ssoLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- const ua = window.navigator.userAgent.toLowerCase();
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
- dd.biz.util.openLink({
- url:
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main", // 先跳你的 SSO 链接
- onSuccess: () => {
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
- setTimeout(() => {
- dd.biz.util.openLink({
- url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`,
- });
- }, 100);
- },
- });
- } else {
- const loading = ElLoading.service({
- lock: true,
- text: "正在跳转,请稍候...",
- background: "rgba(0, 0, 0, 0.7)",
- });
- const newTab = window.open("", "_blank");
- newTab.location.href =
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main";
- setTimeout(function () {
- newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
- setTimeout(() => {
- loading.close();
- }, 500);
- }, 100);
- }
- }
- };
- const openConsult = async () => {
- const res = await ssoLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- const ua = window.navigator.userAgent.toLowerCase();
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
- dd.biz.util.openLink({
- url:
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main", // 先跳你的 SSO 链接
- onSuccess: () => {
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
- setTimeout(() => {
- dd.biz.util.openLink({
- url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`,
- });
- }, 100);
- },
- });
- } else {
- const loading = ElLoading.service({
- lock: true,
- text: "正在跳转,请稍候...",
- background: "rgba(0, 0, 0, 0.7)",
- });
- const newTab = window.open("", "_blank");
- newTab.location.href =
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main";
- setTimeout(function () {
- newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`;
- setTimeout(() => {
- loading.close();
- }, 500);
- }, 100);
- }
- }
- };
- const goNews = () => {
- router.push("/news");
- };
- onUnmounted(() => {
- if (slideTimer) {
- clearInterval(slideTimer);
- slideTimer = null;
- }
- });
- </script>
- <style scoped>
- .portal-home {
- --portal-text: #17345f;
- --portal-text-muted: #5f6f83;
- --portal-text-soft: #7f8fa6;
- --portal-title: #163867;
- --portal-subtitle: rgba(61, 92, 135, 0.86);
- --portal-line: rgba(126, 156, 201, 0.24);
- --portal-card: rgba(255, 255, 255, 0.82);
- --portal-card-2: rgba(248, 251, 255, 0.94);
- --portal-card-3: rgba(240, 246, 255, 0.88);
- --portal-card-4: rgba(231, 239, 251, 0.92);
- --portal-nav-bg: rgba(255, 255, 255, 0.72);
- --portal-nav-hover: rgba(219, 232, 252, 0.8);
- --portal-input-bg: rgba(255, 255, 255, 0.7);
- --portal-input-hover: rgba(255, 255, 255, 0.92);
- --portal-shadow: 0 18px 40px rgba(23, 52, 95, 0.12);
- --portal-shadow-strong: 0 24px 60px rgba(23, 52, 95, 0.16);
- --portal-accent: #245edb;
- --portal-accent-2: #4e8cff;
- --portal-accent-soft: rgba(36, 94, 219, 0.14);
- --portal-todo-bg: rgba(242, 247, 255, 0.94);
- --portal-todo-hover: rgba(228, 238, 252, 0.95);
- --portal-number-todo: #e15a5a;
- --portal-number-done: #2da04d;
- color: var(--portal-text);
- background:
- radial-gradient(
- circle at 18% 12%,
- rgba(83, 126, 255, 0.14),
- transparent 22%
- ),
- radial-gradient(
- circle at 82% 20%,
- rgba(71, 148, 255, 0.14),
- transparent 20%
- ),
- radial-gradient(
- circle at 50% 100%,
- rgba(97, 142, 247, 0.12),
- transparent 28%
- ),
- linear-gradient(180deg, #eef3f9 0%, #f7faff 46%, #eef3f9 100%);
- background-image:
- /* linear-gradient(rgba(245, 249, 255, 0.82), rgba(237, 244, 253, 0.92)), */
- linear-gradient(rgba(245, 249, 255, 0.9), rgba(218, 233, 251, 0.82)),
- url("../assets//images/bg666.png");
- background-position:
- center center,
- center bottom;
- background-repeat: no-repeat, no-repeat;
- background-size:
- cover,
- 100% auto;
- background-attachment: fixed, fixed;
- }
- :global([data-theme="dark"] .portal-home) {
- --portal-text: #eaf1ff;
- --portal-text-muted: rgba(234, 241, 255, 0.95);
- --portal-text-soft: #8a9ab0;
- --portal-title: #f4f7ff;
- --portal-subtitle: rgba(188, 205, 255, 0.82);
- --portal-line: rgba(97, 129, 206, 0.28);
- --portal-card: rgba(10, 19, 43, 0.8);
- --portal-card-2: rgba(12, 24, 52, 0.92);
- --portal-card-3: rgba(17, 25, 48, 0.8);
- --portal-card-4: rgba(15, 24, 45, 0.82);
- --portal-nav-bg: rgba(10, 19, 43, 0.8);
- --portal-nav-hover: rgba(28, 40, 72, 0.8);
- --portal-input-bg: rgba(255, 255, 255, 0.08);
- --portal-input-hover: rgba(255, 255, 255, 0.12);
- --portal-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
- --portal-shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.38);
- --portal-accent: #6e7dff;
- --portal-accent-2: #8d4dff;
- --portal-accent-soft: rgba(110, 125, 255, 0.16);
- --portal-todo-bg: #070e20;
- --portal-todo-hover: rgba(28, 40, 72, 0.8);
- --portal-number-todo: #f56c6c;
- --portal-number-done: #ffffff;
- color: var(--portal-text);
- background:
- radial-gradient(
- circle at 18% 12%,
- rgba(79, 82, 221, 0.34),
- transparent 22%
- ),
- radial-gradient(circle at 82% 20%, rgba(28, 95, 255, 0.2), transparent 20%),
- radial-gradient(
- circle at 50% 100%,
- rgba(103, 46, 255, 0.16),
- transparent 28%
- ),
- linear-gradient(180deg, #040814 0%, #060d1d 46%, #040814 100%);
- background-image:
- linear-gradient(rgba(5, 11, 26, 0.62), rgba(5, 11, 26, 0.82)),
- url("../assets//images/bg666.png");
- }
- .hero-banner {
- position: relative;
- min-height: 310px;
- border: 1px solid var(--portal-line);
- border-radius: 10px;
- background:
- linear-gradient(135deg, var(--portal-accent-soft), transparent 32%),
- linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
- box-shadow:
- var(--portal-shadow-strong),
- inset 0 1px 0 rgba(255, 255, 255, 0.06);
- overflow: hidden;
- }
- .hero-banner::before {
- content: "";
- position: absolute;
- inset: 0;
- background:
- linear-gradient(120deg, rgba(128, 77, 255, 0.14) 0%, transparent 26%),
- radial-gradient(
- circle at 20% 36%,
- rgba(123, 84, 255, 0.22),
- transparent 22%
- ),
- radial-gradient(
- circle at 74% 52%,
- rgba(54, 170, 255, 0.18),
- transparent 24%
- ),
- linear-gradient(
- 90deg,
- rgba(255, 255, 255, 0.04),
- transparent 40%,
- rgba(255, 255, 255, 0.02)
- );
- pointer-events: none;
- }
- .hero-copy {
- position: relative;
- z-index: 2;
- }
- .hero-script {
- display: none;
- }
- .hero-text {
- margin-top: 0;
- color: var(--portal-text);
- font-size: 46px;
- font-weight: 800;
- line-height: 1.2;
- letter-spacing: 0.02em;
- text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
- max-width: 540px;
- }
- .hero-visual {
- position: absolute;
- inset: 0;
- min-height: 310px;
- }
- .hero-visual::after {
- content: "";
- position: absolute;
- inset: 0;
- background:
- linear-gradient(90deg, rgba(5, 11, 26, 0.18) 0%, transparent 28%),
- linear-gradient(
- 180deg,
- transparent 0%,
- rgba(5, 11, 26, 0.04) 56%,
- rgba(5, 11, 26, 0.18) 100%
- );
- pointer-events: none;
- }
- .carousel-container {
- position: relative;
- height: 310px;
- overflow: hidden;
- }
- .platform-block {
- /* display: flex; */
- overflow: hidden;
- border: 1px solid var(--portal-line);
- border-radius: 8px;
- background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
- box-shadow:
- var(--portal-shadow),
- inset 0 1px 0 rgba(255, 255, 255, 0.04);
- }
- .platform-block__header {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- flex: 0 0 190px;
- width: 190px;
- min-width: 190px;
- min-height: 48px;
- padding: 0 20px 0 0px;
- box-sizing: border-box;
- background: linear-gradient(90deg, var(--portal-accent-soft), transparent);
- }
- .platform-block__title-wrap {
- display: flex;
- flex-direction: column;
- align-items: baseline;
- gap: 18px;
- min-width: 0;
- flex: 1;
- }
- .platform-block__title {
- color: var(--portal-title);
- font-size: 15px;
- font-weight: 800;
- min-width: 0;
- flex: 0 1 auto;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- letter-spacing: 0.02em;
- }
- .platform-block__subtitle {
- color: var(--portal-subtitle);
- font-size: 13px;
- font-weight: 500;
- flex: 0 0 auto;
- white-space: nowrap;
- }
- .platform-block__watermark {
- color: rgba(119, 145, 214, 0.24);
- font-size: 42px;
- font-weight: 800;
- line-height: 1;
- letter-spacing: 0.08em;
- }
- .platform-app {
- display: flex;
- width: 100%;
- min-width: 0;
- min-height: 40px;
- align-items: center;
- justify-content: flex-start;
- gap: 6px;
- border: 1px solid var(--portal-line);
- border-radius: 10px;
- padding: 0 8px;
- background: var(--portal-card-3);
- font-size: 14px;
- cursor: pointer;
- transition:
- transform 0.2s ease,
- box-shadow 0.2s ease,
- background 0.2s ease;
- }
- .platform-app:hover {
- transform: translateY(-2px);
- border-color: rgba(133, 163, 255, 0.45);
- box-shadow: 0 10px 26px rgba(34, 54, 110, 0.18);
- }
- .platform-app--active {
- background: linear-gradient(
- 90deg,
- rgba(76, 103, 224, 0.5),
- var(--portal-card)
- );
- color: var(--portal-title);
- border-color: rgba(129, 145, 255, 0.44);
- box-shadow: inset 0 0 0 1px rgba(159, 173, 255, 0.08);
- }
- .platform-app--ghost {
- background: var(--portal-card-4);
- color: var(--portal-text);
- }
- .platform-app__icon {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- flex: 0 0 28px;
- color: var(--portal-accent-2);
- filter: drop-shadow(0 0 8px rgba(90, 122, 255, 0.24));
- }
- .platform-app__label {
- min-width: auto;
- flex: 1;
- white-space: nowrap;
- overflow: visible;
- text-overflow: clip;
- font-size: 13px;
- line-height: 1;
- color: var(--portal-text);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .platform-block > .grid {
- flex: 1;
- align-content: start;
- }
- .portal-mobile-shortcuts {
- display: grid;
- grid-template-columns: repeat(3, minmax(0, 1fr));
- gap: 8px;
- }
- .portal-mobile-shortcut {
- min-width: 0;
- border: 1px solid var(--portal-line);
- border-radius: 12px;
- padding: 10px 8px;
- background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
- color: var(--portal-text);
- font-size: 13px;
- font-weight: 600;
- box-shadow: var(--portal-shadow);
- }
- .side-card {
- overflow: hidden;
- border: 1px solid var(--portal-line);
- border-radius: 14px;
- background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
- box-shadow:
- var(--portal-shadow),
- inset 0 1px 0 rgba(255, 255, 255, 0.04);
- }
- .side-card--content {
- padding-top: 10px;
- }
- .side-card__header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- min-height: 20px;
- padding-right: 10px;
- /* border-radius: 999px; */
- /* background: rgba(28, 39, 72, 0.86); */
- border-bottom: 1px solid var(--portal-line);
- }
- .notice-badge {
- position: relative;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 25px;
- min-width: 70px;
- color: var(--portal-title);
- font-size: 14px;
- }
- .news.notice-badge {
- position: relative;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 25px;
- min-width: 70px;
- color: var(--portal-title);
- font-size: 14px;
- border-bottom: 2px solid var(--portal-accent);
- }
- .notice-tabs {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- }
- .notice-tab {
- height: 25px;
- min-width: 68px;
- padding: 0 14px;
- border: 0;
- border-radius: 999px;
- background: transparent;
- color: var(--portal-subtitle);
- font-size: 14px;
- cursor: pointer;
- transition:
- background 0.2s ease,
- color 0.2s ease;
- }
- .notice-tab--active {
- position: relative;
- color: var(--portal-title);
- }
- .notice-tab--active::before {
- content: "";
- position: absolute;
- left: 50%;
- bottom: -2px;
- width: 90%;
- height: 2px;
- transform: translateX(-50%);
- border-radius: 999px;
- background: linear-gradient(
- to right,
- #5f3abf 0%,
- #7044c5 30%,
- #7044c5 40%,
- rgba(255, 255, 255, 0.7) 50%,
- #7044c5 60%,
- #7044c5 70%,
- #5f3abf 100%
- );
- box-shadow: 0 0 12px rgba(112, 120, 255, 0.95);
- }
- .notice-badge::after {
- content: "";
- position: absolute;
- top: 0;
- right: -15px;
- }
- .side-card__more {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- border: 0;
- background: transparent;
- color: var(--portal-subtitle);
- cursor: pointer;
- font-size: 12px;
- }
- .notice-item {
- /* background: rgba(14, 22, 42, 0.88); */
- padding: 8px 14px;
- box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
- border-radius: 12px;
- }
- .notice-item:hover {
- box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
- transition: all 0.2s ease;
- transform: translateY(-1px);
- }
- .notice-item__title,
- .notice-item__desc {
- color: var(--portal-text);
- font-size: 13px;
- line-height: 1.5;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- }
- .panel-title {
- padding: 0 16px;
- color: var(--portal-title);
- font-size: 15px;
- font-weight: 700;
- }
- .todo-item {
- border: 1px solid var(--portal-line);
- background: var(--portal-card-4);
- padding: 8px 14px;
- box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
- }
- .todo-item__tag {
- display: inline-flex;
- align-items: center;
- border-radius: 999px;
- padding: 2px 8px;
- font-size: 11px;
- white-space: nowrap;
- }
- .news-mini {
- display: flex;
- align-items: center;
- gap: 12px;
- border: 1px solid var(--portal-line);
- background: var(--portal-card-4);
- padding: 5px 12px;
- box-shadow: 0 10px 22px rgba(23, 52, 95, 0.08);
- border-radius: 12px;
- }
- .news-mini:hover {
- box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
- transition: all 0.2s ease;
- transform: translateY(-1px);
- }
- .placeholder-panel {
- display: flex;
- height: 100%;
- padding: 16px;
- justify-content: start;
- color: var(--portal-title);
- font-size: 16px;
- font-weight: 600;
- letter-spacing: 0.08em;
- }
- @media (max-width: 1279px) {
- .hero-text {
- font-size: 34px;
- max-width: 420px;
- }
- .hero-visual {
- min-height: 260px;
- }
- }
- @media (max-width: 767px) {
- .platform-block {
- display: block;
- }
- .platform-block__header {
- width: 100%;
- min-width: 0;
- padding: 0 16px 0 18px;
- flex: none;
- justify-content: flex-start;
- }
- .platform-block__title-wrap {
- gap: 12px;
- flex-wrap: wrap;
- }
- .platform-block__title {
- font-size: 16px;
- }
- .platform-block__subtitle {
- font-size: 12px;
- }
- .platform-block__watermark {
- font-size: 34px;
- }
- .hero-banner {
- min-height: 240px;
- }
- .carousel-container {
- height: 240px;
- }
- .carousel-caption {
- left: 22px;
- right: 22px;
- top: 50%;
- transform: translateY(-50%);
- }
- .hero-text {
- font-size: 24px;
- max-width: 100%;
- }
- }
- .carousel-indicators {
- display: flex;
- gap: 10px;
- z-index: 30;
- }
- .carousel-indicators span {
- width: 36px;
- height: 4px;
- border-radius: 999px;
- cursor: pointer;
- transition: all 0.25s ease;
- box-shadow: 0 0 16px rgba(112, 103, 255, 0.35);
- }
- .carousel-slide {
- position: absolute;
- inset: 0;
- width: 100%;
- height: 100%;
- }
- .hero-visual img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- display: block;
- filter: saturate(1.12) contrast(1.06);
- }
- .carousel-caption {
- position: absolute;
- left: 80px;
- top: 44%;
- z-index: 2;
- transform: translateY(-50%);
- text-align: left;
- }
- .carousel-container::before {
- content: "";
- position: absolute;
- inset: auto 0 0;
- height: 120px;
- background: linear-gradient(180deg, transparent, rgba(5, 11, 26, 0.2));
- z-index: 1;
- pointer-events: none;
- }
- :deep(.portal-home .el-dialog) {
- border-radius: 16px;
- }
- .top-nav-bar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 5px 24px;
- background: var(--portal-nav-bg);
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
- border: 1px solid var(--portal-line);
- border-radius: 8px;
- margin-bottom: 10px;
- box-shadow: var(--portal-shadow);
- }
- .nav-title {
- color: var(--portal-title);
- font-size: 14px;
- font-weight: 600;
- letter-spacing: 0.08em;
- }
- .search-container {
- display: flex;
- align-items: center;
- gap: 8px;
- position: relative;
- width: 320px;
- height: 36px;
- border-radius: 20px;
- background: var(--portal-input-bg);
- border: 1px solid var(--portal-line);
- overflow: hidden;
- transition: all 0.2s ease;
- }
- .search-container:hover {
- background: var(--portal-input-hover);
- border-color: rgba(109, 137, 213, 0.4);
- }
- .search-icon {
- flex-shrink: 0;
- font-size: 18px;
- color: var(--portal-text-soft);
- margin-left: 12px;
- }
- .search-input {
- flex: 1;
- border: none;
- background: transparent;
- outline: none;
- font-size: 14px;
- color: var(--portal-text);
- padding: 0;
- margin: 0;
- }
- .shortcut-key {
- position: absolute;
- right: 12px;
- top: 50%;
- transform: translateY(-50%);
- font-size: 12px;
- color: var(--portal-text-soft);
- font-family: "Courier New", monospace;
- }
- .quick-access {
- display: flex;
- gap: 16px;
- }
- .quick-btn {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 8px 12px;
- /* border: 1px solid rgba(109, 137, 213, 0.16); */
- border-radius: 12px;
- /* background: rgba(17, 25, 48, 0.8); */
- color: var(--portal-text);
- font-size: 13px;
- cursor: pointer;
- transition:
- background 0.2s ease,
- border-color 0.2s ease,
- transform 0.2s ease;
- }
- .quick-btn--dropdown {
- border: none;
- background: transparent;
- outline: none;
- }
- .quick-btn--dropdown:focus-visible {
- outline: none;
- }
- .quick-btn:hover {
- background: var(--portal-nav-hover);
- border-color: rgba(109, 137, 213, 0.4);
- transform: translateY(-1px);
- }
- .btn-icon {
- font-size: 16px;
- color: var(--portal-accent-2);
- }
- .btn-label {
- white-space: nowrap;
- }
- .quick-btn__arrow {
- font-size: 16px;
- color: var(--portal-text-soft);
- }
- .quick-btn__meta {
- color: var(--portal-text-soft);
- }
- .quick-btn__count {
- font-weight: 700;
- }
- .quick-btn__count--todo {
- color: var(--portal-number-todo);
- }
- .quick-btn__count--done {
- color: var(--portal-number-done);
- }
- .aside-btn {
- color: var(--portal-text-soft);
- }
- .badge {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 18px;
- height: 18px;
- border-radius: 50%;
- background: #f56c6c;
- color: white;
- font-size: 10px;
- font-weight: 600;
- }
- .quick-todo-bar {
- display: flex;
- gap: 16px;
- padding: 8px 16px;
- background: var(--portal-todo-bg);
- backdrop-filter: blur(10px);
- border: 1px solid var(--portal-line);
- -webkit-backdrop-filter: blur(10px);
- border-radius: 8px;
- box-shadow: var(--portal-shadow);
- /* margin-bottom: 16px; */
- }
- .quick-todo-btn {
- display: flex;
- flex: 1;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- gap: 8px;
- border: none;
- background: transparent;
- padding: 0;
- color: inherit;
- cursor: pointer;
- outline: none;
- }
- .quick-todo-btn--center {
- align-items: center;
- }
- .quick-todo-btn:hover {
- transform: translateY(-1px);
- }
- .todo-item {
- display: flex;
- align-items: center;
- gap: 8px;
- flex: 1;
- padding: 8px 12px;
- border-radius: 8px;
- transition: all 0.2s ease;
- cursor: pointer;
- }
- .todo-item:hover {
- background: var(--portal-todo-hover);
- transform: translateY(-1px);
- border-color: rgba(109, 137, 213, 0.2);
- }
- .number {
- font-size: 18px;
- font-weight: 700;
- color: var(--portal-number-todo);
- min-width: 24px;
- text-align: center;
- }
- .label {
- font-size: 12px;
- color: var(--portal-text);
- white-space: nowrap;
- }
- .icon {
- font-size: 14px;
- color: var(--portal-accent-2);
- }
- /* 下拉菜单主体 */
- :deep(.el-dropdown-menu) {
- background-color: rgba(0, 0, 0, 0.75) !important;
- border: none !important;
- border-radius: 5px;
- box-shadow: none !important; /* 关键:去除阴影导致的“白边”视觉效果 */
- padding: 0 !important;
- }
- /* 菜单项 */
- :deep(.el-dropdown-menu__item) {
- background: #192a5b !important;
- color: #fff !important; /* 确保文字颜色可见 */
- padding: 0 !important;
- margin: 0 !important;
- border: none !important;
- }
- :deep(.el-dropdown-menu__item):hover {
- background: #182342 !important;
- color: #fff !important;
- }
- :deep(.el-dropdown-menu) {
- border: 0px solid #00487f !important;
- padding: 0px !important;
- background: #182342 !important;
- }
- :deep(.el-scrollbar, .el-popper.el-dropdown__popper) {
- background: #192a5b !important;
- padding: 0 !important;
- margin: 0 !important;
- border: none !important;
- }
- </style>
|