real_time_alarm.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="content">
  3. <view class="section">
  4. <view class="table" v-if="list">
  5. <uni-table emptyText="暂无更多数据" stripe>
  6. <!-- 表头行 -->
  7. <uni-tr>
  8. <uni-th align="center">时间</uni-th>
  9. <uni-th align="center" width="90">单位</uni-th>
  10. <uni-th align="center">地点</uni-th>
  11. <!-- <uni-th align="center">系统名称</uni-th> -->
  12. <uni-th align="center">报警内容</uni-th>
  13. <!-- <uni-th align="center">处理措施</uni-th> -->
  14. </uni-tr>
  15. <!-- 表格数据行 -->
  16. <uni-tr v-for="(item,index) in list" :key="index">
  17. <uni-td style="vertical-align: middle;" align="center">
  18. <view>{{item.enter_time}}</view>
  19. </uni-td>
  20. <uni-td style="vertical-align: middle;" align="center">
  21. <view>{{item.coal_name}}</view>
  22. </uni-td>
  23. <uni-td style="vertical-align: middle;" align="center">
  24. <view>{{item.survey_name}}</view>
  25. </uni-td>
  26. <uni-td style="vertical-align: middle;" align="center">
  27. <view>{{item.abnormal_reason}}</view>
  28. </uni-td>
  29. <!-- <uni-td style="vertical-align: middle;" align="center">
  30. <view>{{item.do_measure}}</view>
  31. </uni-td> -->
  32. </uni-tr>
  33. </uni-table>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. list:[]
  43. };
  44. },
  45. onLoad() {
  46. this.get_ycbj_list()
  47. },
  48. methods:{
  49. get_ycbj_list(){
  50. uni.showLoading({
  51. mask:true
  52. })
  53. this.$p_api.get_ycbj_list({
  54. }).then((res)=>{
  55. uni.hideLoading()
  56. this.list = res.data.content
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .content {
  64. box-sizing: border-box;
  65. padding: 0rpx 25rpx;
  66. margin-bottom: 150rpx;
  67. .section {
  68. .title {
  69. line-height: 90rpx;
  70. font-size: 34rpx;
  71. color: #424242;
  72. font-weight: 700;
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. .text {
  77. margin: 0 20rpx;
  78. }
  79. .line {
  80. width: 100rpx;
  81. height: 2rpx;
  82. background-color: #BFBFBF;
  83. }
  84. }
  85. .table {
  86. margin:0 -25rpx 20rpx;
  87. width: 750rpx;
  88. .uni-table-th {
  89. color: #FFFFFF;
  90. background-color: #00A0E8;
  91. }
  92. .uni-table-th.table--border {
  93. border: none;
  94. }
  95. .uni-table-td.table--border {
  96. color: #666666;
  97. border: none;
  98. }
  99. }
  100. }
  101. }
  102. </style>