修改传参方式
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
<!-- 第一行:totalView 和 infoBox -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="17">
|
||||
<totalView></totalView>
|
||||
<totalView :totalData="totalData"></totalView>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<infoBox></infoBox>
|
||||
@ -55,9 +55,9 @@
|
||||
<el-col :span="7">
|
||||
<div class="calendar-content">
|
||||
<el-card>
|
||||
<calendar></calendar>
|
||||
<todayAttend></todayAttend>
|
||||
<approval></approval>
|
||||
<calendar :calendarData="calendarData"></calendar>
|
||||
<todayAttend :todayAttendData="todayAttendData"></todayAttend>
|
||||
<approval :approvalData="approvalData"></approval>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -72,6 +72,9 @@ import approval from '@/views/integratedManage/attendManage/components/leftBox/a
|
||||
import calendar from '@/views/integratedManage/attendManage/components/leftBox/calendar.vue'
|
||||
import totalView from '@/views/integratedManage/attendManage/components/totalView.vue'
|
||||
import renyuanpaiban from '@/views/integratedManage/attendManage/components/renyuanpaiban.vue'
|
||||
import { ref } from 'vue';
|
||||
|
||||
// 出勤数据 - 用于attendTrend组件
|
||||
const attendData = ref(
|
||||
{
|
||||
week: {
|
||||
@ -86,6 +89,143 @@ const attendData = ref(
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Mock数据 - 更新为循环生成所需的数据结构
|
||||
const totalData = ref({
|
||||
attendance: {
|
||||
value: 248,
|
||||
change: '+8.2%',
|
||||
isPositive: true,
|
||||
chartData: [150, 230, 224, 218, 135, 300, 220],
|
||||
color: '#FF7D00',
|
||||
title: '总出勤人数',
|
||||
compareText: '较昨日同期',
|
||||
chartType: 'bar'
|
||||
},
|
||||
rest: {
|
||||
value: 8,
|
||||
change: '+8.2%',
|
||||
isPositive: true,
|
||||
chartData: [10, 12, 15, 8, 7, 9, 10],
|
||||
color: '#00C48C',
|
||||
title: '调休',
|
||||
compareText: '较上月同期',
|
||||
chartType: 'line'
|
||||
},
|
||||
leave: {
|
||||
value: 24,
|
||||
change: '-10%',
|
||||
isPositive: false,
|
||||
chartData: [30, 25, 28, 22, 20, 26, 24],
|
||||
color: '#FF5252',
|
||||
title: '本月请假',
|
||||
compareText: '较昨日同期',
|
||||
chartType: 'line'
|
||||
},
|
||||
rate: {
|
||||
value: '96.8%',
|
||||
change: '+10%',
|
||||
isPositive: true,
|
||||
chartData: [90, 92, 94, 95, 97, 98, 96.8],
|
||||
color: '#029CD4',
|
||||
title: '平均出勤率',
|
||||
compareText: '较昨日同期',
|
||||
chartType: 'line'
|
||||
}
|
||||
});
|
||||
|
||||
// 审批数据 - 用于approval组件
|
||||
const approvalData = ref([
|
||||
{
|
||||
type: '事假',
|
||||
days: 1,
|
||||
timeRange: '09.14-09.15',
|
||||
people: '水泥班组-王五',
|
||||
status: '待审批',
|
||||
statusType: 'primary',
|
||||
iconPath: '/src/assets/demo/approval.png'
|
||||
},
|
||||
{
|
||||
type: '病假',
|
||||
days: 2,
|
||||
timeRange: '09.14-09.15',
|
||||
people: '水泥班组-王五',
|
||||
status: '待审批',
|
||||
statusType: 'primary',
|
||||
iconPath: '/src/assets/demo/approval.png'
|
||||
},
|
||||
{
|
||||
type: '调休',
|
||||
days: 1,
|
||||
timeRange: '09.14-09.15',
|
||||
people: '水泥班组-王五',
|
||||
status: '待审批',
|
||||
statusType: 'primary',
|
||||
iconPath: '/src/assets/demo/approval.png'
|
||||
},
|
||||
{
|
||||
type: '事假',
|
||||
days: 1,
|
||||
timeRange: '09.14-09.15',
|
||||
people: '水泥班组-王五',
|
||||
status: '待审批',
|
||||
statusType: 'primary',
|
||||
iconPath: '/src/assets/demo/approval.png'
|
||||
},
|
||||
{
|
||||
type: '事假',
|
||||
days: 1,
|
||||
timeRange: '09.14-09.15',
|
||||
people: '水泥班组-王五',
|
||||
status: '已通过',
|
||||
statusType: 'success',
|
||||
iconPath: '/src/assets/demo/approval.png'
|
||||
}
|
||||
]);
|
||||
|
||||
// 今日出勤数据 - 用于todayAttend组件
|
||||
const todayAttendData = ref({
|
||||
attendance: {
|
||||
count: 150,
|
||||
icon: '/src/assets/demo/qin.png'
|
||||
},
|
||||
late: {
|
||||
count: 5,
|
||||
icon: '/src/assets/demo/chi.png'
|
||||
},
|
||||
earlyLeave: {
|
||||
count: 2,
|
||||
icon: '/src/assets/demo/tui.png'
|
||||
},
|
||||
absent: {
|
||||
count: 8,
|
||||
icon: '/src/assets/demo/que.png'
|
||||
}
|
||||
});
|
||||
|
||||
// 日历数据 - 用于calendar组件
|
||||
const calendarData = ref({
|
||||
// 初始化当前日期
|
||||
today: new Date(),
|
||||
currentDate: new Date(2025, 8, 27), // 2025年9月27日,截图中显示的日期
|
||||
selectedDate: new Date(2025, 8, 27),
|
||||
|
||||
// 模拟考勤数据
|
||||
attendanceData: {
|
||||
2025: {
|
||||
9: {
|
||||
1: 'normal',
|
||||
4: 'late',
|
||||
8: 'absent',
|
||||
10: 'leave',
|
||||
15: 'normal',
|
||||
20: 'normal',
|
||||
25: 'late',
|
||||
27: 'normal'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user