main.vue 93 KB

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