<template>
|
<a-card :bordered="false">
|
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
<a-col :xl="4" :lg="5" :md="6" :sm="24">
|
<a-form-item label="记录时间">
|
<a-date-picker value-format="YYYYMMDD" :allowClear="false" v-model="queryParam.theDate"
|
style="width: 100%"/>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="4" :lg="5" :md="6" :sm="24">
|
<a-form-item label="班次">
|
<j-dict-select-tag v-model="queryParam.shiftSchedule" dictCode="shift_schedule"
|
placeholder="请选择班次"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-space>
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="info" @click="searchReset" icon="reload">重置</a-button>
|
</a-space>
|
</a-col>
|
</a-row>
|
</a-form>
|
</div>
|
|
<!-- 操作按钮区域 -->
|
<div class="table-operator">
|
<a-button type="primary" icon="download" @click="handleExportXls('设备打卡率报表')">导出</a-button>
|
</div>
|
|
<!-- table区域-begin -->
|
<div>
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
|
style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
</div>
|
|
<a-table
|
ref="table"
|
size="middle"
|
bordered
|
rowKey="id"
|
:columns="columns"
|
:dataSource="dataSource"
|
:pagination="ipagination"
|
:loading="loading"
|
class="j-table-force-nowrap"
|
@change="handleTableChange">
|
|
<span slot="action" slot-scope="text, record">
|
<a @click="handleDetail(record)">详情</a>
|
</span>
|
</a-table>
|
</div>
|
<!-- table区域-end -->
|
</a-card>
|
</template>
|
|
<script>
|
import moment from 'moment'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
export default {
|
name: 'EfficiencyPunchReport',
|
mixins: [JeecgListMixin],
|
data() {
|
return {
|
queryParam: {
|
theDate: moment().add(-1, 'days').format('YYYYMMDD') // 默认设置为昨天
|
},
|
description: '设备打卡率',
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key: 'rowIndex',
|
width: 60,
|
align: 'center',
|
customRender: function(t, r, index) {
|
return parseInt(index) + 1
|
}
|
},
|
{
|
title: '记录时间',
|
align: 'center',
|
dataIndex: 'theDate'
|
},
|
{
|
title: '班次',
|
align: 'center',
|
dataIndex: 'shiftSchedule_dictText'
|
},
|
{
|
title: '早班上班打卡设备数量',
|
align: 'center',
|
dataIndex: 'mornShiftInNum'
|
},
|
{
|
title: '早下班打卡设备数量',
|
align: 'center',
|
dataIndex: 'mornShiftOutNum'
|
},
|
{
|
title: '晚班上班打卡设备数量',
|
align: 'center',
|
dataIndex: 'evenShiftInNum'
|
},
|
{
|
title: '晚班下班打卡设备数量',
|
align: 'center',
|
dataIndex: 'evenShiftOutNum'
|
},
|
{
|
title: '设备总数',
|
align: 'center',
|
dataIndex: 'deviceCountNum'
|
},
|
{
|
title: '早班上班打卡率(%)',
|
align: 'center',
|
dataIndex: 'mornShiftInRate'
|
},
|
{
|
title: '早班下班打卡率(%)',
|
align: 'center',
|
dataIndex: 'mornShiftOutRate'
|
},
|
{
|
title: '晚班上班打卡率(%)',
|
align: 'center',
|
dataIndex: 'evenShiftInRate',
|
customRender: (text) => {
|
if (text !== null && text !== undefined) {
|
return parseFloat(text).toFixed(2)
|
}
|
return text
|
}
|
},
|
{
|
title: '晚班下班打卡率(%)',
|
align: 'center',
|
dataIndex: 'evenShiftOutRate'
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align: 'center',
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: '/mdcEquipmentPunchRate/queryPageList',
|
exportXlsUrl: '/mdcEquipmentPunchRate/exportXls'
|
}
|
}
|
},
|
}
|
</script>
|