newsDetail.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="page">
  3. <view class="newsDetail">
  4. <view class="n-d1">
  5. <text class="t1"></text>
  6. <text class="t2">告警信息</text>
  7. </view>
  8. <view class="n-d2">
  9. <text>告警对象</text>
  10. <text class="t2">{{dataObj.alarmFor}}</text>
  11. </view>
  12. <view class="n-d2">
  13. <text>告警内容</text>
  14. <text class="t2">{{dataObj.discernResult}}</text>
  15. </view>
  16. <view class="n-d2">
  17. <text>告警等级</text>
  18. <text class="t2">{{dataObj.alarmLevel | alarmLevel}}</text>
  19. </view>
  20. <view class="n-d2">
  21. <text>告警时间</text>
  22. <text class="t2">{{dataObj.createTime}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. dataObj:{}
  32. }
  33. },
  34. filters:{
  35. alarmLevel(val){
  36. return val == 1 ? '预警' :val == 2 ?'一般告警': val == 3 ? '严重告警' : val == 4 ?'危机告警' :'正常'
  37. }
  38. },
  39. mounted() {
  40. this.dataObj = uni.getStorageSync("newsDetailxjapp")
  41. },
  42. methods: {
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .page {
  48. background: #F9F9F9;
  49. height:calc(100vh - 30rpx);
  50. padding-top:30rpx ;
  51. }
  52. .newsDetail {
  53. background: #fff;
  54. margin:0rpx 18rpx 50rpx 18rpx;
  55. border-radius: 20rpx;
  56. padding: 38rpx 38rpx 0 38rpx;
  57. .n-d2{
  58. display: flex;
  59. align-items: center;
  60. justify-content: space-between;
  61. font-size: 30rpx;
  62. height: 90rpx;
  63. line-height: 90rpx;
  64. border-bottom: 1rpx solid #E5E5E5;
  65. color: #666666;
  66. .t2{
  67. font-weight: bold;
  68. color: #333;
  69. }
  70. &:last-child{
  71. border: none;
  72. }
  73. }
  74. .n-d1 {
  75. margin-bottom: 20rpx;
  76. .t1 {
  77. width: 7rpx;
  78. height: 24rpx;
  79. background: #0581FD;
  80. border-radius: 3px;
  81. display: inline-block;
  82. margin-right: 10rpx;
  83. }
  84. .t2 {
  85. font-size: 32rpx;
  86. color: #000;
  87. font-weight: bold;
  88. }
  89. }
  90. }
  91. </style>