人员公示统计
This commit is contained in:
@@ -71,6 +71,51 @@ export function getNowTime1() {
|
|||||||
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
const time = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||||
return time
|
return time
|
||||||
}
|
}
|
||||||
|
// 工时统计上个月26-本月25
|
||||||
|
export function getTime26() {
|
||||||
|
const date = new Date()
|
||||||
|
const day = date.getDate()
|
||||||
|
if (day >= 25) {
|
||||||
|
var month = zeroFill(date.getMonth() + 1)
|
||||||
|
if (month === 0) {
|
||||||
|
month = 12
|
||||||
|
const day = 26
|
||||||
|
const time = date.getFullYear() - 1 + '-' + month + '-' + day
|
||||||
|
return time
|
||||||
|
} else {
|
||||||
|
const day = 26
|
||||||
|
const time = date.getFullYear() + '-' + month + '-' + day
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var month2 = zeroFill(date.getMonth() + 1) - 1
|
||||||
|
if (month2 === 0) {
|
||||||
|
month2 = 12
|
||||||
|
const day = 26
|
||||||
|
const time = date.getFullYear() - 1 + '-' + month2 + '-' + day
|
||||||
|
return time
|
||||||
|
} else {
|
||||||
|
const day = 26
|
||||||
|
const time = date.getFullYear() + '-' + month2 + '-' + day
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export function getTime25() {
|
||||||
|
const date = new Date()
|
||||||
|
const day = date.getDate()
|
||||||
|
if (day >= 25) {
|
||||||
|
const month = zeroFill(date.getMonth() + 2)
|
||||||
|
const day2 = 25
|
||||||
|
const time = date.getFullYear() + '-' + month + '-' + day2
|
||||||
|
return time
|
||||||
|
} else {
|
||||||
|
const month = zeroFill(date.getMonth() + 1)
|
||||||
|
const day2 = 25
|
||||||
|
const time = date.getFullYear() + '-' + month + '-' + day2
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
}
|
||||||
// 判断类型
|
// 判断类型
|
||||||
export function type(target) {
|
export function type(target) {
|
||||||
const ret = typeof (target)
|
const ret = typeof (target)
|
||||||
|
|||||||
@@ -139,11 +139,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { searchtable, searchTable2 } from '@/api/ManufacturingCenter/ManHourStatistics'
|
import { searchtable, searchTable2 } from '@/api/ManufacturingCenter/ManHourStatistics'
|
||||||
|
import { getTime25, getTime26 } from '@/utils/tool'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateRange: '',
|
dateRange: [],
|
||||||
workerName: '',
|
workerName: '',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
@@ -156,6 +157,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.dateRange[0] = getTime26()
|
||||||
|
this.dateRange[1] = getTime25()
|
||||||
this.searchTable()
|
this.searchTable()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -32,16 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" height="570" style="width: 1000px; margin: 3px 0" size="mini" border highlight-current-row element-loading-text="拼命加载中">
|
||||||
v-loading="loading"
|
|
||||||
:data="tableData"
|
|
||||||
:row-class-name="tableRowClassName"
|
|
||||||
height="570"
|
|
||||||
style="width: 1000px; margin: 3px 0"
|
|
||||||
size="mini"
|
|
||||||
border
|
|
||||||
highlight-current-row
|
|
||||||
element-loading-text="拼命加载中">
|
|
||||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="140px" show-overflow-tooltip>
|
<el-table-column label="机床图号" prop="机床图号" align="center" width="140px" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user