index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!--安全隐患-->
  2. <template>
  3. <div class="app-container safetyHazard">
  4. <div class="safetyHazard-page">
  5. <div class="title-button-box">
  6. <div :class="pageType == 1?'check-div':''" @click="goPage(1)">
  7. <p>校院巡查隐患</p>
  8. <p></p>
  9. </div>
  10. <div :class="pageType == 2?'check-div':''" @click="goPage(2)">
  11. <p>实验室自查隐患</p>
  12. <p></p>
  13. </div>
  14. <div :class="pageType == 3?'check-div':''" @click="goPage(3)">
  15. <p>暂无法整改隐患</p>
  16. <p></p>
  17. </div>
  18. </div>
  19. <schoolListPage v-if="pageType == 1"></schoolListPage>
  20. <departmentListPage v-if="pageType == 2"></departmentListPage>
  21. <cannotListPage v-if="pageType == 3"></cannotListPage>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import schoolListPage from './schoolListPage.vue'
  27. import departmentListPage from './departmentListPage.vue'
  28. import cannotListPage from './cannotListPage.vue'
  29. export default {
  30. name: 'index',
  31. components: {
  32. schoolListPage,
  33. departmentListPage,
  34. cannotListPage
  35. },
  36. data(){
  37. return{
  38. pageType:1,
  39. }
  40. },
  41. created(){
  42. },
  43. mounted(){
  44. },
  45. methods:{
  46. goPage(type){
  47. if(this.pageType != type){
  48. this.$set(this,'pageType',type);
  49. }
  50. },
  51. }
  52. }
  53. </script>
  54. <style scoped lang="scss">
  55. .safetyHazard{
  56. flex: 1;
  57. display: flex !important;
  58. flex-direction: column;
  59. overflow: hidden;
  60. .safetyHazard-page{
  61. flex: 1;
  62. display: flex !important;
  63. flex-direction: column;
  64. overflow: hidden;
  65. .title-button-box{
  66. display: flex;
  67. height:80px;
  68. border-bottom:1px solid #E0E0E0;
  69. div{
  70. width:120px;
  71. margin-left:47px;
  72. overflow: hidden;
  73. cursor: pointer;
  74. p:nth-child(1){
  75. font-size:16px;
  76. color:#333;
  77. text-align: center;
  78. line-height:40px;
  79. margin-top:20px;
  80. font-weight: 500;
  81. }
  82. p:nth-child(2){
  83. width:60px;
  84. height:4px;
  85. border-radius:4px;
  86. margin:0 30px;
  87. }
  88. }
  89. .check-div{
  90. p:nth-child(1){
  91. color:#0045AF;
  92. }
  93. p:nth-child(2){
  94. background-color: #0045AF;
  95. }
  96. }
  97. }
  98. }
  99. }
  100. </style>