home.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. <template>
  2. <div class="home" :class="userType != 22&&initPage == 'true' ? 'home-class' : ''" >
  3. <home-navbar />
  4. <div class="max-big-home-box" v-if="userType != 22&&initPage == 'true'">
  5. <div class="max-home-button-box">
  6. <div class="max-home-box">
  7. <div class="max-bottom-box">
  8. <div class="top-button-box">
  9. <!--左侧-->
  10. <div class="left-box">
  11. <!--<div class="position-button top-margin" @click="goPage('EmergencyManagement','应急管理')">-->
  12. <div class="position-button top-margin" @click="goPage('SafetyEducationExam','安全教育与考试')">
  13. <div>
  14. <img src="@/assets/ZDimages/home/1.png">
  15. <p>安全教育与考试</p>
  16. </div>
  17. </div>
  18. <div class="position-button" @click="goPage('null','责任体系')">
  19. <div>
  20. <img src="@/assets/ZDimages/home/2.png">
  21. <p>责任体系</p>
  22. </div>
  23. </div>
  24. <!--<div class="position-button" @click="goPage('ChemicalLibrary','化学品管理')">-->
  25. <div class="position-button" @click="goPage('SecureAccess','安全准入')">
  26. <div>
  27. <img src="@/assets/ZDimages/home/3.png">
  28. <p>安全准入</p>
  29. </div>
  30. </div>
  31. </div>
  32. <!--中间-->
  33. <div class="center-box">
  34. <div class="position-button" @click="goPage('Https://www.sxitdlc.com','数据大屏')">
  35. <div>
  36. <img src="@/assets/ZDimages/home/icon_sydlpt_sjksh.png">
  37. <p>数据可视化</p>
  38. </div>
  39. </div>
  40. </div>
  41. <!--右侧-->
  42. <div class="right-box">
  43. <div class="position-button" @click="goPage('HierarchicalControl','分级管控')">
  44. <!--<div class="position-button top-margin" @click="goPage('SecureAccess','安全准入')">-->
  45. <div>
  46. <img src="@/assets/ZDimages/home/4.png">
  47. <p>分级管控</p>
  48. </div>
  49. </div>
  50. <div class="position-button" @click="goPage('SecurityCheck','安全检查')">
  51. <div>
  52. <img src="@/assets/ZDimages/home/5.png">
  53. <p>安全检查</p>
  54. </div>
  55. </div>
  56. <div class="position-button" @click="goPage('HazardManagement','危险源管理')">
  57. <div>
  58. <img src="@/assets/ZDimages/home/6.png">
  59. <p>危险源管理</p>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="center-button-box display-none-one"></div>
  65. <!--底部-->
  66. <div class="bottom-button-box">
  67. <div class="null-button"></div>
  68. <div class="position-button" @click="goPage('EmergencyManagement','应急管理')">
  69. <!--<div class="position-button" @click="goPage('SafetyEducationExam','安全教育与考试')">-->
  70. <div>
  71. <img src="@/assets/ZDimages/home/7.png">
  72. <p>应急管理</p>
  73. </div>
  74. </div>
  75. <div class="position-button" @click="goPage('CreditViolation','信用管理')">
  76. <div>
  77. <img src="@/assets/ZDimages/home/8.png">
  78. <p>信用管理</p>
  79. </div>
  80. </div>
  81. <!--<div class="position-button" @click="goPage('HierarchicalControl','分级管控')">-->
  82. <!--<div>-->
  83. <!--<img src="@/assets/ZDimages/home/icon_sy_fjgk.png">-->
  84. <!--<p>分级管控</p>-->
  85. <!--</div>-->
  86. <!--</div>-->
  87. <div class="position-button" @click="goPage('null','安全档案')">
  88. <div>
  89. <img src="@/assets/ZDimages/home/9.png">
  90. <p>安全档案</p>
  91. </div>
  92. </div>
  93. <div class="position-button" @click="goPage('Comprehensive','综合管理')">
  94. <div>
  95. <img src="@/assets/ZDimages/home/10.png">
  96. <p>综合管理</p>
  97. </div>
  98. </div>
  99. <div class="null-button"></div>
  100. </div>
  101. </div>
  102. <img class="img-1" src="@/assets/ZDimages/home/img_sy_lf.png">
  103. <img class="img-2" src="@/assets/ZDimages/home/img_yh_db.png">
  104. <img class="img-3" src="@/assets/ZDimages/home/img_yh_zj.png">
  105. <img class="img-4" src="@/assets/ZDimages/home/img_yh_dd.png">
  106. <img class="img-5" src="@/assets/ZDimages/home/img_yh_zj.png">
  107. <img class="img-6" src="@/assets/ZDimages/home/img_yh_db.png">
  108. </div>
  109. </div>
  110. </div>
  111. <backAnimation v-if="userType != '22'&&initPage == 'true'"></backAnimation>
  112. </div>
  113. </template>
  114. <script>
  115. import backAnimation from "@/components/backAnimation/backAnimation"
  116. import homeNavbar from './homeNavbar.vue'
  117. export default {
  118. name: "home",
  119. components: {
  120. homeNavbar,
  121. backAnimation
  122. },
  123. data() {
  124. return {
  125. routeData:{},
  126. userType:localStorage.getItem('userType'),
  127. initPage:localStorage.getItem('initPage'),
  128. };
  129. },
  130. created(){
  131. },
  132. mounted(){
  133. let self =this
  134. this.routeData = JSON.parse(localStorage.getItem("routeData"))
  135. if(localStorage.getItem('initPage') == 'true'){
  136. console.log("true")
  137. if(localStorage.getItem('userType') == '22'){
  138. for(let i=0;i<self.routeData.length;i++){
  139. if(!self.routeData[i].hidden&&self.routeData[i].name != 'Https://www.sxitdlc.com'){
  140. if (self.routeData[i].children){
  141. for(let o=0;o<self.routeData[i].children.length;o++){
  142. if(!self.routeData[i].children[o].alwaysShow&&!self.routeData[i].children[o].hidden){
  143. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path;
  144. console.log("urlText",urlText)
  145. this.$router.push({ path: urlText });
  146. return
  147. }else{
  148. if(self.routeData[i].children[o].children){
  149. for(let x=0;x<self.routeData[i].children[o].children.length;x++){
  150. if(!self.routeData[i].children[o].children[x].alwaysShow&&!self.routeData[i].children[o].children[x].hidden){
  151. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path + '/' + self.routeData[i].children[o].children[x].path;
  152. console.log("urlText",urlText)
  153. this.$router.push({ path: urlText });
  154. return
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }else{
  165. console.log("false")
  166. for(let i=0;i<self.routeData.length;i++){
  167. if(!self.routeData[i].hidden&&self.routeData[i].name != 'Https://www.sxitdlc.com'){
  168. if (self.routeData[i].children){
  169. for(let o=0;o<self.routeData[i].children.length;o++){
  170. if(!self.routeData[i].children[o].alwaysShow&&!self.routeData[i].children[o].hidden){
  171. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path;
  172. console.log("urlText",urlText)
  173. this.$router.push({ path: urlText });
  174. return
  175. }else{
  176. if(self.routeData[i].children[o].children){
  177. for(let x=0;x<self.routeData[i].children[o].children.length;x++){
  178. if(!self.routeData[i].children[o].children[x].alwaysShow&&!self.routeData[i].children[o].children[x].hidden){
  179. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path + '/' + self.routeData[i].children[o].children[x].path;
  180. console.log("urlText",urlText)
  181. this.$router.push({ path: urlText });
  182. return
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. },
  193. methods: {
  194. //跳转按钮
  195. goPage(type,title){
  196. let self = this;
  197. if(type == 'null'){
  198. this.$alert(title+'暂未开放', {
  199. confirmButtonText: '确定',
  200. callback: action => {}
  201. });
  202. return
  203. }
  204. if(type == 'Https://www.sxitdlc.com'){
  205. for(let i=0;i<self.routeData.length;i++){
  206. if(type == self.routeData[i].name){
  207. console.log("self.routeData[i].name",self.routeData[i].name)
  208. window.open(localStorage.getItem('screenUrl') + '?identity=' + localStorage.getItem('identity'));
  209. return
  210. }
  211. }
  212. this.$alert('没有"'+title+'"系统权限,如有疑问,请联系管理员', {
  213. confirmButtonText: '确定',
  214. callback: action => {}
  215. });
  216. }
  217. //寻找跳转目标路由
  218. let num = 0;
  219. for(let i=0;i<self.routeData.length;i++){
  220. if(type == self.routeData[i].name){
  221. num++
  222. if(!self.routeData[i].alwaysShow&&!self.routeData[i].hidden){
  223. let urlText = self.routeData[i].path;
  224. this.$router.push({ path: urlText });
  225. console.log("urlText1",urlText)
  226. return
  227. }else if (self.routeData[i].children){
  228. for(let o=0;o<self.routeData[i].children.length;o++){
  229. if(!self.routeData[i].children[o].alwaysShow&&!self.routeData[i].children[o].hidden){
  230. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path;
  231. this.$router.push({ path: urlText });
  232. console.log("urlText2",urlText)
  233. return
  234. }else{
  235. if(self.routeData[i].children[o].children){
  236. for(let x=0;x<self.routeData[i].children[o].children.length;x++){
  237. if(!self.routeData[i].children[o].children[x].alwaysShow&&!self.routeData[i].children[o].children[x].hidden){
  238. let urlText = self.routeData[i].path + '/' + self.routeData[i].children[o].path + '/' + self.routeData[i].children[o].children[x].path;
  239. this.$router.push({ path: urlText });
  240. console.log("urlText3",urlText)
  241. return
  242. }
  243. }
  244. }
  245. }
  246. }
  247. }
  248. }
  249. }
  250. if(num == 0){
  251. this.$alert('没有"'+title+'"系统权限,如有疑问,请联系管理员', {
  252. confirmButtonText: '确定',
  253. callback: action => {}
  254. });
  255. }
  256. },
  257. },
  258. };
  259. </script>
  260. <style scoped lang="scss">
  261. /*@media screen and (min-height:10px){*/
  262. /*.display-none-one{*/
  263. /*display: none;*/
  264. /*}*/
  265. /*.max-bottom-box{*/
  266. /*.top-button-box{*/
  267. /*.top-margin{*/
  268. /*margin-top:20px!important;*/
  269. /*}*/
  270. /*}*/
  271. /*}*/
  272. /*}*/
  273. /*@media screen and (min-height:850px){*/
  274. /*.max-bottom-box{*/
  275. /*.top-button-box{*/
  276. /*.top-margin{*/
  277. /*margin-top:50px!important;*/
  278. /*}*/
  279. /*}*/
  280. /*}*/
  281. /*}*/
  282. /*@media screen and (min-height:900px){*/
  283. /*.max-bottom-box{*/
  284. /*.top-button-box{*/
  285. /*.top-margin{*/
  286. /*margin-top:100px!important;*/
  287. /*}*/
  288. /*}*/
  289. /*}*/
  290. /*}*/
  291. /*@media screen and (min-height:1000px){*/
  292. /*.display-none-one{*/
  293. /*display: block!important;*/
  294. /*}*/
  295. /*}*/
  296. @-webkit-keyframes centerButtonMover {
  297. 0% {
  298. transform:scale(1);
  299. }
  300. 30% {
  301. transform: rotate(0deg) scale(0.9);
  302. }
  303. 40% {
  304. transform: rotate(-5deg) scale(1);
  305. }
  306. 50% {
  307. transform: rotate(5deg) scale(1);
  308. }
  309. 60% {
  310. transform: rotate(-5deg) scale(1.1);
  311. }
  312. 70% {
  313. transform: rotate(0deg) scale(1.2);
  314. }
  315. 100% {
  316. transform: rotate(0deg) scale(1);
  317. }
  318. }
  319. @-webkit-keyframes centerMover {
  320. 0% {
  321. -webkit-transform: translateY(0);
  322. /*transform:scale(0.5px;*/
  323. }
  324. 50% {
  325. -webkit-transform: translateY(20px);
  326. /*transform:scale(0.5px;*/
  327. }
  328. 100% {
  329. -webkit-transform: translateY(0);
  330. /*transform:scale(0.6px;/*/
  331. }
  332. }
  333. @-webkit-keyframes ringMove {
  334. 0% {
  335. -webkit-transform: translateY(0px);
  336. /*transform:scale(0.5px;*/
  337. opacity:1;
  338. }
  339. 50% {
  340. -webkit-transform: translateY(20px);
  341. /*transform:scale(0.5px;*/
  342. opacity:0;
  343. }
  344. 100% {
  345. -webkit-transform: translateY(0);
  346. /*transform:scale(0.6px;/*/
  347. opacity:0;
  348. }
  349. }
  350. @-webkit-keyframes buttonMove{
  351. 50%{
  352. -webkit-transform:scale(0.8);
  353. transform:scale(0.8);
  354. -webkit-filter:brightness(90%)
  355. }
  356. 100%{
  357. -webkit-transform:scale(1);
  358. transform:scale(1);
  359. /*css3滤镜亮度百分比*/
  360. -webkit-filter:brightness(100%)
  361. }
  362. }
  363. .home-class{
  364. background-color: #004d8c;
  365. background-image:url("../assets/ZDimages/home/img_tydlpt_bg.png")!important;
  366. -webkit-background-size: 100%;
  367. background-size: 100%;
  368. }
  369. .home {
  370. height:100%;
  371. width:100%;
  372. flex:1;
  373. display: flex;
  374. flex-direction: column;
  375. overflow: hidden;
  376. position: relative;
  377. *{
  378. margin:0;
  379. }
  380. .max-big-home-box{
  381. position: relative;
  382. flex:1;
  383. overflow: hidden;
  384. .max-home-button-box{
  385. /*width:1462px;*/
  386. width:1300px;
  387. /*height:848px;*/
  388. height:760px;
  389. top:50%;
  390. left:50%;
  391. margin-top:-380px;
  392. margin-left:-650px;
  393. position: absolute;
  394. .max-home-box{
  395. /*background: #E65D6E;*/
  396. /*width:1462px;*/
  397. width:1300px;
  398. /*height:848px;*/
  399. height:760px;
  400. position: relative;
  401. display: flex;
  402. flex-direction: column;
  403. .img-1{
  404. position: absolute;
  405. /*width:863px;*/
  406. width:690px;
  407. /*height:504px;*/
  408. height:403px;
  409. top:191px;
  410. left:50%;
  411. margin-left:- 345px;
  412. -webkit-animation-name: centerMover;
  413. -webkit-animation-duration: 4s;
  414. -webkit-animation-iteration-count: infinite;
  415. -webkit-animation-delay: 0s;
  416. }
  417. .img-2{
  418. position: absolute;
  419. /*width:463px;*/
  420. width:370px;
  421. /*height:106px;*/
  422. height:84px;
  423. top:391px;
  424. left:50%;
  425. margin-left:- 185px;
  426. -webkit-animation-name: ringMove;
  427. -webkit-animation-duration: 2s;
  428. -webkit-animation-iteration-count: infinite;
  429. -webkit-animation-delay: 0s;
  430. }
  431. .img-3{
  432. position: absolute;
  433. /*width:493px;*/
  434. width:394px;
  435. /*height:107px;*/
  436. height:85px;
  437. top:319px;
  438. left:50%;
  439. margin-left:- 197px;
  440. -webkit-animation-name: ringMove;
  441. -webkit-animation-duration: 2s;
  442. -webkit-animation-iteration-count: infinite;
  443. -webkit-animation-delay: 0.2s;
  444. }
  445. .img-4{
  446. position: absolute;
  447. /*width:554px;*/
  448. width:443px;
  449. /*height:118px;*/
  450. height:94px;
  451. top:231px;
  452. left:50%;
  453. margin-left:- 221px;
  454. -webkit-animation-name: ringMove;
  455. -webkit-animation-duration: 2s;
  456. -webkit-animation-iteration-count: infinite;
  457. -webkit-animation-delay: 0.4s;
  458. }
  459. .img-5{
  460. position: absolute;
  461. width:394px;
  462. /*width:493px;*/
  463. /*height:107px;*/
  464. height:85px;
  465. /*width:644px;*/
  466. /*height:118px;*/
  467. top:141px;
  468. left:50%;
  469. //margin-left:-322px;
  470. margin-left:- 197px;
  471. -webkit-animation-name: ringMove;
  472. -webkit-animation-duration: 2s;
  473. -webkit-animation-iteration-count: infinite;
  474. -webkit-animation-delay: 0.6s;
  475. }
  476. .img-6{
  477. position: absolute;
  478. width:354px;
  479. /*width:443px;*/
  480. /*height:106px;*/
  481. height:84px;
  482. /*width:734px;*/
  483. /*height:118px;*/
  484. top:051px;
  485. left:50%;
  486. //margin-left:-367px;
  487. margin-left:- 177px;
  488. -webkit-animation-name: ringMove;
  489. -webkit-animation-duration: 2s;
  490. -webkit-animation-iteration-count: infinite;
  491. -webkit-animation-delay: 0.8s;
  492. }
  493. .max-bottom-box{
  494. width:1300px;
  495. margin:0 auto;
  496. flex:1;
  497. display: flex;
  498. flex-direction: column;
  499. .top-button-box{
  500. display: flex;
  501. .left-box{
  502. .position-button{
  503. width:297px;
  504. height:136px;
  505. cursor: pointer;
  506. position: relative;
  507. z-index:5;
  508. img{
  509. width:297px;
  510. height:136px;
  511. }
  512. p{
  513. position: absolute;
  514. top:43px;
  515. left:142px;
  516. text-align: center;
  517. font-size:18px;
  518. line-height:18px;
  519. background: linear-gradient(to top, #06F6F7 , #FFFFFF );
  520. -webkit-background-clip: text;
  521. color: transparent;
  522. }
  523. }
  524. .position-button:nth-child(1){
  525. margin-top:0;
  526. }
  527. .position-button:nth-child(2){
  528. margin:55px 0 0 40px;
  529. }
  530. .position-button:nth-child(3){
  531. margin:55px 0 0 80px;
  532. }
  533. }
  534. .center-box{
  535. flex:1;
  536. .position-button{
  537. width:147px;
  538. height:105px;
  539. cursor: pointer;
  540. position: relative;
  541. z-index:5;
  542. margin:0 auto 0;
  543. -webkit-animation-name: centerButtonMover;
  544. -webkit-animation-duration: 3s;
  545. -webkit-animation-iteration-count: infinite;
  546. -webkit-animation-delay: 0s;
  547. img{
  548. width:147px;
  549. height:105px;
  550. }
  551. p{
  552. position: absolute;
  553. top:66px;
  554. left:30px;
  555. text-align: center;
  556. font-size:18px;
  557. line-height:18px;
  558. background: linear-gradient(to top, #06F6F7 , #FFFFFF );
  559. -webkit-background-clip: text;
  560. color: transparent;
  561. }
  562. }
  563. }
  564. .right-box{
  565. .position-button{
  566. width:297px;
  567. height:136px;
  568. cursor: pointer;
  569. z-index:5;
  570. position: relative;
  571. img{
  572. width:297px;
  573. height:136px;
  574. }
  575. p{
  576. position: absolute;
  577. top:43px;
  578. left:56px;
  579. text-align: center;
  580. font-size:18px;
  581. line-height:18px;
  582. background: linear-gradient(to top, #06F6F7 , #FFFFFF );
  583. -webkit-background-clip: text;
  584. color: transparent;
  585. }
  586. }
  587. .position-button:nth-child(1){
  588. margin:0 0 0 80px;
  589. }
  590. .position-button:nth-child(2){
  591. margin:55px 0 0 40px;
  592. }
  593. .position-button:nth-child(3){
  594. margin-top:55px;
  595. }
  596. }
  597. }
  598. .center-button-box{
  599. flex:1;
  600. }
  601. .bottom-button-box{
  602. display: flex;
  603. .null-button{
  604. flex:1;
  605. }
  606. .position-button{
  607. width:140px;
  608. height:200px;
  609. cursor: pointer;
  610. z-index:5;
  611. position: relative;
  612. img{
  613. width:140px;
  614. height:230px;
  615. }
  616. p{
  617. position: absolute;
  618. top:154px;
  619. /*left:34px;*/
  620. width:140px;
  621. text-align: center;
  622. font-size:18px;
  623. line-height:18px;
  624. background: linear-gradient(to top, #06F6F7 , #FFFFFF );
  625. -webkit-background-clip: text;
  626. color: transparent;
  627. }
  628. }
  629. .position-button:nth-child(1),
  630. .position-button:nth-child(2),
  631. .position-button:nth-child(3),
  632. .position-button:nth-child(4){
  633. margin-right:95px;
  634. }
  635. }
  636. .position-button:hover{
  637. -webkit-animation-name: buttonMove;
  638. -webkit-animation-duration: 1.5s;
  639. -webkit-animation-iteration-count: infinite;
  640. -webkit-animation-delay: 0s;
  641. }
  642. }
  643. }
  644. }
  645. }
  646. .bottom-null-box{
  647. height:60px;
  648. }
  649. }
  650. </style>