| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted } from 'vue' |
| | | import { ref, reactive, onMounted } from 'vue' |
| | | import Echarts from "@/components/Echarts/echarts.vue"; |
| | | import * as echarts from 'echarts'; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | |
| | | qualityStatistics, |
| | | statisticsReceivablePayable |
| | | } from "@/api/viewIndex.js"; |
| | | import { listPage } from "@/api/personnelManagement/scheduling.js"; |
| | | import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const userStore = useUserStore() |
| | |
| | | // 获取当前用户排班信息 |
| | | const getCurrentUserSchedule = async () => { |
| | | try { |
| | | const today = dayjs().format('YYYY-MM-DD') |
| | | const res = await listPage({ |
| | | staffName: userStore.name, |
| | | startDate: today, |
| | | endDate: today, |
| | | current: 1, |
| | | size: 10 |
| | | }) |
| | | const res = await getCurrentUserLatestScheduling() |
| | | |
| | | if (res.data && res.data.records && res.data.records.length > 0) { |
| | | const currentSchedule = res.data.records[0] |
| | | if (res.data) { |
| | | const currentSchedule = res.data |
| | | scheduleInfo.value = currentSchedule |
| | | |
| | | // 格式化排班时间显示 |