From 4403544f23791bb1dcde0d41c25ae19f40bc8f4d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 十一月 2025 14:17:00 +0800
Subject: [PATCH] 1.首页-展示一下当前登录账号的排班时间
---
src/views/index.vue | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index e616dc9..d0147e8 100644
--- a/src/views/index.vue
+++ b/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
// 鏍煎紡鍖栨帓鐝椂闂存樉绀�
--
Gitblit v1.9.3