DsionStep5.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div class="dsion-step5">
  3. <BasicTable @register="registerTable">
  4. <template #toolbar>
  5. <!-- <a-button type="primary" @click="handelConfirm">分班确认</a-button> -->
  6. </template>
  7. </BasicTable>
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { reactive, watch } from 'vue';
  12. import { BasicTable, useTable } from '/@/components/Table';
  13. import { table5Columns } from '../data.config';
  14. import { getBandingTaskClassClassSure } from '/@/services/apis/BandingTaskClassController';
  15. import { postBandingTaskSure } from '/@/services/apis/BandingTaskController';
  16. const [registerTable, { reload }] = useTable({
  17. api: getBandingTaskClassClassSure,
  18. title: '班级列表',
  19. rowKey: 'id',
  20. useSearchForm: false,
  21. columns: table5Columns,
  22. showTableSetting: true,
  23. bordered: true,
  24. immediate: true,
  25. canResize: true,
  26. pagination: false,
  27. });
  28. const searchInfo = reactive<Recordable>({});
  29. const props = defineProps({
  30. taskId: { type: String, default: '' },
  31. });
  32. watch(
  33. () => props.taskId,
  34. async (newVal) => {
  35. if (newVal) {
  36. searchInfo.bandingTaskId = newVal;
  37. }
  38. },
  39. );
  40. const validateStep = () => {
  41. return true;
  42. };
  43. const reloadStep = () => {
  44. reload();
  45. };
  46. const handelConfirm = async () => {
  47. await postBandingTaskSure({ id: props.taskId });
  48. };
  49. defineExpose({ validateStep, reloadStep });
  50. </script>
  51. <style lang="less" scoped>
  52. .dsion-step5 {
  53. margin: 16px 0;
  54. }
  55. </style>