gaoluyang
2025-12-09 6cf2b652ec22f424e5192fde5a15db1331167c76
1.海川开心-对账号对应伟完成事项列如待审批,报修等做条幅提醒
已修改2个文件
31 ■■■■■ 文件已修改
src/api/viewIndex.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/viewIndex.js
@@ -44,4 +44,12 @@
        url: '/sales/ledger/getAmountHalfYear',
        method: 'get'
    })
}
// 协同待审批和报修待办事项
export const approveAndDeviceTodos = () => {
    return request({
        url: '/home/approveAndDeviceTodos',
        method: 'get'
    })
}
src/views/index.vue
@@ -170,6 +170,7 @@
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ElNotification } from 'element-plus'
import Echarts from "@/components/Echarts/echarts.vue";
import * as echarts from 'echarts';
import useUserStore from "@/store/modules/user.js";
@@ -179,7 +180,8 @@
    getBusiness,
    homeTodos,
    qualityStatistics,
    statisticsReceivablePayable
    statisticsReceivablePayable,
    approveAndDeviceTodos
} from "@/api/viewIndex.js";
import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js";
import dayjs from "dayjs";
@@ -370,6 +372,7 @@
    qualityStatisticsInfo()
    getAmountHalfYearNum()
    getCurrentUserSchedule()
    getApproveAndDeviceTodos()
})
// 数据统计
const getBusinessData = () => {
@@ -525,6 +528,24 @@
        }
    ]
}
// 协同待审批和报修待办事项
const getApproveAndDeviceTodos = async () => {
    try {
        const res = await approveAndDeviceTodos()
        const { approveTodo, deviceRepairTodo } = res.data
        // 显示通知
        ElNotification({
                title: '待办事项提醒',
                message: `当前有${approveTodo}条待审批事项,${deviceRepairTodo}条待维修事项`,
                type: 'warning',
                duration: 5000
            })
    } catch (error) {
        console.error('获取协同待办事项失败:', error)
    }
}
</script>
<style scoped>