style(attendance): 优化考勤页面时间展示和默认日期范围
1. 调整考勤同步页面的创建时间展示格式,补充时分秒信息 2. 修改考勤异常页面的默认日期范围,改为昨日至当前时间
This commit is contained in:
@@ -418,11 +418,11 @@ export default {
|
||||
methods: {
|
||||
initDateRange() {
|
||||
const now = new Date()
|
||||
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1)
|
||||
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0)
|
||||
const yesterday = new Date(now)
|
||||
yesterday.setDate(yesterday.getDate() - 1)
|
||||
|
||||
this.defaultStartTime = this.formatDate(firstDay)
|
||||
this.defaultEndTime = this.formatDate(lastDay)
|
||||
this.defaultStartTime = this.formatDate(yesterday)
|
||||
this.defaultEndTime = this.formatDate(now)
|
||||
|
||||
this.dateRangeParams = {
|
||||
startDate: this.defaultStartTime,
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="创建时间" align="center" prop="createdAt" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
||||
Reference in New Issue
Block a user