main.vue 88 KB

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