|
@@ -1,11 +1,158 @@
|
|
|
<template>
|
|
|
<div class="statistic-main">
|
|
|
<ButtonSwitchCom class="buttons" :options="[
|
|
|
- {label: '按日', value: '1'},
|
|
|
- {label: '按周', value: '2'},
|
|
|
- {label: '按月', value: '3'},
|
|
|
+ {label: '按日', value: 'day'},
|
|
|
+ {label: '按周', value: 'week'},
|
|
|
+ {label: '按月', value: 'month'},
|
|
|
]" padding="6px 16px" v-model:active="dateType"/>
|
|
|
- <div class="date">{{}}</div>
|
|
|
+ <div class="date">
|
|
|
+ <div>2023230230</div>
|
|
|
+ <div>25 26 27 28</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="content-item">
|
|
|
+ <div class="label">
|
|
|
+ <img src="@/assets/images/business/center-statistics-icon.png"/>
|
|
|
+ 考勤
|
|
|
+ </div>
|
|
|
+ <template v-if="dateType === 'day'">
|
|
|
+ <div class="value value-day">
|
|
|
+ <div class="block day-item">
|
|
|
+ <div class="day-item-label">签到打卡<span>{{dataInfoCpt.sign.signStartTime}}</span></div>
|
|
|
+ <div class="day-item-value">
|
|
|
+ <template v-if="dataInfoCpt.sign.signStartTimeReal">
|
|
|
+ <SvgIcon name="true" color="#02fff1"/><span>{{dataInfoCpt.sign.signStartTimeReal}}</span><span>已打卡</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="block day-item">
|
|
|
+ <div class="day-item-label">签退打卡<span>{{dataInfoCpt.sign.signEndTime}}</span></div>
|
|
|
+ <div class="day-item-value">
|
|
|
+ <template v-if="dataInfoCpt.sign.signEndTimeReal">
|
|
|
+ <SvgIcon name="tips" color="#02fff1"/><span>{{dataInfoCpt.sign.signEndTimeReal}}</span><span>已打卡</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value value-statistic" style="grid-template-columns: repeat(5, 1fr)">
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num green">{{dataInfoCpt.sign.cqts}}</div>
|
|
|
+ <div class="title">出勤天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num red">{{dataInfoCpt.sign.qqts}}</div>
|
|
|
+ <div class="title">缺勤天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num orange">{{dataInfoCpt.sign.cdcs}}</div>
|
|
|
+ <div class="title">迟到次数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num yellow">{{dataInfoCpt.sign.ztcs}}</div>
|
|
|
+ <div class="title">早退次数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num pink">{{dataInfoCpt.sign.qkcs}}</div>
|
|
|
+ <div class="title">缺卡次数</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="content-item">
|
|
|
+ <div class="label">
|
|
|
+ <img src="@/assets/images/business/center-statistics-icon.png"/>
|
|
|
+ 日志
|
|
|
+ </div>
|
|
|
+ <template v-if="dateType === 'day'">
|
|
|
+ <div class="value value-day">
|
|
|
+ <div class="block day-item">
|
|
|
+ <div class="day-item-label">{{dataInfoCpt.daily.submitTime ? '已提交' : '未提交'}}<img v-if="dataInfoCpt.daily.submitTime" class="download" src="@/assets/images/business/download.png"/></div>
|
|
|
+ <div class="day-item-value">
|
|
|
+ <template v-if="dataInfoCpt.daily.submitTime">
|
|
|
+ <SvgIcon name="true" color="#02fff1"/>
|
|
|
+ <span>{{$util.Hms(dataInfoCpt.daily.submitTime)}}</span>
|
|
|
+ <span class="blue">{{dataInfoCpt.daily.username}}</span>
|
|
|
+ <span>已提交</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <SvgIcon name="true" color="#04495c"/>
|
|
|
+ <span>请于</span>
|
|
|
+ <span class="blue">{{dataInfoCpt.daily.submitEndTime}}</span>
|
|
|
+ <span>前尽快提交</span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value value-statistic">
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num green">{{dataInfoCpt.daily.ytjts}}</div>
|
|
|
+ <div class="title">已提交天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num red">{{dataInfoCpt.daily.wtjts}}</div>
|
|
|
+ <div class="title">未提交天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num yellow">{{dataInfoCpt.daily.ytjfs}}</div>
|
|
|
+ <div class="title">已提交份数</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="content-item">
|
|
|
+ <div class="label">
|
|
|
+ <img src="@/assets/images/business/center-statistics-icon.png"/>
|
|
|
+ 周报
|
|
|
+ </div>
|
|
|
+ <template v-if="dateType === 'day'">
|
|
|
+ <div class="value value-day">
|
|
|
+ <div class="block day-item">
|
|
|
+ <div class="day-item-label">{{dataInfoCpt.weekly.submitTime ? '已提交' : '未提交'}}<img v-if="dataInfoCpt.weekly.submitTime" class="download" src="@/assets/images/business/download.png"/></div>
|
|
|
+ <div class="day-item-value">
|
|
|
+ <template v-if="dataInfoCpt.weekly.submitTime">
|
|
|
+ <SvgIcon name="true" color="#02fff1"/>
|
|
|
+ <span>{{$util.Hms(dataInfoCpt.weekly.submitTime)}}</span>
|
|
|
+ <span class="blue">{{dataInfoCpt.weekly.username}}</span>
|
|
|
+ <span>已提交</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <SvgIcon name="true" color="#04495c"/>
|
|
|
+ <span>请于</span>
|
|
|
+ <span class="blue">{{dataInfoCpt.weekly.submitEndTime}}</span>
|
|
|
+ <span>前尽快提交</span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value value-statistic">
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num green">{{dataInfoCpt.weekly.ytjts}}</div>
|
|
|
+ <div class="title">已提交天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num red">{{dataInfoCpt.weekly.wtjts}}</div>
|
|
|
+ <div class="title">未提交天数</div>
|
|
|
+ </div>
|
|
|
+ <div class="block statistic-item">
|
|
|
+ <div class="num yellow">{{dataInfoCpt.weekly.ytjfs}}</div>
|
|
|
+ <div class="title">已提交份数</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -37,10 +184,73 @@ export default defineComponent({
|
|
|
const route = useRoute();
|
|
|
const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
|
|
|
const state = reactive({
|
|
|
- dateType: '1'
|
|
|
+ dateType: 'day',
|
|
|
+ dataInfo: {
|
|
|
+ day: {
|
|
|
+ sign: {
|
|
|
+ signStartTime: '8:30',
|
|
|
+ signStartTimeReal: '07:59',
|
|
|
+ signStartStatus: '1',
|
|
|
+ signEndTime: '15:30',
|
|
|
+ signEndTimeReal: '',
|
|
|
+ signEndStatus: '0',
|
|
|
+ },
|
|
|
+ daily: {
|
|
|
+ username: '陈述婷',
|
|
|
+ submitTime: '2023-11-01 13:22:01',
|
|
|
+ submitEndTime: '23:12:35'
|
|
|
+ },
|
|
|
+ weekly: {
|
|
|
+ submitTime: '',
|
|
|
+ submitEndTime: '23:12:35'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ week: {
|
|
|
+ sign: {
|
|
|
+ cqts: 20,
|
|
|
+ qqts: 2,
|
|
|
+ cdcs: 4,
|
|
|
+ ztcs: 1,
|
|
|
+ qkcs: 1
|
|
|
+ },
|
|
|
+ daily: {
|
|
|
+ ytjts: 20,
|
|
|
+ wtjts: 20,
|
|
|
+ ytjfs: 20
|
|
|
+ },
|
|
|
+ weekly: {
|
|
|
+ ytjts: 20,
|
|
|
+ wtjts: 20,
|
|
|
+ ytjfs: 20
|
|
|
+ },
|
|
|
+ },
|
|
|
+ month: {
|
|
|
+ sign: {
|
|
|
+ cqts: 120,
|
|
|
+ qqts: 12,
|
|
|
+ cdcs: 14,
|
|
|
+ ztcs: 11,
|
|
|
+ qkcs: 11
|
|
|
+ },
|
|
|
+ daily: {
|
|
|
+ ytjts: 120,
|
|
|
+ wtjts: 120,
|
|
|
+ ytjfs: 120
|
|
|
+ },
|
|
|
+ weekly: {
|
|
|
+ ytjts: 120,
|
|
|
+ wtjts: 120,
|
|
|
+ ytjfs: 120
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const dataInfoCpt = computed(() => {
|
|
|
+ return state.dataInfo[state.dateType]
|
|
|
})
|
|
|
return {
|
|
|
- ...toRefs(state)
|
|
|
+ ...toRefs(state),
|
|
|
+ dataInfoCpt
|
|
|
}
|
|
|
},
|
|
|
})
|
|
@@ -50,5 +260,142 @@ export default defineComponent({
|
|
|
.statistic-main {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .buttons {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ .date {
|
|
|
+ height: 80px;
|
|
|
+ }
|
|
|
+ .content {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ .content-item {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ height: 30%;
|
|
|
+ background-image: url("@/assets/images/business/center-statistics-bg.png");
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 40px;
|
|
|
+ .label {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 180px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #0096FF;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 60px;
|
|
|
+ >img {
|
|
|
+ position: absolute;
|
|
|
+ z-index: -1;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .value {
|
|
|
+ flex: 1;
|
|
|
+ height: 60%;
|
|
|
+ display: grid;
|
|
|
+ align-items: center;
|
|
|
+ column-gap: 32px;
|
|
|
+ .block {
|
|
|
+ background: rgba(2, 12, 23, 0.2);
|
|
|
+ border: 3px solid #1E4C85;
|
|
|
+ }
|
|
|
+ &.value-day {
|
|
|
+ display: flex;
|
|
|
+ .day-item {
|
|
|
+ width: 40%;
|
|
|
+ height: 100%;
|
|
|
+ padding-left: 25px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ .day-item-label {
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #0096FF;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ >span {
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .download {
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .day-item-value {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ >span {
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .blue {
|
|
|
+ color: #0096FF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.value-statistic {
|
|
|
+ display: grid;
|
|
|
+ column-gap: 14px;
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
+ .statistic-item {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .num {
|
|
|
+ font-size: 28px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .green {
|
|
|
+ color: #3EFFBB;
|
|
|
+ }
|
|
|
+ .red {
|
|
|
+ color: #E5004F;
|
|
|
+ }
|
|
|
+ .orange {
|
|
|
+ color: #F9741B;
|
|
|
+ }
|
|
|
+ .yellow {
|
|
|
+ color: #F8EA9A;
|
|
|
+ }
|
|
|
+ .pink {
|
|
|
+ color: #FF23B9;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|