|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="main">
|
|
<div class="main">
|
|
- <div class="buttons">
|
|
|
|
|
|
+ <div class="buttons-top">
|
|
<ButtonSwitchCom class="buttons" :options="[
|
|
<ButtonSwitchCom class="buttons" :options="[
|
|
{label: '今日', value: '1'},
|
|
{label: '今日', value: '1'},
|
|
{label: '本周', value: '2'},
|
|
{label: '本周', value: '2'},
|
|
@@ -29,14 +29,14 @@
|
|
<div class="item">
|
|
<div class="item">
|
|
<img src="@/assets/images/business/statistic-cds.png"/>
|
|
<img src="@/assets/images/business/statistic-cds.png"/>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div><span class="green">{{ statisticData.cds.num }}</span>/{{ statisticData.cds.total }}</div>
|
|
|
|
|
|
+ <div><span class="red">{{ statisticData.cds.num }}</span>/{{ statisticData.cds.total }}</div>
|
|
<div>迟到数</div>
|
|
<div>迟到数</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
<img src="@/assets/images/business/statistic-zts.png"/>
|
|
<img src="@/assets/images/business/statistic-zts.png"/>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div><span class="green">{{ statisticData.zts.num }}</span>/{{ statisticData.zts.total }}</div>
|
|
|
|
|
|
+ <div><span class="red">{{ statisticData.zts.num }}</span>/{{ statisticData.zts.total }}</div>
|
|
<div>早退数</div>
|
|
<div>早退数</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -50,18 +50,35 @@
|
|
<div class="item">
|
|
<div class="item">
|
|
<img src="@/assets/images/business/statistic-rztjl.png"/>
|
|
<img src="@/assets/images/business/statistic-rztjl.png"/>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div><span class="green">{{ statisticData.rztjl }}</span> %</div>
|
|
|
|
|
|
+ <div><span class="yellow">{{ statisticData.rztjl }}</span> %</div>
|
|
<div>日志提交率</div>
|
|
<div>日志提交率</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="item">
|
|
|
|
|
|
+ <div class="item" :style="`opacity: ${dateType === '1' && new Date($store.state.app.timestamp).getDay() === 5 ? 1 : 0.3};`">
|
|
<img src="@/assets/images/business/statistic-zbtjl.png"/>
|
|
<img src="@/assets/images/business/statistic-zbtjl.png"/>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div><span class="green">{{ statisticData.zbtjl }}</span> %</div>
|
|
|
|
|
|
+ <div><span class="yellow">{{ statisticData.zbtjl }}</span> %</div>
|
|
<div>周报提交率</div>
|
|
<div>周报提交率</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="center-bar"/>
|
|
|
|
+ <div class="seat">
|
|
|
|
+ <div class="tab">
|
|
|
|
+ <ButtonSwitchCom class="buttons" :options="[
|
|
|
|
+ {label: '在位情况', value: '1'},
|
|
|
|
+ {label: '日志提交', value: '2'},
|
|
|
|
+ {label: '周报提交', value: '3'},
|
|
|
|
+ ]" padding="4px 8px" v-model:active="seatType"/>
|
|
|
|
+ <div class="tips">
|
|
|
|
+ 注:
|
|
|
|
+ <img src="@/assets/images/business/clue-icon.png"/>正常出勤,
|
|
|
|
+ <img src="@/assets/images/business/clue-icon.png"/>缺勤,
|
|
|
|
+ <img src="@/assets/images/business/clue-icon.png"/>异常
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <SeatCom :type="seatType === '1' ? 'sign' : 'file'" :data="seatData"/>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -81,11 +98,13 @@ import {
|
|
import {useStore} from 'vuex'
|
|
import {useStore} from 'vuex'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
|
|
+import SeatCom from './seat.vue'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: '',
|
|
name: '',
|
|
components: {
|
|
components: {
|
|
- ButtonSwitchCom
|
|
|
|
|
|
+ ButtonSwitchCom,
|
|
|
|
+ SeatCom
|
|
},
|
|
},
|
|
setup(props, {emit}) {
|
|
setup(props, {emit}) {
|
|
const store = useStore();
|
|
const store = useStore();
|
|
@@ -103,8 +122,56 @@ export default defineComponent({
|
|
cql: 45.6,
|
|
cql: 45.6,
|
|
rztjl: 80.6,
|
|
rztjl: 80.6,
|
|
zbtjl: 13,
|
|
zbtjl: 13,
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ seatType: '1',
|
|
|
|
+ seatData: []
|
|
})
|
|
})
|
|
|
|
+ const initSeatData = () => {
|
|
|
|
+ state.seatData = []
|
|
|
|
+ const arr = []
|
|
|
|
+ for (let i = 1; i <= 48; i++) {
|
|
|
|
+ const obj: any = {
|
|
|
|
+ index: i < 10 ? `0${i}` : i
|
|
|
|
+ }
|
|
|
|
+ if (state.seatType === '1') {
|
|
|
|
+ if (i === 9) {
|
|
|
|
+ obj.deptName = '通航服务站'
|
|
|
|
+ obj.isDaily = true
|
|
|
|
+ obj.isweekly = false
|
|
|
|
+ obj.username = '张三丰'
|
|
|
|
+ obj.phone = '18976123456'
|
|
|
|
+ obj.status = '0' // 0-正常出勤,1-缺勤,2异常
|
|
|
|
+ }
|
|
|
|
+ if (i === 18) {
|
|
|
|
+ obj.deptName = '通航服务站'
|
|
|
|
+ obj.isDaily = true
|
|
|
|
+ obj.isweekly = false
|
|
|
|
+ obj.status = '1'
|
|
|
|
+ }
|
|
|
|
+ if (i === 27) {
|
|
|
|
+ obj.deptName = '打私办'
|
|
|
|
+ obj.isDaily = true
|
|
|
|
+ obj.isweekly = false
|
|
|
|
+ obj.status = '2'
|
|
|
|
+ obj.username = '张三丰'
|
|
|
|
+ obj.phone = '18976123456'
|
|
|
|
+ }
|
|
|
|
+ if (i === 36) {
|
|
|
|
+ obj.deptName = '打私办'
|
|
|
|
+ obj.isDaily = true
|
|
|
|
+ obj.isweekly = false
|
|
|
|
+ obj.status = '2'
|
|
|
|
+ obj.username = '张三丰'
|
|
|
|
+ obj.phone = '18976123456'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ arr.push(obj)
|
|
|
|
+ }
|
|
|
|
+ state.seatData = arr
|
|
|
|
+ }
|
|
|
|
+ watch(() => state.seatType, () => {
|
|
|
|
+ initSeatData()
|
|
|
|
+ }, {immediate: true})
|
|
return {
|
|
return {
|
|
...toRefs(state)
|
|
...toRefs(state)
|
|
}
|
|
}
|
|
@@ -118,7 +185,7 @@ export default defineComponent({
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- .buttons {
|
|
|
|
|
|
+ .buttons-top {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -131,5 +198,73 @@ export default defineComponent({
|
|
opacity: 0.5;
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .statistic {
|
|
|
|
+ display: grid;
|
|
|
|
+ grid-template-columns: repeat(7, 1fr);
|
|
|
|
+ grid-template-rows: 68px;
|
|
|
|
+ margin-top: 12px;
|
|
|
|
+ .item {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ >img {
|
|
|
|
+ width: 60px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ }
|
|
|
|
+ .content {
|
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ color: #00DEFF;
|
|
|
|
+ >div {
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+ .green {
|
|
|
|
+ color: #5BDEAB;
|
|
|
|
+ font-size: 17px;
|
|
|
|
+ }
|
|
|
|
+ .red {
|
|
|
|
+ color: #E5004F;
|
|
|
|
+ font-size: 17px;
|
|
|
|
+ }
|
|
|
|
+ .yellow {
|
|
|
|
+ color: #FFCC02;
|
|
|
|
+ font-size: 17px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .center-bar {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 35px;
|
|
|
|
+ background-image: url("@/assets/images/business/center-bar.png");
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-size: 100% 100%;
|
|
|
|
+ margin-top: 18px;
|
|
|
|
+ margin-bottom: 15px;
|
|
|
|
+ }
|
|
|
|
+ .seat {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ flex: 1;
|
|
|
|
+ .tab {
|
|
|
|
+ height: 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ .tips {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: rgba(254, 254, 254, 0.5);
|
|
|
|
+ line-height: 68px;
|
|
|
|
+ >img {
|
|
|
|
+ width: 13px;
|
|
|
|
+ height: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .seat-com {
|
|
|
|
+ flex: 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|