GroupSetting.vue 1001 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <base-table border stripe size="small" height="100%" :columns="columns" :data="taskDetail"></base-table>
  3. </template>
  4. <script setup lang="ts" name="GroupSetting">
  5. /** 任务设置 - 按小组设置 */
  6. import { watch } from 'vue'
  7. import useFetch from '@/hooks/useFetch'
  8. import BaseTable from '@/components/element/BaseTable.vue'
  9. import type { EpTableColumn } from 'global-type'
  10. const props = defineProps<{
  11. mainNumber?: number | string
  12. markingGroupNumber?: number | string
  13. subjectCode?: string
  14. }>()
  15. const { fetch: getTaskDetail, result: taskDetail } = useFetch('getTaskDetail')
  16. const columns: EpTableColumn[] = [
  17. { label: '小组', prop: 'markingGroupNumber' },
  18. { label: '计划量', prop: 'markCount' },
  19. { label: '已完成量', prop: 'finishCount' },
  20. ]
  21. watch(
  22. props,
  23. () => {
  24. if (props.mainNumber && props.markingGroupNumber && props.subjectCode) {
  25. getTaskDetail({ ...props })
  26. }
  27. },
  28. { immediate: true }
  29. )
  30. </script>
  31. <style scoped lang="scss"></style>