| | |
| | | <script> |
| | | import { useAreaStore } from '@/stores/area.js' |
| | | import { mapStores } from 'pinia' |
| | | import dayjs from 'dayjs' |
| | | |
| | | import ProblemTable from './component/ProblemTable.vue' |
| | | import ProblemSummary from './component/ProblemSummary.vue' |
| | |
| | | return { |
| | | subtaskList: [], |
| | | activeNames: ['1', '2'], |
| | | time: '' |
| | | time: '', |
| | | area: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | time(nV, oV) { |
| | | if (nV != oV) { |
| | | this.areaStore.setTimeOneDay(nV) |
| | | const d = nV ? dayjs(nV) : dayjs() |
| | | this.area.starttime = d.startOf('day').format('YYYY-MM-DD HH:mm:ss') |
| | | this.area.endtime = d.endOf('day').format('YYYY-MM-DD HH:mm:ss') |
| | | // this.areaStore.setTimeOneDay(nV) |
| | | this.fetchSubtask() |
| | | } |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | fetchSubtask() { |
| | | taskApi.fetchSubtaskSummaryByArea(this.areaStore.area).then((res) => { |
| | | taskApi.fetchSubtaskSummaryByArea(this.area).then((res) => { |
| | | this.subtaskList = res.data |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | mounted() { |
| | | // this.fetchSubtask() |
| | | this.area = this.areaStore.area |
| | | } |
| | | } |
| | | </script> |