123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513 |
- <template>
- <div class="main mainVueIndex" :class="current_theme" id="defaultpage">
- <div class="oa-header-user" v-if="showIframe">
- <h3 v-show="menuType === '2'" class="oa-user-name" style="color: #fff">
- {{ store.state.userInfo ? store.state.userInfo.userName : '' }}
- </h3>
- <div class="oa-header-upt">
- <a
- ><template>
- <img
- @click="changeMenuType"
- v-if="userInfo.photo"
- class="oa-sign-tul-ui"
- :src="
- 'data:image/' + userInfo.photo + ';base64,' + userInfo.photo
- "
- alt="头像"
- />
- <img
- @click="changeMenuType"
- v-else
- class="oa-sign-tul-ui"
- src="../../static/img/photo-default.png"
- alt="头像"
- /> </template
- ></a>
- </div>
- <div class="oa-header-ucon">
- <div class="oa-header-ulist">
- <div class="oa-header-uin">
- <template>
- <img
- v-if="userInfo.photo"
- class="oa-sign-tul-ui"
- :src="
- 'data:image/' + userInfo.photo + ';base64,' + userInfo.photo
- "
- alt="头像"
- @click="photoModal = true"
- />
- <img
- v-else
- class="oa-sign-tul-ui"
- src="../../static/img/photo-default.png"
- alt="头像"
- @click="photoModal = true"
- />
- </template>
- <h3>
- {{ store.state.userInfo ? store.state.userInfo.userName : '' }}
- </h3>
- </div>
- <ul class="oa-header-uul">
- <li @click="showPersonInfo()">
- <span class="st-icons st-icons-user"></span>个人信息
- </li>
- <li @click="pwdModal.show = true">
- <span class="st-icons st-icons-pwd"></span>修改密码
- </li>
- <!-- <li @click="signOut">
- <span class="st-icons st-icons-out"></span>退出登录
- </li> -->
- <li @click="signOut">
- <span class="st-icons st-icons-out"></span>退出登录
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div
- v-show="showIframe"
- class="icore-menu-main overFlowSet"
- :class="{ 'icore-menu-main2': menuType === '2' }"
- >
- <div id="menuDrag" v-if="menuType === '2'" class="menuDrag"></div>
- <el-menu
- :default-active="defaultActiveIndex"
- :collapse="menuType === '1'"
- class="el-menu-vertical-demo icore-menu icore-menu-level1"
- v-for="(item, index) in menuData"
- :key="item.id"
- @open="handleOperate"
- @close="handleOperate"
- >
- <el-submenu
- :index="index + ''"
- v-if="item.menuType && Number(item.status)"
- >
- <template slot="title">
- <i
- class="icore-menu-lic icore-menu-icons icore-icons-menu-default"
- :class="item.menuIcon ? item.menuIcon : ''"
- ></i>
- <div class="icore-menu-lit marignL15 nameText">{{ item.name }}</div>
- </template>
- <template v-for="(sitem, sindex) in item.children">
- <el-submenu
- :index="index + '-' + sindex"
- v-if="
- sitem.children &&
- sitem.children.length > 0 &&
- allNoMenu(sitem.children) &&
- Number(sitem.status)
- "
- :key="sitem.id"
- @click.native="
- selectMenu(sitem, [
- { menuId: 1, menuLabel: item.name },
- { menuId: 2, menuLabel: sitem.name }
- ])
- "
- >
- <template slot="title">
- <span>{{ sitem.name }}</span>
- </template>
- <template v-for="(ssitem, ssindex) in sitem.children">
- <el-submenu
- :index="index + '-' + sindex + '-' + ssindex"
- v-if="
- ssitem.children &&
- ssitem.children.length > 0 &&
- allNoMenu(ssitem.children) &&
- Number(ssitem.status)
- "
- :key="ssitem.id"
- >
- <template slot="title">
- <span>{{ ssitem.name }}</span>
- </template>
- <template v-for="(sssitem, sssindex) in ssitem.children">
- <el-menu-item
- @click.native="
- selectMenu(sssitem, [
- { menuId: 1, menuLabel: item.name },
- { menuId: 2, menuLabel: sitem.name },
- { menuId: 3, menuLabel: ssitem.name },
- { menuId: 4, menuLabel: sssitem.name }
- ])
- "
- v-if="
- (sssitem.menuType === '1' ||
- sssitem.menuType === '4') &&
- Number(sssitem.status)
- "
- :index="
- index + '-' + sindex + '-' + ssindex + '-' + sssindex
- "
- :key="sssitem.id"
- >{{ sssitem.name }}</el-menu-item
- >
- <!-- 分割线 -->
- <el-menu-item
- class="nav_menu"
- v-if="sssitem.menuType === '3' && Number(sssitem.status)"
- :index="
- index + '-' + sindex + '-' + ssindex + '-' + sssindex
- "
- :key="sssitem.id"
- >
- <template>
- <div></div>
- </template>
- </el-menu-item>
- <!-- 停用菜单 -->
- <el-menu-item
- v-if="Number(sssitem.status) === 0"
- :index="
- index + '-' + sindex + '-' + ssindex + '-' + sssindex
- "
- :key="sssitem.id"
- >{{ sssitem.name }}</el-menu-item
- >
- </template>
- </el-submenu>
- <!-- 停用菜单 -->
- <el-menu-item
- :index="index + '-' + sindex + '-' + ssindex"
- class="closeMenu"
- v-if="Number(ssitem.status) === 0"
- :key="ssitem.id"
- >
- {{ ssitem.name }}
- </el-menu-item>
- <!-- 分割线 -->
- <el-menu-item
- class="nav_menu"
- :index="index + '-' + sindex + '-' + ssindex"
- v-if="
- (!ssitem.children ||
- ssitem.children.length === 0 ||
- !allNoMenu(ssitem.children)) &&
- ssitem.menuType === '3' &&
- Number(ssitem.status)
- "
- :key="ssitem.id"
- >
- <template>
- <div></div>
- </template>
- </el-menu-item>
- <!-- 分割线 END -->
- <el-menu-item
- @click.native="
- selectMenu(ssitem, [
- { menuId: 1, menuLabel: item.name },
- { menuId: 2, menuLabel: sitem.name },
- { menuId: 3, menuLabel: ssitem.name }
- ])
- "
- :index="index + '-' + sindex + '-' + ssindex"
- v-if="
- (!ssitem.children ||
- ssitem.children.length === 0 ||
- !allNoMenu(ssitem.children)) &&
- (ssitem.menuType === '1' || ssitem.menuType === '4') &&
- Number(ssitem.status)
- "
- :key="ssitem.id"
- >{{ ssitem.name }}</el-menu-item
- >
- </template>
- </el-submenu>
- <!-- 停用菜单 -->
- <el-menu-item
- :index="index + '-' + sindex"
- class="closeMenu"
- v-if="Number(sitem.status) === 0"
- :key="sitem.id"
- >
- {{ sitem.name }}
- </el-menu-item>
- <el-menu-item
- @click.native="
- selectMenu(sitem, [
- { menuId: 1, menuLabel: item.name },
- { menuId: 2, menuLabel: sitem.name }
- ])
- "
- :index="index + '-' + sindex"
- v-if="
- (!sitem.children ||
- sitem.children.length === 0 ||
- !allNoMenu(sitem.children)) &&
- (sitem.menuType === '1' || sitem.menuType === '4') &&
- Number(sitem.status)
- "
- :key="sitem.id"
- >{{ sitem.name }}</el-menu-item
- >
- </template>
- </el-submenu>
- </el-menu>
- </div>
- <section
- class="sl-container"
- :class="{ 'sl-container2': menuType === '2' }"
- id="mainContainer"
- >
- <header class="sl-header">
- <div v-if="showIframe" class="sl-header-ul">
- <!-- <div class="sl-header-li-name">工业互联网平台 ICP-iCore 2.0</div> -->
- <!-- <div class="hnstLogo">
- <img src="../assets/img/logo_1.png" alt="" />
- </div> -->
- <!-- 下拉选择公司 -->
- <div
- class="company-select"
- v-if="companys !== '' && companys.length >= 1"
- >
- <span
- class="ifCompany el-dropdown-link"
- v-if="companys.length === 1"
- >
- {{ companyName }}
- </span>
- <el-dropdown trigger="click" @command="selectComPany" v-else>
- <span class="el-dropdown-link">
- {{ companyName }}
- <i class="el-icon-arrow-down el-icon--right"></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <div v-for="item in companys" :key="item.id">
- <el-dropdown-item :command="item">
- {{ item.companyName }}
- </el-dropdown-item>
- </div>
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown
- trigger="click"
- @command="selectOrg"
- v-if="orgDutyLinks.length > 0"
- :style="{
- marginLeft: !styleControll ? '50px' : '20px',
- fontSize: '12px'
- }"
- >
- <span class="el-dropdown-link"
- ><!--<i class="el-icon-arrow-down el-icon--right"></i>-->
- {{ orgName }}
- </span>
- <el-dropdown-menu slot="dropdown">
- <div v-for="item in orgDutyLinks" :key="item.orgId">
- <el-dropdown-item :command="item">{{
- item.orgName
- }}</el-dropdown-item>
- </div>
- </el-dropdown-menu>
- </el-dropdown>
- <!-- <span style="margin-left: 20px; font-size: 12px">{{
- dutyName
- }}</span> -->
- </div>
- <div class="sl-header-li-lgbc">
- <span class="icore-icons icore-icons-right-arrow am-xz"></span>
- <span class="sl-breadcrumb-text">当前位置:</span>
- <el-breadcrumb
- separator-class="el-icon-arrow-right"
- class="sl-breadcrumb-list"
- >
- <el-breadcrumb-item
- v-for="item in pageBreadcrumb"
- :key="'bdb' + item.menuId"
- >{{ item.menuLabel }}</el-breadcrumb-item
- >
- </el-breadcrumb>
- </div>
- <!--通知信息-->
- <div
- class="sl-header-li-websocket"
- @mouseenter="updatecss"
- @mouseleave="leave"
- >
- <el-badge
- :value="taskAllNum"
- :max="99"
- class="item"
- style="margin-right: 20px"
- :hidden="badgeshow"
- >
- <el-button type="text" size="small" @click="goMyTaskPage" style="padding:3px"
- > <i class="el-icon-message-solid" style="font-size: 20px;"></i></el-button
- >
- </el-badge>
- <div
- class="Web_Notice"
- v-show="socketshow"
- style="z-index: 1 ; overflow-y: scroll"
- >
- <div class="workspace_row-grid_mytask">
- <div
- class="workspace_message"
- v-for="(item, index) in noticedata"
- :key="index"
- @click="seeTaskContent(item)"
- >
- <div class="workspace_message-title">
- 标题: {{ item.noticetitle }}
- </div>
- <div class="workspace_message-content">
- 内容:{{ item.noticecontent }}
- </div>
- <div class="workspace_message-from">
- 来自: {{ item.insertusername }}
- </div>
- <div class="workspace_message-date">
- 时间:{{ item.inserttime }}
- </div>
- <div style="height: 20px"></div>
- <el-divider></el-divider>
- </div>
- <div class="workspace_replace_item"></div>
- </div>
- </div>
- </div>
- <div class="theme-defined">
- <div
- @click="fullScreenEvent"
- :class="fullScreen ? 'icore-return-screen' : 'icore-full-screen'"
- :title="fullScreen ? '退出全屏' : '全屏'"
- ></div>
- <div @click="themeEvent" class="icore-theme" title="主题"></div>
- <div @click="lockEvent" class="icore-lock" title="锁屏"></div>
- <div @click="backMain" class="icore-main" title="主页"></div>
- </div>
- </div>
- </header>
- <div class="sl-content-main">
- <template v-if="showIframe">
- <default-vue
- :menuData="menuData"
- @gotoSetPage="gotoSetPage"
- v-if="tabsData.length === 0"
- ></default-vue>
- <el-tabs
- id="menuTabId"
- v-show="tabsData.length > 0"
- v-model="selectedMenu"
- type="card"
- closable
- @tab-remove="removeTab"
- @tab-click="handleClick"
- style="padding: 10px 0px 0px; height: 100%"
- >
- <el-tab-pane
- :label="item.name"
- :name="item.menuId"
- :key="item.menuId"
- v-for="(item, index) in tabsData"
- >
- <span @contextmenu="rightShow($event, index, item)" slot="label">
- {{ item.name }}
- </span>
- <div class="pageBreadcrumb">
- {{ JSON.stringify(item.pageBreadcrumb) }}
- </div>
- <iframe
- :src="
- isDev(item.menuUrl)
- ? getDevUrl(item.menuUrl)
- : toTrustUrl(item.menuUrl)
- "
- :style="minHeight"
- ></iframe>
- </el-tab-pane>
- </el-tabs>
- <div class="contextmenu">
- <el-dropdown
- trigger="click"
- @visible-change="visibleChange"
- @command="handleCommand"
- >
- <span class="el-dropdown-link" v-show="false">
- 下拉菜单<i
- id="setClick"
- class="el-icon-arrow-down el-icon--right"
- ></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item command="a">关闭标签页</el-dropdown-item>
- <el-dropdown-item :disabled="tabsData.length === 1" command="b"
- >关闭其他标签页</el-dropdown-item
- >
- <el-dropdown-item
- :disabled="tabsData.length - menuTabIndex === 1"
- command="c"
- >关闭右侧标签页</el-dropdown-item
- >
- <el-dropdown-item command="d">刷新当前标签页</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </template>
- <transition
- enter-active-class="fade-in"
- leave-active-class="leave-immediately"
- :duration="{ enter: 400, leave: 100 }"
- ref="childrenPage"
- >
- <router-view
- @updateTaskNum="updateTaskNum"
- @updateMessageNum="updateMessageNum"
- >
- </router-view>
- </transition>
- </div>
- </section>
- <!-- -->
- <div
- is="usersAddAndEdit"
- v-if="userModal.show"
- :operate="'edit'"
- :operate1="'index'"
- :item="userInfo"
- @on-then="userModalThen"
- @on-close="userModalClose"
- @editFinish="updataUserInfo"
- ></div>
- <!-- -->
- <!-- 修改密码 -->
- <el-dialog
- ref="pwdModal"
- :visible.sync="pwdModal.show"
- class="oa-pwd-modal"
- title="修改密码"
- width="500px"
- @open="openPwd"
- >
- <el-form
- ref="pwdModal"
- :model="pwdModal.form"
- :rules="pwdModal.ruleValidate"
- label-width="120px"
- style="padding-right: 40px"
- >
- <el-form-item label="原密码" prop="userid" v-show="false">
- <el-input
- size="small"
- type="text"
- v-model="pwdModal.form.userid"
- :maxlength="64"
- ></el-input>
- </el-form-item>
- <el-form-item label="原密码" prop="prepassword">
- <el-input
- size="small"
- type="password"
- v-model="pwdModal.form.prepassword"
- :maxlength="64"
- ></el-input>
- </el-form-item>
- <el-form-item label="新密码" prop="newpassword">
- <el-input
- size="small"
- type="password"
- @input="inputThing"
- v-model="pwdModal.form.newpassword"
- :maxlength="64"
- ></el-input>
- <div
- class="strongBox"
- v-show="strongShow"
- :style="{ backgroundColor: strongColor }"
- >
- {{ strongText }}
- </div>
- </el-form-item>
- <el-form-item label="确认密码" prop="againNewpassword">
- <el-input
- size="small"
- type="password"
- v-model="pwdModal.form.againNewpassword"
- :maxlength="64"
- ></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button size="small" @click="pwdModal.show = false">取 消</el-button>
- <el-button
- size="small"
- :loading="pwdModal.loading"
- type="primary"
- @click="pwdSubmit('pwdModal')"
- >确 定</el-button
- >
- </div>
- </el-dialog>
- <!-- 锁屏 -->
- <el-dialog
- title="锁屏"
- v-if="lockEventFlag"
- :visible.sync="lockEventFlag"
- width="500px"
- >
- <el-form
- :model="lockRuleForm"
- :rules="lockRules"
- ref="lockRuleForm"
- label-width="150px"
- >
- <el-form-item label="锁屏密码" prop="pwd">
- <el-input
- :class="checkedByLogin ? 'lockInput' : ''"
- :disabled="checkedByLogin"
- @keyup.enter.native="lockEventSet"
- v-model="lockRuleForm.pwd"
- style="width: 250px"
- ></el-input>
- <el-checkbox v-model="checkedByLogin">使用登录密码</el-checkbox>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="lockEventFlag = false">取 消</el-button>
- <el-button type="primary" @click="lockEventSet">确 定</el-button>
- </div>
- </el-dialog>
- <!-- /修改密码 -->
- <div v-if="lockScreenPwd" class="lock_screen">
- <div
- v-if="lockErrorMsg"
- class="el-message el-message--error"
- style="z-index: 2033"
- >
- <i class="el-message__icon el-icon-error"></i>
- <p class="el-message__content">密码错误!</p>
- </div>
- <div
- style="
- margin: 0 auto;
- width: 300px;
- position: relative;
- top: 45%;
- transform: translateY(-50%);
- "
- >
- <div>
- <el-input
- ref="lockInput"
- class="lockInput"
- placeholder="请输入密码"
- @keyup.enter.native="setLock"
- type="text"
- v-model="inputLockPwd"
- >
- <template slot="append">
- <div @click="setLock" class="lock_route">
- <i class="el-icon-back"></i>
- </div>
- </template>
- </el-input>
- </div>
- <div style="padding: 10px">
- 忘记密码?
- <a
- @click="lockSignOut"
- style="text-decoration: underline; color: #409eff; cursor: pointer"
- >退出登录</a
- >
- </div>
- </div>
- </div>
- <!-- 切换主题 -->
- <el-dialog
- title="选择主题"
- v-if="themeSetFlag"
- :visible.sync="themeSetFlag"
- width="30%"
- >
- <el-radio-group v-model="current_theme">
- <el-radio
- :label="theme.label"
- :key="theme.label"
- v-for="theme in theme_group"
- >{{ theme.desc }}</el-radio
- >
- </el-radio-group>
- <div slot="footer" class="dialog-footer"></div>
- </el-dialog>
- <!-- 权限被修改 -->
- <el-dialog
- v-if="privilegeUpdateIfo"
- :visible.sync="privilegeUpdateIfo"
- width="35%"
- top="20vh"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false"
- class="privilegeArea"
- >
- <span v-if="closeSecond > 0" style="font-size: 18px; color: #333">
- <i class="el-icon-warning"></i>
- {{ ' 您的权限已被管理员修改,' + closeSecond + 's后将自动退出' }}
- </span>
- <span v-else style="font-size: 20px; color: #f56c6c">
- <i class="el-icon-loading"></i>
- {{ '正在为您退出,请稍后...' }}
- </span>
- <div slot="footer" class="dialog-footer" v-if="closeSecond > 0">
- <el-button type="primary" size="small" @click="closeConfirm"
- >确 定</el-button
- >
- </div>
- </el-dialog>
- <!--通知弹窗-->
- <el-dialog
- :visible.sync="centerDialogVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false">
- <div style="margin-left: 30px; font-size: 20px">
- <h1>{{ noticedata1.noticetitle }}</h1>
- </div>
- <div style="height: 20px"></div>
- <div style="margin-left: 30px">
- <i class="el-icon-document"></i>{{ noticedata1.noticecontent }}
- </div>
- <el-divider></el-divider>
- <div style="margin-left: 30px">
- <i class="el-icon-user-solid"></i>
- {{ noticedata1.insertusername }}
- </div>
- <div style="margin-left: 30px"><i></i>{{ noticedata1.inserttime }}</div>
- <span slot="footer" class="dialog-footer">
- <el-button type="primary" @click="makeSure">确 定</el-button>
- </span>
- </el-dialog>
- <!--通知-->
- <!-- <div class="Web_Notice">
- <span class="margin_R10">
- <i class="el-icon-message iconImg"></i>
- <el-badge :value="taskAllNum" :max="99" :hidden="taskAllNum < 1"></el-badge>
- </span>
- </div>-->
- </div>
- </template>
- <script>
- import element_css_json_import from '../assets/json/element_css.js'
- import objectAssign from 'object-assign'
- import generateColors from './utils/color'
- import usersAddAndEdit from '@/views/systemConfig/components/usersAddAndEdit.vue'
- import { getCookie } from '@/utils/util.js'
- import { checkCharLength } from '@/utils/validator.js'
- import store from '@/store/index.js'
- // 字典数据
- import dataDictionary from '@/store/dataDictionary.js'
- // import defaultVue from "./defaultVue.vue";
- import defaultVue from '@/views/homepage/components/homepage.vue'
- import { proPath } from '@/config/config.js'
- import draggable from 'vuedraggable'
- export default {
- components: {
- usersAddAndEdit,
- defaultVue
- },
- data() {
- const validateLockPass = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请输入锁屏密码'))
- } else {
- let reg = /^[A-Za-z0-9]+$/
- if (!reg.test(value)) {
- return callback(new Error('请输入英文和数字'))
- }
- callback()
- }
- }
- const validatePass = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请输入新密码'))
- } else {
- if (this.regular !== '') {
- let reg = eval('/' + this.regular + '/')
- if (!reg.test(value)) {
- let message =
- this.regularType === 1
- ? '至少包含英文、数字、特殊符号中的两种!'
- : ''
- message +=
- '长度需在' + this.minLength + '-' + this.maxLength + '之间'
- return callback(new Error(message))
- }
- } else {
- this.getPwdValid()
- this.$refs.pwdModal.validateField('newpassword')
- }
- // let reg = /^[A-Za-z0-9]+$/
- // if (!reg.test(value)) {
- // return callback(new Error('请输入英文和数字'));
- // }
- if (this.pwdModal.form.againNewpassword !== '') {
- // 对第二个密码框单独验证
- this.$refs.pwdModal.validateField('againNewpassword')
- }
- callback()
- }
- }
- const validatePassCheck = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请再次输入新密码'))
- } else if (value !== this.pwdModal.form.newpassword) {
- callback(new Error('两次输入密码不一致'))
- } else {
- callback()
- }
- }
- return {
- centerDialogVisible: false,
- badgeshow: '',
- dutyName: '',
- regular: '', // 密码策略校验正则表达式
- regularType: '',
- minLength: 0,
- maxLength: 0,
- websocket: '',
- interval: '',
- companys: [], // 用户公司列表
- companyId: '', // 选择公司Id
- companyName: '', // 选择公司名称
- checkedByLogin: false,
- strongShow: false,
- digit: false,
- strongText: '',
- strongColor: '',
- originalStyle: '',
- colors: {
- primary: '#20a0ff'
- },
- theme_color: '#409EFF',
- current_theme: 'deepBlue_theme',
- theme_group: [
- {
- label: 'basic_theme',
- desc: '默认主题'
- },
- {
- label: 'green_theme',
- desc: '护眼主题'
- },
- {
- label: 'deepBlue_theme',
- desc: '深蓝色主题'
- },
- {
- label: 'dark_theme',
- desc: '黑色主题'
- },
- {
- label: 'red_theme',
- desc: '红色主题'
- },
- {
- label: 'Cyan_theme',
- desc: '青色主题'
- },
- {
- label: 'yellow_theme',
- desc: '黄色主题'
- }
- ],
- theme_origin_color: {
- basic_theme: '#409EFF',
- deepBlue_theme: '#072ec5',
- dark_theme: '#000000',
- red_theme: '#F20808',
- green_theme: '#008000',
- Cyan_theme: '#00ffff',
- yellow_theme: '#FFFF00'
- },
- themeSetFlag: false,
- lockErrorMsg: false,
- inputLockPwd: '',
- lockScreenPwd: window.top.localStorage.getItem('lockpwd'),
- lockEventFlag: false,
- lockRuleForm: {
- pwd: ''
- },
- lockRules: {
- pwd: [
- {
- required: true,
- message: '请输入锁屏密码',
- trigger: 'blur'
- },
- {
- min: 1,
- max: 128,
- message: '长度在 1 到 128 个字符',
- trigger: 'change'
- },
- {
- validator: validateLockPass,
- trigger: 'change'
- }
- ]
- },
- fullScreen: false,
- oldMinHeight: 0,
- minHeight: 'width: 100%;height: 100%;border: 0px;min-height: 777px',
- menuTabIndex: 0,
- pageBreadcrumb: [
- {
- menuId: 1,
- menuLabel: '首页'
- }
- ],
- widthLog: '',
- leftLog: '',
- dragFlag: false,
- store,
- dataDictionary,
- showIframe: false,
- selectedMenu: '',
- menuType: '2',
- menuData: store.state.routes,
- tabsData: [],
- userInfo: {},
- userModal: {
- show: false
- },
- // 修改密码
- pwdModal: {
- loading: false,
- show: false,
- form: {
- userid: '',
- prepassword: '',
- newpassword: '',
- // 重复密码
- againNewpassword: ''
- },
- ruleValidate: {
- prepassword: [
- {
- required: true,
- message: '原密码不能为空',
- trigger: 'blur'
- }
- ],
- newpassword: [
- {
- required: true,
- message: '新密码不能为空',
- trigger: 'blur'
- },
- // { type: 'string', max: 64, message: '密码不能多于64个字符', trigger: 'blur' },
- {
- validator: validatePass,
- trigger: 'blur'
- }
- ],
- againNewpassword: [
- {
- required: true,
- message: '确认密码不能为空',
- trigger: 'blur'
- },
- // { type: 'string', max: 64, message: '密码不能多于64个字符', trigger: 'blur' },
- {
- validator: validatePassCheck,
- trigger: 'blur'
- }
- ]
- }
- },
- inter: undefined,
- task1Num: 0, // 我的待办任务
- task2Num: 0, // 委托待办任务
- myMessageLength: 0, // 我收到的公告
- privilegeUpdateIfo: false, // 权限被修改后退出提示框
- closeSecond: 5, // 系统退出倒计时
- mainPageList: [], //设为主页的菜单页面
- orgName: '',
- orgId: '',
- orgCode: '',
- orgDutyLinks: [],
- styleControll: false,
- dutyId: '',
- appId: '',
- defaultActiveIndex: '',
- taskAllNum: '', //任务数目
- socketshow: false, //通知框的显示
- orgcodezs: '', //cookie中的orgcode
- userId: '', //cookie中的userId
- noticedata: [],
- noticedata1: {
- noticeTitle: 'ceshi',
- noticecontent: 'ceshi',
- insertusername: 'ceshi',
- inserttime: 'ceshi'
- },
- allowed: []
- }
- },
- created() {
- this.orgcodezs = getCookie('orgCode')
- this.userId = getCookie('userId')
- this.current_theme = window.top.localStorage.getItem('current_theme')
- ? window.top.localStorage.getItem('current_theme')
- : 'deepBlue_theme'
- this.theme_color = this.theme_origin_color[this.current_theme]
- this.getIndexStyle()
- let w = document.documentElement.clientWidth || document.body.clientWidth
- let h = document.documentElement.clientHeight || document.body.clientHeight
- if (w <= 1500) {
- this.styleControll = true
- } else {
- this.styleControll = false
- }
- console.log(this.$route, 'this.route')
- console.log('获取到的orgCode+++++++++++++' + this.orgcodezs)
- this.getinformation()
- let timer=setInterval(()=>{
- this.getinformation()
- },1000*60)
- },
- destroyed() {
- // 销毁浏览器返回监听
- // window.removeEventListener('popstate', this.goBack, false);
- clearInterval(this.inter)
- // 销毁websocket监听
- // this.websocket.onclose = this.close();
- },
- computed: {},
- beforeCreate() {
- let userId = getCookie('userId')
- this.appId = getCookie('appId')
- let menuId = window.top.localStorage.getItem('activeMenu')
- let companyId = window.top.localStorage.getItem('companyId')
- },
- watch: {
- checkedByLogin: function(n) {
- if (n) {
- try {
- this.lockRuleForm.pwd = JSON.parse(getCookie('userInfo')).password
- } catch (error) {
- this.lockRuleForm.pwd = ''
- }
- } else {
- this.lockRuleForm.pwd = ''
- }
- },
- theme_color: function(newV, oldV) {
- let that = this
- that.colors.primary = newV
- console.log(newV)
- console.log($(document.getElementsByTagName('iframe')))
- window.colorVal = newV
- that.primaryColor = this.colors.primary
- that.colors = objectAssign(
- {},
- that.colors,
- generateColors(that.colors.primary)
- )
- let theme_style = that.originalStyle
- Object.keys(that.colors).forEach(key => {
- theme_style = theme_style.replace(
- new RegExp('(:|\\s+)' + key, 'g'),
- '$1' + that.colors[key]
- )
- })
- that.loadNewStyle(document, theme_style)
- for (let i = 0; i < document.getElementsByTagName('iframe').length; i++) {
- try {
- that.loadNewStyle(
- document.getElementsByTagName('iframe')[i].contentDocument,
- theme_style
- )
- } catch (err) {}
- }
- },
- current_theme: function(n) {
- let that = this
- window.top.localStorage.setItem('current_theme', n)
- that.theme_color = that.theme_origin_color[n]
- console.log(that.theme_color)
- console.log('这是')
- for (let i = 0; i < document.getElementsByTagName('iframe').length; i++) {
- console.log(
- document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName('mainVueIndex')[0]
- .className
- )
- try {
- document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName(
- 'mainVueIndex'
- )[0].className = 'main mainVueIndex ' + n
- } catch (err) {}
- }
- },
- menuType: function(newV, oldV) {
- let that = this
- if (newV === '2') {
- that.$nextTick(function() {
- $('.icore-menu-main2').css({
- width: that.widthLog
- })
- $('.sl-container2').css({
- 'padding-left': that.leftLog
- })
- $('.oa-header-user').css({
- width: that.widthLog
- })
- $('.oa-header-upt').css({
- width: ''
- })
- that.setDrag()
- })
- } else {
- that.widthLog = $('.icore-menu-main2').css('width')
- that.leftLog = $('.sl-container2').css('padding-left')
- $('.icore-menu-main2').css({
- width: ''
- })
- $('.sl-container2').css({
- 'padding-left': ''
- })
- $('.oa-header-user').css({
- width: '80px'
- })
- $('.oa-header-upt').css({
- width: '80px'
- })
- }
- },
- selectedMenu: function(menuId) {
- var currentMenu = this.getMenuIndexByMenuId(this.menuData, null, menuId)
- currentMenu &&
- window.top.localStorage.setItem(
- 'currentMenuIndex',
- currentMenu.menuIndex
- )
- }
- },
- mounted() {
- let that = this
- window.onresize = function() {
- let isFull =
- document.fullscreen ||
- document.webkitIsFullScreen ||
- document.msFullscreenEnabled
- isFull = isFull ? true : false
- if (that.fullScreen !== isFull) {
- //要执行的动作
- that.fullScreen = isFull
- }
- }
- // // 监控浏览器返回
- // if (window.history && window.history.pushState) {
- // history.pushState(null, null, document.URL);
- // window.addEventListener('popstate', this.goBack, false);
- // }
- // 取字典(用处不明,且加入租户id后报错!!!!!暂时注释掉!!!!!!!!!!)
- // this.dataDictionary.dispatch('list').then(() => {
- // // console.log(this.dataDictionary.state.dict)
- // });
- this.showIframeEvent()
- this.$nextTick(() => {
- this.minHeight =
- 'width: 100%;height: 100%;border: 0px;min-height: ' +
- ($('#menuTabId').height() - 91) +
- 'px'
- that.checkedByLogin = true
- })
- // 获取公司信息
- this.companyId = window.top.localStorage.getItem('companyId')
- this.companys = JSON.parse(window.top.localStorage.getItem('companys'))
- if (this.companyId !== '' && this.companyId !== null) {
- this.companyName = this.companys.find(
- x => x.id === this.companyId
- ).companyName
- }
- setTimeout(() => {
- this.current_theme = window.top.localStorage.getItem('current_theme')
- ? window.top.localStorage.getItem('current_theme')
- : 'deepBlue_theme'
- }, 1000)
- // 获取我的待办任务
- var arr = ['#/authManage']
- if ($.inArray(location.hash, arr) == -1) {
- //that.getMyToDoDelegateTask();
- //that.getMyToDoTask();
- }
- that.getMyMessage()
- // 直接关闭浏览器窗口或者标签页时,关闭websocket连接
- // window.onbeforeunload = function () {
- // // that.send("closesocket:");
- // that.close();
- // }
- // 获取当前密码策略校验
- that.getPwdValid()
- // 获取机构职级
- that.getOrgDutyList()
- },
- methods: {
- //弹框删除
- async makeSure() {
- let noticeid = this.noticedata1.noticeid
- console.log(this.noticedata1)
- this.noticedata1 = []
- this.centerDialogVisible = false
- await this.axios
- .post('/api/v1/ams/updateNoticeStatus', {
- userId: this.userId,
- noticeId: noticeid
- })
- .then(res => {
- console.log(res.data)
- if (res.data.data === 0) {
- this.badgeshow = true
- } else {
- console.log('进入了小红点标记区')
- this.taskAllNum = res.data.data
- }
- })
- this.getinformation()
- },
- // 判断是否为公司其他平台模块且处于开发模式
- isDev(url) {
- let isDevModule = false
- if (
- url.indexOf('steerinfo.com') !== -1 &&
- document.domain.indexOf('steerinfo.com') === -1
- ) {
- isDevModule = true
- }
- return isDevModule
- },
- // 根据当前模式更改菜单跳转url
- getDevUrl(url) {
- let newUrl = ''
- let index = url.indexOf('steerinfo.com')
- return (newUrl = url.substring(index).replace('steerinfo.com/views', '.'))
- },
- // 根据https/http跳转
- toTrustUrl(url) {
- let newUrl = ''
- if (url.indexOf('https:') === -1 && url.indexOf('http:') > -1) {
- newUrl = url.replace('http:', window.top.location.protocol)
- } else if (url.indexOf('https:') > -1) {
- newUrl = url.replace('https:', window.top.location.protocol)
- } else {
- newUrl = url
- }
- return newUrl
- },
- // 获取当前密码策略
- getPwdValid() {
- this.axios
- .get('pass/v1/syspwdpolicys/getExecutingPwdPolicy')
- .then(res => {
- if (res.code === '0') {
- this.regular = res.data.regular
- this.regularType = res.data.regularType
- this.minLength = res.data.minLength
- this.maxLength = res.data.maxLength
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(err => {
- console.log(err)
- })
- },
- /**
- * 样式加载
- *
- */
- loadNewStyle(doc, theme_style) {
- let child = doc.getElementById('theme')
- if (child !== null) {
- doc.getElementsByTagName('head')[0].removeChild(child)
- }
- let a = document.createElement('style')
- a.setAttribute('id', 'theme')
- a.innerHTML = theme_style
- doc.getElementsByTagName('head')[0].appendChild(a)
- },
- // 验证密码强度的事件
- inputThing(val) {
- let _this = this
- let arr = []
- let i = 0
- arr[0] = /[^a-zA-Z0-9_]/g
- arr[1] = /[a-z]/g
- arr[2] = /[0-9]/g
- arr[3] = /[A-Z]/g
- if (val.length >= 6) {
- arr.forEach(res => {
- if (val.match(res)) {
- i++
- }
- })
- switch (i) {
- case 0:
- _this.strongShow = false
- break
- case 1:
- _this.strongShow = true
- _this.strongText = '弱'
- _this.strongColor = '#F26299'
- _this.digit = true
- break
- case 2:
- _this.strongShow = true
- _this.strongText = '中'
- _this.strongColor = '#F29E55'
- break
- case 3:
- _this.strongShow = true
- _this.strongText = '强'
- _this.strongColor = '#4CD995'
- break
- }
- } else if (!val) {
- _this.strongShow = false
- } else {
- _this.strongShow = true
- _this.strongText = '弱'
- _this.strongColor = '#F26299'
- _this.digit = false
- }
- },
- /**
- * 加载全局样式;
- */
- getStyleTemplate(data) {
- const colorMap = {
- '#3a8ee6': 'shade-1',
- '#409eff': 'primary',
- '#53a8ff': 'light-1',
- '#66b1ff': 'light-2',
- '#79bbff': 'light-3',
- '#8cc5ff': 'light-4',
- '#a0cfff': 'light-5',
- '#b3d8ff': 'light-6',
- '#c6e2ff': 'light-7',
- '#d9ecff': 'light-8',
- '#ecf5ff': 'light-9'
- }
- Object.keys(colorMap).forEach(key => {
- const value = colorMap[key]
- data = data.replace(new RegExp(key, 'ig'), value)
- })
- return data
- },
- getIndexStyle() {
- let data = `@charset "UTF-8"; ${element_css_json_import.element_css}`
- this.originalStyle = this.getStyleTemplate(data)
- },
- /**
- * 解除锁屏
- *
- */
- setLock() {
- let that = this
- let crypto = require('crypto')
- if (
- that.lockScreenPwd === that.inputLockPwd ||
- that.lockScreenPwd ===
- crypto
- .createHash('sha1')
- .update(that.inputLockPwd)
- .digest('hex')
- ) {
- window.top.localStorage.setItem('lockpwd', '')
- that.lockScreenPwd = ''
- that.inputLockPwd = ''
- } else {
- that.inputLockPwd = ''
- that.lockErrorMsg = true
- setTimeout(() => {
- that.lockErrorMsg = false
- }, 1000)
- }
- },
- /**
- * 锁屏退出登录
- */
- lockSignOut() {
- let that = this
- that.store
- .dispatch('loginOut')
- .then(function(res) {
- window.location.href = './index.html'
- })
- .catch(function() {
- // TODO
- })
- },
- /**
- *打开主页
- */
- backMain() {
- this.$message.success('跳转主页')
- // window.open(
- // window.location.protocol + "//portal.steerinfo.com",
- // "_blank"
- // );
- },
- /**
- * 主题
- */
- themeEvent() {
- let that = this
- that.themeSetFlag = true
- },
- /**
- * 锁屏
- */
- lockEvent() {
- let that = this
- if (!that.checkedByLogin) {
- that.lockRuleForm.pwd = ''
- }
- that.lockEventFlag = true
- },
- lockEventSet() {
- let that = this
- this.$refs.lockRuleForm.validate(valid => {
- if (valid) {
- window.top.localStorage.setItem('lockpwd', that.lockRuleForm.pwd)
- that.lockScreenPwd = that.lockRuleForm.pwd
- that.lockEventFlag = false
- that.$nextTick(() => {
- that.$refs.lockInput.focus()
- })
- } else {
- return false
- }
- })
- },
- /*
- 全屏
- */
- fullScreenEvent() {
- let that = this
- let main = document.documentElement
- if (that.fullScreen) {
- if (document.exitFullscreen) {
- document.exitFullscreen()
- } else if (document.mozCancelFullScreen) {
- document.mozCancelFullScreen()
- } else if (document.webkitCancelFullScreen) {
- document.webkitCancelFullScreen()
- } else if (document.msExitFullscreen) {
- document.msExitFullscreen()
- }
- } else {
- // 开始全屏操作
- var currentIfrm = $('#menuTabId')
- .find('div[role=tabpanel]:visible')
- .find('iframe')
- $('.oa-header-user')
- .hide()
- .next()
- .hide()
- $('#outerHeader').hide()
- $('#mainContainer').css('paddingLeft', '0')
- $('#menuTabId')
- .css('padding', 0)
- .children(':eq(0)')
- .hide()
- $('.sl-content-main', top.document).css('height', 'initial')
- // 先保留全屏前的iframe高度
- this.oldMinHeight = currentIfrm.css('min-height')
- // 将最小高度设置成当前分辨率的高度
- currentIfrm.css('min-height', window.screen.height)
- if (main.requestFullscreen) {
- main.requestFullscreen()
- } else if (main.mozRequestFullScreen) {
- main.mozRequestFullScreen()
- } else if (main.webkitRequestFullScreen) {
- main.webkitRequestFullScreen()
- } else if (main.msRequestFullscreen) {
- main.msRequestFullscreen()
- }
- }
- that.fullScreen = !that.fullScreen
- },
- // 下拉选择公司
- selectComPany(command) {
- this.$confirm('此操作将刷新系统页面, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- this.companyId = command.id
- this.companyName = command.companyName
- // 查询列表
- this.store
- .dispatch('generateRoutes', {
- companyId: command.id,
- appId: this.appId
- })
- .then(res => {
- if (res.code === '0') {
- this.store.commit('addRouters', res.data)
- } else {
- this.$message({
- message: res.message,
- type: 'error'
- })
- }
- })
- window.top.localStorage.setItem('companyId', command.id)
- window.location.reload()
- this.$message({
- type: 'success',
- message: '正在为您更新数据...'
- })
- })
- .catch(error => {
- console.log(error)
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
- })
- },
- selectOrg(command) {
- this.$confirm('此操作将切换用户所在机构及职级, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- this.orgName = command.orgName
- this.orgId = command.orgId
- this.dutyName = command.dutys ? command.dutys[0].dutyName : ''
- this.dutyId = command.dutys ? command.dutys[0].dutyId : ''
- window.top.localStorage.setItem('dutyName', this.dutyName)
- window.top.localStorage.setItem('dutyId', this.dutyId)
- window.top.localStorage.setItem('orgId', command.orgId)
- window.top.localStorage.setItem('orgCode', command.orgCode)
- window.location.reload()
- this.$message({
- type: 'success',
- message: '正在为您更新数据...'
- })
- this.updateUserInfo()
- })
- .catch(error => {
- console.log(error)
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
- })
- },
- // 更新用户当前机构及职级
- async updateUserInfo() {
- // do
- },
- getOrgDutyList() {
- let that = this
- that.axios
- .get('pass/v1/sysorgs/findOrgs?companyId=' + this.companyId)
- .then(res => {
- if (res.code === '0') {
- this.orgDutyLinks = res.data
- if (this.orgDutyLinks.length > 0) {
- let orgId = window.top.localStorage.getItem('orgId')
- if (orgId && orgId !== '' && orgId !== null) {
- let obj = this.orgDutyLinks.find(x => x.orgId === orgId)
- if (obj) {
- this.orgId = orgId
- this.orgName = obj.orgName
- this.orgCode = obj.orgCode
- this.dutyName = obj.dutys ? obj.dutys[0].dutyName : ''
- this.dutyId = obj.dutys ? obj.dutys[0].dutyId : ''
- } else {
- this.orgName = res.data[0].orgName
- this.orgId = res.data[0].orgId
- this.orgCode = res.data[0].orgCode
- this.dutyName = res.data[0].dutys
- ? res.data[0].dutys[0].dutyName
- : ''
- this.dutyId = res.data[0].dutys
- ? res.data[0].dutys.dutyId
- : ''
- }
- } else {
- this.orgName = res.data[0].orgName
- this.orgId = res.data[0].orgId
- this.orgCode = res.data[0].orgCode
- this.dutyName = res.data[0].dutys
- ? res.data[0].dutys[0].dutyName
- : ''
- this.dutyId = res.data[0].dutys
- ? res.data[0].dutys[0].dutyId
- : ''
- this.updateUserInfo()
- }
- window.top.localStorage.setItem('orgId', this.orgId)
- window.top.localStorage.setItem('orgCode', this.orgCode)
- window.top.localStorage.setItem('dutyName', this.dutyName)
- window.top.localStorage.setItem('dutyId', this.dutyId)
- }
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(err => {
- console.log(err)
- })
- },
- visibleChange(f) {
- let that = this
- if (!f) {
- $('.contextmenu').css({
- display: 'none'
- })
- }
- },
- handleCommand(command) {
- let that = this
- switch (command) {
- case 'a': //关闭当前标签
- $('#menuTabId .el-icon-close')
- .eq(that.menuTabIndex)
- .click()
- break
- case 'b': //关闭其他标签
- var removeTarget = []
- var len = that.tabsData.length - that.menuTabIndex - 1
- for (let i = 0; i < len; i++) {
- removeTarget.push(
- $('#menuTabId .el-icon-close').eq(that.menuTabIndex + i + 1)
- )
- }
- for (let i = 0; i < that.menuTabIndex; i++) {
- removeTarget.push($('#menuTabId .el-icon-close').eq(i))
- }
- for (let i = 0; i < removeTarget.length; i++) {
- $(removeTarget[i]).click()
- }
- break
- case 'c': //关闭右侧标签
- var removeTarget = []
- var len = that.tabsData.length - that.menuTabIndex - 1
- for (let i = 0; i < len; i++) {
- removeTarget.push(
- $('#menuTabId .el-icon-close').eq(that.menuTabIndex + i + 1)
- )
- }
- for (let i = 0; i < removeTarget.length; i++) {
- $(removeTarget[i]).click()
- }
- break
- case 'd': // 刷新当前标签页
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- break
- }
- },
- // 右键菜单
- rightShow($event, index, item) {
- let that = this
- that.menuTabIndex = index
- $('.contextmenu').css({
- left: $event.pageX + 120 + 'px',
- top: $event.pageY + 'px',
- display: 'block'
- })
- $('#setClick').click()
- $event.preventDefault()
- },
- gotoSetPage(item) {
- let that = this
- let menuData = item.preTarget
- if (!menuData) {
- return
- }
- that.tabsData.push(menuData)
- that.selectedMenu = menuData.menuId
- that.pageBreadcrumb = item.pageBreadcrumb
- that.axios
- .post(proPath + 'v1/sysmenus/accessOwnAdd', {
- userId: that.$store.state.userInfo.userId,
- menuId: menuData.menuId
- })
- .then(function(response) {})
- .catch(function() {})
- },
- // 判断是否在iframe下
- showIframeEvent() {
- var that = this
- var thisDocument = document
- try {
- var topDocument = window.top.document
- } catch (err) {
- thisDocument.getElementsByClassName(
- 'icore-menu-main'
- )[0].style.display = 'none'
- thisDocument.getElementsByClassName('sl-header')[0].style.display =
- 'none'
- thisDocument.getElementById('mainContainer').style.padding = '0px'
- return
- }
- var routerCover = this.$router.history.current.query
- var routerParams = this.$router.history.current.params
- var routerFlag = 0
- var routerFlagP = 0
- for (var i in routerCover) {
- routerFlag = routerFlag + 1
- }
- for (var j in routerParams) {
- routerFlagP = routerFlagP + 1
- }
- that.showIframe =
- thisDocument === topDocument && routerFlag === 0 && routerFlagP === 0
- if (that.showIframe) {
- that.getUserInfo()
- thisDocument.getElementById('mainContainer').style['padding-left'] =
- '179px'
- // websocket初始化
- let token = getCookie('accessToken')
- if (token) {
- this.init(token)
- }
- // 打开设为主页的菜单
- // that.openMainPage();
- // 自动打开上一次访问页面
- that.autoOpenLatestPage()
- }
- if (routerFlag > 0 || routerFlagP > 0) {
- that.menuType = '1'
- }
- var setShowIframe = setInterval(function() {
- for (
- let i = 0;
- i < window.top.document.getElementsByTagName('iframe').length;
- i++
- ) {
- if (
- window.top.document.getElementsByTagName('iframe')[i]
- .contentDocument !== null &&
- window.top.document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName('icore-menu-main')
- .length > 0
- ) {
- $(
- window.top.document.getElementsByTagName('iframe')[i].parentNode
- .parentNode
- ).css({
- height: 'calc(100% - 31px)'
- })
- $(
- window.top.document.getElementsByTagName('iframe')[i].parentNode
- ).css({
- height: '100%'
- })
- window.top.document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName(
- 'icore-menu-main'
- )[0].style.display = 'none'
- window.top.document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName(
- 'sl-header'
- )[0].style.display = 'none'
- window.top.document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementsByClassName(
- 'sl-content-main'
- )[0].style.height = '100%'
- window.top.document
- .getElementsByTagName('iframe')
- [i].contentDocument.getElementById(
- 'mainContainer'
- ).style.padding = '0px'
- if (
- i ===
- window.top.document.getElementsByTagName('iframe').length - 1
- ) {
- clearInterval(setShowIframe)
- }
- }
- }
- if (window.top.document.getElementsByTagName('iframe').length === 0) {
- if (!that.showIframe) {
- thisDocument.getElementById('mainContainer').style['padding-left'] =
- '0px'
- thisDocument.getElementsByClassName(
- 'sl-content-main'
- )[0].style.height = '100%'
- }
- clearInterval(setShowIframe)
- }
- }, 20)
- that.setDrag()
- },
- handleOperate() {
- setTimeout(() => {
- this.$nextTick(() => {
- let heightOld = $('.icore-menu-main')[0].clientHeight
- let height = $('.icore-menu-main')[0].scrollHeight
- if (height !== 0) {
- // 菜单收缩后scrollHeight复原
- window.top.document.getElementsByClassName(
- 'menuDrag'
- )[0].style.height = heightOld + 'px'
- // 再次赋值
- let heightNew = $('.icore-menu-main')[0].scrollHeight
- window.top.document.getElementsByClassName(
- 'menuDrag'
- )[0].style.height = heightNew + 'px'
- }
- })
- }, 500)
- },
- setDrag() {
- let that = this
- if (that.showIframe) {
- that.$nextTick(() => {
- window.top.document.getElementsByClassName(
- 'menuDrag'
- )[0].style.height = $('.icore-menu-main')[0].scrollHeight + 'px'
- })
- }
- $('#menuDrag').unbind()
- $('#menuDrag').mousedown(function(event) {
- that.dragFlag = true
- $(event.target).data('dragStart', event.pageX)
- $(event.target).data('dragWidth', $('.icore-menu-main2').outerWidth())
- $('body').css({
- cursor: 'col-resize'
- })
- let _html =
- '<div id="dragsc" style="height: 100%;width: 100%;position: absolute;top: 0;z-index: 888;"></div>'
- $('body').append(_html)
- $('body').mousemove(function(e) {
- if (!that.dragFlag) {
- $(this).css({
- cursor: ''
- })
- $('#dragsc').remove()
- $(this).unbind(e)
- } else {
- var startX = $('#menuDrag').data('dragStart')
- var endX = e.pageX
- var change = endX - startX
- var containerWidth = $('#menuDrag').data('dragWidth')
- // console.log('containerWidth + change = ' + (containerWidth + change))
- if (containerWidth + change < 180) {
- $('.icore-menu-main2').css({
- width: '180px'
- })
- $('.oa-header-user').css({
- width: ''
- })
- $('.sl-container2').css({
- 'padding-left': '179px'
- })
- } else if (containerWidth + change <= 800) {
- $('.icore-menu-main2').css({
- width: containerWidth + change + 'px'
- })
- $('.sl-container2').css({
- 'padding-left': containerWidth + change - 1 + 'px'
- })
- $('.oa-header-user').css({
- width: containerWidth + change + 'px'
- })
- }
- }
- })
- $('body').mouseup(function(ev) {
- that.dragFlag = false
- $(this).unbind(ev)
- })
- })
- },
- // tabs选项选择
- handleClick(tab, event) {
- let that = this
- let pageBreadcrumb = $($('.pageBreadcrumb')[parseInt(tab.index)]).html()
- that.pageBreadcrumb = JSON.parse(pageBreadcrumb)
- window.top.localStorage.setItem('activeMenu', tab.name)
- that.menuTabIndex = that.getTabIndex(tab.name)
- for (let i = 0; i < this.mainPageList.length - 1; i++) {
- if (
- tab.name === this.mainPageList[i].menuId &&
- this.mainPageList[i].mainPageLoading === true
- ) {
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- this.mainPageList[i].mainPageLoading = false
- }
- }
- },
- removeTab(targetName) {
- var that = this
- var spliceIndex = null
- var temp = []
- for (let i = 0; i < this.mainPageList.length - 1; i++) {
- if (targetName === this.mainPageList[i].menuId) {
- this.mainPageList[i].mainPageLoading = false
- }
- }
- for (var i = 0; i < that.tabsData.length; i++) {
- temp.push(that.tabsData[i])
- if (targetName === that.tabsData[i].menuId) {
- spliceIndex = i
- }
- }
- if (spliceIndex !== null) {
- temp.splice(spliceIndex, 1)
- }
- if (that.selectedMenu === that.tabsData[spliceIndex].menuId) {
- if (temp.length !== 0) {
- var showIndex = spliceIndex
- if (showIndex > temp.length - 1) {
- showIndex = temp.length - 1
- }
- that.selectedMenu = temp[showIndex].menuId
- window.top.localStorage.setItem('activeMenu', that.selectedMenu)
- that.pageBreadcrumb = temp[showIndex].pageBreadcrumb
- } else {
- that.pageBreadcrumb = [
- {
- menuId: 1,
- menuLabel: '首页'
- }
- ]
- window.top.localStorage.setItem('currentMenuIndex', '')
- }
- }
- that.tabsData = temp
- },
- // 菜单选择
- selectMenu(menuData, pageBreadcrumb) {
- console.log('menuData')
- console.log(menuData)
- // console.log(pageBreadcrumb)
- var that = this
- if (
- menuData.menuUrl !== null &&
- menuData.menuUrl !== '' &&
- typeof menuData.menuUrl !== 'undefined'
- ) {
- window.top.localStorage.setItem('activeMenu', menuData.menuId)
- var temp = []
- menuData.pageBreadcrumb = pageBreadcrumb
- var setTabsFlag = true
- for (var i = 0; i < that.tabsData.length; i++) {
- if (menuData.menuId === that.tabsData[i].menuId) {
- setTabsFlag = false
- break
- }
- }
- if (setTabsFlag) {
- for (var j = 0; j < that.tabsData.length; j++) {
- temp.push(that.tabsData[j])
- }
- temp.push(menuData)
- that.tabsData.push(menuData)
- }
- that.selectedMenu = menuData.menuId
- that.pageBreadcrumb = pageBreadcrumb
- that.axios
- .post(proPath + 'v1/sysmenus/accessOwnAdd', {
- userId: that.$store.state.userInfo.userId,
- menuId: menuData.menuId
- })
- .then(function(response) {})
- .catch(function() {})
- this.$nextTick(() => {
- console.log($(document.getElementsByTagName('iframe')))
- })
- }
- // console.log('目录', that.selectedMenu, that.tabsData)
- // 左侧菜单点击切换的时候需要重新加载页面
- that.menuTabIndex = that.getTabIndex(menuData.menuId)
- $('#menuTabId iframe').eq(that.menuTabIndex).length &&
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- },
- // 是否合部都不是菜单就不用显示
- allNoMenu(items) {
- let bol = false
- for (let item of items) {
- if (item.menuType === '1' || item.menuType === '4') {
- // 有菜单
- bol = true
- break
- }
- }
- return bol
- },
- //
- signOut() {
- let _this = this
- _this
- .$msgbox({
- title: '退出提示',
- message: '确定退出登录吗?',
- showCancelButton: true,
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- beforeClose: (action, instance, done) => {
- if (action === 'confirm') {
- instance.confirmButtonLoading = true
- instance.confirmButtonText = '执行中...'
- // ajax
- let res = this.axios.get('pass/logout', {
- params: {
- authorization: getCookie('accessToken')
- }
- })
- res
- .then(function(res) {
- console.log(111)
- instance.confirmButtonText = '确定'
- instance.confirmButtonLoading = false
- done()
- window.location.href = './index.html'
- })
- .catch(function() {
- instance.confirmButtonText = '确定'
- instance.confirmButtonLoading = false
- done()
- })
- } else {
- done()
- }
- }
- })
- .then(action => {})
- },
- // 查看个人信息
- showPersonInfo() {
- // 打开查看
- this.userModal.show = true
- let userId = this.$store.state.userInfo.userId
- },
- getUserInfo() {
- let that = this
- if (that.$store.state.userInfo) {
- that.axios
- .get(proPath + 'v1/sysusers/' + that.$store.state.userInfo.userId)
- .then(function(response) {
- if (response) {
- that.userInfo = response.data
- top.globalUserInfo = response.data
- }
- })
- }
- },
- // 隐藏侧边栏
- changeMenuType() {
- if (this.menuType === '2') {
- this.menuType = '1'
- } else {
- this.menuType = '2'
- }
- },
- // 菜单选中
- thisMenu(item) {
- for (let b of this.pageBreadcrumb) {
- if (b.menuId === item.menuId) {
- return true
- }
- }
- return false
- },
- // 弹窗完成
- userModalThen(str, item) {
- // console.log('代码执行了')
- switch (str) {
- case 'close':
- this.userModal.show = false
- break
- case 'success':
- this.userModal.show = false
- // 刷新
- this.store.dispatch('getUserInfo')
- break
- }
- },
- // 修改密码
- pwdSubmit() {
- // if (this.strongText === '弱' && this.digit) {
- // this.$message.warning('密码安全等级太弱')
- // return
- // } else if (this.strongText === '弱' && !this.digit) {
- // this.$message.warning('密码不能小于六位数')
- // return
- // }
- this.$refs['pwdModal'].validate(valid => {
- if (valid) {
- // if (this.pwdModal.form.newpassword.length > 16) {
- // this.$message.warning('密码最长为16个字符')
- // return
- // }
- this.pwdModal.loading = true
- this.pwdModal.form.userid = this.store.state.userInfo.id
- this.store
- .dispatch('system/usersManage/updpsw', this.pwdModal.form)
- .then(res => {
- this.pwdModal.loading = false
- if (res.code === '0') {
- this.$message.success('设置成功')
- this.strongShow = false
- this.pwdModal.show = false
- } else {
- this.$message.error(res.message)
- }
- })
- }
- })
- },
- // 打开修改密码弹窗
- openPwd() {
- this.$refs['pwdModal'].resetFields && this.$refs['pwdModal'].resetFields()
- this.strongShow = false
- },
- // 弹窗完成
- userModalThen(str, item) {
- let that = this
- switch (str) {
- case 'close':
- that.userModal.show = false
- break
- case 'success':
- that.userModal.show = false
- // 刷新
- that.getUser(that.tableParams.form)
- break
- }
- },
- // 关闭弹窗
- userModalClose() {},
- // 修改完毕重新请求数据
- updataUserInfo(data) {
- this.getUserInfo()
- this.$store.commit('userInfo', data)
- },
- init: function(token) {
- let that = this
- // 192.168.10.231:9008本地
- let path = ''
- if (
- window.top.document.location.origin.indexOf('icore-paas-test') !== -1 ||
- window.top.document.location.origin.indexOf('localhost') !== -1
- ) {
- path =
- 'wss://websocket-dev.steerinfo.com/websocket?type=pass&token=' + token
- } else {
- path =
- 'wss://websocket.steerinfo.com/websocket?type=pass&token=' + token
- }
- if ('WebSocket' in window) {
- // 实例化websocket
- this.websocket = new WebSocket(path)
- // 监听websocket连接
- this.websocket.onopen = this.open
- // 监听websocket错误信息
- this.websocket.onerror = this.error
- // 监听websocket消息
- this.websocket.onmessage = this.getMessage
- //每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
- // this.interval = window.setInterval(function(){
- // if(that.websocket !== null){
- // if (that.websocket.readyState !== that.websocket.OPEN) {
- // let token = getCookie('accessToken');
- // if (token) {
- // that.init(token);
- // }
- // }
- // // } else {
- // // that.websocket.send('HeartBeat');
- // // // console.log("发送心跳包:HeartBeat");
- // // }
- // }
- // },30000);
- } else {
- alert('您当前浏览器不支持WebSocket')
- // 每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
- // forgeWebSocket这个方法是在不支持websocket的浏览器中去执行,这个方法作用是作为最早得轮询方式去保持长连接。这样不管浏览器支不支持websocket都能保持长连接的功能作用
- // this.interval = window.setInterval(function(){
- // that.forgeWebSocket();
- // },30000);
- }
- },
- open: function() {
- console.log('websocket连接成功')
- },
- error: function() {
- console.log('连接错误')
- },
- getTabIndex(menuId) {
- let index = 0
- for (let i = 0; i < this.tabsData.length; i++) {
- if (this.tabsData[i].menuId === menuId) {
- index = i
- }
- }
- return index
- },
- getMessage: function(msg) {
- let that = this
- // console.log(msg.data);
- let newMsg = JSON.parse(msg.data)
- let message = ''
- if (Object.prototype.toString.call(newMsg) === '[object Object]') {
- message = newMsg
- } else if (Object.prototype.toString.call(newMsg) === '[object Array]') {
- message = JSON.parse(msg.data).find(item => item.offline === false)
- }
- if (message.hasOwnProperty('type')) {
- let activeMenu = window.top.localStorage.getItem('activeMenu')
- let obj = this.getTreeAll(
- this.menuData,
- './workFlow.html#/coverTask',
- 1,
- []
- )
- let taskObj = this.getTreeAll(
- this.menuData,
- './workFlow.html#/personalInitiatedTask',
- 1,
- []
- )
- let msgObj = this.getTreeAll(
- this.menuData,
- './systemConfig.html#/noticeUser',
- 1,
- []
- )
- switch (message.type) {
- case 'ACT_TO_DO_TASK': // 待办任务;
- this.$message.info('您收到一条新的待办任务,请前往待办任务中查看!')
- if (activeMenu === obj.menuData.menuId) {
- that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- this.getMyToDoTask()
- this.getMyToDoDelegateTask()
- break
- case 'ACT_TO_DO_DELEGATETASK': // 委托待办任务;
- this.$message.info(
- '您收到一条新的委托待办任务,请前往待办任务中查看!'
- )
- if (activeMenu === obj.menuData.menuId) {
- that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- this.getMyToDoTask()
- this.getMyToDoDelegateTask()
- break
- case 'ACT_MY_APPLY_TASK': // 申请完成任务;
- this.$message.info('您有一条申请审批已完成,请前往流程跟踪中查看!')
- if (activeMenu === taskObj.menuData.menuId) {
- that.menuTabIndex = that.getTabIndex(taskObj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- break
- case 'SSO_NOTICE': // 公告;
- this.$message.info('您收到一条新的公告:' + message.payload.title)
- if (activeMenu === msgObj.menuData.menuId) {
- that.menuTabIndex = that.getTabIndex(msgObj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- this.getMyMessage()
- break
- case 'SSO_ROLE': // 权限已被管理员修改
- case 'SSO_MENU':
- case 'SSO_ORG':
- let userId = this.$store.state.userInfo.userId
- if (userId !== 'admin') {
- this.privilegeUpdateIfo = true
- this.coutTime(5)
- } else {
- if (message.type === 'SSO_MENU') {
- store
- .dispatch('generateRoutes', {
- companyId: this.companyId,
- appId: this.appId
- })
- .then(res => {
- if (res.code === '0') {
- this.menuData = res.data
- }
- })
- .catch(err => {
- console.log(err)
- })
- }
- }
- break
- case 'UPDATE_NUM':
- this.getMyToDoTask()
- this.getMyToDoDelegateTask()
- this.getMyMessage()
- if (
- message.payload === 'updateMessageNumOfAuth' &&
- activeMenu === msgObj.menuData.menuId
- ) {
- that.menuTabIndex = that.getTabIndex(msgObj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- break
- }
- }
- },
- send: function(params) {
- this.websocket.send(params)
- },
- close: function() {
- console.log('websocket已经关闭')
- if (this.interval) {
- window.clearInterval(this.interval)
- // console.log("清除定时器");
- }
- },
- // 倒计时函数
- coutTime(index) {
- let that = this
- that.closeSecond = index
- setTimeout(function() {
- if (index == 0) {
- that.store
- .dispatch('loginOut')
- .then(function(res) {
- window.location.href = './index.html'
- })
- .catch(function(err) {
- console.log(err)
- })
- } else {
- that.coutTime(--index)
- }
- }, 1000)
- },
- closeConfirm() {
- this.closeSecond = 0
- this.store
- .dispatch('loginOut')
- .then(function(res) {
- window.location.href = './index.html'
- })
- .catch(function(err) {
- console.log(err)
- })
- },
- // 遍历树获取指定url菜单相关
- // tree 整体树
- // url 需要跳转的页面url
- // num 递归层级,初始值传1,用于返回页面线性层级
- // list 包括页面&页面父级&父级的父级...直到最外层
- getTreeAll(tree, url, num, list) {
- let menuObj = {}
- if (!!tree && tree.length !== 0) {
- for (let item of tree) {
- menuObj['pageBreadcrumb'] = list
- if (item.menuUrl === url) {
- menuObj['menuData'] = item
- let obj = {
- menuId: num,
- menuLabel: item.menuLabel
- }
- menuObj.pageBreadcrumb.push(obj)
- return menuObj
- } else {
- let obj = {
- menuId: num,
- menuLabel: item.menuLabel
- }
- let a = []
- a.push(obj)
- let newList = list.concat(a)
- if (
- item.hasOwnProperty('children') &&
- item.children !== null &&
- item.children.length > 0
- ) {
- menuObj = this.getTreeAll(item.children, url, num + 1, newList)
- if (menuObj.hasOwnProperty('menuData')) {
- return menuObj
- }
- }
- }
- }
- }
- return menuObj
- },
- // 前往我的待办任务
- goMyTaskPage() {
- let that = this
- let updateStatus = false
- for (let item of this.tabsData) {
- if (item.menuUrl === './workFlow.html#/coverTask') {
- updateStatus = true
- }
- }
- let obj = this.getTreeAll(
- this.menuData,
- './workFlow.html#/coverTask',
- 1,
- []
- )
- this.selectMenu(obj.menuData, obj.pageBreadcrumb)
- if (updateStatus === true) {
- that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- },
- // 前往公告页面
- goNoticePage() {
- let that = this
- let updateStatus = false
- for (let item of this.tabsData) {
- if (item.menuUrl === './systemConfig.html#/noticeUser') {
- updateStatus = true
- }
- }
- let obj = this.getTreeAll(
- this.menuData,
- './systemConfig.html#/noticeUser',
- 1,
- []
- )
- this.selectMenu(obj.menuData, obj.pageBreadcrumb)
- if (updateStatus === true) {
- that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
- $('#menuTabId .el-tabs__item')
- .eq(that.menuTabIndex)
- .click()
- $('#menuTabId iframe')
- .eq(that.menuTabIndex)[0]
- .contentWindow.location.reload(true)
- }
- },
- updateTaskNum() {
- let userId = getCookie('userId')
- let messageType = {
- payload: 'updateTaskNum',
- type: 'UPDATE_NUM',
- userId: userId
- }
- this.axios
- .post('pass/websocket/socket/frontSendMessage', messageType, {
- individualType: 'json'
- })
- .then(res => {
- if (res.code === '0') {
- // do
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(error => {
- console.log(error.message)
- })
- },
- updateMessageNum() {
- let userId = getCookie('userId')
- let messageType = {
- payload: 'updateTaskNum',
- type: 'UPDATE_NUM',
- userId: userId
- }
- this.axios
- .post('pass/websocket/socket/frontSendMessage', messageType, {
- individualType: 'json'
- })
- .then(res => {
- if (res.code === '0') {
- // do
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(error => {
- console.log(error.message)
- })
- },
- // 获取我的待办任务个数
- getMyToDoTask() {
- // 获取当前用户
- let userId = getCookie('userId')
- this.axios
- .get(
- 'pass/act/v1/actusertasks/findMyToDoTask?userId=' +
- userId +
- '&companyId=' +
- this.companyId +
- '&pageNum=1&pageSize=1000000'
- )
- .then(res => {
- if (res.code === '0') {
- this.task1Num = res.data.list.length
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(error => {
- console.log(error.message)
- })
- },
- // 获取委托我代办的任务
- getMyToDoDelegateTask() {
- // 获取当前用户
- let userId = getCookie('userId')
- this.axios
- .get(
- 'pass/act/v1/actusertasks/findMyToDoDelegateTask?userId=' +
- userId +
- '&companyId=' +
- this.companyId +
- '&pageNum=1&pageSize=1000000'
- )
- .then(res => {
- if (res.code === '0') {
- this.task2Num = res.data.list.length
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(error => {
- console.log(error.message)
- })
- },
- // 获取我的公告信息
- getMyMessage() {
- // 获取当前用户
- let userId = getCookie('userId')
- this.axios
- .get(
- 'pass/v1/sysnotices/getUserNoticelike?status=0&pageNum=1&pageSize=1000000&companyId=' +
- this.companyId
- )
- .then(res => {
- if (res.code === '0') {
- this.myMessageLength = res.data.list.length
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(error => {
- console.log(error.message)
- })
- },
- // 获取主页页面
- getMainPage(tree, index, list) {
- list = list ? list : []
- if (!!tree && tree.length !== 0) {
- for (let i = 0; i < tree.length; i++) {
- let menuIndex = index ? index + '-' + i.toString() : i
- if (
- tree[i].loginDispaly &&
- tree[i].loginDispaly === '1' &&
- tree[i].status === '1'
- ) {
- tree[i]['menuIndex'] = menuIndex
- tree[i]['mainPageLoading'] = true
- list.push(tree[i])
- } else {
- if (
- tree[i].hasOwnProperty('children') &&
- tree[i].children !== null &&
- tree[i].children.length > 0
- ) {
- this.getMainPage(tree[i].children, menuIndex, list)
- }
- }
- }
- }
- return list
- },
- getMenuIndexByMenuId(tree, index, menuId) {
- if (!!tree && tree.length !== 0) {
- for (let i = 0; i < tree.length; i++) {
- let menuIndex = index ? index + '-' + i.toString() : i.toString()
- if (tree[i].menuId == menuId) {
- tree[i]['menuIndex'] = menuIndex
- return tree[i]
- }
- if (
- tree[i].hasOwnProperty('children') &&
- tree[i].children !== null &&
- tree[i].children.length > 0
- ) {
- var result = this.getMenuIndexByMenuId(
- tree[i].children,
- menuIndex,
- menuId
- )
- if (result) {
- return result
- }
- }
- }
- }
- },
- autoOpenLatestPage() {
- var that = this
- var currentMenuIndex = window.top.localStorage.getItem('currentMenuIndex')
- let menuList = window.top.document.getElementsByClassName('el-menu-item')
- for (let i = 0; i < menuList.length; i++) {
- if (menuList[i].__vue__.index === currentMenuIndex) {
- setTimeout(function() {
- that.defaultActiveIndex = currentMenuIndex
- menuList[i].click()
- }, 20)
- }
- }
- },
- // 打开设为主页菜单页面
- openMainPage() {
- this.mainPageList = this.getMainPage(this.menuData)
- // console.log(this.mainPageList)
- let menuList = window.top.document.getElementsByClassName('el-menu-item')
- let s = 0
- for (let item of this.mainPageList) {
- for (let i = 0; i < menuList.length; i++) {
- if (
- menuList[i].innerHTML === item.menuLabel &&
- menuList[i].__vue__.index === item.menuIndex
- ) {
- s++
- setTimeout(() => {
- menuList[i].click()
- // console.log('点击行为')
- }, 200)
- }
- }
- }
- },
- // 浏览器返回操作
- goBack() {
- this.$router.replace({
- path: '/'
- })
- },
- updatecss() {
- console.log("taskAllNum")
- console.log(this.taskAllNum)
- if(!this.taskAllNum){
- console.log("进入了弹出框的判断1")
- this.socketshow = false
- }else{
- console.log("进入了弹出框的判断2")
- this.socketshow=true
- }
- //let height = document.body.clientHeight - 125
- /*this.$nextTick(() => {
- $('.Web_Notice')[0].style.height = height + 'px;'
- })*/
- },
- leave() {
- this.socketshow = false
- },
- getinformation() {
- this.taskAllNum=0
- this.noticedata=[]
- console.log('获取到的userId----------------' + this.userId)
- this.axios
- .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
- .then(res => {
- console.log("进入了获取数据的方法")
- res.data.data.forEach((e)=>{
- console.log("进入了数据的遍历")
- if(e.status==0&&e.insertusername!='销售审核'){
- console.log("进入了数据的插入")
- this.taskAllNum++;
- this.noticedata.push(e)
- }
- })
- //this.taskAllNum = res.data.data.length
- console.log("获取到的数据")
- console.log(this.noticedata)
- console.log(this.taskAllNum)
- if (this.taskAllNum != null) {
- if (this.taskAllNum == 0) {
- console.log('进入了标记为0')
- this.badgeshow = true
- } else {
- console.log('进入了标记不为0')
- this.badgeshow = false
- let data={
- noticetitle:this.noticedata[0].noticetitle,
- noticecontent:this.noticedata[0].noticecontent,
- insertusername:this.noticedata[0].insertusername,
- inserttime:this.noticedata[0].inserttime,
- noticeid:this.noticedata[0].noticeId
- }
- //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
- if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
- this.noticedata1=data;
- this.centerDialogVisible=true;
- window.top.localStorage.setItem('noticeId', data.noticeid)
- // window.top.localStorage.setItem('noticeTime', new Date().getTime())
- }else{
- console.log("暂无新的通知,不展示");
- }
- }
- } else {
- console.log('进入了标记值为null的值')
- this.taskAllNum = null
- }
- })
- },
- // 查看待办任务详情
- seeTaskContent(item) {
- console.log('点击后的事件')
- console.log(item)
- let data = {
- noticetitle: item.noticetitle,
- noticecontent: item.noticecontent,
- insertusername: item.insertusername,
- inserttime: item.inserttime,
- noticeid: item.noticeId
- }
- this.noticedata1 = data
- this.centerDialogVisible = true
- console.log(this.noticedata1)
- console.log(this.centerDialogVisible)
- console.log(this.noticedata1.noticetitle)
- //this.$refs.defaultpage.seeTaskContent(item)
- // // this.dialogVisible = true;
- // this.itemTask = item;
- }
- }
- }
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style lang="less" scoped>
- .Web_Notice {
- width: 400px;
- position: absolute;
- left: -200px;
- height: 500px;
- background-color: #f1f6fd;
- }
- /deep/ .privilegeArea {
- .el-dialog {
- min-width: 400px;
- min-height: 120px;
- padding-bottom: 10px;
- }
- }
- .contextmenu {
- width: 150px;
- height: 150px;
- top: 0px;
- position: absolute;
- display: none;
- }
- iframe {
- display: block !important;
- }
- /deep/.lockInput .el-input__inner {
- -webkit-text-security: disc !important;
- }
- .theme-defined {
- position: absolute;
- right: 20px;
- top: 20px;
- width: 150px;
- }
- .theme-defined > div {
- float: right;
- margin-right: 10px;
- }
- .company-select {
- position: absolute;
- left: 225px;
- // top: 20px;
- // float: left;
- height: 60px;
- line-height: 60px;
- margin-left: 20px;
- color: #fff;
- font-size: 20px;
- }
- .el-dropdown {
- font-size: 16px;
- color: #ffffff;
- cursor: pointer;
- }
- .ifCompany {
- font-size: 16px;
- color: #ffffff;
- }
- .lock_route {
- transform: rotateY(180deg);
- cursor: pointer;
- position: absolute;
- width: 40px;
- height: 39px;
- top: 0px;
- right: 0px;
- text-align: center;
- line-height: 40px;
- background-color: #ccc;
- color: #fff;
- }
- .lock_screen {
- position: absolute;
- z-index: 9999999999;
- background-color: #fff;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- min-width: 1600px;
- background: url(../assets/img/default-bg.png) center bottom no-repeat;
- }
- .main {
- height: 100%;
- }
- .sl-header {
- /* position: fixed; */
- top: 0;
- left: 0;
- z-index: 1002;
- width: 100%;
- /* min-width: 1150px; */
- background-color: #fff;
- background-color: rgba(255, 255, 255, 0.9);
- }
- .sl-container {
- height: 100%;
- position: relative;
- /* padding-top: 60px; */
- padding-left: 79px;
- /* transition: padding-left .3s ease-out; */
- }
- .sl-container2 {
- padding-left: 0px;
- }
- .sl-content-main {
- width: 100%;
- // min-width: 1200px;
- height: calc(100% - 60px);
- overflow: auto;
- ::-webkit-scrollbar {
- //滚动条宽高,如果不需要显示滚动条可设置宽高为0
- width: 0px;
- height: 10px;
- }
- ::-webkit-scrollbar-thumb {
- //滚动条颜色和圆角
- background-color: #dfe0e0;
- border-radius: 3px;
- }
- ::-webkit-scrollbar-track-piece {
- // border: 2px solid #000;
- background-color: #f2f6f8;
- border-radius: 3px;
- }
- }
- .icore-menu-main {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 1001;
- width: 80px;
- height: calc(100% - 60px);
- margin-top: 60px;
- border-right: 1px solid #efefef;
- background-color: #fff;
- /* transition: width .25s ease-out;*/
- }
- .icore-menu-main2 {
- width: 180px;
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
- .sl-content {
- transition: margin-left 0.2s linear;
- }
- .sl-header-li-logo {
- float: left;
- margin-top: 13px;
- margin-left: 20px;
- }
- .sl-header-li-name {
- float: left;
- height: 60px;
- line-height: 60px;
- margin-left: 20px;
- color: #fff;
- font-size: 20px;
- }
- .sl-header-li-line {
- float: left;
- margin-top: 5px;
- height: 26px;
- }
- .sl-header-li-lgo {
- float: right;
- margin-top: 21px;
- width: 120px;
- }
- .sl-header-li-lgob {
- display: inline-block;
- padding-left: 25px;
- position: relative;
- color: white;
- height: 20px;
- line-height: 20px;
- vertical-align: middle;
- }
- .sl-header-li-lgob > .xs-icons {
- position: absolute;
- top: -8px;
- left: -18px;
- }
- .icore-menu-ops {
- font-size: 16px;
- color: #666;
- transition: transform 0.3s ease-out;
- }
- .icore-menu-main2 .icore-menu-ops {
- transform: rotate(180deg);
- }
- /* header menu style --> begin */
- .icore-menu {
- border-right: solid 0px #e6e6e6;
- }
- .icore-menu-a {
- position: relative;
- display: inline-block;
- width: 100%;
- padding-left: 54px;
- -webkit-transition: color 0.3s;
- transition: color 0.3s;
- cursor: pointer;
- border-right: 2px solid #fff;
- }
- .icore-menu-tip-cover {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- .icore-menu-a-noc {
- padding-right: 2px;
- }
- .icore-menu-lit {
- opacity: 0;
- display: inline-block;
- margin-top: 4px;
- height: 36px;
- line-height: 36px;
- vertical-align: middle;
- overflow: hidden;
- transition: opacity 0.3s ease-out;
- }
- .nameText {
- max-width: 85%;
- text-overflow: ellipsis;
- }
- .icore-menu-main2 .icore-menu-lit {
- opacity: 1;
- }
- .icore-menu-main2 .icore-menu-tip-cover {
- display: none;
- }
- .icore-menu-lic {
- position: absolute;
- top: 50%;
- left: 10px;
- margin-top: -11px;
- }
- .icore-menu-ric {
- position: absolute;
- top: 50%;
- right: 4px;
- margin-top: -3px;
- font-family: element-icons !important;
- speak: none;
- font-style: normal;
- font-weight: 400;
- font-variant: normal;
- color: #999;
- text-transform: none;
- line-height: 1;
- vertical-align: baseline;
- display: inline-block;
- -webkit-font-smoothing: antialiased;
- font-smoothing: antialiased;
- -webkit-transition: transform 0.3s;
- transition: transform 0.3s;
- }
- /* .icore-menu-ric:before{
- content: "\E603";
- }*/
- .icore-menu-ricr {
- color: #999;
- }
- .icore-menu-s {
- position: absolute;
- top: -7px;
- left: 100%;
- z-index: 1004;
- border: 1px solid #ccc;
- box-shadow: 0 2px 8px #999;
- border-radius: 2px;
- background-color: #fff;
- min-width: 130px;
- padding: 10px 0;
- }
- .icore-menu-sham {
- -webkit-transform: scaleY(0);
- transform: scaleY(0);
- -webkit-transition: transform, display 0.4s;
- transition: transform 0.4s;
- -webkit-transform-origin: center top;
- transform-origin: center top;
- }
- .icore-menu-a:hover > .icore-menu-sham,
- .icore-menu-sa:hover > .icore-menu-sham {
- opacity: 1;
- -webkit-transform: scaleY(1);
- transform: scaleY(1);
- }
- .icore-menu-s.icore-menu-s-right {
- left: auto;
- right: 15px;
- }
- .main-upload_text_logo {
- display: block;
- text-align: center;
- position: relative;
- margin: 0px -20px;
- top: -35px;
- border-bottom: 1px solid #cccccc;
- }
- .main-file_upload {
- width: 100%;
- text-align: center;
- position: relative;
- display: inline-block;
- vertical-align: top;
- }
- .main-file_con .hide {
- width: 120px;
- position: absolute;
- height: 30px;
- left: 58px;
- margin-top: -8px;
- opacity: 0;
- filter: alpha(opacity=0);
- z-index: 22;
- }
- .main-file_con .main-file_uploader,
- .upload_bt {
- left: 0;
- top: -5px;
- position: relative;
- color: #fff;
- display: inline-block;
- padding: 0px 20px;
- background: #2ecc71;
- text-align: center;
- z-index: 11;
- border-radius: 15px;
- cursor: pointer;
- }
- .upload_bt {
- left: 130px;
- }
- .main-file_con .hide:hover {
- box-shadow: 1px 2px #44795b;
- }
- .main-img_holder,
- .m_main-img_holder {
- height: 100px;
- line-height: 70px;
- }
- .main-img_holder img,
- .m_main-img_holder img {
- max-width: 200px;
- }
- .main-file_btn_upload {
- margin-top: -20px;
- margin-bottom: 20px;
- }
- .icore-menu-sa {
- display: block;
- min-width: 120px;
- white-space: nowrap;
- padding: 0 20px;
- line-height: 32px;
- position: relative;
- }
- .icore-menu-a:hover {
- color: #2391e5;
- background-color: #e2f1fc;
- border-right-color: #e2f1fc;
- }
- .icore-menu-a:hover > .icore-menu-ric {
- color: #2391e5;
- -webkit-transform: rotate(180deg);
- transform: rotate(180deg);
- }
- .icore-menu-sa:hover {
- background-color: #e2f1fc;
- color: #2391e5;
- }
- .icore-menu-sa:hover > .icore-menu-ricr {
- color: #2391e5;
- }
- .icore-menu-ss {
- opacity: 0;
- position: absolute;
- left: 100%;
- top: -11px;
- z-index: 1005;
- padding: 10px 0;
- border: 1px solid #ccc;
- box-shadow: 0 2px 8px #999;
- border-radius: 2px;
- background-color: #fff;
- }
- .icore-menu-sed {
- border-right-color: #2391e5;
- }
- .icore-menu-sed,
- .icore-menu-ssed,
- .icore-menu-sssed {
- color: #2391e5;
- }
- .icore-menu-sed > .icore-menu-ricr,
- .icore-menu-ssed > .icore-menu-ricr,
- .icore-menu-sed > .icore-menu-ric {
- color: #2391e5;
- }
- .icore-menu-sdis {
- cursor: default !important;
- cursor: not-allowed !important;
- color: #999 !important;
- background-color: #fff !important;
- }
- .icore-menu-reverse > .icore-menu-s,
- .icore-menu-reverse > .icore-menu-ss {
- top: auto;
- bottom: -11px;
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- }
- /* header menu style --> end */
- .sl-breadcrumb {
- overflow: hidden;
- background-color: #fff;
- height: 30px;
- padding: 7px 0 0 20px;
- }
- .sl-header-li-lgbc {
- position: absolute;
- right: 40%;
- top: 20px;
- }
- .sl-header-li-websocket {
- position: absolute;
- right: 210px;
- top: 17px;
- .el-button--text {
- color: white;
- }
- }
- .sl-breadcrumb-text {
- float: left;
- color: white;
- }
- .sl-breadcrumb-list {
- float: left;
- padding-left: 10px;
- font-size: 12px;
- position: relative;
- top: 6px;
- }
- .sl-footer {
- padding: 20px 0 0px;
- }
- .sl-footer > p {
- text-align: center;
- height: 20px;
- line-height: 20px;
- vertical-align: middle;
- }
- .am-xz {
- float: left;
- margin-right: 7px;
- margin-top: 2px;
- animation: amXuanzhuan 4s linear infinite;
- }
- @keyframes amXuanzhuan {
- 0% {
- transform: rotate3d(1, 0, 0, 360deg);
- }
- 100% {
- transform: rotate3d(1, 0, 0, 0);
- }
- }
- .oa-header-photo-uld {
- width: 200px;
- height: 200px;
- line-height: 200px;
- vertical-align: middle;
- margin: 0 auto;
- overflow: hidden;
- cursor: pointer;
- }
- .oa-header-photo-uld > img {
- max-width: 100%;
- max-height: 100%;
- vertical-align: middle;
- }
- /*.oa-header-content {*/
- /*background: url("../../static/img/top_bgimg.png") left center no-repeat rgb(60,207,255);*/
- /*height: 60px;*/
- /*}*/
- .oa-header-logo {
- float: left;
- padding: 15px 0 0 30px;
- height: 50px;
- overflow: hidden;
- }
- .oa-header-logo > img {
- animation: fadeInLeft 0.5s ease-out 0s both;
- }
- .oa-header-upt {
- position: absolute;
- left: 0;
- top: 0;
- width: 100px;
- height: 60px;
- overflow: hidden;
- text-align: center;
- }
- .oa-header-upt > a {
- display: inline-block;
- width: 40px;
- height: 40px;
- margin-top: 10px;
- animation: fadeInRight 0.5s ease-out 0s both;
- }
- .oa-header-upt > a > img {
- width: 40px;
- height: 40px;
- line-height: 40px;
- vertical-align: middle;
- color: #333;
- border-radius: 20px;
- box-shadow: 0 0 10px #333;
- }
- .oa-header-user:hover .oa-header-upt > a > img {
- animation: circle 4s linear 0s infinite;
- }
- .oa-header-ucon {
- display: none;
- overflow: hidden;
- position: absolute;
- top: 50px;
- left: 10px;
- z-index: 18000;
- padding: 10px 0 10px 10px;
- font-size: 15px;
- }
- .oa-header-ulist {
- position: relative;
- width: 215px;
- border: 1px solid #ddd;
- box-shadow: 0 0 8px #999;
- background-color: #fff;
- background-color: rgba(255, 255, 255, 0.95);
- }
- .oa-header-user:hover .oa-header-ucon {
- display: block;
- }
- .oa-header-user:hover .oa-header-ulist {
- animation: fadeInRight 0.4s ease-out 0s both;
- }
- .oa-header-uin {
- text-align: center;
- overflow: hidden;
- padding: 20px 0 15px 0;
- }
- .oa-header-uin > img {
- width: 60px;
- height: 60px;
- border-radius: 30px;
- cursor: pointer;
- }
- .oa-header-uin > img:hover {
- animation: largen2 0.6s ease-out 0s both;
- }
- .oa-header-uin > h3 {
- padding-top: 10px;
- color: #666;
- }
- .oa-header-uul {
- padding-bottom: 10px;
- }
- .oa-header-uul > li {
- height: 40px;
- line-height: 40px;
- text-align: center;
- vertical-align: middle;
- cursor: pointer;
- transition: background-color 0.3s linear 0s;
- }
- .oa-header-uul .st-icons {
- position: relative;
- top: 6px;
- margin-right: 8px;
- transition: all 0.3s linear;
- }
- .st-icons-out {
- margin-right: 4px;
- }
- .oa-header-uul > li:hover {
- background-color: #ebebeb;
- }
- .oa-header-uul::before,
- .oa-header-uul::after {
- border-bottom-color: rgba(0, 0, 0, 0.2);
- content: '';
- display: inline-block;
- position: absolute;
- }
- .oa-header-uul::after {
- left: 41px;
- top: -6px;
- border-bottom: 6px solid #fff;
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- }
- .oa-header-uul::before {
- left: 40px;
- top: -7px;
- border-bottom: 7px solid #ccc;
- border-left: 7px solid transparent;
- border-right: 7px solid transparent;
- }
- .hnstLogo {
- position: absolute;
- left: 190px;
- top: 14px;
- }
- .hnstLogo > img {
- height: 32px;
- }
- .marignL15 {
- margin-left: 15px;
- }
- .menuDrag {
- height: calc(100% - 120px);
- width: 18px;
- position: absolute;
- right: -6px;
- cursor: col-resize;
- z-index: 22;
- }
- .pageBreadcrumb {
- display: none;
- }
- .oa-user-name {
- position: absolute;
- top: 21px;
- left: 100px;
- max-width: 44%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .strongBox {
- position: absolute;
- right: 0;
- top: 0;
- width: 28px;
- height: 28px;
- line-height: 28px;
- text-align: center;
- color: white;
- background: red;
- border-radius: 5px;
- font-size: 14px;
- }
- </style>
|