doingJob.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div class="content">
  3. <el-table :data="tableData" border style="width: 100%">
  4. <el-table-column prop="ticketName" label="作业名称" min-width="600" />
  5. <el-table-column prop="workstationName" label="岗位" min-width="200" />
  6. <el-table-column prop="machineryName" label="设备工艺" min-width="500" />
  7. <el-table-column label="作业类型" prop="ticketType" min-width="150">
  8. <template #default="scope">
  9. <dict-tag :type="DICT_TYPE.TICKET_TYPE" :value="scope.row.ticketType" />
  10. </template>
  11. </el-table-column>
  12. <el-table-column prop="ticketStartTime" label="作业开始时间" width="290" />
  13. </el-table>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import {DICT_TYPE} from "@/utils/dict";
  18. import * as Home from "@/api/home";
  19. const tableData = ref([])
  20. onMounted(() => {
  21. getJobDate()
  22. })
  23. const getJobDate = async () => {
  24. try {
  25. const jobData = await Home.getHomePage()
  26. tableData.value = jobData.jobList
  27. console.log(jobData, tableData.value, '数据有什么')
  28. } catch (error) {}
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .content {
  33. width: 100%;
  34. max-height: 400px;
  35. overflow: auto;
  36. }
  37. </style>