main.vue 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513
  1. <template>
  2. <div class="main mainVueIndex" :class="current_theme" id="defaultpage">
  3. <div class="oa-header-user" v-if="showIframe">
  4. <h3 v-show="menuType === '2'" class="oa-user-name" style="color: #fff">
  5. {{ store.state.userInfo ? store.state.userInfo.userName : '' }}
  6. </h3>
  7. <div class="oa-header-upt">
  8. <a
  9. ><template>
  10. <img
  11. @click="changeMenuType"
  12. v-if="userInfo.photo"
  13. class="oa-sign-tul-ui"
  14. :src="
  15. 'data:image/' + userInfo.photo + ';base64,' + userInfo.photo
  16. "
  17. alt="头像"
  18. />
  19. <img
  20. @click="changeMenuType"
  21. v-else
  22. class="oa-sign-tul-ui"
  23. src="../../static/img/photo-default.png"
  24. alt="头像"
  25. /> </template
  26. ></a>
  27. </div>
  28. <div class="oa-header-ucon">
  29. <div class="oa-header-ulist">
  30. <div class="oa-header-uin">
  31. <template>
  32. <img
  33. v-if="userInfo.photo"
  34. class="oa-sign-tul-ui"
  35. :src="
  36. 'data:image/' + userInfo.photo + ';base64,' + userInfo.photo
  37. "
  38. alt="头像"
  39. @click="photoModal = true"
  40. />
  41. <img
  42. v-else
  43. class="oa-sign-tul-ui"
  44. src="../../static/img/photo-default.png"
  45. alt="头像"
  46. @click="photoModal = true"
  47. />
  48. </template>
  49. <h3>
  50. {{ store.state.userInfo ? store.state.userInfo.userName : '' }}
  51. </h3>
  52. </div>
  53. <ul class="oa-header-uul">
  54. <li @click="showPersonInfo()">
  55. <span class="st-icons st-icons-user"></span>个人信息
  56. </li>
  57. <li @click="pwdModal.show = true">
  58. <span class="st-icons st-icons-pwd"></span>修改密码
  59. </li>
  60. <!-- <li @click="signOut">
  61. <span class="st-icons st-icons-out"></span>退出登录
  62. </li> -->
  63. <li @click="signOut">
  64. <span class="st-icons st-icons-out"></span>退出登录
  65. </li>
  66. </ul>
  67. </div>
  68. </div>
  69. </div>
  70. <div
  71. v-show="showIframe"
  72. class="icore-menu-main overFlowSet"
  73. :class="{ 'icore-menu-main2': menuType === '2' }"
  74. >
  75. <div id="menuDrag" v-if="menuType === '2'" class="menuDrag"></div>
  76. <el-menu
  77. :default-active="defaultActiveIndex"
  78. :collapse="menuType === '1'"
  79. class="el-menu-vertical-demo icore-menu icore-menu-level1"
  80. v-for="(item, index) in menuData"
  81. :key="item.id"
  82. @open="handleOperate"
  83. @close="handleOperate"
  84. >
  85. <el-submenu
  86. :index="index + ''"
  87. v-if="item.menuType && Number(item.status)"
  88. >
  89. <template slot="title">
  90. <i
  91. class="icore-menu-lic icore-menu-icons icore-icons-menu-default"
  92. :class="item.menuIcon ? item.menuIcon : ''"
  93. ></i>
  94. <div class="icore-menu-lit marignL15 nameText">{{ item.name }}</div>
  95. </template>
  96. <template v-for="(sitem, sindex) in item.children">
  97. <el-submenu
  98. :index="index + '-' + sindex"
  99. v-if="
  100. sitem.children &&
  101. sitem.children.length > 0 &&
  102. allNoMenu(sitem.children) &&
  103. Number(sitem.status)
  104. "
  105. :key="sitem.id"
  106. @click.native="
  107. selectMenu(sitem, [
  108. { menuId: 1, menuLabel: item.name },
  109. { menuId: 2, menuLabel: sitem.name }
  110. ])
  111. "
  112. >
  113. <template slot="title">
  114. <span>{{ sitem.name }}</span>
  115. </template>
  116. <template v-for="(ssitem, ssindex) in sitem.children">
  117. <el-submenu
  118. :index="index + '-' + sindex + '-' + ssindex"
  119. v-if="
  120. ssitem.children &&
  121. ssitem.children.length > 0 &&
  122. allNoMenu(ssitem.children) &&
  123. Number(ssitem.status)
  124. "
  125. :key="ssitem.id"
  126. >
  127. <template slot="title">
  128. <span>{{ ssitem.name }}</span>
  129. </template>
  130. <template v-for="(sssitem, sssindex) in ssitem.children">
  131. <el-menu-item
  132. @click.native="
  133. selectMenu(sssitem, [
  134. { menuId: 1, menuLabel: item.name },
  135. { menuId: 2, menuLabel: sitem.name },
  136. { menuId: 3, menuLabel: ssitem.name },
  137. { menuId: 4, menuLabel: sssitem.name }
  138. ])
  139. "
  140. v-if="
  141. (sssitem.menuType === '1' ||
  142. sssitem.menuType === '4') &&
  143. Number(sssitem.status)
  144. "
  145. :index="
  146. index + '-' + sindex + '-' + ssindex + '-' + sssindex
  147. "
  148. :key="sssitem.id"
  149. >{{ sssitem.name }}</el-menu-item
  150. >
  151. <!-- 分割线 -->
  152. <el-menu-item
  153. class="nav_menu"
  154. v-if="sssitem.menuType === '3' && Number(sssitem.status)"
  155. :index="
  156. index + '-' + sindex + '-' + ssindex + '-' + sssindex
  157. "
  158. :key="sssitem.id"
  159. >
  160. <template>
  161. <div></div>
  162. </template>
  163. </el-menu-item>
  164. <!-- 停用菜单 -->
  165. <el-menu-item
  166. v-if="Number(sssitem.status) === 0"
  167. :index="
  168. index + '-' + sindex + '-' + ssindex + '-' + sssindex
  169. "
  170. :key="sssitem.id"
  171. >{{ sssitem.name }}</el-menu-item
  172. >
  173. </template>
  174. </el-submenu>
  175. <!-- 停用菜单 -->
  176. <el-menu-item
  177. :index="index + '-' + sindex + '-' + ssindex"
  178. class="closeMenu"
  179. v-if="Number(ssitem.status) === 0"
  180. :key="ssitem.id"
  181. >
  182. {{ ssitem.name }}
  183. </el-menu-item>
  184. <!-- 分割线 -->
  185. <el-menu-item
  186. class="nav_menu"
  187. :index="index + '-' + sindex + '-' + ssindex"
  188. v-if="
  189. (!ssitem.children ||
  190. ssitem.children.length === 0 ||
  191. !allNoMenu(ssitem.children)) &&
  192. ssitem.menuType === '3' &&
  193. Number(ssitem.status)
  194. "
  195. :key="ssitem.id"
  196. >
  197. <template>
  198. <div></div>
  199. </template>
  200. </el-menu-item>
  201. <!-- 分割线 END -->
  202. <el-menu-item
  203. @click.native="
  204. selectMenu(ssitem, [
  205. { menuId: 1, menuLabel: item.name },
  206. { menuId: 2, menuLabel: sitem.name },
  207. { menuId: 3, menuLabel: ssitem.name }
  208. ])
  209. "
  210. :index="index + '-' + sindex + '-' + ssindex"
  211. v-if="
  212. (!ssitem.children ||
  213. ssitem.children.length === 0 ||
  214. !allNoMenu(ssitem.children)) &&
  215. (ssitem.menuType === '1' || ssitem.menuType === '4') &&
  216. Number(ssitem.status)
  217. "
  218. :key="ssitem.id"
  219. >{{ ssitem.name }}</el-menu-item
  220. >
  221. </template>
  222. </el-submenu>
  223. <!-- 停用菜单 -->
  224. <el-menu-item
  225. :index="index + '-' + sindex"
  226. class="closeMenu"
  227. v-if="Number(sitem.status) === 0"
  228. :key="sitem.id"
  229. >
  230. {{ sitem.name }}
  231. </el-menu-item>
  232. <el-menu-item
  233. @click.native="
  234. selectMenu(sitem, [
  235. { menuId: 1, menuLabel: item.name },
  236. { menuId: 2, menuLabel: sitem.name }
  237. ])
  238. "
  239. :index="index + '-' + sindex"
  240. v-if="
  241. (!sitem.children ||
  242. sitem.children.length === 0 ||
  243. !allNoMenu(sitem.children)) &&
  244. (sitem.menuType === '1' || sitem.menuType === '4') &&
  245. Number(sitem.status)
  246. "
  247. :key="sitem.id"
  248. >{{ sitem.name }}</el-menu-item
  249. >
  250. </template>
  251. </el-submenu>
  252. </el-menu>
  253. </div>
  254. <section
  255. class="sl-container"
  256. :class="{ 'sl-container2': menuType === '2' }"
  257. id="mainContainer"
  258. >
  259. <header class="sl-header">
  260. <div v-if="showIframe" class="sl-header-ul">
  261. <!-- <div class="sl-header-li-name">工业互联网平台 ICP-iCore 2.0</div> -->
  262. <!-- <div class="hnstLogo">
  263. <img src="../assets/img/logo_1.png" alt="" />
  264. </div> -->
  265. <!-- 下拉选择公司 -->
  266. <div
  267. class="company-select"
  268. v-if="companys !== '' && companys.length >= 1"
  269. >
  270. <span
  271. class="ifCompany el-dropdown-link"
  272. v-if="companys.length === 1"
  273. >
  274. {{ companyName }}
  275. </span>
  276. <el-dropdown trigger="click" @command="selectComPany" v-else>
  277. <span class="el-dropdown-link">
  278. {{ companyName }}
  279. <i class="el-icon-arrow-down el-icon--right"></i>
  280. </span>
  281. <el-dropdown-menu slot="dropdown">
  282. <div v-for="item in companys" :key="item.id">
  283. <el-dropdown-item :command="item">
  284. {{ item.companyName }}
  285. </el-dropdown-item>
  286. </div>
  287. </el-dropdown-menu>
  288. </el-dropdown>
  289. <el-dropdown
  290. trigger="click"
  291. @command="selectOrg"
  292. v-if="orgDutyLinks.length > 0"
  293. :style="{
  294. marginLeft: !styleControll ? '50px' : '20px',
  295. fontSize: '12px'
  296. }"
  297. >
  298. <span class="el-dropdown-link"
  299. ><!--<i class="el-icon-arrow-down el-icon--right"></i>-->
  300. {{ orgName }}
  301. </span>
  302. <el-dropdown-menu slot="dropdown">
  303. <div v-for="item in orgDutyLinks" :key="item.orgId">
  304. <el-dropdown-item :command="item">{{
  305. item.orgName
  306. }}</el-dropdown-item>
  307. </div>
  308. </el-dropdown-menu>
  309. </el-dropdown>
  310. <!-- <span style="margin-left: 20px; font-size: 12px">{{
  311. dutyName
  312. }}</span> -->
  313. </div>
  314. <div class="sl-header-li-lgbc">
  315. <span class="icore-icons icore-icons-right-arrow am-xz"></span>
  316. <span class="sl-breadcrumb-text">当前位置:</span>
  317. <el-breadcrumb
  318. separator-class="el-icon-arrow-right"
  319. class="sl-breadcrumb-list"
  320. >
  321. <el-breadcrumb-item
  322. v-for="item in pageBreadcrumb"
  323. :key="'bdb' + item.menuId"
  324. >{{ item.menuLabel }}</el-breadcrumb-item
  325. >
  326. </el-breadcrumb>
  327. </div>
  328. <!--通知信息-->
  329. <div
  330. class="sl-header-li-websocket"
  331. @mouseenter="updatecss"
  332. @mouseleave="leave"
  333. >
  334. <el-badge
  335. :value="taskAllNum"
  336. :max="99"
  337. class="item"
  338. style="margin-right: 20px"
  339. :hidden="badgeshow"
  340. >
  341. <el-button type="text" size="small" @click="goMyTaskPage" style="padding:3px"
  342. > <i class="el-icon-message-solid" style="font-size: 20px;"></i></el-button
  343. >
  344. </el-badge>
  345. <div
  346. class="Web_Notice"
  347. v-show="socketshow"
  348. style="z-index: 1 ; overflow-y: scroll"
  349. >
  350. <div class="workspace_row-grid_mytask">
  351. <div
  352. class="workspace_message"
  353. v-for="(item, index) in noticedata"
  354. :key="index"
  355. @click="seeTaskContent(item)"
  356. >
  357. <div class="workspace_message-title">
  358. 标题: {{ item.noticetitle }}
  359. </div>
  360. <div class="workspace_message-content">
  361. 内容:{{ item.noticecontent }}
  362. </div>
  363. <div class="workspace_message-from">
  364. 来自: {{ item.insertusername }}
  365. </div>
  366. <div class="workspace_message-date">
  367. 时间:{{ item.inserttime }}
  368. </div>
  369. <div style="height: 20px"></div>
  370. <el-divider></el-divider>
  371. </div>
  372. <div class="workspace_replace_item"></div>
  373. </div>
  374. </div>
  375. </div>
  376. <div class="theme-defined">
  377. <div
  378. @click="fullScreenEvent"
  379. :class="fullScreen ? 'icore-return-screen' : 'icore-full-screen'"
  380. :title="fullScreen ? '退出全屏' : '全屏'"
  381. ></div>
  382. <div @click="themeEvent" class="icore-theme" title="主题"></div>
  383. <div @click="lockEvent" class="icore-lock" title="锁屏"></div>
  384. <div @click="backMain" class="icore-main" title="主页"></div>
  385. </div>
  386. </div>
  387. </header>
  388. <div class="sl-content-main">
  389. <template v-if="showIframe">
  390. <default-vue
  391. :menuData="menuData"
  392. @gotoSetPage="gotoSetPage"
  393. v-if="tabsData.length === 0"
  394. ></default-vue>
  395. <el-tabs
  396. id="menuTabId"
  397. v-show="tabsData.length > 0"
  398. v-model="selectedMenu"
  399. type="card"
  400. closable
  401. @tab-remove="removeTab"
  402. @tab-click="handleClick"
  403. style="padding: 10px 0px 0px; height: 100%"
  404. >
  405. <el-tab-pane
  406. :label="item.name"
  407. :name="item.menuId"
  408. :key="item.menuId"
  409. v-for="(item, index) in tabsData"
  410. >
  411. <span @contextmenu="rightShow($event, index, item)" slot="label">
  412. {{ item.name }}
  413. </span>
  414. <div class="pageBreadcrumb">
  415. {{ JSON.stringify(item.pageBreadcrumb) }}
  416. </div>
  417. <iframe
  418. :src="
  419. isDev(item.menuUrl)
  420. ? getDevUrl(item.menuUrl)
  421. : toTrustUrl(item.menuUrl)
  422. "
  423. :style="minHeight"
  424. ></iframe>
  425. </el-tab-pane>
  426. </el-tabs>
  427. <div class="contextmenu">
  428. <el-dropdown
  429. trigger="click"
  430. @visible-change="visibleChange"
  431. @command="handleCommand"
  432. >
  433. <span class="el-dropdown-link" v-show="false">
  434. 下拉菜单<i
  435. id="setClick"
  436. class="el-icon-arrow-down el-icon--right"
  437. ></i>
  438. </span>
  439. <el-dropdown-menu slot="dropdown">
  440. <el-dropdown-item command="a">关闭标签页</el-dropdown-item>
  441. <el-dropdown-item :disabled="tabsData.length === 1" command="b"
  442. >关闭其他标签页</el-dropdown-item
  443. >
  444. <el-dropdown-item
  445. :disabled="tabsData.length - menuTabIndex === 1"
  446. command="c"
  447. >关闭右侧标签页</el-dropdown-item
  448. >
  449. <el-dropdown-item command="d">刷新当前标签页</el-dropdown-item>
  450. </el-dropdown-menu>
  451. </el-dropdown>
  452. </div>
  453. </template>
  454. <transition
  455. enter-active-class="fade-in"
  456. leave-active-class="leave-immediately"
  457. :duration="{ enter: 400, leave: 100 }"
  458. ref="childrenPage"
  459. >
  460. <router-view
  461. @updateTaskNum="updateTaskNum"
  462. @updateMessageNum="updateMessageNum"
  463. >
  464. </router-view>
  465. </transition>
  466. </div>
  467. </section>
  468. <!-- -->
  469. <div
  470. is="usersAddAndEdit"
  471. v-if="userModal.show"
  472. :operate="'edit'"
  473. :operate1="'index'"
  474. :item="userInfo"
  475. @on-then="userModalThen"
  476. @on-close="userModalClose"
  477. @editFinish="updataUserInfo"
  478. ></div>
  479. <!-- -->
  480. <!-- 修改密码 -->
  481. <el-dialog
  482. ref="pwdModal"
  483. :visible.sync="pwdModal.show"
  484. class="oa-pwd-modal"
  485. title="修改密码"
  486. width="500px"
  487. @open="openPwd"
  488. >
  489. <el-form
  490. ref="pwdModal"
  491. :model="pwdModal.form"
  492. :rules="pwdModal.ruleValidate"
  493. label-width="120px"
  494. style="padding-right: 40px"
  495. >
  496. <el-form-item label="原密码" prop="userid" v-show="false">
  497. <el-input
  498. size="small"
  499. type="text"
  500. v-model="pwdModal.form.userid"
  501. :maxlength="64"
  502. ></el-input>
  503. </el-form-item>
  504. <el-form-item label="原密码" prop="prepassword">
  505. <el-input
  506. size="small"
  507. type="password"
  508. v-model="pwdModal.form.prepassword"
  509. :maxlength="64"
  510. ></el-input>
  511. </el-form-item>
  512. <el-form-item label="新密码" prop="newpassword">
  513. <el-input
  514. size="small"
  515. type="password"
  516. @input="inputThing"
  517. v-model="pwdModal.form.newpassword"
  518. :maxlength="64"
  519. ></el-input>
  520. <div
  521. class="strongBox"
  522. v-show="strongShow"
  523. :style="{ backgroundColor: strongColor }"
  524. >
  525. {{ strongText }}
  526. </div>
  527. </el-form-item>
  528. <el-form-item label="确认密码" prop="againNewpassword">
  529. <el-input
  530. size="small"
  531. type="password"
  532. v-model="pwdModal.form.againNewpassword"
  533. :maxlength="64"
  534. ></el-input>
  535. </el-form-item>
  536. </el-form>
  537. <div slot="footer" class="dialog-footer">
  538. <el-button size="small" @click="pwdModal.show = false">取 消</el-button>
  539. <el-button
  540. size="small"
  541. :loading="pwdModal.loading"
  542. type="primary"
  543. @click="pwdSubmit('pwdModal')"
  544. >确 定</el-button
  545. >
  546. </div>
  547. </el-dialog>
  548. <!-- 锁屏 -->
  549. <el-dialog
  550. title="锁屏"
  551. v-if="lockEventFlag"
  552. :visible.sync="lockEventFlag"
  553. width="500px"
  554. >
  555. <el-form
  556. :model="lockRuleForm"
  557. :rules="lockRules"
  558. ref="lockRuleForm"
  559. label-width="150px"
  560. >
  561. <el-form-item label="锁屏密码" prop="pwd">
  562. <el-input
  563. :class="checkedByLogin ? 'lockInput' : ''"
  564. :disabled="checkedByLogin"
  565. @keyup.enter.native="lockEventSet"
  566. v-model="lockRuleForm.pwd"
  567. style="width: 250px"
  568. ></el-input>
  569. <el-checkbox v-model="checkedByLogin">使用登录密码</el-checkbox>
  570. </el-form-item>
  571. </el-form>
  572. <div slot="footer" class="dialog-footer">
  573. <el-button @click="lockEventFlag = false">取 消</el-button>
  574. <el-button type="primary" @click="lockEventSet">确 定</el-button>
  575. </div>
  576. </el-dialog>
  577. <!-- /修改密码 -->
  578. <div v-if="lockScreenPwd" class="lock_screen">
  579. <div
  580. v-if="lockErrorMsg"
  581. class="el-message el-message--error"
  582. style="z-index: 2033"
  583. >
  584. <i class="el-message__icon el-icon-error"></i>
  585. <p class="el-message__content">密码错误!</p>
  586. </div>
  587. <div
  588. style="
  589. margin: 0 auto;
  590. width: 300px;
  591. position: relative;
  592. top: 45%;
  593. transform: translateY(-50%);
  594. "
  595. >
  596. <div>
  597. <el-input
  598. ref="lockInput"
  599. class="lockInput"
  600. placeholder="请输入密码"
  601. @keyup.enter.native="setLock"
  602. type="text"
  603. v-model="inputLockPwd"
  604. >
  605. <template slot="append">
  606. <div @click="setLock" class="lock_route">
  607. <i class="el-icon-back"></i>
  608. </div>
  609. </template>
  610. </el-input>
  611. </div>
  612. <div style="padding: 10px">
  613. 忘记密码?
  614. <a
  615. @click="lockSignOut"
  616. style="text-decoration: underline; color: #409eff; cursor: pointer"
  617. >退出登录</a
  618. >
  619. </div>
  620. </div>
  621. </div>
  622. <!-- 切换主题 -->
  623. <el-dialog
  624. title="选择主题"
  625. v-if="themeSetFlag"
  626. :visible.sync="themeSetFlag"
  627. width="30%"
  628. >
  629. <el-radio-group v-model="current_theme">
  630. <el-radio
  631. :label="theme.label"
  632. :key="theme.label"
  633. v-for="theme in theme_group"
  634. >{{ theme.desc }}</el-radio
  635. >
  636. </el-radio-group>
  637. <div slot="footer" class="dialog-footer"></div>
  638. </el-dialog>
  639. <!-- 权限被修改 -->
  640. <el-dialog
  641. v-if="privilegeUpdateIfo"
  642. :visible.sync="privilegeUpdateIfo"
  643. width="35%"
  644. top="20vh"
  645. :close-on-click-modal="false"
  646. :close-on-press-escape="false"
  647. :show-close="false"
  648. class="privilegeArea"
  649. >
  650. <span v-if="closeSecond > 0" style="font-size: 18px; color: #333">
  651. <i class="el-icon-warning"></i>
  652. {{ ' 您的权限已被管理员修改,' + closeSecond + 's后将自动退出' }}
  653. </span>
  654. <span v-else style="font-size: 20px; color: #f56c6c">
  655. <i class="el-icon-loading"></i>
  656. {{ '正在为您退出,请稍后...' }}
  657. </span>
  658. <div slot="footer" class="dialog-footer" v-if="closeSecond > 0">
  659. <el-button type="primary" size="small" @click="closeConfirm"
  660. >确 定</el-button
  661. >
  662. </div>
  663. </el-dialog>
  664. <!--通知弹窗-->
  665. <el-dialog
  666. :visible.sync="centerDialogVisible"
  667. :close-on-click-modal="false"
  668. :close-on-press-escape="false"
  669. :show-close="false">
  670. <div style="margin-left: 30px; font-size: 20px">
  671. <h1>{{ noticedata1.noticetitle }}</h1>
  672. </div>
  673. <div style="height: 20px"></div>
  674. <div style="margin-left: 30px">
  675. <i class="el-icon-document"></i>{{ noticedata1.noticecontent }}
  676. </div>
  677. <el-divider></el-divider>
  678. <div style="margin-left: 30px">
  679. <i class="el-icon-user-solid"></i>
  680. {{ noticedata1.insertusername }}
  681. </div>
  682. <div style="margin-left: 30px"><i></i>{{ noticedata1.inserttime }}</div>
  683. <span slot="footer" class="dialog-footer">
  684. <el-button type="primary" @click="makeSure">确 定</el-button>
  685. </span>
  686. </el-dialog>
  687. <!--通知-->
  688. <!-- <div class="Web_Notice">
  689. <span class="margin_R10">
  690. <i class="el-icon-message iconImg"></i>
  691. <el-badge :value="taskAllNum" :max="99" :hidden="taskAllNum < 1"></el-badge>
  692. </span>
  693. </div>-->
  694. </div>
  695. </template>
  696. <script>
  697. import element_css_json_import from '../assets/json/element_css.js'
  698. import objectAssign from 'object-assign'
  699. import generateColors from './utils/color'
  700. import usersAddAndEdit from '@/views/systemConfig/components/usersAddAndEdit.vue'
  701. import { getCookie } from '@/utils/util.js'
  702. import { checkCharLength } from '@/utils/validator.js'
  703. import store from '@/store/index.js'
  704. // 字典数据
  705. import dataDictionary from '@/store/dataDictionary.js'
  706. // import defaultVue from "./defaultVue.vue";
  707. import defaultVue from '@/views/homepage/components/homepage.vue'
  708. import { proPath } from '@/config/config.js'
  709. import draggable from 'vuedraggable'
  710. export default {
  711. components: {
  712. usersAddAndEdit,
  713. defaultVue
  714. },
  715. data() {
  716. const validateLockPass = (rule, value, callback) => {
  717. if (value === '') {
  718. callback(new Error('请输入锁屏密码'))
  719. } else {
  720. let reg = /^[A-Za-z0-9]+$/
  721. if (!reg.test(value)) {
  722. return callback(new Error('请输入英文和数字'))
  723. }
  724. callback()
  725. }
  726. }
  727. const validatePass = (rule, value, callback) => {
  728. if (value === '') {
  729. callback(new Error('请输入新密码'))
  730. } else {
  731. if (this.regular !== '') {
  732. let reg = eval('/' + this.regular + '/')
  733. if (!reg.test(value)) {
  734. let message =
  735. this.regularType === 1
  736. ? '至少包含英文、数字、特殊符号中的两种!'
  737. : ''
  738. message +=
  739. '长度需在' + this.minLength + '-' + this.maxLength + '之间'
  740. return callback(new Error(message))
  741. }
  742. } else {
  743. this.getPwdValid()
  744. this.$refs.pwdModal.validateField('newpassword')
  745. }
  746. // let reg = /^[A-Za-z0-9]+$/
  747. // if (!reg.test(value)) {
  748. // return callback(new Error('请输入英文和数字'));
  749. // }
  750. if (this.pwdModal.form.againNewpassword !== '') {
  751. // 对第二个密码框单独验证
  752. this.$refs.pwdModal.validateField('againNewpassword')
  753. }
  754. callback()
  755. }
  756. }
  757. const validatePassCheck = (rule, value, callback) => {
  758. if (value === '') {
  759. callback(new Error('请再次输入新密码'))
  760. } else if (value !== this.pwdModal.form.newpassword) {
  761. callback(new Error('两次输入密码不一致'))
  762. } else {
  763. callback()
  764. }
  765. }
  766. return {
  767. centerDialogVisible: false,
  768. badgeshow: '',
  769. dutyName: '',
  770. regular: '', // 密码策略校验正则表达式
  771. regularType: '',
  772. minLength: 0,
  773. maxLength: 0,
  774. websocket: '',
  775. interval: '',
  776. companys: [], // 用户公司列表
  777. companyId: '', // 选择公司Id
  778. companyName: '', // 选择公司名称
  779. checkedByLogin: false,
  780. strongShow: false,
  781. digit: false,
  782. strongText: '',
  783. strongColor: '',
  784. originalStyle: '',
  785. colors: {
  786. primary: '#20a0ff'
  787. },
  788. theme_color: '#409EFF',
  789. current_theme: 'deepBlue_theme',
  790. theme_group: [
  791. {
  792. label: 'basic_theme',
  793. desc: '默认主题'
  794. },
  795. {
  796. label: 'green_theme',
  797. desc: '护眼主题'
  798. },
  799. {
  800. label: 'deepBlue_theme',
  801. desc: '深蓝色主题'
  802. },
  803. {
  804. label: 'dark_theme',
  805. desc: '黑色主题'
  806. },
  807. {
  808. label: 'red_theme',
  809. desc: '红色主题'
  810. },
  811. {
  812. label: 'Cyan_theme',
  813. desc: '青色主题'
  814. },
  815. {
  816. label: 'yellow_theme',
  817. desc: '黄色主题'
  818. }
  819. ],
  820. theme_origin_color: {
  821. basic_theme: '#409EFF',
  822. deepBlue_theme: '#072ec5',
  823. dark_theme: '#000000',
  824. red_theme: '#F20808',
  825. green_theme: '#008000',
  826. Cyan_theme: '#00ffff',
  827. yellow_theme: '#FFFF00'
  828. },
  829. themeSetFlag: false,
  830. lockErrorMsg: false,
  831. inputLockPwd: '',
  832. lockScreenPwd: window.top.localStorage.getItem('lockpwd'),
  833. lockEventFlag: false,
  834. lockRuleForm: {
  835. pwd: ''
  836. },
  837. lockRules: {
  838. pwd: [
  839. {
  840. required: true,
  841. message: '请输入锁屏密码',
  842. trigger: 'blur'
  843. },
  844. {
  845. min: 1,
  846. max: 128,
  847. message: '长度在 1 到 128 个字符',
  848. trigger: 'change'
  849. },
  850. {
  851. validator: validateLockPass,
  852. trigger: 'change'
  853. }
  854. ]
  855. },
  856. fullScreen: false,
  857. oldMinHeight: 0,
  858. minHeight: 'width: 100%;height: 100%;border: 0px;min-height: 777px',
  859. menuTabIndex: 0,
  860. pageBreadcrumb: [
  861. {
  862. menuId: 1,
  863. menuLabel: '首页'
  864. }
  865. ],
  866. widthLog: '',
  867. leftLog: '',
  868. dragFlag: false,
  869. store,
  870. dataDictionary,
  871. showIframe: false,
  872. selectedMenu: '',
  873. menuType: '2',
  874. menuData: store.state.routes,
  875. tabsData: [],
  876. userInfo: {},
  877. userModal: {
  878. show: false
  879. },
  880. // 修改密码
  881. pwdModal: {
  882. loading: false,
  883. show: false,
  884. form: {
  885. userid: '',
  886. prepassword: '',
  887. newpassword: '',
  888. // 重复密码
  889. againNewpassword: ''
  890. },
  891. ruleValidate: {
  892. prepassword: [
  893. {
  894. required: true,
  895. message: '原密码不能为空',
  896. trigger: 'blur'
  897. }
  898. ],
  899. newpassword: [
  900. {
  901. required: true,
  902. message: '新密码不能为空',
  903. trigger: 'blur'
  904. },
  905. // { type: 'string', max: 64, message: '密码不能多于64个字符', trigger: 'blur' },
  906. {
  907. validator: validatePass,
  908. trigger: 'blur'
  909. }
  910. ],
  911. againNewpassword: [
  912. {
  913. required: true,
  914. message: '确认密码不能为空',
  915. trigger: 'blur'
  916. },
  917. // { type: 'string', max: 64, message: '密码不能多于64个字符', trigger: 'blur' },
  918. {
  919. validator: validatePassCheck,
  920. trigger: 'blur'
  921. }
  922. ]
  923. }
  924. },
  925. inter: undefined,
  926. task1Num: 0, // 我的待办任务
  927. task2Num: 0, // 委托待办任务
  928. myMessageLength: 0, // 我收到的公告
  929. privilegeUpdateIfo: false, // 权限被修改后退出提示框
  930. closeSecond: 5, // 系统退出倒计时
  931. mainPageList: [], //设为主页的菜单页面
  932. orgName: '',
  933. orgId: '',
  934. orgCode: '',
  935. orgDutyLinks: [],
  936. styleControll: false,
  937. dutyId: '',
  938. appId: '',
  939. defaultActiveIndex: '',
  940. taskAllNum: '', //任务数目
  941. socketshow: false, //通知框的显示
  942. orgcodezs: '', //cookie中的orgcode
  943. userId: '', //cookie中的userId
  944. noticedata: [],
  945. noticedata1: {
  946. noticeTitle: 'ceshi',
  947. noticecontent: 'ceshi',
  948. insertusername: 'ceshi',
  949. inserttime: 'ceshi'
  950. },
  951. allowed: []
  952. }
  953. },
  954. created() {
  955. this.orgcodezs = getCookie('orgCode')
  956. this.userId = getCookie('userId')
  957. this.current_theme = window.top.localStorage.getItem('current_theme')
  958. ? window.top.localStorage.getItem('current_theme')
  959. : 'deepBlue_theme'
  960. this.theme_color = this.theme_origin_color[this.current_theme]
  961. this.getIndexStyle()
  962. let w = document.documentElement.clientWidth || document.body.clientWidth
  963. let h = document.documentElement.clientHeight || document.body.clientHeight
  964. if (w <= 1500) {
  965. this.styleControll = true
  966. } else {
  967. this.styleControll = false
  968. }
  969. console.log(this.$route, 'this.route')
  970. console.log('获取到的orgCode+++++++++++++' + this.orgcodezs)
  971. this.getinformation()
  972. let timer=setInterval(()=>{
  973. this.getinformation()
  974. },1000*60)
  975. },
  976. destroyed() {
  977. // 销毁浏览器返回监听
  978. // window.removeEventListener('popstate', this.goBack, false);
  979. clearInterval(this.inter)
  980. // 销毁websocket监听
  981. // this.websocket.onclose = this.close();
  982. },
  983. computed: {},
  984. beforeCreate() {
  985. let userId = getCookie('userId')
  986. this.appId = getCookie('appId')
  987. let menuId = window.top.localStorage.getItem('activeMenu')
  988. let companyId = window.top.localStorage.getItem('companyId')
  989. },
  990. watch: {
  991. checkedByLogin: function(n) {
  992. if (n) {
  993. try {
  994. this.lockRuleForm.pwd = JSON.parse(getCookie('userInfo')).password
  995. } catch (error) {
  996. this.lockRuleForm.pwd = ''
  997. }
  998. } else {
  999. this.lockRuleForm.pwd = ''
  1000. }
  1001. },
  1002. theme_color: function(newV, oldV) {
  1003. let that = this
  1004. that.colors.primary = newV
  1005. console.log(newV)
  1006. console.log($(document.getElementsByTagName('iframe')))
  1007. window.colorVal = newV
  1008. that.primaryColor = this.colors.primary
  1009. that.colors = objectAssign(
  1010. {},
  1011. that.colors,
  1012. generateColors(that.colors.primary)
  1013. )
  1014. let theme_style = that.originalStyle
  1015. Object.keys(that.colors).forEach(key => {
  1016. theme_style = theme_style.replace(
  1017. new RegExp('(:|\\s+)' + key, 'g'),
  1018. '$1' + that.colors[key]
  1019. )
  1020. })
  1021. that.loadNewStyle(document, theme_style)
  1022. for (let i = 0; i < document.getElementsByTagName('iframe').length; i++) {
  1023. try {
  1024. that.loadNewStyle(
  1025. document.getElementsByTagName('iframe')[i].contentDocument,
  1026. theme_style
  1027. )
  1028. } catch (err) {}
  1029. }
  1030. },
  1031. current_theme: function(n) {
  1032. let that = this
  1033. window.top.localStorage.setItem('current_theme', n)
  1034. that.theme_color = that.theme_origin_color[n]
  1035. console.log(that.theme_color)
  1036. console.log('这是')
  1037. for (let i = 0; i < document.getElementsByTagName('iframe').length; i++) {
  1038. console.log(
  1039. document
  1040. .getElementsByTagName('iframe')
  1041. [i].contentDocument.getElementsByClassName('mainVueIndex')[0]
  1042. .className
  1043. )
  1044. try {
  1045. document
  1046. .getElementsByTagName('iframe')
  1047. [i].contentDocument.getElementsByClassName(
  1048. 'mainVueIndex'
  1049. )[0].className = 'main mainVueIndex ' + n
  1050. } catch (err) {}
  1051. }
  1052. },
  1053. menuType: function(newV, oldV) {
  1054. let that = this
  1055. if (newV === '2') {
  1056. that.$nextTick(function() {
  1057. $('.icore-menu-main2').css({
  1058. width: that.widthLog
  1059. })
  1060. $('.sl-container2').css({
  1061. 'padding-left': that.leftLog
  1062. })
  1063. $('.oa-header-user').css({
  1064. width: that.widthLog
  1065. })
  1066. $('.oa-header-upt').css({
  1067. width: ''
  1068. })
  1069. that.setDrag()
  1070. })
  1071. } else {
  1072. that.widthLog = $('.icore-menu-main2').css('width')
  1073. that.leftLog = $('.sl-container2').css('padding-left')
  1074. $('.icore-menu-main2').css({
  1075. width: ''
  1076. })
  1077. $('.sl-container2').css({
  1078. 'padding-left': ''
  1079. })
  1080. $('.oa-header-user').css({
  1081. width: '80px'
  1082. })
  1083. $('.oa-header-upt').css({
  1084. width: '80px'
  1085. })
  1086. }
  1087. },
  1088. selectedMenu: function(menuId) {
  1089. var currentMenu = this.getMenuIndexByMenuId(this.menuData, null, menuId)
  1090. currentMenu &&
  1091. window.top.localStorage.setItem(
  1092. 'currentMenuIndex',
  1093. currentMenu.menuIndex
  1094. )
  1095. }
  1096. },
  1097. mounted() {
  1098. let that = this
  1099. window.onresize = function() {
  1100. let isFull =
  1101. document.fullscreen ||
  1102. document.webkitIsFullScreen ||
  1103. document.msFullscreenEnabled
  1104. isFull = isFull ? true : false
  1105. if (that.fullScreen !== isFull) {
  1106. //要执行的动作
  1107. that.fullScreen = isFull
  1108. }
  1109. }
  1110. // // 监控浏览器返回
  1111. // if (window.history && window.history.pushState) {
  1112. // history.pushState(null, null, document.URL);
  1113. // window.addEventListener('popstate', this.goBack, false);
  1114. // }
  1115. // 取字典(用处不明,且加入租户id后报错!!!!!暂时注释掉!!!!!!!!!!)
  1116. // this.dataDictionary.dispatch('list').then(() => {
  1117. // // console.log(this.dataDictionary.state.dict)
  1118. // });
  1119. this.showIframeEvent()
  1120. this.$nextTick(() => {
  1121. this.minHeight =
  1122. 'width: 100%;height: 100%;border: 0px;min-height: ' +
  1123. ($('#menuTabId').height() - 91) +
  1124. 'px'
  1125. that.checkedByLogin = true
  1126. })
  1127. // 获取公司信息
  1128. this.companyId = window.top.localStorage.getItem('companyId')
  1129. this.companys = JSON.parse(window.top.localStorage.getItem('companys'))
  1130. if (this.companyId !== '' && this.companyId !== null) {
  1131. this.companyName = this.companys.find(
  1132. x => x.id === this.companyId
  1133. ).companyName
  1134. }
  1135. setTimeout(() => {
  1136. this.current_theme = window.top.localStorage.getItem('current_theme')
  1137. ? window.top.localStorage.getItem('current_theme')
  1138. : 'deepBlue_theme'
  1139. }, 1000)
  1140. // 获取我的待办任务
  1141. var arr = ['#/authManage']
  1142. if ($.inArray(location.hash, arr) == -1) {
  1143. //that.getMyToDoDelegateTask();
  1144. //that.getMyToDoTask();
  1145. }
  1146. that.getMyMessage()
  1147. // 直接关闭浏览器窗口或者标签页时,关闭websocket连接
  1148. // window.onbeforeunload = function () {
  1149. // // that.send("closesocket:");
  1150. // that.close();
  1151. // }
  1152. // 获取当前密码策略校验
  1153. that.getPwdValid()
  1154. // 获取机构职级
  1155. that.getOrgDutyList()
  1156. },
  1157. methods: {
  1158. //弹框删除
  1159. async makeSure() {
  1160. let noticeid = this.noticedata1.noticeid
  1161. console.log(this.noticedata1)
  1162. this.noticedata1 = []
  1163. this.centerDialogVisible = false
  1164. await this.axios
  1165. .post('/api/v1/ams/updateNoticeStatus', {
  1166. userId: this.userId,
  1167. noticeId: noticeid
  1168. })
  1169. .then(res => {
  1170. console.log(res.data)
  1171. if (res.data.data === 0) {
  1172. this.badgeshow = true
  1173. } else {
  1174. console.log('进入了小红点标记区')
  1175. this.taskAllNum = res.data.data
  1176. }
  1177. })
  1178. this.getinformation()
  1179. },
  1180. // 判断是否为公司其他平台模块且处于开发模式
  1181. isDev(url) {
  1182. let isDevModule = false
  1183. if (
  1184. url.indexOf('steerinfo.com') !== -1 &&
  1185. document.domain.indexOf('steerinfo.com') === -1
  1186. ) {
  1187. isDevModule = true
  1188. }
  1189. return isDevModule
  1190. },
  1191. // 根据当前模式更改菜单跳转url
  1192. getDevUrl(url) {
  1193. let newUrl = ''
  1194. let index = url.indexOf('steerinfo.com')
  1195. return (newUrl = url.substring(index).replace('steerinfo.com/views', '.'))
  1196. },
  1197. // 根据https/http跳转
  1198. toTrustUrl(url) {
  1199. let newUrl = ''
  1200. if (url.indexOf('https:') === -1 && url.indexOf('http:') > -1) {
  1201. newUrl = url.replace('http:', window.top.location.protocol)
  1202. } else if (url.indexOf('https:') > -1) {
  1203. newUrl = url.replace('https:', window.top.location.protocol)
  1204. } else {
  1205. newUrl = url
  1206. }
  1207. return newUrl
  1208. },
  1209. // 获取当前密码策略
  1210. getPwdValid() {
  1211. this.axios
  1212. .get('pass/v1/syspwdpolicys/getExecutingPwdPolicy')
  1213. .then(res => {
  1214. if (res.code === '0') {
  1215. this.regular = res.data.regular
  1216. this.regularType = res.data.regularType
  1217. this.minLength = res.data.minLength
  1218. this.maxLength = res.data.maxLength
  1219. } else {
  1220. this.$message.error(res.message)
  1221. }
  1222. })
  1223. .catch(err => {
  1224. console.log(err)
  1225. })
  1226. },
  1227. /**
  1228. * 样式加载
  1229. *
  1230. */
  1231. loadNewStyle(doc, theme_style) {
  1232. let child = doc.getElementById('theme')
  1233. if (child !== null) {
  1234. doc.getElementsByTagName('head')[0].removeChild(child)
  1235. }
  1236. let a = document.createElement('style')
  1237. a.setAttribute('id', 'theme')
  1238. a.innerHTML = theme_style
  1239. doc.getElementsByTagName('head')[0].appendChild(a)
  1240. },
  1241. // 验证密码强度的事件
  1242. inputThing(val) {
  1243. let _this = this
  1244. let arr = []
  1245. let i = 0
  1246. arr[0] = /[^a-zA-Z0-9_]/g
  1247. arr[1] = /[a-z]/g
  1248. arr[2] = /[0-9]/g
  1249. arr[3] = /[A-Z]/g
  1250. if (val.length >= 6) {
  1251. arr.forEach(res => {
  1252. if (val.match(res)) {
  1253. i++
  1254. }
  1255. })
  1256. switch (i) {
  1257. case 0:
  1258. _this.strongShow = false
  1259. break
  1260. case 1:
  1261. _this.strongShow = true
  1262. _this.strongText = '弱'
  1263. _this.strongColor = '#F26299'
  1264. _this.digit = true
  1265. break
  1266. case 2:
  1267. _this.strongShow = true
  1268. _this.strongText = '中'
  1269. _this.strongColor = '#F29E55'
  1270. break
  1271. case 3:
  1272. _this.strongShow = true
  1273. _this.strongText = '强'
  1274. _this.strongColor = '#4CD995'
  1275. break
  1276. }
  1277. } else if (!val) {
  1278. _this.strongShow = false
  1279. } else {
  1280. _this.strongShow = true
  1281. _this.strongText = '弱'
  1282. _this.strongColor = '#F26299'
  1283. _this.digit = false
  1284. }
  1285. },
  1286. /**
  1287. * 加载全局样式;
  1288. */
  1289. getStyleTemplate(data) {
  1290. const colorMap = {
  1291. '#3a8ee6': 'shade-1',
  1292. '#409eff': 'primary',
  1293. '#53a8ff': 'light-1',
  1294. '#66b1ff': 'light-2',
  1295. '#79bbff': 'light-3',
  1296. '#8cc5ff': 'light-4',
  1297. '#a0cfff': 'light-5',
  1298. '#b3d8ff': 'light-6',
  1299. '#c6e2ff': 'light-7',
  1300. '#d9ecff': 'light-8',
  1301. '#ecf5ff': 'light-9'
  1302. }
  1303. Object.keys(colorMap).forEach(key => {
  1304. const value = colorMap[key]
  1305. data = data.replace(new RegExp(key, 'ig'), value)
  1306. })
  1307. return data
  1308. },
  1309. getIndexStyle() {
  1310. let data = `@charset "UTF-8"; ${element_css_json_import.element_css}`
  1311. this.originalStyle = this.getStyleTemplate(data)
  1312. },
  1313. /**
  1314. * 解除锁屏
  1315. *
  1316. */
  1317. setLock() {
  1318. let that = this
  1319. let crypto = require('crypto')
  1320. if (
  1321. that.lockScreenPwd === that.inputLockPwd ||
  1322. that.lockScreenPwd ===
  1323. crypto
  1324. .createHash('sha1')
  1325. .update(that.inputLockPwd)
  1326. .digest('hex')
  1327. ) {
  1328. window.top.localStorage.setItem('lockpwd', '')
  1329. that.lockScreenPwd = ''
  1330. that.inputLockPwd = ''
  1331. } else {
  1332. that.inputLockPwd = ''
  1333. that.lockErrorMsg = true
  1334. setTimeout(() => {
  1335. that.lockErrorMsg = false
  1336. }, 1000)
  1337. }
  1338. },
  1339. /**
  1340. * 锁屏退出登录
  1341. */
  1342. lockSignOut() {
  1343. let that = this
  1344. that.store
  1345. .dispatch('loginOut')
  1346. .then(function(res) {
  1347. window.location.href = './index.html'
  1348. })
  1349. .catch(function() {
  1350. // TODO
  1351. })
  1352. },
  1353. /**
  1354. *打开主页
  1355. */
  1356. backMain() {
  1357. this.$message.success('跳转主页')
  1358. // window.open(
  1359. // window.location.protocol + "//portal.steerinfo.com",
  1360. // "_blank"
  1361. // );
  1362. },
  1363. /**
  1364. * 主题
  1365. */
  1366. themeEvent() {
  1367. let that = this
  1368. that.themeSetFlag = true
  1369. },
  1370. /**
  1371. * 锁屏
  1372. */
  1373. lockEvent() {
  1374. let that = this
  1375. if (!that.checkedByLogin) {
  1376. that.lockRuleForm.pwd = ''
  1377. }
  1378. that.lockEventFlag = true
  1379. },
  1380. lockEventSet() {
  1381. let that = this
  1382. this.$refs.lockRuleForm.validate(valid => {
  1383. if (valid) {
  1384. window.top.localStorage.setItem('lockpwd', that.lockRuleForm.pwd)
  1385. that.lockScreenPwd = that.lockRuleForm.pwd
  1386. that.lockEventFlag = false
  1387. that.$nextTick(() => {
  1388. that.$refs.lockInput.focus()
  1389. })
  1390. } else {
  1391. return false
  1392. }
  1393. })
  1394. },
  1395. /*
  1396. 全屏
  1397. */
  1398. fullScreenEvent() {
  1399. let that = this
  1400. let main = document.documentElement
  1401. if (that.fullScreen) {
  1402. if (document.exitFullscreen) {
  1403. document.exitFullscreen()
  1404. } else if (document.mozCancelFullScreen) {
  1405. document.mozCancelFullScreen()
  1406. } else if (document.webkitCancelFullScreen) {
  1407. document.webkitCancelFullScreen()
  1408. } else if (document.msExitFullscreen) {
  1409. document.msExitFullscreen()
  1410. }
  1411. } else {
  1412. // 开始全屏操作
  1413. var currentIfrm = $('#menuTabId')
  1414. .find('div[role=tabpanel]:visible')
  1415. .find('iframe')
  1416. $('.oa-header-user')
  1417. .hide()
  1418. .next()
  1419. .hide()
  1420. $('#outerHeader').hide()
  1421. $('#mainContainer').css('paddingLeft', '0')
  1422. $('#menuTabId')
  1423. .css('padding', 0)
  1424. .children(':eq(0)')
  1425. .hide()
  1426. $('.sl-content-main', top.document).css('height', 'initial')
  1427. // 先保留全屏前的iframe高度
  1428. this.oldMinHeight = currentIfrm.css('min-height')
  1429. // 将最小高度设置成当前分辨率的高度
  1430. currentIfrm.css('min-height', window.screen.height)
  1431. if (main.requestFullscreen) {
  1432. main.requestFullscreen()
  1433. } else if (main.mozRequestFullScreen) {
  1434. main.mozRequestFullScreen()
  1435. } else if (main.webkitRequestFullScreen) {
  1436. main.webkitRequestFullScreen()
  1437. } else if (main.msRequestFullscreen) {
  1438. main.msRequestFullscreen()
  1439. }
  1440. }
  1441. that.fullScreen = !that.fullScreen
  1442. },
  1443. // 下拉选择公司
  1444. selectComPany(command) {
  1445. this.$confirm('此操作将刷新系统页面, 是否继续?', '提示', {
  1446. confirmButtonText: '确定',
  1447. cancelButtonText: '取消',
  1448. type: 'warning'
  1449. })
  1450. .then(() => {
  1451. this.companyId = command.id
  1452. this.companyName = command.companyName
  1453. // 查询列表
  1454. this.store
  1455. .dispatch('generateRoutes', {
  1456. companyId: command.id,
  1457. appId: this.appId
  1458. })
  1459. .then(res => {
  1460. if (res.code === '0') {
  1461. this.store.commit('addRouters', res.data)
  1462. } else {
  1463. this.$message({
  1464. message: res.message,
  1465. type: 'error'
  1466. })
  1467. }
  1468. })
  1469. window.top.localStorage.setItem('companyId', command.id)
  1470. window.location.reload()
  1471. this.$message({
  1472. type: 'success',
  1473. message: '正在为您更新数据...'
  1474. })
  1475. })
  1476. .catch(error => {
  1477. console.log(error)
  1478. this.$message({
  1479. type: 'info',
  1480. message: '已取消操作'
  1481. })
  1482. })
  1483. },
  1484. selectOrg(command) {
  1485. this.$confirm('此操作将切换用户所在机构及职级, 是否继续?', '提示', {
  1486. confirmButtonText: '确定',
  1487. cancelButtonText: '取消',
  1488. type: 'warning'
  1489. })
  1490. .then(() => {
  1491. this.orgName = command.orgName
  1492. this.orgId = command.orgId
  1493. this.dutyName = command.dutys ? command.dutys[0].dutyName : ''
  1494. this.dutyId = command.dutys ? command.dutys[0].dutyId : ''
  1495. window.top.localStorage.setItem('dutyName', this.dutyName)
  1496. window.top.localStorage.setItem('dutyId', this.dutyId)
  1497. window.top.localStorage.setItem('orgId', command.orgId)
  1498. window.top.localStorage.setItem('orgCode', command.orgCode)
  1499. window.location.reload()
  1500. this.$message({
  1501. type: 'success',
  1502. message: '正在为您更新数据...'
  1503. })
  1504. this.updateUserInfo()
  1505. })
  1506. .catch(error => {
  1507. console.log(error)
  1508. this.$message({
  1509. type: 'info',
  1510. message: '已取消操作'
  1511. })
  1512. })
  1513. },
  1514. // 更新用户当前机构及职级
  1515. async updateUserInfo() {
  1516. // do
  1517. },
  1518. getOrgDutyList() {
  1519. let that = this
  1520. that.axios
  1521. .get('pass/v1/sysorgs/findOrgs?companyId=' + this.companyId)
  1522. .then(res => {
  1523. if (res.code === '0') {
  1524. this.orgDutyLinks = res.data
  1525. if (this.orgDutyLinks.length > 0) {
  1526. let orgId = window.top.localStorage.getItem('orgId')
  1527. if (orgId && orgId !== '' && orgId !== null) {
  1528. let obj = this.orgDutyLinks.find(x => x.orgId === orgId)
  1529. if (obj) {
  1530. this.orgId = orgId
  1531. this.orgName = obj.orgName
  1532. this.orgCode = obj.orgCode
  1533. this.dutyName = obj.dutys ? obj.dutys[0].dutyName : ''
  1534. this.dutyId = obj.dutys ? obj.dutys[0].dutyId : ''
  1535. } else {
  1536. this.orgName = res.data[0].orgName
  1537. this.orgId = res.data[0].orgId
  1538. this.orgCode = res.data[0].orgCode
  1539. this.dutyName = res.data[0].dutys
  1540. ? res.data[0].dutys[0].dutyName
  1541. : ''
  1542. this.dutyId = res.data[0].dutys
  1543. ? res.data[0].dutys.dutyId
  1544. : ''
  1545. }
  1546. } else {
  1547. this.orgName = res.data[0].orgName
  1548. this.orgId = res.data[0].orgId
  1549. this.orgCode = res.data[0].orgCode
  1550. this.dutyName = res.data[0].dutys
  1551. ? res.data[0].dutys[0].dutyName
  1552. : ''
  1553. this.dutyId = res.data[0].dutys
  1554. ? res.data[0].dutys[0].dutyId
  1555. : ''
  1556. this.updateUserInfo()
  1557. }
  1558. window.top.localStorage.setItem('orgId', this.orgId)
  1559. window.top.localStorage.setItem('orgCode', this.orgCode)
  1560. window.top.localStorage.setItem('dutyName', this.dutyName)
  1561. window.top.localStorage.setItem('dutyId', this.dutyId)
  1562. }
  1563. } else {
  1564. this.$message.error(res.message)
  1565. }
  1566. })
  1567. .catch(err => {
  1568. console.log(err)
  1569. })
  1570. },
  1571. visibleChange(f) {
  1572. let that = this
  1573. if (!f) {
  1574. $('.contextmenu').css({
  1575. display: 'none'
  1576. })
  1577. }
  1578. },
  1579. handleCommand(command) {
  1580. let that = this
  1581. switch (command) {
  1582. case 'a': //关闭当前标签
  1583. $('#menuTabId .el-icon-close')
  1584. .eq(that.menuTabIndex)
  1585. .click()
  1586. break
  1587. case 'b': //关闭其他标签
  1588. var removeTarget = []
  1589. var len = that.tabsData.length - that.menuTabIndex - 1
  1590. for (let i = 0; i < len; i++) {
  1591. removeTarget.push(
  1592. $('#menuTabId .el-icon-close').eq(that.menuTabIndex + i + 1)
  1593. )
  1594. }
  1595. for (let i = 0; i < that.menuTabIndex; i++) {
  1596. removeTarget.push($('#menuTabId .el-icon-close').eq(i))
  1597. }
  1598. for (let i = 0; i < removeTarget.length; i++) {
  1599. $(removeTarget[i]).click()
  1600. }
  1601. break
  1602. case 'c': //关闭右侧标签
  1603. var removeTarget = []
  1604. var len = that.tabsData.length - that.menuTabIndex - 1
  1605. for (let i = 0; i < len; i++) {
  1606. removeTarget.push(
  1607. $('#menuTabId .el-icon-close').eq(that.menuTabIndex + i + 1)
  1608. )
  1609. }
  1610. for (let i = 0; i < removeTarget.length; i++) {
  1611. $(removeTarget[i]).click()
  1612. }
  1613. break
  1614. case 'd': // 刷新当前标签页
  1615. $('#menuTabId .el-tabs__item')
  1616. .eq(that.menuTabIndex)
  1617. .click()
  1618. $('#menuTabId iframe')
  1619. .eq(that.menuTabIndex)[0]
  1620. .contentWindow.location.reload(true)
  1621. break
  1622. }
  1623. },
  1624. // 右键菜单
  1625. rightShow($event, index, item) {
  1626. let that = this
  1627. that.menuTabIndex = index
  1628. $('.contextmenu').css({
  1629. left: $event.pageX + 120 + 'px',
  1630. top: $event.pageY + 'px',
  1631. display: 'block'
  1632. })
  1633. $('#setClick').click()
  1634. $event.preventDefault()
  1635. },
  1636. gotoSetPage(item) {
  1637. let that = this
  1638. let menuData = item.preTarget
  1639. if (!menuData) {
  1640. return
  1641. }
  1642. that.tabsData.push(menuData)
  1643. that.selectedMenu = menuData.menuId
  1644. that.pageBreadcrumb = item.pageBreadcrumb
  1645. that.axios
  1646. .post(proPath + 'v1/sysmenus/accessOwnAdd', {
  1647. userId: that.$store.state.userInfo.userId,
  1648. menuId: menuData.menuId
  1649. })
  1650. .then(function(response) {})
  1651. .catch(function() {})
  1652. },
  1653. // 判断是否在iframe下
  1654. showIframeEvent() {
  1655. var that = this
  1656. var thisDocument = document
  1657. try {
  1658. var topDocument = window.top.document
  1659. } catch (err) {
  1660. thisDocument.getElementsByClassName(
  1661. 'icore-menu-main'
  1662. )[0].style.display = 'none'
  1663. thisDocument.getElementsByClassName('sl-header')[0].style.display =
  1664. 'none'
  1665. thisDocument.getElementById('mainContainer').style.padding = '0px'
  1666. return
  1667. }
  1668. var routerCover = this.$router.history.current.query
  1669. var routerParams = this.$router.history.current.params
  1670. var routerFlag = 0
  1671. var routerFlagP = 0
  1672. for (var i in routerCover) {
  1673. routerFlag = routerFlag + 1
  1674. }
  1675. for (var j in routerParams) {
  1676. routerFlagP = routerFlagP + 1
  1677. }
  1678. that.showIframe =
  1679. thisDocument === topDocument && routerFlag === 0 && routerFlagP === 0
  1680. if (that.showIframe) {
  1681. that.getUserInfo()
  1682. thisDocument.getElementById('mainContainer').style['padding-left'] =
  1683. '179px'
  1684. // websocket初始化
  1685. let token = getCookie('accessToken')
  1686. if (token) {
  1687. this.init(token)
  1688. }
  1689. // 打开设为主页的菜单
  1690. // that.openMainPage();
  1691. // 自动打开上一次访问页面
  1692. that.autoOpenLatestPage()
  1693. }
  1694. if (routerFlag > 0 || routerFlagP > 0) {
  1695. that.menuType = '1'
  1696. }
  1697. var setShowIframe = setInterval(function() {
  1698. for (
  1699. let i = 0;
  1700. i < window.top.document.getElementsByTagName('iframe').length;
  1701. i++
  1702. ) {
  1703. if (
  1704. window.top.document.getElementsByTagName('iframe')[i]
  1705. .contentDocument !== null &&
  1706. window.top.document
  1707. .getElementsByTagName('iframe')
  1708. [i].contentDocument.getElementsByClassName('icore-menu-main')
  1709. .length > 0
  1710. ) {
  1711. $(
  1712. window.top.document.getElementsByTagName('iframe')[i].parentNode
  1713. .parentNode
  1714. ).css({
  1715. height: 'calc(100% - 31px)'
  1716. })
  1717. $(
  1718. window.top.document.getElementsByTagName('iframe')[i].parentNode
  1719. ).css({
  1720. height: '100%'
  1721. })
  1722. window.top.document
  1723. .getElementsByTagName('iframe')
  1724. [i].contentDocument.getElementsByClassName(
  1725. 'icore-menu-main'
  1726. )[0].style.display = 'none'
  1727. window.top.document
  1728. .getElementsByTagName('iframe')
  1729. [i].contentDocument.getElementsByClassName(
  1730. 'sl-header'
  1731. )[0].style.display = 'none'
  1732. window.top.document
  1733. .getElementsByTagName('iframe')
  1734. [i].contentDocument.getElementsByClassName(
  1735. 'sl-content-main'
  1736. )[0].style.height = '100%'
  1737. window.top.document
  1738. .getElementsByTagName('iframe')
  1739. [i].contentDocument.getElementById(
  1740. 'mainContainer'
  1741. ).style.padding = '0px'
  1742. if (
  1743. i ===
  1744. window.top.document.getElementsByTagName('iframe').length - 1
  1745. ) {
  1746. clearInterval(setShowIframe)
  1747. }
  1748. }
  1749. }
  1750. if (window.top.document.getElementsByTagName('iframe').length === 0) {
  1751. if (!that.showIframe) {
  1752. thisDocument.getElementById('mainContainer').style['padding-left'] =
  1753. '0px'
  1754. thisDocument.getElementsByClassName(
  1755. 'sl-content-main'
  1756. )[0].style.height = '100%'
  1757. }
  1758. clearInterval(setShowIframe)
  1759. }
  1760. }, 20)
  1761. that.setDrag()
  1762. },
  1763. handleOperate() {
  1764. setTimeout(() => {
  1765. this.$nextTick(() => {
  1766. let heightOld = $('.icore-menu-main')[0].clientHeight
  1767. let height = $('.icore-menu-main')[0].scrollHeight
  1768. if (height !== 0) {
  1769. // 菜单收缩后scrollHeight复原
  1770. window.top.document.getElementsByClassName(
  1771. 'menuDrag'
  1772. )[0].style.height = heightOld + 'px'
  1773. // 再次赋值
  1774. let heightNew = $('.icore-menu-main')[0].scrollHeight
  1775. window.top.document.getElementsByClassName(
  1776. 'menuDrag'
  1777. )[0].style.height = heightNew + 'px'
  1778. }
  1779. })
  1780. }, 500)
  1781. },
  1782. setDrag() {
  1783. let that = this
  1784. if (that.showIframe) {
  1785. that.$nextTick(() => {
  1786. window.top.document.getElementsByClassName(
  1787. 'menuDrag'
  1788. )[0].style.height = $('.icore-menu-main')[0].scrollHeight + 'px'
  1789. })
  1790. }
  1791. $('#menuDrag').unbind()
  1792. $('#menuDrag').mousedown(function(event) {
  1793. that.dragFlag = true
  1794. $(event.target).data('dragStart', event.pageX)
  1795. $(event.target).data('dragWidth', $('.icore-menu-main2').outerWidth())
  1796. $('body').css({
  1797. cursor: 'col-resize'
  1798. })
  1799. let _html =
  1800. '<div id="dragsc" style="height: 100%;width: 100%;position: absolute;top: 0;z-index: 888;"></div>'
  1801. $('body').append(_html)
  1802. $('body').mousemove(function(e) {
  1803. if (!that.dragFlag) {
  1804. $(this).css({
  1805. cursor: ''
  1806. })
  1807. $('#dragsc').remove()
  1808. $(this).unbind(e)
  1809. } else {
  1810. var startX = $('#menuDrag').data('dragStart')
  1811. var endX = e.pageX
  1812. var change = endX - startX
  1813. var containerWidth = $('#menuDrag').data('dragWidth')
  1814. // console.log('containerWidth + change = ' + (containerWidth + change))
  1815. if (containerWidth + change < 180) {
  1816. $('.icore-menu-main2').css({
  1817. width: '180px'
  1818. })
  1819. $('.oa-header-user').css({
  1820. width: ''
  1821. })
  1822. $('.sl-container2').css({
  1823. 'padding-left': '179px'
  1824. })
  1825. } else if (containerWidth + change <= 800) {
  1826. $('.icore-menu-main2').css({
  1827. width: containerWidth + change + 'px'
  1828. })
  1829. $('.sl-container2').css({
  1830. 'padding-left': containerWidth + change - 1 + 'px'
  1831. })
  1832. $('.oa-header-user').css({
  1833. width: containerWidth + change + 'px'
  1834. })
  1835. }
  1836. }
  1837. })
  1838. $('body').mouseup(function(ev) {
  1839. that.dragFlag = false
  1840. $(this).unbind(ev)
  1841. })
  1842. })
  1843. },
  1844. // tabs选项选择
  1845. handleClick(tab, event) {
  1846. let that = this
  1847. let pageBreadcrumb = $($('.pageBreadcrumb')[parseInt(tab.index)]).html()
  1848. that.pageBreadcrumb = JSON.parse(pageBreadcrumb)
  1849. window.top.localStorage.setItem('activeMenu', tab.name)
  1850. that.menuTabIndex = that.getTabIndex(tab.name)
  1851. for (let i = 0; i < this.mainPageList.length - 1; i++) {
  1852. if (
  1853. tab.name === this.mainPageList[i].menuId &&
  1854. this.mainPageList[i].mainPageLoading === true
  1855. ) {
  1856. $('#menuTabId iframe')
  1857. .eq(that.menuTabIndex)[0]
  1858. .contentWindow.location.reload(true)
  1859. this.mainPageList[i].mainPageLoading = false
  1860. }
  1861. }
  1862. },
  1863. removeTab(targetName) {
  1864. var that = this
  1865. var spliceIndex = null
  1866. var temp = []
  1867. for (let i = 0; i < this.mainPageList.length - 1; i++) {
  1868. if (targetName === this.mainPageList[i].menuId) {
  1869. this.mainPageList[i].mainPageLoading = false
  1870. }
  1871. }
  1872. for (var i = 0; i < that.tabsData.length; i++) {
  1873. temp.push(that.tabsData[i])
  1874. if (targetName === that.tabsData[i].menuId) {
  1875. spliceIndex = i
  1876. }
  1877. }
  1878. if (spliceIndex !== null) {
  1879. temp.splice(spliceIndex, 1)
  1880. }
  1881. if (that.selectedMenu === that.tabsData[spliceIndex].menuId) {
  1882. if (temp.length !== 0) {
  1883. var showIndex = spliceIndex
  1884. if (showIndex > temp.length - 1) {
  1885. showIndex = temp.length - 1
  1886. }
  1887. that.selectedMenu = temp[showIndex].menuId
  1888. window.top.localStorage.setItem('activeMenu', that.selectedMenu)
  1889. that.pageBreadcrumb = temp[showIndex].pageBreadcrumb
  1890. } else {
  1891. that.pageBreadcrumb = [
  1892. {
  1893. menuId: 1,
  1894. menuLabel: '首页'
  1895. }
  1896. ]
  1897. window.top.localStorage.setItem('currentMenuIndex', '')
  1898. }
  1899. }
  1900. that.tabsData = temp
  1901. },
  1902. // 菜单选择
  1903. selectMenu(menuData, pageBreadcrumb) {
  1904. console.log('menuData')
  1905. console.log(menuData)
  1906. // console.log(pageBreadcrumb)
  1907. var that = this
  1908. if (
  1909. menuData.menuUrl !== null &&
  1910. menuData.menuUrl !== '' &&
  1911. typeof menuData.menuUrl !== 'undefined'
  1912. ) {
  1913. window.top.localStorage.setItem('activeMenu', menuData.menuId)
  1914. var temp = []
  1915. menuData.pageBreadcrumb = pageBreadcrumb
  1916. var setTabsFlag = true
  1917. for (var i = 0; i < that.tabsData.length; i++) {
  1918. if (menuData.menuId === that.tabsData[i].menuId) {
  1919. setTabsFlag = false
  1920. break
  1921. }
  1922. }
  1923. if (setTabsFlag) {
  1924. for (var j = 0; j < that.tabsData.length; j++) {
  1925. temp.push(that.tabsData[j])
  1926. }
  1927. temp.push(menuData)
  1928. that.tabsData.push(menuData)
  1929. }
  1930. that.selectedMenu = menuData.menuId
  1931. that.pageBreadcrumb = pageBreadcrumb
  1932. that.axios
  1933. .post(proPath + 'v1/sysmenus/accessOwnAdd', {
  1934. userId: that.$store.state.userInfo.userId,
  1935. menuId: menuData.menuId
  1936. })
  1937. .then(function(response) {})
  1938. .catch(function() {})
  1939. this.$nextTick(() => {
  1940. console.log($(document.getElementsByTagName('iframe')))
  1941. })
  1942. }
  1943. // console.log('目录', that.selectedMenu, that.tabsData)
  1944. // 左侧菜单点击切换的时候需要重新加载页面
  1945. that.menuTabIndex = that.getTabIndex(menuData.menuId)
  1946. $('#menuTabId iframe').eq(that.menuTabIndex).length &&
  1947. $('#menuTabId iframe')
  1948. .eq(that.menuTabIndex)[0]
  1949. .contentWindow.location.reload(true)
  1950. },
  1951. // 是否合部都不是菜单就不用显示
  1952. allNoMenu(items) {
  1953. let bol = false
  1954. for (let item of items) {
  1955. if (item.menuType === '1' || item.menuType === '4') {
  1956. // 有菜单
  1957. bol = true
  1958. break
  1959. }
  1960. }
  1961. return bol
  1962. },
  1963. //
  1964. signOut() {
  1965. let _this = this
  1966. _this
  1967. .$msgbox({
  1968. title: '退出提示',
  1969. message: '确定退出登录吗?',
  1970. showCancelButton: true,
  1971. confirmButtonText: '确定',
  1972. cancelButtonText: '取消',
  1973. beforeClose: (action, instance, done) => {
  1974. if (action === 'confirm') {
  1975. instance.confirmButtonLoading = true
  1976. instance.confirmButtonText = '执行中...'
  1977. // ajax
  1978. let res = this.axios.get('pass/logout', {
  1979. params: {
  1980. authorization: getCookie('accessToken')
  1981. }
  1982. })
  1983. res
  1984. .then(function(res) {
  1985. console.log(111)
  1986. instance.confirmButtonText = '确定'
  1987. instance.confirmButtonLoading = false
  1988. done()
  1989. window.location.href = './index.html'
  1990. })
  1991. .catch(function() {
  1992. instance.confirmButtonText = '确定'
  1993. instance.confirmButtonLoading = false
  1994. done()
  1995. })
  1996. } else {
  1997. done()
  1998. }
  1999. }
  2000. })
  2001. .then(action => {})
  2002. },
  2003. // 查看个人信息
  2004. showPersonInfo() {
  2005. // 打开查看
  2006. this.userModal.show = true
  2007. let userId = this.$store.state.userInfo.userId
  2008. },
  2009. getUserInfo() {
  2010. let that = this
  2011. if (that.$store.state.userInfo) {
  2012. that.axios
  2013. .get(proPath + 'v1/sysusers/' + that.$store.state.userInfo.userId)
  2014. .then(function(response) {
  2015. if (response) {
  2016. that.userInfo = response.data
  2017. top.globalUserInfo = response.data
  2018. }
  2019. })
  2020. }
  2021. },
  2022. // 隐藏侧边栏
  2023. changeMenuType() {
  2024. if (this.menuType === '2') {
  2025. this.menuType = '1'
  2026. } else {
  2027. this.menuType = '2'
  2028. }
  2029. },
  2030. // 菜单选中
  2031. thisMenu(item) {
  2032. for (let b of this.pageBreadcrumb) {
  2033. if (b.menuId === item.menuId) {
  2034. return true
  2035. }
  2036. }
  2037. return false
  2038. },
  2039. // 弹窗完成
  2040. userModalThen(str, item) {
  2041. // console.log('代码执行了')
  2042. switch (str) {
  2043. case 'close':
  2044. this.userModal.show = false
  2045. break
  2046. case 'success':
  2047. this.userModal.show = false
  2048. // 刷新
  2049. this.store.dispatch('getUserInfo')
  2050. break
  2051. }
  2052. },
  2053. // 修改密码
  2054. pwdSubmit() {
  2055. // if (this.strongText === '弱' && this.digit) {
  2056. // this.$message.warning('密码安全等级太弱')
  2057. // return
  2058. // } else if (this.strongText === '弱' && !this.digit) {
  2059. // this.$message.warning('密码不能小于六位数')
  2060. // return
  2061. // }
  2062. this.$refs['pwdModal'].validate(valid => {
  2063. if (valid) {
  2064. // if (this.pwdModal.form.newpassword.length > 16) {
  2065. // this.$message.warning('密码最长为16个字符')
  2066. // return
  2067. // }
  2068. this.pwdModal.loading = true
  2069. this.pwdModal.form.userid = this.store.state.userInfo.id
  2070. this.store
  2071. .dispatch('system/usersManage/updpsw', this.pwdModal.form)
  2072. .then(res => {
  2073. this.pwdModal.loading = false
  2074. if (res.code === '0') {
  2075. this.$message.success('设置成功')
  2076. this.strongShow = false
  2077. this.pwdModal.show = false
  2078. } else {
  2079. this.$message.error(res.message)
  2080. }
  2081. })
  2082. }
  2083. })
  2084. },
  2085. // 打开修改密码弹窗
  2086. openPwd() {
  2087. this.$refs['pwdModal'].resetFields && this.$refs['pwdModal'].resetFields()
  2088. this.strongShow = false
  2089. },
  2090. // 弹窗完成
  2091. userModalThen(str, item) {
  2092. let that = this
  2093. switch (str) {
  2094. case 'close':
  2095. that.userModal.show = false
  2096. break
  2097. case 'success':
  2098. that.userModal.show = false
  2099. // 刷新
  2100. that.getUser(that.tableParams.form)
  2101. break
  2102. }
  2103. },
  2104. // 关闭弹窗
  2105. userModalClose() {},
  2106. // 修改完毕重新请求数据
  2107. updataUserInfo(data) {
  2108. this.getUserInfo()
  2109. this.$store.commit('userInfo', data)
  2110. },
  2111. init: function(token) {
  2112. let that = this
  2113. // 192.168.10.231:9008本地
  2114. let path = ''
  2115. if (
  2116. window.top.document.location.origin.indexOf('icore-paas-test') !== -1 ||
  2117. window.top.document.location.origin.indexOf('localhost') !== -1
  2118. ) {
  2119. path =
  2120. 'wss://websocket-dev.steerinfo.com/websocket?type=pass&token=' + token
  2121. } else {
  2122. path =
  2123. 'wss://websocket.steerinfo.com/websocket?type=pass&token=' + token
  2124. }
  2125. if ('WebSocket' in window) {
  2126. // 实例化websocket
  2127. this.websocket = new WebSocket(path)
  2128. // 监听websocket连接
  2129. this.websocket.onopen = this.open
  2130. // 监听websocket错误信息
  2131. this.websocket.onerror = this.error
  2132. // 监听websocket消息
  2133. this.websocket.onmessage = this.getMessage
  2134. //每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
  2135. // this.interval = window.setInterval(function(){
  2136. // if(that.websocket !== null){
  2137. // if (that.websocket.readyState !== that.websocket.OPEN) {
  2138. // let token = getCookie('accessToken');
  2139. // if (token) {
  2140. // that.init(token);
  2141. // }
  2142. // }
  2143. // // } else {
  2144. // // that.websocket.send('HeartBeat');
  2145. // // // console.log("发送心跳包:HeartBeat");
  2146. // // }
  2147. // }
  2148. // },30000);
  2149. } else {
  2150. alert('您当前浏览器不支持WebSocket')
  2151. // 每隔30秒钟发送一次心跳,避免websocket连接因超时而自动断开
  2152. // forgeWebSocket这个方法是在不支持websocket的浏览器中去执行,这个方法作用是作为最早得轮询方式去保持长连接。这样不管浏览器支不支持websocket都能保持长连接的功能作用
  2153. // this.interval = window.setInterval(function(){
  2154. // that.forgeWebSocket();
  2155. // },30000);
  2156. }
  2157. },
  2158. open: function() {
  2159. console.log('websocket连接成功')
  2160. },
  2161. error: function() {
  2162. console.log('连接错误')
  2163. },
  2164. getTabIndex(menuId) {
  2165. let index = 0
  2166. for (let i = 0; i < this.tabsData.length; i++) {
  2167. if (this.tabsData[i].menuId === menuId) {
  2168. index = i
  2169. }
  2170. }
  2171. return index
  2172. },
  2173. getMessage: function(msg) {
  2174. let that = this
  2175. // console.log(msg.data);
  2176. let newMsg = JSON.parse(msg.data)
  2177. let message = ''
  2178. if (Object.prototype.toString.call(newMsg) === '[object Object]') {
  2179. message = newMsg
  2180. } else if (Object.prototype.toString.call(newMsg) === '[object Array]') {
  2181. message = JSON.parse(msg.data).find(item => item.offline === false)
  2182. }
  2183. if (message.hasOwnProperty('type')) {
  2184. let activeMenu = window.top.localStorage.getItem('activeMenu')
  2185. let obj = this.getTreeAll(
  2186. this.menuData,
  2187. './workFlow.html#/coverTask',
  2188. 1,
  2189. []
  2190. )
  2191. let taskObj = this.getTreeAll(
  2192. this.menuData,
  2193. './workFlow.html#/personalInitiatedTask',
  2194. 1,
  2195. []
  2196. )
  2197. let msgObj = this.getTreeAll(
  2198. this.menuData,
  2199. './systemConfig.html#/noticeUser',
  2200. 1,
  2201. []
  2202. )
  2203. switch (message.type) {
  2204. case 'ACT_TO_DO_TASK': // 待办任务;
  2205. this.$message.info('您收到一条新的待办任务,请前往待办任务中查看!')
  2206. if (activeMenu === obj.menuData.menuId) {
  2207. that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
  2208. $('#menuTabId .el-tabs__item')
  2209. .eq(that.menuTabIndex)
  2210. .click()
  2211. $('#menuTabId iframe')
  2212. .eq(that.menuTabIndex)[0]
  2213. .contentWindow.location.reload(true)
  2214. }
  2215. this.getMyToDoTask()
  2216. this.getMyToDoDelegateTask()
  2217. break
  2218. case 'ACT_TO_DO_DELEGATETASK': // 委托待办任务;
  2219. this.$message.info(
  2220. '您收到一条新的委托待办任务,请前往待办任务中查看!'
  2221. )
  2222. if (activeMenu === obj.menuData.menuId) {
  2223. that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
  2224. $('#menuTabId .el-tabs__item')
  2225. .eq(that.menuTabIndex)
  2226. .click()
  2227. $('#menuTabId iframe')
  2228. .eq(that.menuTabIndex)[0]
  2229. .contentWindow.location.reload(true)
  2230. }
  2231. this.getMyToDoTask()
  2232. this.getMyToDoDelegateTask()
  2233. break
  2234. case 'ACT_MY_APPLY_TASK': // 申请完成任务;
  2235. this.$message.info('您有一条申请审批已完成,请前往流程跟踪中查看!')
  2236. if (activeMenu === taskObj.menuData.menuId) {
  2237. that.menuTabIndex = that.getTabIndex(taskObj.menuData.menuId)
  2238. $('#menuTabId .el-tabs__item')
  2239. .eq(that.menuTabIndex)
  2240. .click()
  2241. $('#menuTabId iframe')
  2242. .eq(that.menuTabIndex)[0]
  2243. .contentWindow.location.reload(true)
  2244. }
  2245. break
  2246. case 'SSO_NOTICE': // 公告;
  2247. this.$message.info('您收到一条新的公告:' + message.payload.title)
  2248. if (activeMenu === msgObj.menuData.menuId) {
  2249. that.menuTabIndex = that.getTabIndex(msgObj.menuData.menuId)
  2250. $('#menuTabId .el-tabs__item')
  2251. .eq(that.menuTabIndex)
  2252. .click()
  2253. $('#menuTabId iframe')
  2254. .eq(that.menuTabIndex)[0]
  2255. .contentWindow.location.reload(true)
  2256. }
  2257. this.getMyMessage()
  2258. break
  2259. case 'SSO_ROLE': // 权限已被管理员修改
  2260. case 'SSO_MENU':
  2261. case 'SSO_ORG':
  2262. let userId = this.$store.state.userInfo.userId
  2263. if (userId !== 'admin') {
  2264. this.privilegeUpdateIfo = true
  2265. this.coutTime(5)
  2266. } else {
  2267. if (message.type === 'SSO_MENU') {
  2268. store
  2269. .dispatch('generateRoutes', {
  2270. companyId: this.companyId,
  2271. appId: this.appId
  2272. })
  2273. .then(res => {
  2274. if (res.code === '0') {
  2275. this.menuData = res.data
  2276. }
  2277. })
  2278. .catch(err => {
  2279. console.log(err)
  2280. })
  2281. }
  2282. }
  2283. break
  2284. case 'UPDATE_NUM':
  2285. this.getMyToDoTask()
  2286. this.getMyToDoDelegateTask()
  2287. this.getMyMessage()
  2288. if (
  2289. message.payload === 'updateMessageNumOfAuth' &&
  2290. activeMenu === msgObj.menuData.menuId
  2291. ) {
  2292. that.menuTabIndex = that.getTabIndex(msgObj.menuData.menuId)
  2293. $('#menuTabId .el-tabs__item')
  2294. .eq(that.menuTabIndex)
  2295. .click()
  2296. $('#menuTabId iframe')
  2297. .eq(that.menuTabIndex)[0]
  2298. .contentWindow.location.reload(true)
  2299. }
  2300. break
  2301. }
  2302. }
  2303. },
  2304. send: function(params) {
  2305. this.websocket.send(params)
  2306. },
  2307. close: function() {
  2308. console.log('websocket已经关闭')
  2309. if (this.interval) {
  2310. window.clearInterval(this.interval)
  2311. // console.log("清除定时器");
  2312. }
  2313. },
  2314. // 倒计时函数
  2315. coutTime(index) {
  2316. let that = this
  2317. that.closeSecond = index
  2318. setTimeout(function() {
  2319. if (index == 0) {
  2320. that.store
  2321. .dispatch('loginOut')
  2322. .then(function(res) {
  2323. window.location.href = './index.html'
  2324. })
  2325. .catch(function(err) {
  2326. console.log(err)
  2327. })
  2328. } else {
  2329. that.coutTime(--index)
  2330. }
  2331. }, 1000)
  2332. },
  2333. closeConfirm() {
  2334. this.closeSecond = 0
  2335. this.store
  2336. .dispatch('loginOut')
  2337. .then(function(res) {
  2338. window.location.href = './index.html'
  2339. })
  2340. .catch(function(err) {
  2341. console.log(err)
  2342. })
  2343. },
  2344. // 遍历树获取指定url菜单相关
  2345. // tree 整体树
  2346. // url 需要跳转的页面url
  2347. // num 递归层级,初始值传1,用于返回页面线性层级
  2348. // list 包括页面&页面父级&父级的父级...直到最外层
  2349. getTreeAll(tree, url, num, list) {
  2350. let menuObj = {}
  2351. if (!!tree && tree.length !== 0) {
  2352. for (let item of tree) {
  2353. menuObj['pageBreadcrumb'] = list
  2354. if (item.menuUrl === url) {
  2355. menuObj['menuData'] = item
  2356. let obj = {
  2357. menuId: num,
  2358. menuLabel: item.menuLabel
  2359. }
  2360. menuObj.pageBreadcrumb.push(obj)
  2361. return menuObj
  2362. } else {
  2363. let obj = {
  2364. menuId: num,
  2365. menuLabel: item.menuLabel
  2366. }
  2367. let a = []
  2368. a.push(obj)
  2369. let newList = list.concat(a)
  2370. if (
  2371. item.hasOwnProperty('children') &&
  2372. item.children !== null &&
  2373. item.children.length > 0
  2374. ) {
  2375. menuObj = this.getTreeAll(item.children, url, num + 1, newList)
  2376. if (menuObj.hasOwnProperty('menuData')) {
  2377. return menuObj
  2378. }
  2379. }
  2380. }
  2381. }
  2382. }
  2383. return menuObj
  2384. },
  2385. // 前往我的待办任务
  2386. goMyTaskPage() {
  2387. let that = this
  2388. let updateStatus = false
  2389. for (let item of this.tabsData) {
  2390. if (item.menuUrl === './workFlow.html#/coverTask') {
  2391. updateStatus = true
  2392. }
  2393. }
  2394. let obj = this.getTreeAll(
  2395. this.menuData,
  2396. './workFlow.html#/coverTask',
  2397. 1,
  2398. []
  2399. )
  2400. this.selectMenu(obj.menuData, obj.pageBreadcrumb)
  2401. if (updateStatus === true) {
  2402. that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
  2403. $('#menuTabId .el-tabs__item')
  2404. .eq(that.menuTabIndex)
  2405. .click()
  2406. $('#menuTabId iframe')
  2407. .eq(that.menuTabIndex)[0]
  2408. .contentWindow.location.reload(true)
  2409. }
  2410. },
  2411. // 前往公告页面
  2412. goNoticePage() {
  2413. let that = this
  2414. let updateStatus = false
  2415. for (let item of this.tabsData) {
  2416. if (item.menuUrl === './systemConfig.html#/noticeUser') {
  2417. updateStatus = true
  2418. }
  2419. }
  2420. let obj = this.getTreeAll(
  2421. this.menuData,
  2422. './systemConfig.html#/noticeUser',
  2423. 1,
  2424. []
  2425. )
  2426. this.selectMenu(obj.menuData, obj.pageBreadcrumb)
  2427. if (updateStatus === true) {
  2428. that.menuTabIndex = that.getTabIndex(obj.menuData.menuId)
  2429. $('#menuTabId .el-tabs__item')
  2430. .eq(that.menuTabIndex)
  2431. .click()
  2432. $('#menuTabId iframe')
  2433. .eq(that.menuTabIndex)[0]
  2434. .contentWindow.location.reload(true)
  2435. }
  2436. },
  2437. updateTaskNum() {
  2438. let userId = getCookie('userId')
  2439. let messageType = {
  2440. payload: 'updateTaskNum',
  2441. type: 'UPDATE_NUM',
  2442. userId: userId
  2443. }
  2444. this.axios
  2445. .post('pass/websocket/socket/frontSendMessage', messageType, {
  2446. individualType: 'json'
  2447. })
  2448. .then(res => {
  2449. if (res.code === '0') {
  2450. // do
  2451. } else {
  2452. this.$message.error(res.message)
  2453. }
  2454. })
  2455. .catch(error => {
  2456. console.log(error.message)
  2457. })
  2458. },
  2459. updateMessageNum() {
  2460. let userId = getCookie('userId')
  2461. let messageType = {
  2462. payload: 'updateTaskNum',
  2463. type: 'UPDATE_NUM',
  2464. userId: userId
  2465. }
  2466. this.axios
  2467. .post('pass/websocket/socket/frontSendMessage', messageType, {
  2468. individualType: 'json'
  2469. })
  2470. .then(res => {
  2471. if (res.code === '0') {
  2472. // do
  2473. } else {
  2474. this.$message.error(res.message)
  2475. }
  2476. })
  2477. .catch(error => {
  2478. console.log(error.message)
  2479. })
  2480. },
  2481. // 获取我的待办任务个数
  2482. getMyToDoTask() {
  2483. // 获取当前用户
  2484. let userId = getCookie('userId')
  2485. this.axios
  2486. .get(
  2487. 'pass/act/v1/actusertasks/findMyToDoTask?userId=' +
  2488. userId +
  2489. '&companyId=' +
  2490. this.companyId +
  2491. '&pageNum=1&pageSize=1000000'
  2492. )
  2493. .then(res => {
  2494. if (res.code === '0') {
  2495. this.task1Num = res.data.list.length
  2496. } else {
  2497. this.$message.error(res.message)
  2498. }
  2499. })
  2500. .catch(error => {
  2501. console.log(error.message)
  2502. })
  2503. },
  2504. // 获取委托我代办的任务
  2505. getMyToDoDelegateTask() {
  2506. // 获取当前用户
  2507. let userId = getCookie('userId')
  2508. this.axios
  2509. .get(
  2510. 'pass/act/v1/actusertasks/findMyToDoDelegateTask?userId=' +
  2511. userId +
  2512. '&companyId=' +
  2513. this.companyId +
  2514. '&pageNum=1&pageSize=1000000'
  2515. )
  2516. .then(res => {
  2517. if (res.code === '0') {
  2518. this.task2Num = res.data.list.length
  2519. } else {
  2520. this.$message.error(res.message)
  2521. }
  2522. })
  2523. .catch(error => {
  2524. console.log(error.message)
  2525. })
  2526. },
  2527. // 获取我的公告信息
  2528. getMyMessage() {
  2529. // 获取当前用户
  2530. let userId = getCookie('userId')
  2531. this.axios
  2532. .get(
  2533. 'pass/v1/sysnotices/getUserNoticelike?status=0&pageNum=1&pageSize=1000000&companyId=' +
  2534. this.companyId
  2535. )
  2536. .then(res => {
  2537. if (res.code === '0') {
  2538. this.myMessageLength = res.data.list.length
  2539. } else {
  2540. this.$message.error(res.message)
  2541. }
  2542. })
  2543. .catch(error => {
  2544. console.log(error.message)
  2545. })
  2546. },
  2547. // 获取主页页面
  2548. getMainPage(tree, index, list) {
  2549. list = list ? list : []
  2550. if (!!tree && tree.length !== 0) {
  2551. for (let i = 0; i < tree.length; i++) {
  2552. let menuIndex = index ? index + '-' + i.toString() : i
  2553. if (
  2554. tree[i].loginDispaly &&
  2555. tree[i].loginDispaly === '1' &&
  2556. tree[i].status === '1'
  2557. ) {
  2558. tree[i]['menuIndex'] = menuIndex
  2559. tree[i]['mainPageLoading'] = true
  2560. list.push(tree[i])
  2561. } else {
  2562. if (
  2563. tree[i].hasOwnProperty('children') &&
  2564. tree[i].children !== null &&
  2565. tree[i].children.length > 0
  2566. ) {
  2567. this.getMainPage(tree[i].children, menuIndex, list)
  2568. }
  2569. }
  2570. }
  2571. }
  2572. return list
  2573. },
  2574. getMenuIndexByMenuId(tree, index, menuId) {
  2575. if (!!tree && tree.length !== 0) {
  2576. for (let i = 0; i < tree.length; i++) {
  2577. let menuIndex = index ? index + '-' + i.toString() : i.toString()
  2578. if (tree[i].menuId == menuId) {
  2579. tree[i]['menuIndex'] = menuIndex
  2580. return tree[i]
  2581. }
  2582. if (
  2583. tree[i].hasOwnProperty('children') &&
  2584. tree[i].children !== null &&
  2585. tree[i].children.length > 0
  2586. ) {
  2587. var result = this.getMenuIndexByMenuId(
  2588. tree[i].children,
  2589. menuIndex,
  2590. menuId
  2591. )
  2592. if (result) {
  2593. return result
  2594. }
  2595. }
  2596. }
  2597. }
  2598. },
  2599. autoOpenLatestPage() {
  2600. var that = this
  2601. var currentMenuIndex = window.top.localStorage.getItem('currentMenuIndex')
  2602. let menuList = window.top.document.getElementsByClassName('el-menu-item')
  2603. for (let i = 0; i < menuList.length; i++) {
  2604. if (menuList[i].__vue__.index === currentMenuIndex) {
  2605. setTimeout(function() {
  2606. that.defaultActiveIndex = currentMenuIndex
  2607. menuList[i].click()
  2608. }, 20)
  2609. }
  2610. }
  2611. },
  2612. // 打开设为主页菜单页面
  2613. openMainPage() {
  2614. this.mainPageList = this.getMainPage(this.menuData)
  2615. // console.log(this.mainPageList)
  2616. let menuList = window.top.document.getElementsByClassName('el-menu-item')
  2617. let s = 0
  2618. for (let item of this.mainPageList) {
  2619. for (let i = 0; i < menuList.length; i++) {
  2620. if (
  2621. menuList[i].innerHTML === item.menuLabel &&
  2622. menuList[i].__vue__.index === item.menuIndex
  2623. ) {
  2624. s++
  2625. setTimeout(() => {
  2626. menuList[i].click()
  2627. // console.log('点击行为')
  2628. }, 200)
  2629. }
  2630. }
  2631. }
  2632. },
  2633. // 浏览器返回操作
  2634. goBack() {
  2635. this.$router.replace({
  2636. path: '/'
  2637. })
  2638. },
  2639. updatecss() {
  2640. console.log("taskAllNum")
  2641. console.log(this.taskAllNum)
  2642. if(!this.taskAllNum){
  2643. console.log("进入了弹出框的判断1")
  2644. this.socketshow = false
  2645. }else{
  2646. console.log("进入了弹出框的判断2")
  2647. this.socketshow=true
  2648. }
  2649. //let height = document.body.clientHeight - 125
  2650. /*this.$nextTick(() => {
  2651. $('.Web_Notice')[0].style.height = height + 'px;'
  2652. })*/
  2653. },
  2654. leave() {
  2655. this.socketshow = false
  2656. },
  2657. getinformation() {
  2658. this.taskAllNum=0
  2659. this.noticedata=[]
  2660. console.log('获取到的userId----------------' + this.userId)
  2661. this.axios
  2662. .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
  2663. .then(res => {
  2664. console.log("进入了获取数据的方法")
  2665. res.data.data.forEach((e)=>{
  2666. console.log("进入了数据的遍历")
  2667. if(e.status==0&&e.insertusername!='销售审核'){
  2668. console.log("进入了数据的插入")
  2669. this.taskAllNum++;
  2670. this.noticedata.push(e)
  2671. }
  2672. })
  2673. //this.taskAllNum = res.data.data.length
  2674. console.log("获取到的数据")
  2675. console.log(this.noticedata)
  2676. console.log(this.taskAllNum)
  2677. if (this.taskAllNum != null) {
  2678. if (this.taskAllNum == 0) {
  2679. console.log('进入了标记为0')
  2680. this.badgeshow = true
  2681. } else {
  2682. console.log('进入了标记不为0')
  2683. this.badgeshow = false
  2684. let data={
  2685. noticetitle:this.noticedata[0].noticetitle,
  2686. noticecontent:this.noticedata[0].noticecontent,
  2687. insertusername:this.noticedata[0].insertusername,
  2688. inserttime:this.noticedata[0].inserttime,
  2689. noticeid:this.noticedata[0].noticeId
  2690. }
  2691. //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
  2692. if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
  2693. this.noticedata1=data;
  2694. this.centerDialogVisible=true;
  2695. window.top.localStorage.setItem('noticeId', data.noticeid)
  2696. // window.top.localStorage.setItem('noticeTime', new Date().getTime())
  2697. }else{
  2698. console.log("暂无新的通知,不展示");
  2699. }
  2700. }
  2701. } else {
  2702. console.log('进入了标记值为null的值')
  2703. this.taskAllNum = null
  2704. }
  2705. })
  2706. },
  2707. // 查看待办任务详情
  2708. seeTaskContent(item) {
  2709. console.log('点击后的事件')
  2710. console.log(item)
  2711. let data = {
  2712. noticetitle: item.noticetitle,
  2713. noticecontent: item.noticecontent,
  2714. insertusername: item.insertusername,
  2715. inserttime: item.inserttime,
  2716. noticeid: item.noticeId
  2717. }
  2718. this.noticedata1 = data
  2719. this.centerDialogVisible = true
  2720. console.log(this.noticedata1)
  2721. console.log(this.centerDialogVisible)
  2722. console.log(this.noticedata1.noticetitle)
  2723. //this.$refs.defaultpage.seeTaskContent(item)
  2724. // // this.dialogVisible = true;
  2725. // this.itemTask = item;
  2726. }
  2727. }
  2728. }
  2729. </script>
  2730. <!-- Add "scoped" attribute to limit CSS to this component only -->
  2731. <style lang="less" scoped>
  2732. .Web_Notice {
  2733. width: 400px;
  2734. position: absolute;
  2735. left: -200px;
  2736. height: 500px;
  2737. background-color: #f1f6fd;
  2738. }
  2739. /deep/ .privilegeArea {
  2740. .el-dialog {
  2741. min-width: 400px;
  2742. min-height: 120px;
  2743. padding-bottom: 10px;
  2744. }
  2745. }
  2746. .contextmenu {
  2747. width: 150px;
  2748. height: 150px;
  2749. top: 0px;
  2750. position: absolute;
  2751. display: none;
  2752. }
  2753. iframe {
  2754. display: block !important;
  2755. }
  2756. /deep/.lockInput .el-input__inner {
  2757. -webkit-text-security: disc !important;
  2758. }
  2759. .theme-defined {
  2760. position: absolute;
  2761. right: 20px;
  2762. top: 20px;
  2763. width: 150px;
  2764. }
  2765. .theme-defined > div {
  2766. float: right;
  2767. margin-right: 10px;
  2768. }
  2769. .company-select {
  2770. position: absolute;
  2771. left: 225px;
  2772. // top: 20px;
  2773. // float: left;
  2774. height: 60px;
  2775. line-height: 60px;
  2776. margin-left: 20px;
  2777. color: #fff;
  2778. font-size: 20px;
  2779. }
  2780. .el-dropdown {
  2781. font-size: 16px;
  2782. color: #ffffff;
  2783. cursor: pointer;
  2784. }
  2785. .ifCompany {
  2786. font-size: 16px;
  2787. color: #ffffff;
  2788. }
  2789. .lock_route {
  2790. transform: rotateY(180deg);
  2791. cursor: pointer;
  2792. position: absolute;
  2793. width: 40px;
  2794. height: 39px;
  2795. top: 0px;
  2796. right: 0px;
  2797. text-align: center;
  2798. line-height: 40px;
  2799. background-color: #ccc;
  2800. color: #fff;
  2801. }
  2802. .lock_screen {
  2803. position: absolute;
  2804. z-index: 9999999999;
  2805. background-color: #fff;
  2806. top: 0;
  2807. left: 0;
  2808. width: 100%;
  2809. height: 100%;
  2810. min-width: 1600px;
  2811. background: url(../assets/img/default-bg.png) center bottom no-repeat;
  2812. }
  2813. .main {
  2814. height: 100%;
  2815. }
  2816. .sl-header {
  2817. /* position: fixed; */
  2818. top: 0;
  2819. left: 0;
  2820. z-index: 1002;
  2821. width: 100%;
  2822. /* min-width: 1150px; */
  2823. background-color: #fff;
  2824. background-color: rgba(255, 255, 255, 0.9);
  2825. }
  2826. .sl-container {
  2827. height: 100%;
  2828. position: relative;
  2829. /* padding-top: 60px; */
  2830. padding-left: 79px;
  2831. /* transition: padding-left .3s ease-out; */
  2832. }
  2833. .sl-container2 {
  2834. padding-left: 0px;
  2835. }
  2836. .sl-content-main {
  2837. width: 100%;
  2838. // min-width: 1200px;
  2839. height: calc(100% - 60px);
  2840. overflow: auto;
  2841. ::-webkit-scrollbar {
  2842. //滚动条宽高,如果不需要显示滚动条可设置宽高为0
  2843. width: 0px;
  2844. height: 10px;
  2845. }
  2846. ::-webkit-scrollbar-thumb {
  2847. //滚动条颜色和圆角
  2848. background-color: #dfe0e0;
  2849. border-radius: 3px;
  2850. }
  2851. ::-webkit-scrollbar-track-piece {
  2852. // border: 2px solid #000;
  2853. background-color: #f2f6f8;
  2854. border-radius: 3px;
  2855. }
  2856. }
  2857. .icore-menu-main {
  2858. position: fixed;
  2859. top: 0;
  2860. left: 0;
  2861. z-index: 1001;
  2862. width: 80px;
  2863. height: calc(100% - 60px);
  2864. margin-top: 60px;
  2865. border-right: 1px solid #efefef;
  2866. background-color: #fff;
  2867. /* transition: width .25s ease-out;*/
  2868. }
  2869. .icore-menu-main2 {
  2870. width: 180px;
  2871. -webkit-touch-callout: none;
  2872. -webkit-user-select: none;
  2873. -khtml-user-select: none;
  2874. -moz-user-select: none;
  2875. -ms-user-select: none;
  2876. user-select: none;
  2877. }
  2878. .sl-content {
  2879. transition: margin-left 0.2s linear;
  2880. }
  2881. .sl-header-li-logo {
  2882. float: left;
  2883. margin-top: 13px;
  2884. margin-left: 20px;
  2885. }
  2886. .sl-header-li-name {
  2887. float: left;
  2888. height: 60px;
  2889. line-height: 60px;
  2890. margin-left: 20px;
  2891. color: #fff;
  2892. font-size: 20px;
  2893. }
  2894. .sl-header-li-line {
  2895. float: left;
  2896. margin-top: 5px;
  2897. height: 26px;
  2898. }
  2899. .sl-header-li-lgo {
  2900. float: right;
  2901. margin-top: 21px;
  2902. width: 120px;
  2903. }
  2904. .sl-header-li-lgob {
  2905. display: inline-block;
  2906. padding-left: 25px;
  2907. position: relative;
  2908. color: white;
  2909. height: 20px;
  2910. line-height: 20px;
  2911. vertical-align: middle;
  2912. }
  2913. .sl-header-li-lgob > .xs-icons {
  2914. position: absolute;
  2915. top: -8px;
  2916. left: -18px;
  2917. }
  2918. .icore-menu-ops {
  2919. font-size: 16px;
  2920. color: #666;
  2921. transition: transform 0.3s ease-out;
  2922. }
  2923. .icore-menu-main2 .icore-menu-ops {
  2924. transform: rotate(180deg);
  2925. }
  2926. /* header menu style --> begin */
  2927. .icore-menu {
  2928. border-right: solid 0px #e6e6e6;
  2929. }
  2930. .icore-menu-a {
  2931. position: relative;
  2932. display: inline-block;
  2933. width: 100%;
  2934. padding-left: 54px;
  2935. -webkit-transition: color 0.3s;
  2936. transition: color 0.3s;
  2937. cursor: pointer;
  2938. border-right: 2px solid #fff;
  2939. }
  2940. .icore-menu-tip-cover {
  2941. position: absolute;
  2942. top: 0;
  2943. left: 0;
  2944. width: 100%;
  2945. height: 100%;
  2946. }
  2947. .icore-menu-a-noc {
  2948. padding-right: 2px;
  2949. }
  2950. .icore-menu-lit {
  2951. opacity: 0;
  2952. display: inline-block;
  2953. margin-top: 4px;
  2954. height: 36px;
  2955. line-height: 36px;
  2956. vertical-align: middle;
  2957. overflow: hidden;
  2958. transition: opacity 0.3s ease-out;
  2959. }
  2960. .nameText {
  2961. max-width: 85%;
  2962. text-overflow: ellipsis;
  2963. }
  2964. .icore-menu-main2 .icore-menu-lit {
  2965. opacity: 1;
  2966. }
  2967. .icore-menu-main2 .icore-menu-tip-cover {
  2968. display: none;
  2969. }
  2970. .icore-menu-lic {
  2971. position: absolute;
  2972. top: 50%;
  2973. left: 10px;
  2974. margin-top: -11px;
  2975. }
  2976. .icore-menu-ric {
  2977. position: absolute;
  2978. top: 50%;
  2979. right: 4px;
  2980. margin-top: -3px;
  2981. font-family: element-icons !important;
  2982. speak: none;
  2983. font-style: normal;
  2984. font-weight: 400;
  2985. font-variant: normal;
  2986. color: #999;
  2987. text-transform: none;
  2988. line-height: 1;
  2989. vertical-align: baseline;
  2990. display: inline-block;
  2991. -webkit-font-smoothing: antialiased;
  2992. font-smoothing: antialiased;
  2993. -webkit-transition: transform 0.3s;
  2994. transition: transform 0.3s;
  2995. }
  2996. /* .icore-menu-ric:before{
  2997. content: "\E603";
  2998. }*/
  2999. .icore-menu-ricr {
  3000. color: #999;
  3001. }
  3002. .icore-menu-s {
  3003. position: absolute;
  3004. top: -7px;
  3005. left: 100%;
  3006. z-index: 1004;
  3007. border: 1px solid #ccc;
  3008. box-shadow: 0 2px 8px #999;
  3009. border-radius: 2px;
  3010. background-color: #fff;
  3011. min-width: 130px;
  3012. padding: 10px 0;
  3013. }
  3014. .icore-menu-sham {
  3015. -webkit-transform: scaleY(0);
  3016. transform: scaleY(0);
  3017. -webkit-transition: transform, display 0.4s;
  3018. transition: transform 0.4s;
  3019. -webkit-transform-origin: center top;
  3020. transform-origin: center top;
  3021. }
  3022. .icore-menu-a:hover > .icore-menu-sham,
  3023. .icore-menu-sa:hover > .icore-menu-sham {
  3024. opacity: 1;
  3025. -webkit-transform: scaleY(1);
  3026. transform: scaleY(1);
  3027. }
  3028. .icore-menu-s.icore-menu-s-right {
  3029. left: auto;
  3030. right: 15px;
  3031. }
  3032. .main-upload_text_logo {
  3033. display: block;
  3034. text-align: center;
  3035. position: relative;
  3036. margin: 0px -20px;
  3037. top: -35px;
  3038. border-bottom: 1px solid #cccccc;
  3039. }
  3040. .main-file_upload {
  3041. width: 100%;
  3042. text-align: center;
  3043. position: relative;
  3044. display: inline-block;
  3045. vertical-align: top;
  3046. }
  3047. .main-file_con .hide {
  3048. width: 120px;
  3049. position: absolute;
  3050. height: 30px;
  3051. left: 58px;
  3052. margin-top: -8px;
  3053. opacity: 0;
  3054. filter: alpha(opacity=0);
  3055. z-index: 22;
  3056. }
  3057. .main-file_con .main-file_uploader,
  3058. .upload_bt {
  3059. left: 0;
  3060. top: -5px;
  3061. position: relative;
  3062. color: #fff;
  3063. display: inline-block;
  3064. padding: 0px 20px;
  3065. background: #2ecc71;
  3066. text-align: center;
  3067. z-index: 11;
  3068. border-radius: 15px;
  3069. cursor: pointer;
  3070. }
  3071. .upload_bt {
  3072. left: 130px;
  3073. }
  3074. .main-file_con .hide:hover {
  3075. box-shadow: 1px 2px #44795b;
  3076. }
  3077. .main-img_holder,
  3078. .m_main-img_holder {
  3079. height: 100px;
  3080. line-height: 70px;
  3081. }
  3082. .main-img_holder img,
  3083. .m_main-img_holder img {
  3084. max-width: 200px;
  3085. }
  3086. .main-file_btn_upload {
  3087. margin-top: -20px;
  3088. margin-bottom: 20px;
  3089. }
  3090. .icore-menu-sa {
  3091. display: block;
  3092. min-width: 120px;
  3093. white-space: nowrap;
  3094. padding: 0 20px;
  3095. line-height: 32px;
  3096. position: relative;
  3097. }
  3098. .icore-menu-a:hover {
  3099. color: #2391e5;
  3100. background-color: #e2f1fc;
  3101. border-right-color: #e2f1fc;
  3102. }
  3103. .icore-menu-a:hover > .icore-menu-ric {
  3104. color: #2391e5;
  3105. -webkit-transform: rotate(180deg);
  3106. transform: rotate(180deg);
  3107. }
  3108. .icore-menu-sa:hover {
  3109. background-color: #e2f1fc;
  3110. color: #2391e5;
  3111. }
  3112. .icore-menu-sa:hover > .icore-menu-ricr {
  3113. color: #2391e5;
  3114. }
  3115. .icore-menu-ss {
  3116. opacity: 0;
  3117. position: absolute;
  3118. left: 100%;
  3119. top: -11px;
  3120. z-index: 1005;
  3121. padding: 10px 0;
  3122. border: 1px solid #ccc;
  3123. box-shadow: 0 2px 8px #999;
  3124. border-radius: 2px;
  3125. background-color: #fff;
  3126. }
  3127. .icore-menu-sed {
  3128. border-right-color: #2391e5;
  3129. }
  3130. .icore-menu-sed,
  3131. .icore-menu-ssed,
  3132. .icore-menu-sssed {
  3133. color: #2391e5;
  3134. }
  3135. .icore-menu-sed > .icore-menu-ricr,
  3136. .icore-menu-ssed > .icore-menu-ricr,
  3137. .icore-menu-sed > .icore-menu-ric {
  3138. color: #2391e5;
  3139. }
  3140. .icore-menu-sdis {
  3141. cursor: default !important;
  3142. cursor: not-allowed !important;
  3143. color: #999 !important;
  3144. background-color: #fff !important;
  3145. }
  3146. .icore-menu-reverse > .icore-menu-s,
  3147. .icore-menu-reverse > .icore-menu-ss {
  3148. top: auto;
  3149. bottom: -11px;
  3150. -webkit-transform-origin: center bottom;
  3151. transform-origin: center bottom;
  3152. }
  3153. /* header menu style --> end */
  3154. .sl-breadcrumb {
  3155. overflow: hidden;
  3156. background-color: #fff;
  3157. height: 30px;
  3158. padding: 7px 0 0 20px;
  3159. }
  3160. .sl-header-li-lgbc {
  3161. position: absolute;
  3162. right: 40%;
  3163. top: 20px;
  3164. }
  3165. .sl-header-li-websocket {
  3166. position: absolute;
  3167. right: 210px;
  3168. top: 17px;
  3169. .el-button--text {
  3170. color: white;
  3171. }
  3172. }
  3173. .sl-breadcrumb-text {
  3174. float: left;
  3175. color: white;
  3176. }
  3177. .sl-breadcrumb-list {
  3178. float: left;
  3179. padding-left: 10px;
  3180. font-size: 12px;
  3181. position: relative;
  3182. top: 6px;
  3183. }
  3184. .sl-footer {
  3185. padding: 20px 0 0px;
  3186. }
  3187. .sl-footer > p {
  3188. text-align: center;
  3189. height: 20px;
  3190. line-height: 20px;
  3191. vertical-align: middle;
  3192. }
  3193. .am-xz {
  3194. float: left;
  3195. margin-right: 7px;
  3196. margin-top: 2px;
  3197. animation: amXuanzhuan 4s linear infinite;
  3198. }
  3199. @keyframes amXuanzhuan {
  3200. 0% {
  3201. transform: rotate3d(1, 0, 0, 360deg);
  3202. }
  3203. 100% {
  3204. transform: rotate3d(1, 0, 0, 0);
  3205. }
  3206. }
  3207. .oa-header-photo-uld {
  3208. width: 200px;
  3209. height: 200px;
  3210. line-height: 200px;
  3211. vertical-align: middle;
  3212. margin: 0 auto;
  3213. overflow: hidden;
  3214. cursor: pointer;
  3215. }
  3216. .oa-header-photo-uld > img {
  3217. max-width: 100%;
  3218. max-height: 100%;
  3219. vertical-align: middle;
  3220. }
  3221. /*.oa-header-content {*/
  3222. /*background: url("../../static/img/top_bgimg.png") left center no-repeat rgb(60,207,255);*/
  3223. /*height: 60px;*/
  3224. /*}*/
  3225. .oa-header-logo {
  3226. float: left;
  3227. padding: 15px 0 0 30px;
  3228. height: 50px;
  3229. overflow: hidden;
  3230. }
  3231. .oa-header-logo > img {
  3232. animation: fadeInLeft 0.5s ease-out 0s both;
  3233. }
  3234. .oa-header-upt {
  3235. position: absolute;
  3236. left: 0;
  3237. top: 0;
  3238. width: 100px;
  3239. height: 60px;
  3240. overflow: hidden;
  3241. text-align: center;
  3242. }
  3243. .oa-header-upt > a {
  3244. display: inline-block;
  3245. width: 40px;
  3246. height: 40px;
  3247. margin-top: 10px;
  3248. animation: fadeInRight 0.5s ease-out 0s both;
  3249. }
  3250. .oa-header-upt > a > img {
  3251. width: 40px;
  3252. height: 40px;
  3253. line-height: 40px;
  3254. vertical-align: middle;
  3255. color: #333;
  3256. border-radius: 20px;
  3257. box-shadow: 0 0 10px #333;
  3258. }
  3259. .oa-header-user:hover .oa-header-upt > a > img {
  3260. animation: circle 4s linear 0s infinite;
  3261. }
  3262. .oa-header-ucon {
  3263. display: none;
  3264. overflow: hidden;
  3265. position: absolute;
  3266. top: 50px;
  3267. left: 10px;
  3268. z-index: 18000;
  3269. padding: 10px 0 10px 10px;
  3270. font-size: 15px;
  3271. }
  3272. .oa-header-ulist {
  3273. position: relative;
  3274. width: 215px;
  3275. border: 1px solid #ddd;
  3276. box-shadow: 0 0 8px #999;
  3277. background-color: #fff;
  3278. background-color: rgba(255, 255, 255, 0.95);
  3279. }
  3280. .oa-header-user:hover .oa-header-ucon {
  3281. display: block;
  3282. }
  3283. .oa-header-user:hover .oa-header-ulist {
  3284. animation: fadeInRight 0.4s ease-out 0s both;
  3285. }
  3286. .oa-header-uin {
  3287. text-align: center;
  3288. overflow: hidden;
  3289. padding: 20px 0 15px 0;
  3290. }
  3291. .oa-header-uin > img {
  3292. width: 60px;
  3293. height: 60px;
  3294. border-radius: 30px;
  3295. cursor: pointer;
  3296. }
  3297. .oa-header-uin > img:hover {
  3298. animation: largen2 0.6s ease-out 0s both;
  3299. }
  3300. .oa-header-uin > h3 {
  3301. padding-top: 10px;
  3302. color: #666;
  3303. }
  3304. .oa-header-uul {
  3305. padding-bottom: 10px;
  3306. }
  3307. .oa-header-uul > li {
  3308. height: 40px;
  3309. line-height: 40px;
  3310. text-align: center;
  3311. vertical-align: middle;
  3312. cursor: pointer;
  3313. transition: background-color 0.3s linear 0s;
  3314. }
  3315. .oa-header-uul .st-icons {
  3316. position: relative;
  3317. top: 6px;
  3318. margin-right: 8px;
  3319. transition: all 0.3s linear;
  3320. }
  3321. .st-icons-out {
  3322. margin-right: 4px;
  3323. }
  3324. .oa-header-uul > li:hover {
  3325. background-color: #ebebeb;
  3326. }
  3327. .oa-header-uul::before,
  3328. .oa-header-uul::after {
  3329. border-bottom-color: rgba(0, 0, 0, 0.2);
  3330. content: '';
  3331. display: inline-block;
  3332. position: absolute;
  3333. }
  3334. .oa-header-uul::after {
  3335. left: 41px;
  3336. top: -6px;
  3337. border-bottom: 6px solid #fff;
  3338. border-left: 6px solid transparent;
  3339. border-right: 6px solid transparent;
  3340. }
  3341. .oa-header-uul::before {
  3342. left: 40px;
  3343. top: -7px;
  3344. border-bottom: 7px solid #ccc;
  3345. border-left: 7px solid transparent;
  3346. border-right: 7px solid transparent;
  3347. }
  3348. .hnstLogo {
  3349. position: absolute;
  3350. left: 190px;
  3351. top: 14px;
  3352. }
  3353. .hnstLogo > img {
  3354. height: 32px;
  3355. }
  3356. .marignL15 {
  3357. margin-left: 15px;
  3358. }
  3359. .menuDrag {
  3360. height: calc(100% - 120px);
  3361. width: 18px;
  3362. position: absolute;
  3363. right: -6px;
  3364. cursor: col-resize;
  3365. z-index: 22;
  3366. }
  3367. .pageBreadcrumb {
  3368. display: none;
  3369. }
  3370. .oa-user-name {
  3371. position: absolute;
  3372. top: 21px;
  3373. left: 100px;
  3374. max-width: 44%;
  3375. white-space: nowrap;
  3376. overflow: hidden;
  3377. text-overflow: ellipsis;
  3378. }
  3379. .strongBox {
  3380. position: absolute;
  3381. right: 0;
  3382. top: 0;
  3383. width: 28px;
  3384. height: 28px;
  3385. line-height: 28px;
  3386. text-align: center;
  3387. color: white;
  3388. background: red;
  3389. border-radius: 5px;
  3390. font-size: 14px;
  3391. }
  3392. </style>