|
@@ -0,0 +1,204 @@
|
|
|
+<template>
|
|
|
+ <BaseBlockCom title="考勤情况" style="position: relative;">
|
|
|
+ <template #title>
|
|
|
+ <div class="more">查看更多》</div>
|
|
|
+ </template>
|
|
|
+ <ButtonSwitchCom class="buttons" :options="[
|
|
|
+ {label: '昨日', value: '1'},
|
|
|
+ {label: '上周', value: '2'},
|
|
|
+ {label: '上月', value: '3'},
|
|
|
+ {label: '自定义', value: '4'},
|
|
|
+ ]" padding="3px 12px" v-model:active="dateType" @buttonClick="handleButtonClick"/>
|
|
|
+ <div class="list">
|
|
|
+ <template v-for="(item, index) in list">
|
|
|
+ <div class="item">
|
|
|
+ <div class="index">{{index < 9 ? '0' : ''}}{{index + 1}}</div>
|
|
|
+ <div class="title __text-ellipsis">{{item.title}}</div>
|
|
|
+ <template v-if="item.status === 1">
|
|
|
+ <div class="status status-true">
|
|
|
+ 已签到({{item.total}}次)
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.status === 2">
|
|
|
+ <div class="status status-false">
|
|
|
+ <template v-if="item.type === 1">
|
|
|
+ 迟到
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.type === 2">
|
|
|
+ 缺勤
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.type === 3">
|
|
|
+ 早退({{item.total}}次)
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+<!-- <div class="opacity-block"/>-->
|
|
|
+ <CusDialog
|
|
|
+ title="考勤情况"
|
|
|
+ v-model:show="showTimeDialog"
|
|
|
+ @submit="showTimeDialog = false"
|
|
|
+ footAlign="right"
|
|
|
+ height="180px"
|
|
|
+ width="400px"
|
|
|
+ >
|
|
|
+ <div class="__normal-form">
|
|
|
+ <CusForm labelWidth="100px" ref="ref_form">
|
|
|
+ <CusFormColumn
|
|
|
+ :span="24"
|
|
|
+ label="自定义日期:"
|
|
|
+ link="date"
|
|
|
+ type="daterange"
|
|
|
+ v-model:param="cusDate"/>
|
|
|
+ </CusForm>
|
|
|
+ </div>
|
|
|
+ </CusDialog>
|
|
|
+ </BaseBlockCom>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import {
|
|
|
+ defineComponent,
|
|
|
+ computed,
|
|
|
+ onMounted,
|
|
|
+ ref,
|
|
|
+ reactive,
|
|
|
+ watch,
|
|
|
+ getCurrentInstance,
|
|
|
+ ComponentInternalInstance,
|
|
|
+ toRefs,
|
|
|
+ nextTick
|
|
|
+} from 'vue'
|
|
|
+import {useStore} from 'vuex'
|
|
|
+import {useRouter, useRoute} from 'vue-router'
|
|
|
+import BaseBlockCom from '../../common/base-block.vue'
|
|
|
+import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
|
+import * as Handle from '../../common/handle'
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: '',
|
|
|
+ components: {
|
|
|
+ BaseBlockCom,
|
|
|
+ ButtonSwitchCom,
|
|
|
+ },
|
|
|
+ setup(props, {emit}) {
|
|
|
+ const store = useStore();
|
|
|
+ const router = useRouter();
|
|
|
+ const route = useRoute();
|
|
|
+ const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
|
|
|
+ const state = reactive({
|
|
|
+ Handle: Handle,
|
|
|
+ list: [
|
|
|
+ {status: 1, title: '太极计算机股份有限公司', total: 20},
|
|
|
+ {status: 1, title: '太极计算机股份有限公司', total: 2},
|
|
|
+ {status: 2, title: '中电科国海信通科技(海南)有限公司中电科国海信通科技(海南)有限公司', type: 3, total: 20},
|
|
|
+ {status: 2, title: '消防总队', type: 1},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ {status: 2, title: '消防总队', type: 2},
|
|
|
+ ],
|
|
|
+ dateType: '1',
|
|
|
+ showTimeDialog: false,
|
|
|
+ cusDate: ''
|
|
|
+ })
|
|
|
+ const handleButtonClick = (val) => {
|
|
|
+ if (val.value === '4') {
|
|
|
+ console.log(val)
|
|
|
+ state.showTimeDialog = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...toRefs(state),
|
|
|
+ handleButtonClick
|
|
|
+ }
|
|
|
+ },
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.more {
|
|
|
+ font-size: 12px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #2EB8FF;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+$buttonsHeight: 30px;
|
|
|
+.buttons {
|
|
|
+ height: $buttonsHeight;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.list {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - #{$buttonsHeight});
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding-left: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-y: auto;
|
|
|
+ position: relative;
|
|
|
+ .item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #C5D0D4;
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ .index {
|
|
|
+ margin-left: 27px;
|
|
|
+ width: 50px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ max-width: 230px;
|
|
|
+ }
|
|
|
+ .status {
|
|
|
+ width: 87px;
|
|
|
+ height: 26px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ font-size: 12px;
|
|
|
+ font-family: Adobe Heiti Std;
|
|
|
+ font-weight: normal;
|
|
|
+ margin-left: auto;
|
|
|
+ &.status-true {
|
|
|
+ background-image: url("@/assets/images/business/sign-true.png");
|
|
|
+ color: #3EFFBB;
|
|
|
+ }
|
|
|
+ &.status-false {
|
|
|
+ background-image: url("@/assets/images/business/sign-false.png");
|
|
|
+ color: #E5004F;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+//.opacity-block {
|
|
|
+// width: 100%;
|
|
|
+// height: 100px;
|
|
|
+// position: absolute;
|
|
|
+// bottom: 0;
|
|
|
+// background: linear-gradient(180deg, rgba(5, 26, 50, 0.5) 0%, rgba(5, 26, 50, 1) 100%);
|
|
|
+//
|
|
|
+//}
|
|
|
+</style>
|