warnAnalysis.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="warnAnalysis">
  3. <div class="warn-tag">
  4. <a-tag color="pink" v-for="(item, index) in tagList" :key="index">{{ item.title }}</a-tag>
  5. </div>
  6. <div class="warn-content">
  7. <a-table :columns="analysisColumns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
  8. :pagination="pagination" >
  9. <template #bodyCell="{ column, text }"></template>
  10. </a-table>
  11. </div>
  12. </div>
  13. </template>
  14. <script setup lang="ts">
  15. import { ref, reactive } from 'vue'
  16. import {analysisColumns} from './comment.data'
  17. let tagList = ref([
  18. { title: '测试1' },
  19. { title: '测试2' },
  20. { title: '测试3' },
  21. { title: '测试4' },
  22. { title: '测试5' },
  23. { title: '测试6' },
  24. ])
  25. let pagination = reactive({
  26. current: 1, // 当前页码
  27. pageSize: 10, // 每页显示条数
  28. total: 0, // 总条目数,后端返回
  29. // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
  30. showSizeChanger: true, // 是否可改变每页显示条数
  31. pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
  32. });
  33. let tableData=ref<any[]>([])
  34. </script>
  35. <style lang="less" scoped>
  36. .warnAnalysis {
  37. position: relative;
  38. width: 100%;
  39. height: 100%;
  40. .warn-tag {
  41. height: 30px;
  42. margin: 10px;
  43. text-align: center;
  44. }
  45. .warn-content {
  46. margin: 10px;
  47. }
  48. }
  49. ::v-deep .zxm-tag {
  50. font-size: 14px;
  51. padding: 0px 20px;
  52. line-height: 28px;
  53. background: linear-gradient(#2cd1ff55, #1eb0ff55);
  54. border-color: #74e9fe;
  55. color: #fff;
  56. }
  57. </style>