index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view class="content">
  3. <view class="service_header_box">
  4. <!-- <view class="service_header_left">
  5. </view> -->
  6. <view class="service_header_right">
  7. <view class="btn" :class="!isSlecte?'active':''" @click="isSlecte=false">
  8. 当前告警
  9. </view>
  10. <view class="btn" :class="isSlecte?'active':''" @click="isSlecte=true">
  11. 告警记录
  12. </view>
  13. </view>
  14. </view>
  15. <view class="recharge" v-if="!isSlecte">
  16. <FireAlarm :isSlecte="isSlecte"></FireAlarm>
  17. </view>
  18. <view class="change" v-else>
  19. <Fault :isSlecte="isSlecte"></Fault>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import Fault from "./components/Fault.vue"
  25. import FireAlarm from "./components/FireAlarm.vue"
  26. export default {
  27. components:{
  28. Fault,FireAlarm
  29. },
  30. data() {
  31. return {
  32. isSlecte:false,
  33. }
  34. },
  35. mounted() {
  36. let showpage = this.$storage.getJson('gotoname')
  37. if(showpage){
  38. this.isSlecte = false
  39. }
  40. },
  41. methods: {
  42. },
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .content{
  47. width: 100%;
  48. color:white;
  49. font-size: 24px;
  50. .service_header_box{
  51. display: flex;
  52. justify-content: space-between;
  53. .service_header_left{
  54. display: flex;
  55. .service_header_left_title{
  56. font-size: 12px;
  57. font-family: PingFang SC-Regular, PingFang SC;
  58. font-weight: 400;
  59. color: #A8ADC8;
  60. height: 32px;
  61. line-height: 32px;
  62. margin-right: 10px;
  63. }
  64. .service_header_left_btn{
  65. width: 88px;
  66. height: 32px;
  67. border-radius: 2px 2px 2px 2px;
  68. border: 1px solid #91FDB9;
  69. color: #91FDB9;
  70. font-size: 14px;
  71. text-align: center;
  72. line-height: 32px;
  73. }
  74. }
  75. .service_header_right {
  76. display: flex;
  77. .btn {
  78. width: 100px;
  79. height: 48px;
  80. background: #263042;
  81. border-radius: 0px 2px 2px 0px;
  82. font-size: 16px;
  83. text-align: center;
  84. line-height: 48px;
  85. }
  86. .active {
  87. background: #91FDB9;
  88. border-radius: 2px 0px 0px 2px;
  89. color: black;
  90. }
  91. }
  92. }
  93. }
  94. </style>