From 44de375bdcb1be60470e1aa7dbb7652be7e9ed17 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Thu, 29 Jan 2026 16:51:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +
.env.production | 2 +-
src/views/report/attendanceRate/index.vue | 124 +++++++++++++++++++---
vue.config.js | 5 +-
4 files changed, 115 insertions(+), 18 deletions(-)
diff --git a/.env.development b/.env.development
index 7fa39d6..84ca1a3 100644
--- a/.env.development
+++ b/.env.development
@@ -7,5 +7,7 @@ ENV = 'development'
# 博诺思管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
+BASE_URL = /
+
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/.env.production b/.env.production
index 25e5652..a8d19b9 100644
--- a/.env.production
+++ b/.env.production
@@ -4,6 +4,6 @@ VUE_APP_TITLE = 考勤后台管理系统
# 生产环境配置
ENV = 'production'
-BASE_URL=/gz-att/
+BASE_URL = /gz-att/
# 博诺思管理系统/生产环境
VUE_APP_BASE_API = '/gzatt-api'
diff --git a/src/views/report/attendanceRate/index.vue b/src/views/report/attendanceRate/index.vue
index c453665..c3e3a6d 100644
--- a/src/views/report/attendanceRate/index.vue
+++ b/src/views/report/attendanceRate/index.vue
@@ -130,7 +130,17 @@
:prop="item.prop"
v-for="item in mainListFields"
:key="item.prop"
- />
+ >
+
+ {{ scope.row[item.prop] }}
+ {{ scope.row[item.prop] }}
+
+
+ >
+
+ {{ scope.row[item.prop] }}
+ {{ scope.row[item.prop] }}
+
+
@@ -716,6 +736,8 @@ import {
import {
getAttendanceRateList,
getLateEarlyAbsentList,
+ getAttendanceRateDetail,
+ getAttAbnormalDetailsList,
} from "@/api/report/attendanceRate";
import { listDeptTree } from "@/api/system/userInfo";
@@ -777,6 +799,8 @@ export default {
userId: undefined,
attStatis: undefined,
attCurrentMonth: undefined,
+ leavePaidRate: "",
+ leaveUnpaidRate: "",
},
tableDataRecord: [],
totalTwo: 0,
@@ -853,10 +877,30 @@ export default {
{ label: "部门", prop: "orgName" },
{ label: "考勤月份", prop: "attCurrentMonth" },
{ label: "应出勤天数", prop: "requiredDays" },
- { label: "迟到率", prop: "lateRate" },
- { label: "早退率", prop: "earlyRate" },
- { label: "休假率(带薪)", prop: "leavePaidRate" },
- { label: "休假率(不带薪)", prop: "leaveUnpaidRate" },
+ {
+ label: "迟到率",
+ prop: "lateRate",
+ needShow: true,
+ type: "迟到记录",
+ },
+ {
+ label: "早退率",
+ prop: "earlyRate",
+ needShow: true,
+ type: "早退记录",
+ },
+ {
+ label: "休假率(带薪)",
+ prop: "leavePaidRate",
+ needShow: true,
+ type: "带薪1",
+ },
+ {
+ label: "休假率(不带薪)",
+ prop: "leaveUnpaidRate",
+ needShow: true,
+ type: "带薪0",
+ },
// { label: "异常打卡率", prop: "abnormalRate" },
{ label: "外勤次数", prop: "outsideAttNum" },
],
@@ -882,16 +926,31 @@ export default {
abnormalListFields: [
{ label: "姓名", prop: "userName" },
{ label: "单位", prop: "orgName" },
- { label: "次数", prop: "count" },
- { label: "异常类型", prop: "abnormalType" },
- { label: "异常原因", prop: "abnormalReason" },
+ {
+ label: "迟到天数",
+ prop: "lateNum",
+ needShow: true,
+ type: "早退记录",
+ },
+ {
+ label: "旷工天数",
+ prop: "skippingNum",
+ needShow: true,
+ type: "旷工记录",
+ },
+ {
+ label: "早退天数",
+ prop: "earlyNum",
+ needShow: true,
+ type: "早退记录",
+ },
],
queryParamsAbnormal: {
pageNum: 1,
pageSize: 10,
attCurrentMonth: new Date().toISOString().split("T")[0].slice(0, 7), // 默认当月
userName: undefined,
- orgIdList: undefined,
+ orgIdList: [],
orgName: undefined,
},
};
@@ -1033,6 +1092,14 @@ export default {
this.queryRecord.attStatis = 26;
} else if (titleBoss == "培训记录") {
this.queryRecord.attStatis = 28;
+ } else if (titleBoss == "带薪1") {
+ this.queryRecord.attStatis = "";
+ this.queryRecord.leavePaidRate = 1;
+ this.queryRecord.leaveUnpaidRate = 0;
+ } else if (titleBoss == "带薪0") {
+ this.queryRecord.attStatis = "";
+ this.queryRecord.leaveUnpaidRate = 1;
+ this.queryRecord.leavePaidRate = 0;
}
this.showRecord = true;
this.getListRecord();
@@ -1057,12 +1124,31 @@ export default {
},
/** 查询月异常详情列表 */
getListRecord() {
- getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then(
- (response) => {
+ // getAttendanceRateDetail(
+ // this.queryRecord,
+ // this.dateRange
+ // )(this.addDateRange(this.queryRecord, this.dateRange)).then(
+ // (response) => {
+ // this.tableDataRecord = response.rows;
+ // this.totalTwo = response.total;
+ // }
+ // );
+
+ if (this.tabIndex == "考勤报表") {
+ getAttendanceRateDetail(
+ this.addDateRange(this.queryRecord, this.dateRange)
+ ).then((response) => {
this.tableDataRecord = response.rows;
this.totalTwo = response.total;
- }
- );
+ });
+ } else {
+ getAttAbnormalDetailsList(
+ this.addDateRange(this.queryRecord, this.dateRange)
+ ).then((response) => {
+ this.tableDataRecord = response.rows;
+ this.totalTwo = response.total;
+ });
+ }
},
/** 搜索按钮操作 */
@@ -1242,7 +1328,15 @@ export default {
// 获取异常考勤统计列表
getAbnormalList() {
- getLateEarlyAbsentList(this.queryParamsAbnormal).then((response) => {
+ let query = _.cloneDeep(this.queryParamsAbnormal);
+ if (query.orgIdList && query.orgIdList.length > 0) {
+ query.orgIds = query.orgIdList.map((id) => id.toString());
+ } else {
+ query.orgIds = undefined;
+ }
+ delete query["orgIdList"];
+
+ getLateEarlyAbsentList(query).then((response) => {
this.abnormalList = response.rows;
this.totalAbnormal = response.total;
});
diff --git a/vue.config.js b/vue.config.js
index abb1513..b5890e6 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
- publicPath: process.env.NODE_ENV === "production" ? "/gz-att/" : "/gz-att/",
+ publicPath: process.env.NODE_ENV === "production" ? "/gz-att/" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: "gz-att",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@@ -35,9 +35,10 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://192.168.0.50:8100`, // 孙亮
+ // target: `http://192.168.0.50:8100`, // 孙亮
// target: `http://192.168.0.14:8001`,
// target: `http://192.168.2.146:8100`,
+ target: `http://192.168.0.234:8100`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",