This commit is contained in:
BianLzhaoMin 2026-01-29 16:51:31 +08:00
parent 11adf3de11
commit 44de375bdc
4 changed files with 115 additions and 18 deletions

View File

@ -7,5 +7,7 @@ ENV = 'development'
# 博诺思管理系统/开发环境 # 博诺思管理系统/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
BASE_URL = /
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -4,6 +4,6 @@ VUE_APP_TITLE = 考勤后台管理系统
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
BASE_URL=/gz-att/ BASE_URL = /gz-att/
# 博诺思管理系统/生产环境 # 博诺思管理系统/生产环境
VUE_APP_BASE_API = '/gzatt-api' VUE_APP_BASE_API = '/gzatt-api'

View File

@ -130,7 +130,17 @@
:prop="item.prop" :prop="item.prop"
v-for="item in mainListFields" v-for="item in mainListFields"
:key="item.prop" :key="item.prop"
/> >
<template slot-scope="scope">
<span
v-if="item.needShow"
style="color: #02a7f0; cursor: pointer"
@click="openRecord(scope.row, item.type)"
>{{ scope.row[item.prop] }}</span
>
<span v-else>{{ scope.row[item.prop] }}</span>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -215,7 +225,17 @@
:prop="item.prop" :prop="item.prop"
v-for="item in abnormalListFields" v-for="item in abnormalListFields"
:key="item.prop" :key="item.prop"
/> >
<template slot-scope="scope">
<span
v-if="item.needShow"
style="color: #02a7f0; cursor: pointer"
@click="openRecord(scope.row, item.type)"
>{{ scope.row[item.prop] }}</span
>
<span v-else>{{ scope.row[item.prop] }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
@ -716,6 +736,8 @@ import {
import { import {
getAttendanceRateList, getAttendanceRateList,
getLateEarlyAbsentList, getLateEarlyAbsentList,
getAttendanceRateDetail,
getAttAbnormalDetailsList,
} from "@/api/report/attendanceRate"; } from "@/api/report/attendanceRate";
import { listDeptTree } from "@/api/system/userInfo"; import { listDeptTree } from "@/api/system/userInfo";
@ -777,6 +799,8 @@ export default {
userId: undefined, userId: undefined,
attStatis: undefined, attStatis: undefined,
attCurrentMonth: undefined, attCurrentMonth: undefined,
leavePaidRate: "",
leaveUnpaidRate: "",
}, },
tableDataRecord: [], tableDataRecord: [],
totalTwo: 0, totalTwo: 0,
@ -853,10 +877,30 @@ export default {
{ label: "部门", prop: "orgName" }, { label: "部门", prop: "orgName" },
{ label: "考勤月份", prop: "attCurrentMonth" }, { label: "考勤月份", prop: "attCurrentMonth" },
{ label: "应出勤天数", prop: "requiredDays" }, { label: "应出勤天数", prop: "requiredDays" },
{ label: "迟到率", prop: "lateRate" }, {
{ label: "早退率", prop: "earlyRate" }, label: "迟到率",
{ label: "休假率(带薪)", prop: "leavePaidRate" }, prop: "lateRate",
{ label: "休假率(不带薪)", prop: "leaveUnpaidRate" }, 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: "abnormalRate" },
{ label: "外勤次数", prop: "outsideAttNum" }, { label: "外勤次数", prop: "outsideAttNum" },
], ],
@ -882,16 +926,31 @@ export default {
abnormalListFields: [ abnormalListFields: [
{ label: "姓名", prop: "userName" }, { label: "姓名", prop: "userName" },
{ label: "单位", prop: "orgName" }, { label: "单位", prop: "orgName" },
{ label: "次数", prop: "count" }, {
{ label: "异常类型", prop: "abnormalType" }, label: "迟到天数",
{ label: "异常原因", prop: "abnormalReason" }, prop: "lateNum",
needShow: true,
type: "早退记录",
},
{
label: "旷工天数",
prop: "skippingNum",
needShow: true,
type: "旷工记录",
},
{
label: "早退天数",
prop: "earlyNum",
needShow: true,
type: "早退记录",
},
], ],
queryParamsAbnormal: { queryParamsAbnormal: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
attCurrentMonth: new Date().toISOString().split("T")[0].slice(0, 7), // attCurrentMonth: new Date().toISOString().split("T")[0].slice(0, 7), //
userName: undefined, userName: undefined,
orgIdList: undefined, orgIdList: [],
orgName: undefined, orgName: undefined,
}, },
}; };
@ -1033,6 +1092,14 @@ export default {
this.queryRecord.attStatis = 26; this.queryRecord.attStatis = 26;
} else if (titleBoss == "培训记录") { } else if (titleBoss == "培训记录") {
this.queryRecord.attStatis = 28; 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.showRecord = true;
this.getListRecord(); this.getListRecord();
@ -1057,12 +1124,31 @@ export default {
}, },
/** 查询月异常详情列表 */ /** 查询月异常详情列表 */
getListRecord() { getListRecord() {
getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then( // getAttendanceRateDetail(
(response) => { // 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.tableDataRecord = response.rows;
this.totalTwo = response.total; 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() { 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.abnormalList = response.rows;
this.totalAbnormal = response.total; this.totalAbnormal = response.total;
}); });

View File

@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 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 // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: "gz-att", outputDir: "gz-att",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -35,9 +35,10 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [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.0.14:8001`,
// target: `http://192.168.2.146:8100`, // target: `http://192.168.2.146:8100`,
target: `http://192.168.0.234:8100`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",