月报表、月异常报表-增加打卡记录展示,增加备注
This commit is contained in:
parent
b3305fa32f
commit
c0ddafe4d7
|
|
@ -19,3 +19,13 @@ export function exportMonthReport(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询外出次数查询列表
|
||||||
|
export function getClockingRecordListByUserId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/attDetails/getClockingRecordListByUserId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,3 +30,12 @@ export function exportMonthlyError(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询外出次数查询列表
|
||||||
|
export function getClockingRecordListByUserId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/attDetails/getClockingRecordListByUserId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,14 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="打卡记录" align="center" prop="clockingRecordNum">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div @click="openAttCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||||
|
{{ scope.row.clockingRecordNum }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
|
@ -208,16 +216,46 @@
|
||||||
<pagination v-show="totalTwoOutCount > 0" :total="totalTwoOutCount" :page.sync="queryRecord.pageNum"
|
<pagination v-show="totalTwoOutCount > 0" :total="totalTwoOutCount" :page.sync="queryRecord.pageNum"
|
||||||
:limit.sync="queryRecord.pageSize" @pagination="getOutCountList" />
|
:limit.sync="queryRecord.pageSize" @pagination="getOutCountList" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 打卡次数记录 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="showAttCount" width="1200px" height="1000px" append-to-body>
|
||||||
|
<el-form :model="queryAttCount" ref="queryFormRecordAtt" size="small" :inline="true" v-show="showSearch"
|
||||||
|
label-width="110px">
|
||||||
|
<el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loadingAttCount" :data="tableDataAttCount" width="900px" height="600px" row-key="id">
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryAttCount.pageNum - 1) * queryAttCount.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考勤日期" align="center" prop="attCurrentDay" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatDate(scope.row.attCurrentDay) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考勤时间" align="center" prop="attCurrentTime" sortable :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="打卡地址" align="center" prop="attAddress" sortable :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" sortable :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="totalAttCount > 0" :total="totalAttCount" :page.sync="queryAttCount.pageNum"
|
||||||
|
:limit.sync="queryAttCount.pageSize" @pagination="getClockingRecordListByUserId" />
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDetail } from "@/api/report/monthlyError";
|
import { getDetail } from "@/api/report/monthlyError";
|
||||||
import { getMonthAttReport, exportMonthReport } from "@/api/report/monthReport";
|
import { getMonthAttReport, exportMonthReport , getClockingRecordListByUserId} from "@/api/report/monthReport";
|
||||||
import { listDeptTree } from "@/api/system/userInfo";
|
import { listDeptTree } from "@/api/system/userInfo";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import { getOutCountList, exportOutCountList } from "@/api/report/attReport";
|
import { getOutCountList, exportOutCountList } from '@/api/report/attReport'
|
||||||
|
|
||||||
var monstr = "";
|
var monstr = "";
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -242,7 +280,7 @@ export default {
|
||||||
typeList: [],
|
typeList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
title1: "打卡记录",
|
title1: "正常打卡天数",
|
||||||
title2: "迟到记录",
|
title2: "迟到记录",
|
||||||
title3: "早退记录",
|
title3: "早退记录",
|
||||||
title4: "旷工记录",
|
title4: "旷工记录",
|
||||||
|
|
@ -252,6 +290,7 @@ export default {
|
||||||
title8: "轮休记录",
|
title8: "轮休记录",
|
||||||
title9: "临时外出记录",
|
title9: "临时外出记录",
|
||||||
title10: "出差天数",
|
title10: "出差天数",
|
||||||
|
title11: "打卡记录",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
showRecord: false,
|
showRecord: false,
|
||||||
|
|
@ -299,6 +338,19 @@ export default {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loadingTwo: false,
|
loadingTwo: false,
|
||||||
tableDataOutCount: [],
|
tableDataOutCount: [],
|
||||||
|
|
||||||
|
|
||||||
|
queryAttCount: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
month: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
},
|
||||||
|
showAttCount: false,
|
||||||
|
totalAttCount: 0,
|
||||||
|
// 遮罩层
|
||||||
|
loadingAttCount: false,
|
||||||
|
tableDataAttCount: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -384,7 +436,7 @@ export default {
|
||||||
this.queryRecord.userId = row.userId;
|
this.queryRecord.userId = row.userId;
|
||||||
this.queryRecord.attCurrentMonth = row.attCurrentMonth;
|
this.queryRecord.attCurrentMonth = row.attCurrentMonth;
|
||||||
this.attCurrentMonth = row.attCurrentMonth;
|
this.attCurrentMonth = row.attCurrentMonth;
|
||||||
if (titleBoss == '打卡记录') {
|
if (titleBoss == '正常打卡天数') {
|
||||||
this.queryRecord.attStatis = 1;
|
this.queryRecord.attStatis = 1;
|
||||||
} else if (titleBoss == '迟到记录') {
|
} else if (titleBoss == '迟到记录') {
|
||||||
this.queryRecord.attStatis = 2;
|
this.queryRecord.attStatis = 2;
|
||||||
|
|
@ -489,6 +541,25 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//打开打卡次数记录
|
||||||
|
openAttCountList(row) {
|
||||||
|
this.title = "打卡记录";
|
||||||
|
this.queryAttCount.month = row.attCurrentMonth;
|
||||||
|
this.queryAttCount.userName = row.userName;
|
||||||
|
this.showAttCount = true;
|
||||||
|
this.getClockingRecordListByUserId();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询打卡次数记录列表 */
|
||||||
|
getClockingRecordListByUserId() {
|
||||||
|
this.loadingAttCount = true;
|
||||||
|
getClockingRecordListByUserId(this.queryAttCount).then(response => {
|
||||||
|
this.tableDataAttCount = response.rows;
|
||||||
|
this.totalAttCount = response.total;
|
||||||
|
this.loadingAttCount = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,16 @@
|
||||||
type="month"
|
type="month"
|
||||||
value-format="yyyy-MM"
|
value-format="yyyy-MM"
|
||||||
></el-date-picker> -->
|
></el-date-picker> -->
|
||||||
<el-date-picker v-model="queryParams.attCurrentMonth" type="monthrange" range-separator="至" start-placeholder="开始月份"
|
<el-date-picker v-model="queryParams.attCurrentMonth" type="monthrange" range-separator="至"
|
||||||
end-placeholder="结束月份" value-format="yyyy-MM" :clearable="false" :editable="false">
|
start-placeholder="开始月份"
|
||||||
|
end-placeholder="结束月份" value-format="yyyy-MM" :clearable="false" :editable="false"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="部门" prop="orgId">
|
<el-form-item label="部门" prop="orgId">
|
||||||
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" @select="handleSelect" placeholder="选择部门" style="width: 240px"/>
|
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" @select="handleSelect"
|
||||||
|
placeholder="选择部门" style="width: 240px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名:" prop="name">
|
<el-form-item label="姓名:" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -35,7 +39,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['att:detail:export']"
|
v-hasPermi="['att:detail:export']"
|
||||||
>导出数据</el-button>
|
>导出数据
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -53,44 +58,49 @@
|
||||||
<el-table-column label="正常打卡天数" align="center" prop="normalNum" sortable>
|
<el-table-column label="正常打卡天数" align="center" prop="normalNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title1)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title1)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.normalNum }}
|
{{ scope.row.normalNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="迟到次数" align="center" prop="lateNum" sortable>
|
<el-table-column label="迟到天数" align="center" prop="lateNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title2)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title2)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.lateNum }}
|
{{ scope.row.lateNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="早退次数" align="center" prop="earlyNum" sortable>
|
<el-table-column label="早退天数" align="center" prop="earlyNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title3)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title3)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.earlyNum }}
|
{{ scope.row.earlyNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="旷工次数" align="center" prop="skippingNum" sortable>
|
<el-table-column label="旷工天数" align="center" prop="skippingNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title4)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title4)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.skippingNum }}
|
{{ scope.row.skippingNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="打卡地异常次数" align="center" prop="addressErrorNum" sortable>
|
<el-table-column label="打卡地异常天数" align="center" prop="addressErrorNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title5)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title5)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.addressErrorNum }}
|
{{ scope.row.addressErrorNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="出入异常次数" align="center" prop="einErrorNum" sortable>
|
<!-- <el-table-column label="出入异常天数" align="center" prop="einErrorNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title6)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title6)" style="color: #02a7f0; cursor: pointer">
|
||||||
|
|
@ -101,11 +111,21 @@
|
||||||
<el-table-column label="请假天数" align="center" prop="leaveNum" sortable>
|
<el-table-column label="请假天数" align="center" prop="leaveNum" sortable>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
@click="openRecord(scope.row,title7)" style="color: #02a7f0; cursor: pointer">
|
@click="openRecord(scope.row,title7)" style="color: #02a7f0; cursor: pointer"
|
||||||
|
>
|
||||||
{{ scope.row.leaveNum }}
|
{{ scope.row.leaveNum }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="打卡记录" align="center" prop="clockingRecordNum">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div @click="openAttCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||||
|
{{ scope.row.clockingRecordNum }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -117,8 +137,12 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 相关记录 -->
|
<!-- 相关记录 -->
|
||||||
<el-dialog :title="title" :visible.sync="showRecord" width="1200px" height="1000px" append-to-body @close="cancelRecord">
|
<el-dialog :title="title" :visible.sync="showRecord" width="1200px" height="1000px" append-to-body
|
||||||
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
@close="cancelRecord"
|
||||||
|
>
|
||||||
|
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch"
|
||||||
|
label-width="110px"
|
||||||
|
>
|
||||||
<el-form-item label="选择考勤时间段">
|
<el-form-item label="选择考勤时间段">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
|
|
@ -178,19 +202,52 @@
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 打卡次数记录 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="showAttCount" width="1200px" height="1000px" append-to-body>
|
||||||
|
<el-form :model="queryAttCount" ref="queryFormRecordAtt" size="small" :inline="true" v-show="showSearch"
|
||||||
|
label-width="110px">
|
||||||
|
<el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loadingAttCount" :data="tableDataAttCount" width="900px" height="600px" row-key="id">
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryAttCount.pageNum - 1) * queryAttCount.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考勤日期" align="center" prop="attCurrentDay" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatDate(scope.row.attCurrentDay) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考勤时间" align="center" prop="attCurrentTime" sortable :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="打卡地址" align="center" prop="attAddress" sortable :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" sortable :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="totalAttCount > 0" :total="totalAttCount" :page.sync="queryAttCount.pageNum"
|
||||||
|
:limit.sync="queryAttCount.pageSize" @pagination="getClockingRecordListByUserId" />
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listMonthlyError,getDetail,exportMonthlyError} from "@/api/report/monthlyError";
|
import { listMonthlyError, getDetail, exportMonthlyError,getClockingRecordListByUserId } from '@/api/report/monthlyError'
|
||||||
import {listDeptTree} from "@/api/system/userInfo";
|
import { listDeptTree } from '@/api/system/userInfo'
|
||||||
import { downloadFile } from '@/utils/download'
|
import { downloadFile } from '@/utils/download'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
// import { getEngineeringList } from "@/api/select";
|
// import { getEngineeringList } from "@/api/select";
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MonthlyError",
|
name: 'MonthlyError',
|
||||||
dicts: ['att_status'],
|
dicts: ['att_status'],
|
||||||
// dicts: ['sys_normal_disable','sys_voltage_level','sys_org_name','sys_pro_type','sys_pro_status',
|
// dicts: ['sys_normal_disable','sys_voltage_level','sys_org_name','sys_pro_type','sys_pro_status',
|
||||||
// 'sys_yz_manage','sys_sg_manage','sys_jl_manage','sys_device_type'],
|
// 'sys_yz_manage','sys_sg_manage','sys_jl_manage','sys_device_type'],
|
||||||
|
|
@ -217,14 +274,14 @@
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableDataRecord: [],
|
tableDataRecord: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
title1: "打卡记录",
|
title1: '打卡记录',
|
||||||
title2: "迟到记录",
|
title2: '迟到记录',
|
||||||
title3: "早退记录",
|
title3: '早退记录',
|
||||||
title4: "旷工记录",
|
title4: '旷工记录',
|
||||||
title5: "打卡地异常记录",
|
title5: '打卡地异常记录',
|
||||||
title6: "出入异常记录",
|
title6: '出入异常记录',
|
||||||
title7: "请假记录",
|
title7: '请假记录',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
|
@ -237,7 +294,7 @@
|
||||||
attCurrentMonth: undefined,
|
attCurrentMonth: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
orgName: undefined,
|
orgName: undefined,
|
||||||
orgId: undefined,
|
orgId: undefined
|
||||||
},
|
},
|
||||||
|
|
||||||
queryRecord: {
|
queryRecord: {
|
||||||
|
|
@ -245,39 +302,50 @@
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
attStatis: undefined,
|
attStatis: undefined,
|
||||||
attCurrent: undefined,
|
attCurrent: undefined
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate: this.disabledDate,
|
disabledDate: this.disabledDate
|
||||||
}
|
},
|
||||||
|
|
||||||
};
|
queryAttCount: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
month: undefined,
|
||||||
|
userName: undefined
|
||||||
},
|
},
|
||||||
computed: {
|
showAttCount: false,
|
||||||
|
totalAttCount: 0,
|
||||||
|
// 遮罩层
|
||||||
|
loadingAttCount: false,
|
||||||
|
tableDataAttCount: []
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
this.getMonth();
|
this.getMonth()
|
||||||
this.getDeptList();
|
this.getDeptList()
|
||||||
if (this.$route.query.param) {
|
if (this.$route.query.param) {
|
||||||
console.log(this.$route.query.param)
|
console.log(this.$route.query.param)
|
||||||
this.queryParams.attCurrentMonth = this.$route.query.param
|
this.queryParams.attCurrentMonth = this.$route.query.param
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
const str=this.queryRecord.attCurrent+'-01';
|
const str = this.queryRecord.attCurrent + '-01'
|
||||||
// 获取当前日期
|
// 获取当前日期
|
||||||
var currentDate = new Date(str);
|
var currentDate = new Date(str)
|
||||||
// 获取当前月份的第一天
|
// 获取当前月份的第一天
|
||||||
var firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
|
var firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1)
|
||||||
// 获取当前月份的最后一天
|
// 获取当前月份的最后一天
|
||||||
var lastDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);
|
var lastDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0)
|
||||||
return time < firstDayOfMonth || time > lastDayOfMonth;
|
return time < firstDayOfMonth || time > lastDayOfMonth
|
||||||
},
|
},
|
||||||
// defaultTime(){
|
// defaultTime(){
|
||||||
// // ['2023-04-01', '2023-04-10']
|
// // ['2023-04-01', '2023-04-10']
|
||||||
|
|
@ -293,146 +361,169 @@
|
||||||
// },
|
// },
|
||||||
getMonth() {
|
getMonth() {
|
||||||
// 默认当月
|
// 默认当月
|
||||||
var nowDate = new Date();
|
var nowDate = new Date()
|
||||||
var date = {
|
var date = {
|
||||||
year: nowDate.getFullYear(),
|
year: nowDate.getFullYear(),
|
||||||
month: nowDate.getMonth() + 1,
|
month: nowDate.getMonth() + 1,
|
||||||
day: nowDate.getDate()
|
day: nowDate.getDate()
|
||||||
};
|
}
|
||||||
const dayDate = date.year + "-" + (date.month >= 10 ? date.month : "0" + date.month);
|
const dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month)
|
||||||
// var date = new Date();
|
// var date = new Date();
|
||||||
this.$set(this.queryParams, "attCurrentMonth", [dayDate.toString(),dayDate.toString()]);
|
this.$set(this.queryParams, 'attCurrentMonth', [dayDate.toString(), dayDate.toString()])
|
||||||
},
|
},
|
||||||
formatDate(dateString) {
|
formatDate(dateString) {
|
||||||
const date = new Date(dateString); // 创建日期对象
|
const date = new Date(dateString) // 创建日期对象
|
||||||
const year = date.getFullYear(); // 获取年份
|
const year = date.getFullYear() // 获取年份
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 获取月份(注意:月份从0开始)
|
const month = String(date.getMonth() + 1).padStart(2, '0') // 获取月份(注意:月份从0开始)
|
||||||
const day = String(date.getDate()).padStart(2, '0'); // 获取日期
|
const day = String(date.getDate()).padStart(2, '0') // 获取日期
|
||||||
const weekdays = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; // 星期几数组
|
const weekdays = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] // 星期几数组
|
||||||
const weekday = weekdays[date.getDay()]; // 获取星期几
|
const weekday = weekdays[date.getDay()] // 获取星期几
|
||||||
|
|
||||||
return `${year}-${month}-${day} ${weekday}`; // 组合成所需格式
|
return `${year}-${month}-${day} ${weekday}` // 组合成所需格式
|
||||||
},
|
},
|
||||||
|
|
||||||
getDeptList() {
|
getDeptList() {
|
||||||
listDeptTree().then(response => {
|
listDeptTree().then(response => {
|
||||||
this.deptOptions = this.handleTree(response.data, "id");
|
this.deptOptions = this.handleTree(response.data, 'id')
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 转换部门数据结构 */
|
/** 转换部门数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
if (node.children && !node.children.length) {
|
if (node.children && !node.children.length) {
|
||||||
delete node.children;
|
delete node.children
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
label: node.orgName,
|
label: node.orgName,
|
||||||
children: node.children
|
children: node.children
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSelect(value, instanceId) {
|
handleSelect(value, instanceId) {
|
||||||
console.log('Selected:', value);
|
console.log('Selected:', value)
|
||||||
// 在这里处理选择事件
|
// 在这里处理选择事件
|
||||||
this.queryParams.orgName=value.orgName;
|
this.queryParams.orgName = value.orgName
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询月异常列表 */
|
/** 查询月异常列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
let query = _.cloneDeep(this.queryParams);
|
let query = _.cloneDeep(this.queryParams)
|
||||||
query.startMonth = query.attCurrentMonth[0];
|
query.startMonth = query.attCurrentMonth[0]
|
||||||
query.endMonth = query.attCurrentMonth[1];
|
query.endMonth = query.attCurrentMonth[1]
|
||||||
delete query['attCurrentMonth'];
|
delete query['attCurrentMonth']
|
||||||
console.log(query)
|
console.log(query)
|
||||||
listMonthlyError(query).then(response => {
|
listMonthlyError(query).then(response => {
|
||||||
this.tableData = response.rows;
|
this.tableData = response.rows
|
||||||
this.total = response.total;
|
this.total = response.total
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.queryForm = {};
|
this.queryForm = {}
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm')
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
resetRecord() {
|
resetRecord() {
|
||||||
// this.queryFormRecord = {};
|
// this.queryFormRecord = {};
|
||||||
this.dateRange = [];
|
this.dateRange = []
|
||||||
this.resetForm("queryFormRecord");
|
this.resetForm('queryFormRecord')
|
||||||
this.getListRecord();
|
this.getListRecord()
|
||||||
},
|
},
|
||||||
|
|
||||||
//打开月异常详情页面
|
//打开月异常详情页面
|
||||||
openRecord(row, titleBoss) {
|
openRecord(row, titleBoss) {
|
||||||
this.id = row.id;
|
this.id = row.id
|
||||||
this.title = titleBoss;
|
this.title = titleBoss
|
||||||
this.queryRecord.userId = row.userId;
|
this.queryRecord.userId = row.userId
|
||||||
this.queryRecord.orgId = row.orgId;
|
this.queryRecord.orgId = row.orgId
|
||||||
this.queryRecord.attCurrent = row.attCurrentMonth;
|
this.queryRecord.attCurrent = row.attCurrentMonth
|
||||||
if (titleBoss == '打卡记录') {
|
if (titleBoss == '打卡记录') {
|
||||||
this.queryRecord.attStatis=1;
|
this.queryRecord.attStatis = 1
|
||||||
} else if (titleBoss == '迟到记录') {
|
} else if (titleBoss == '迟到记录') {
|
||||||
this.queryRecord.attStatis=2;
|
this.queryRecord.attStatis = 2
|
||||||
} else if (titleBoss == '早退记录') {
|
} else if (titleBoss == '早退记录') {
|
||||||
this.queryRecord.attStatis=4;
|
this.queryRecord.attStatis = 4
|
||||||
} else if (titleBoss == '旷工记录') {
|
} else if (titleBoss == '旷工记录') {
|
||||||
this.queryRecord.attStatis=3;
|
this.queryRecord.attStatis = 3
|
||||||
} else if (titleBoss == '打卡地异常记录') {
|
} else if (titleBoss == '打卡地异常记录') {
|
||||||
this.queryRecord.attStatis=9;
|
this.queryRecord.attStatis = 9
|
||||||
} else if (titleBoss == '出入异常记录') {
|
} else if (titleBoss == '出入异常记录') {
|
||||||
this.queryRecord.attStatis=8;
|
this.queryRecord.attStatis = 8
|
||||||
} else if (titleBoss == '请假记录') {
|
} else if (titleBoss == '请假记录') {
|
||||||
this.queryRecord.attStatis=6;
|
this.queryRecord.attStatis = 6
|
||||||
}
|
}
|
||||||
this.showRecord = true;
|
this.showRecord = true
|
||||||
this.getListRecord();
|
this.getListRecord()
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询月异常详情列表 */
|
/** 查询月异常详情列表 */
|
||||||
getListRecord() {
|
getListRecord() {
|
||||||
this.loadingTwo = true;
|
this.loadingTwo = true
|
||||||
getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then(response => {
|
getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then(response => {
|
||||||
this.tableDataRecord = response.rows;
|
this.tableDataRecord = response.rows
|
||||||
this.totalTwo = response.total;
|
this.totalTwo = response.total
|
||||||
this.loadingTwo = false;
|
this.loadingTwo = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQueryRecord() {
|
handleQueryRecord() {
|
||||||
this.queryRecord.pageNum = 1;
|
this.queryRecord.pageNum = 1
|
||||||
this.getListRecord();
|
this.getListRecord()
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelRecord() {
|
cancelRecord() {
|
||||||
this.showRecord = false;
|
this.showRecord = false
|
||||||
this.resetRecord();
|
this.resetRecord()
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
let query = _.cloneDeep(this.queryParams);
|
let query = _.cloneDeep(this.queryParams)
|
||||||
query.startMonth = query.attCurrentMonth[0];
|
query.startMonth = query.attCurrentMonth[0]
|
||||||
query.endMonth = query.attCurrentMonth[1];
|
query.endMonth = query.attCurrentMonth[1]
|
||||||
delete query['attCurrentMonth'];
|
delete query['attCurrentMonth']
|
||||||
console.log(query)
|
console.log(query)
|
||||||
exportMonthlyError(query).then(res => {
|
exportMonthlyError(query).then(res => {
|
||||||
downloadFile({ fileName: `月异常报表_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
downloadFile({
|
||||||
|
fileName: `月异常报表_${new Date().getTime()}.xlsx`,
|
||||||
|
fileData: res,
|
||||||
|
fileType: 'application/vnd.ms-excel;charset=utf-8'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//打开打卡次数记录
|
||||||
|
openAttCountList(row) {
|
||||||
|
this.title = '打卡记录'
|
||||||
|
this.queryAttCount.month = row.attCurrentMonth
|
||||||
|
this.queryAttCount.userName = row.name
|
||||||
|
this.showAttCount = true
|
||||||
|
this.getClockingRecordListByUserId()
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询打卡次数记录列表 */
|
||||||
|
getClockingRecordListByUserId() {
|
||||||
|
this.loadingAttCount = true
|
||||||
|
getClockingRecordListByUserId(this.queryAttCount).then(response => {
|
||||||
|
this.tableDataAttCount = response.rows
|
||||||
|
this.totalAttCount = response.total
|
||||||
|
this.loadingAttCount = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -442,15 +533,18 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceCode {
|
.deviceCode {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
//隐藏图片上传框的css
|
//隐藏图片上传框的css
|
||||||
::v-deep.disabled {
|
::v-deep.disabled {
|
||||||
.el-upload--picture-card {
|
.el-upload--picture-card {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue