|
@@ -1,13 +1,12 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <header class="mui-bar mui-bar-nav">
|
|
|
- <h1 class="mui-title">考勤统计</h1>
|
|
|
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
- </header>
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle"></top-header>
|
|
|
+
|
|
|
<div class="mui-content vongi-admin-kqtj">
|
|
|
<div class="fyy-temper-date">
|
|
|
- <a href="" class="mui-col-xs-6">2020-03-19<span class="mui-icon iconfont icon-xiajiantou"></span></a>
|
|
|
- <a href="" class="mui-col-xs-6">08:00-09:00<span class="mui-icon iconfont icon-xiajiantou"></span></a>
|
|
|
+ <a class="mui-col-xs-6" @click="selectData">{{subForm.queryDate}}<span class="mui-icon iconfont icon-xiajiantou"></span></a>
|
|
|
+ <a class="mui-col-xs-6">08:00-09:00<span class="mui-icon iconfont icon-xiajiantou"></span></a>
|
|
|
</div>
|
|
|
<h6>本时段考勤统计: 已打卡<span class="color55f868">30</span>人/缺卡<span class="colorfe616c">2</span>人</h6>
|
|
|
<ul class="mui-table-view mui-table-view-chevron">
|
|
@@ -79,14 +78,100 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+
|
|
|
+ <loading :visible="isLoading"></loading>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ require('$project/assets/js/mui.picker.min.js');
|
|
|
+ import * as API_Admin from '@/apis/HouseKeeper/admin'
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import {
|
|
|
+ mapGetters,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex'
|
|
|
+ import {
|
|
|
+ currentTimeStamp,
|
|
|
+ parseUnixTime
|
|
|
+ } from '$project/utils'
|
|
|
+ export default {
|
|
|
+ name: 'HouseKeeperAdminAttendanceList',
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageTitle: '考勤统计',
|
|
|
+
|
|
|
+ isLoading: false,
|
|
|
+
|
|
|
+ subForm: {
|
|
|
+ queryDate: ''
|
|
|
+ },
|
|
|
+ recordList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.subForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取列表
|
|
|
+ getList() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Admin.getAttednance(this.subForm).then(response => {
|
|
|
+
|
|
|
+ this.recordList = response;
|
|
|
+
|
|
|
+ this.isLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //选择日期
|
|
|
+ selectData() {
|
|
|
+ var _this = this;
|
|
|
+ var picker = new mui.DtPicker({
|
|
|
+ "type": "date",
|
|
|
+ "beginYear": 2020,
|
|
|
+ "endYear": 2040,
|
|
|
+ "endDate": new Date(),
|
|
|
+ "value": _this.subForm.queryDate
|
|
|
+ });
|
|
|
+ picker.show(function(rs) {
|
|
|
+ _this.subForm.queryDate = rs.text;
|
|
|
+ _this.getList();
|
|
|
+ picker.dispose();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ asynCallBack() {
|
|
|
+
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ //获取列表
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ destroyed() {},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: 'wx_openid',
|
|
|
+ token: 'token',
|
|
|
+ person_data: 'person_data',
|
|
|
+ company_data: 'company_data',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/sczpfyy.css"></style>
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
|
<style src="$project/assets/css/iconfont.css"></style>
|
|
|
+<style src="$project/assets/css/mui.picker.min.css"></style>
|
|
|
<style scoped>
|
|
|
</style>
|