FireTable.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <scroll-view class="uni-container" scroll-y="true" @scrolltolower='scrollbottom'>
  3. <uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
  4. <!-- <scroll-view style="width: 1000px;" scroll-x="true"> -->
  5. <uni-tr class="headerFix">
  6. <uni-th width="160">告警设备</uni-th>
  7. <uni-th width="260">告警信息</uni-th>
  8. <uni-th width="168">告警时间</uni-th>
  9. <uni-th width="160" align="center">是否处理</uni-th>
  10. <uni-th width="190" align="center">正在告警</uni-th>
  11. <uni-th width="80" align="center">操作</uni-th>
  12. </uni-tr>
  13. <uni-tr v-for="(item, index) in tableData" :key="index">
  14. <uni-td width="160">{{ item.date }}</uni-td>
  15. <uni-td width="260">{{ item.name }}</uni-td>
  16. <uni-td width="168">{{ item.name }}</uni-td>
  17. <uni-td width="160" align="center">{{ item.name }}</uni-td>
  18. <uni-td width="190" align="center">{{ item.name }}</uni-td>
  19. <uni-td width="80" align="center"><view class="editbtn">处理</view></uni-td>
  20. </uni-tr>
  21. <!-- </scroll-view> -->
  22. </uni-table>
  23. </scroll-view>
  24. </template>
  25. <script>
  26. export default {
  27. name: "PublicTable",
  28. props: ['loading', 'tableData'],
  29. data() {
  30. return {
  31. };
  32. },
  33. methods:{
  34. scrollright(){
  35. console.log('scrollright')
  36. },
  37. scrollbottom(){
  38. console.log('scrollbottom')
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .editbtn {
  45. color: #91FDB9;
  46. }
  47. .tableHeader {
  48. display: flex;
  49. }
  50. .uni-group {
  51. display: flex;
  52. align-items: center;
  53. justify-content: center;
  54. view:first-child {
  55. margin-right: 15px;
  56. }
  57. }
  58. .uni-container {
  59. margin-top: 16px;
  60. height: 523px;
  61. box-sizing: border-box;
  62. padding-top: 36px;
  63. }
  64. ::v-deep .table--border {
  65. border: none;
  66. }
  67. ::v-deep .uni-table-scroll {
  68. width: 998px;
  69. height: 100%;
  70. }
  71. .headerFix{
  72. position:fixed;
  73. left: 241px;
  74. z-index: 1;
  75. top: 175px;
  76. width: 1000px;
  77. }
  78. ::v-deep .uni-table {
  79. background: none;
  80. .empty-border {
  81. border: none;
  82. height: 80px;
  83. line-height: 80px;
  84. }
  85. .uni-table-th {
  86. height: 46px;
  87. background: #1D283E;
  88. box-shadow: 0px 1px 0px 0px #2F3C86;
  89. font-weight: 600;
  90. color: #FFFFFF;
  91. font-size: 14px;
  92. padding: 12px 8px;
  93. }
  94. .uni-table-td {
  95. font-weight: 400;
  96. color: #FFFFFF;
  97. font-size: 14px;
  98. height: 46px;
  99. line-height: 38px;
  100. }
  101. .uni-table-tr:nth-child(n + 2):hover {
  102. background-color: #1e2f36;
  103. }
  104. }
  105. ::v-deep .table--stripe .uni-table-tr:nth-child(2n + 3) {
  106. background-color: #141B2B;
  107. box-shadow: 0px 1px 0px 0px #292D46, 0px -1px 0px 0px #292D46;
  108. }
  109. </style>