| | |
| | | <div class="company-meta">{{userStore.roleName}}</div> |
| | | </div> |
| | | <div style="display: flex;align-items: center;gap: 8px"> |
| | | <el-icon color="#5053B5" size="22"><Clock /></el-icon> |
| | | <span>登陆日期:{{userStore.currentLoginTime}}</span> |
| | | </div> |
| | | <el-icon color="#5053B5" size="22"><Clock /></el-icon> |
| | | <span>登陆日期:{{userStore.currentLoginTime}}</span> |
| | | </div> |
| | | <div style="display: flex;align-items: center;gap: 8px"> |
| | | <el-icon color="#5053B5" size="22"><Calendar /></el-icon> |
| | | <span>排班时间:{{scheduleTime}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="data-cards"> |
| | |
| | | <li v-for="item in todoList" :key="item.id"> |
| | | <div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px"> |
| | | <div style="display: flex;justify-content: space-between;align-items: center;"> |
| | | <div class="todo-title">流程编号:{{item.approveId}}</div> |
| | | <div class="todo-division">申请部门:{{item.approveDeptName}}</div> |
| | | <div class="todo-title">待办编号:{{item.approveId}}</div> |
| | | <div class="todo-division">部门:{{item.approveDeptName}}</div> |
| | | <div class="todo-time">{{item.approveTime}}</div> |
| | | </div> |
| | | <div class="todo-division">审批事由:{{item.approveReason}}</div> |
| | | <div class="todo-division">待办事由:{{item.approveReason}}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | </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"; |
| | | import { Clock, Calendar } from '@element-plus/icons-vue' |
| | | import { |
| | | analysisCustomerContractAmounts, getAmountHalfYear, |
| | | getBusiness, |
| | |
| | | qualityStatistics, |
| | | statisticsReceivablePayable |
| | | } from "@/api/viewIndex.js"; |
| | | import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const userStore = useUserStore() |
| | | |
| | |
| | | const todoList = ref([]) |
| | | const radio1 = ref(1) |
| | | |
| | | // 排班时间 |
| | | const scheduleTime = ref('') |
| | | const scheduleInfo = ref({}) |
| | | |
| | | // 图表引用 |
| | | const barChart = ref(null) |
| | | const lineChart = ref(null) |
| | |
| | | statisticsReceivable() |
| | | qualityStatisticsInfo() |
| | | getAmountHalfYearNum() |
| | | getCurrentUserSchedule() |
| | | }) |
| | | // 数据统计 |
| | | const getBusinessData = () => { |
| | |
| | | } |
| | | // 应付应收统计 |
| | | const statisticsReceivable = (type) => { |
| | | console.log(type) |
| | | statisticsReceivablePayable({type: radio1.value}).then((res) => { |
| | | barSeries.value[0].data = [ |
| | | // { value: res.data.prepayMoney, itemStyle: { color: barColors2[0] } }, |
| | |
| | | qualityStatisticsObject.value.factoryNum = res.data.factoryNum |
| | | }) |
| | | } |
| | | // 获取当前用户排班信息 |
| | | const getCurrentUserSchedule = async () => { |
| | | try { |
| | | const res = await getCurrentUserLatestScheduling() |
| | | |
| | | if (res.data) { |
| | | const currentSchedule = res.data |
| | | scheduleInfo.value = currentSchedule |
| | | |
| | | // 格式化排班时间显示 |
| | | if (currentSchedule.startTime && currentSchedule.endTime) { |
| | | scheduleTime.value = `${currentSchedule.startTime} - ${currentSchedule.endTime}` |
| | | } else if (currentSchedule.workStartTime && currentSchedule.workEndTime) { |
| | | const startTime = dayjs(currentSchedule.workStartTime).format('HH:mm') |
| | | const endTime = dayjs(currentSchedule.workEndTime).format('HH:mm') |
| | | scheduleTime.value = `${startTime} - ${endTime}` |
| | | } else { |
| | | scheduleTime.value = '今日无排班' |
| | | } |
| | | } else { |
| | | scheduleTime.value = '今日无排班' |
| | | scheduleInfo.value = {} |
| | | } |
| | | } catch (error) { |
| | | console.error('获取排班信息失败:', error) |
| | | scheduleTime.value = '获取排班信息失败' |
| | | } |
| | | } |
| | | |
| | | const getAmountHalfYearNum = async () => { |
| | | const res = await getAmountHalfYear() |
| | | console.log(res) |