faultWarnIndex.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="faultwarn">
  3. <company-header></company-header>
  4. <view class="falutWarn_main">
  5. <view class="faultwarn_main_com flex" style="margin:10px 0" v-for="(item,index) in faultwarnData"
  6. :key="index">
  7. <view class="faultwarn_main_com_left">
  8. <view class="faultwarnLeftTop">{{item.name}}</view>
  9. <view class="faultwarnLeftBot">{{item.code}}</view>
  10. </view>
  11. <view class="faultwarn_main_com_right">
  12. <view class="faultwarnRightTop" :style="getSty(item)">{{item.reson}}
  13. </view>
  14. <view class="faultwarnRightBot" :style="getSty(item)">{{item.date}}
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import companyHeader from '../common/companyHeader.vue'
  23. export default {
  24. onLoad: function() {},
  25. components: {
  26. companyHeader
  27. },
  28. data() {
  29. return {
  30. faultwarnData: []
  31. }
  32. },
  33. created() {
  34. this.faultwarnData = [{
  35. name: '乌力吉',
  36. code: 'A25',
  37. reson: '通讯站点诊断类故障',
  38. date: '2017-01-06 13:34:34'
  39. },
  40. {
  41. name: '宝龙山',
  42. code: 'A25',
  43. reson: '通讯站点诊断类故障通讯站点诊断类故障通 讯站点诊断类故障',
  44. date: '2017-01-06 13:34:34'
  45. },
  46. ]
  47. },
  48. methods: {
  49. getSty(item) {
  50. let sty = ''
  51. if (item.reson.length > 16) {
  52. sty = 'top: 5px'
  53. } else {
  54. sty = 'top: 15px'
  55. }
  56. return sty
  57. },
  58. changeMsg() {
  59. this.$tab.navigateTo('/pages/common/messagePage')
  60. },
  61. changeStation() {
  62. this.$tab.navigateTo('/pages/common/stationListPage')
  63. },
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. page {
  69. background-color: #202246;
  70. }
  71. .faultwarn {
  72. width: 100vw;
  73. background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
  74. background-repeat: no-repeat, repeat;
  75. background-size: 100% 260px, 100% 5px;
  76. .falutWarn_main {
  77. padding: 0 20px;
  78. .faultwarn_main_com {
  79. height: 60px;
  80. background: #3F4572;
  81. border-radius: 5px;
  82. .faultwarn_main_com_left {
  83. width: 20%;
  84. background-color: #610900;
  85. color: #fff;
  86. border-radius: 5px 0 0 5px;
  87. text-align: center;
  88. .faultwarnLeftTop {
  89. font-size: 30upx;
  90. position: relative;
  91. top: 15px;
  92. }
  93. .faultwarnLeftBot {
  94. position: relative;
  95. top: 20px;
  96. }
  97. }
  98. .faultwarn_main_com_right {
  99. padding-left: 10px;
  100. width: 80%;
  101. .faultwarnRightTop {
  102. margin-bottom: 5px;
  103. color: #6A98CB;
  104. font-size: 30upx;
  105. position: relative;
  106. // top: 5px;
  107. }
  108. .faultwarnRightBot {
  109. color: #9A9BA6;
  110. position: relative;
  111. // top: 5px;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. </style>