main.vue 97 KB

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