real_time_alarm.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. this.$p_api.get_ycbj_list({
  51. }).then((res)=>{
  52. this.list = res.data.content
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .content {
  60. box-sizing: border-box;
  61. padding: 0rpx 25rpx;
  62. margin-bottom: 150rpx;
  63. .section {
  64. .title {
  65. line-height: 90rpx;
  66. font-size: 34rpx;
  67. color: #424242;
  68. font-weight: 700;
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. .text {
  73. margin: 0 20rpx;
  74. }
  75. .line {
  76. width: 100rpx;
  77. height: 2rpx;
  78. background-color: #BFBFBF;
  79. }
  80. }
  81. .table {
  82. margin:0 -25rpx 20rpx;
  83. width: 750rpx;
  84. .uni-table-th {
  85. color: #FFFFFF;
  86. background-color: #00A0E8;
  87. }
  88. .uni-table-th.table--border {
  89. border: none;
  90. }
  91. .uni-table-td.table--border {
  92. color: #666666;
  93. border: none;
  94. }
  95. }
  96. }
  97. }
  98. </style>