homeSubPageKYDXNH.vue 19 KB

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