gaoluyang
2025-12-09 c1b289c6d8e4db3874f6f4800e091208e0c7a244
src/views/index.vue
@@ -169,7 +169,7 @@
</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";
@@ -181,7 +181,7 @@
   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()
@@ -424,17 +424,10 @@
// 获取当前用户排班信息
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
      
      // 格式化排班时间显示