main.vue 97 KB

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