AlarmInfo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <box
  3. title="消息通知详情"
  4. can-full-screen
  5. fullscreen
  6. v-on="$listeners"
  7. >
  8. <div class="info l-flex--col">
  9. <div class="l-flex--row center info__deviceName">
  10. {{ alarm.deviceName }}
  11. </div>
  12. <div
  13. class="l-flex--row center"
  14. :style="colorStyle"
  15. >
  16. <svg-icon
  17. class="alarm__icon"
  18. icon-class="v0-alarm"
  19. />
  20. <div class="alarm__name">
  21. {{ level }}
  22. </div>
  23. </div>
  24. <div class="l-flex--row center alarm__type">
  25. {{ alarm.type }}
  26. </div>
  27. <div class="l-flex--row c-sibling-item--v info__row">
  28. <div class="l-flex__fill l-flex--row center row__label">发生时间</div>
  29. <div class="l-flex__fill">{{ alarm.happenTime }}</div>
  30. <div class="l-flex__fill l-flex--row center row__label">截图</div>
  31. <div class="l-flex__fill">
  32. <auto-image
  33. v-if="alarm.asset"
  34. :src="alarm.asset.url"
  35. broken="image-broken"
  36. class="o-image u-pointer"
  37. style="width: 128px; height: 72px;"
  38. @click.native="onView"
  39. />
  40. <span v-else>-</span>
  41. </div>
  42. </div>
  43. <div class="l-flex--row c-sibling-item--v far info__row">
  44. <div class="l-flex__fill l-flex--row center row__label">处理方式</div>
  45. <div class="l-flex__fill">{{ alarm.handle }}</div>
  46. <div class="l-flex__fill l-flex--row center row__label">处理结果</div>
  47. <div class="l-flex__fill">{{ alarm.status.label }}</div>
  48. </div>
  49. <div class="info__tip l-flex--row center">
  50. 如有疑问,请及时联系管理员,谢谢。
  51. </div>
  52. </div>
  53. <preview-dialog
  54. ref="previewDialog"
  55. append-to-body
  56. />
  57. </box>
  58. </template>
  59. <script>
  60. import Box from './Box'
  61. export default {
  62. name: 'AlarmInfo',
  63. components: {
  64. Box
  65. },
  66. props: {
  67. alarm: {
  68. type: Object,
  69. required: true
  70. }
  71. },
  72. computed: {
  73. level () {
  74. return ['普通等级', '提示等级', '紧急等级'][this.alarm?.level]
  75. },
  76. colorStyle () {
  77. return this.alarm
  78. ? {
  79. color: ['#04A681', '#FFA000', '#F40645'][this.alarm.level]
  80. }
  81. : null
  82. }
  83. },
  84. methods: {
  85. onView () {
  86. this.$refs.previewDialog.show(this.alarm.asset)
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .info {
  93. &__row {
  94. height: 80px;
  95. line-height: 1;
  96. background-color: #313a5a;
  97. .row__label {
  98. color: #9ea9cd;
  99. }
  100. }
  101. &__deviceName {
  102. line-height: 72px;
  103. font-size: 48px;
  104. font-weight: bold;
  105. margin: 50px 0 69px 0;
  106. }
  107. .alarm {
  108. &__icon {
  109. margin-right: 8px;
  110. font-size: 32px;
  111. }
  112. &__type {
  113. font-size: 40px;
  114. line-height: 60px;
  115. font-weight: bold;
  116. margin: 40px 0 80px 0;
  117. }
  118. &__name {
  119. font-size: 32px;
  120. font-weight: 500;
  121. line-height: 48px;
  122. }
  123. }
  124. &__tip {
  125. color: #9ea9cd;
  126. line-height: 42px;
  127. font-size: 28px;
  128. margin-top: 80px;
  129. }
  130. }
  131. </style>