fault.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <el-table :data="tableData" id="tableStyle" :height="tableHeight" border>
  3. <el-table-column prop="operationName" label="冻结状态">
  4. <template #default="scope">
  5. {{ dictS.getLableByValue("escalation_fault_state", scope.row.state) }}
  6. </template>
  7. </el-table-column>
  8. <el-table-column prop="creator" label="报故人" />
  9. <el-table-column prop="stationName" label="报故工位" />
  10. <el-table-column prop="created" label="报故时间" />
  11. <el-table-column prop="disposalMeasures" label="处理结果">
  12. <template #default="scope">
  13. {{
  14. dictS.getLableByValue(
  15. "disposal_measures_type",
  16. scope.row.disposalMeasures
  17. )
  18. }}
  19. </template>
  20. </el-table-column>
  21. <el-table-column prop="standard" label="备注" />
  22. <template #empty>
  23. <div class="empty">
  24. <Empty />
  25. </div>
  26. </template>
  27. </el-table>
  28. <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
  29. </template>
  30. <script lang="ts" setup>
  31. import { useProcessStore } from "@/store";
  32. import { escalationRecordInfo } from "@/api/process/traceability";
  33. import { useDictionaryStore } from "@/store";
  34. const dictS = useDictionaryStore();
  35. const store = useProcessStore();
  36. const page = ref(1);
  37. const limit = ref(10);
  38. const total = ref(10);
  39. const tableData = ref([]);
  40. const tableHeight = ref(null);
  41. //动态控制表格高度
  42. const setTableHeight = () => {
  43. tableHeight.value =
  44. Number(document.getElementById("tabBox").offsetHeight) - 60;
  45. };
  46. const getPagination = async () => {
  47. const { data } = await escalationRecordInfo({
  48. pageNo: page.value,
  49. pageSize: limit.value,
  50. seqNo: store.useSeqNo,
  51. });
  52. total.value = data.totalCount;
  53. tableData.value = data.records;
  54. };
  55. onMounted(() => {
  56. getPagination();
  57. setTableHeight();
  58. });
  59. </script>
  60. <style lang="scss" scoped></style>