index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="dustMonitor">
  3. <customHeader>束管日报分析</customHeader>
  4. <a-table :columns="columns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW">
  5. <template #bodyCell="{ column, record }">
  6. <template v-if="column.dataIndex === 'action'">
  7. <a class="action-link" @click="toDetail(record)">数据分析</a>
  8. </template>
  9. </template>
  10. </a-table>
  11. <a-modal style="width: 24%; height: 600px" title="爆炸三角形" v-model:visible="modalVisible" :draggable="true" :footer="null">
  12. <blastDelta :posMonitor="posMonitor" />
  13. </a-modal>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import { ref, onMounted, shallowRef } from 'vue';
  18. import { columns } from './bundle-table.data';
  19. import { getBundleInfoList } from './bundle-table.api';
  20. import customHeader from '/@/components/vent/customHeader.vue';
  21. // import { blastDelta } from './modal/blastDelta.vue';
  22. import blastDelta from './modal/blastDelta.vue';
  23. let tableData = ref<any[]>([]);
  24. let modalVisible = ref(false);
  25. const posMonitor = shallowRef({});
  26. async function getTableList() {
  27. let res = await getBundleInfoList({ type: 'bundle' });
  28. const content = res.content;
  29. let contentArr = JSON.parse(content);
  30. tableData.value = contentArr;
  31. }
  32. function toDetail(record: any) {
  33. posMonitor.value = record;
  34. console.log(posMonitor.value, 'posMonitor');
  35. modalVisible.value = true;
  36. }
  37. onMounted(() => {
  38. getTableList();
  39. });
  40. </script>
  41. <style lang="less" scoped>
  42. @import '/@/design/theme.less';
  43. .dustMonitor {
  44. width: 100%;
  45. height: 100%;
  46. padding: 80px 10px 15px 10px;
  47. box-sizing: border-box;
  48. position: relative;
  49. }
  50. :deep(.zxm-table-thead > tr > th:last-child) {
  51. border-right: 1px solid #91e9fe !important;
  52. }
  53. :deep(.zxm-picker-input > input) {
  54. color: #fff;
  55. }
  56. :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
  57. border: 1px solid var(--vent-form-item-border) !important;
  58. background-color: #ffffff00 !important;
  59. }
  60. :deep(.zxm-select-selection-item) {
  61. color: #fff !important;
  62. }
  63. </style>