From d11269c954d085f3cd44a9adb590e42b1681df8c Mon Sep 17 00:00:00 2001 From: tzy Date: Thu, 5 Jun 2025 09:04:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(personnelMatters):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8A=A0=E7=8F=AD=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增加班详情页面路由和组件 - 修改请假管理页面,注释掉操作列 - 优化员工餐费统计导出功能- 修复人员事项相关页面的路由跳转问题 --- src/api/restaurant/statistics.js | 2 +- src/router/index.js | 13 +++++++++++++ src/views/attendance/statistical/index.vue | 8 ++++---- src/views/personnelMatters/leave/index.vue | 19 +++++++++---------- src/views/personnelMatters/overTime/index.vue | 4 ++-- .../personnelMatters/overTimeDetail/index.vue | 11 ++++++++--- src/views/restaurant/statistics/index.vue | 6 +++--- 7 files changed, 40 insertions(+), 23 deletions(-) diff --git a/src/api/restaurant/statistics.js b/src/api/restaurant/statistics.js index efb6714..6897eb2 100644 --- a/src/api/restaurant/statistics.js +++ b/src/api/restaurant/statistics.js @@ -30,7 +30,7 @@ export function updateStatistics(data) { export function exportStatistics(query) { return request({ url: '/restaurant/statistics/export', - method: 'get', + method: 'post', params: query }) } diff --git a/src/router/index.js b/src/router/index.js index 0f3e15c..21a7242 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -91,6 +91,19 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } } ] + }, + { + path: '/personnelMatters/overTimeDetail', + component: Layout, + hidden: true, + children: [ + { + path: 'index', + component: () => import('@/views/personnelMatters/overTimeDetail/index'), + name: 'OverTimeDetail', + meta: { title: '加班详情', activeMenu: '/personnelMatters/overTime' } + } + ] } ] diff --git a/src/views/attendance/statistical/index.vue b/src/views/attendance/statistical/index.vue index fdca5ac..7504085 100644 --- a/src/views/attendance/statistical/index.vue +++ b/src/views/attendance/statistical/index.vue @@ -42,7 +42,7 @@ v-hasPermi="['attendance:statistical:export']" >导出 - + @@ -123,7 +123,7 @@ @click="handlemiddleDetail(scope.row)">{{ scope.row.middleShiftNumber}} - + diff --git a/src/views/personnelMatters/leave/index.vue b/src/views/personnelMatters/leave/index.vue index f20b980..6c0dbd0 100644 --- a/src/views/personnelMatters/leave/index.vue +++ b/src/views/personnelMatters/leave/index.vue @@ -38,7 +38,7 @@ - + @@ -214,7 +214,6 @@ export default { autoCalculation: true, leaveTitle:"请假详情", leaveDrawer:false, - holidaysType:[], // 请假管理详情表格数据 detailList: [], @@ -233,7 +232,7 @@ export default { ], } }, - + // 遮罩层 loading: true, // 显示搜索条件 @@ -285,7 +284,7 @@ export default { methods: { getholidaysType(){ getNewDicts("holidays_type").then(res => { - this.detail.holidaysType = res.data; + this.detail.holidaysType = res.data; }); }, //查询详情 diff --git a/src/views/personnelMatters/overTime/index.vue b/src/views/personnelMatters/overTime/index.vue index 79ec120..e573e7e 100644 --- a/src/views/personnelMatters/overTime/index.vue +++ b/src/views/personnelMatters/overTime/index.vue @@ -285,10 +285,10 @@ export default { }, handleDetail(row){ this.$router.push({ - path: "/personnelMatters/overTimeDetail", + path: "/personnelMatters/overTimeDetail/index", query: { overTimeId: row.id, - name:row.name + name: row.name } }); }, diff --git a/src/views/personnelMatters/overTimeDetail/index.vue b/src/views/personnelMatters/overTimeDetail/index.vue index 44f2b9c..398051d 100644 --- a/src/views/personnelMatters/overTimeDetail/index.vue +++ b/src/views/personnelMatters/overTimeDetail/index.vue @@ -128,9 +128,14 @@ export default { }; }, created() { - var param = this.$route.query - this.queryParams.name = param.name; - this.queryParams.overTimeId = param.overTimeId; + const { overTimeId, name } = this.$route.query; + if (!overTimeId || !name) { + this.$modal.msgError("参数错误"); + this.$router.push("/personnelMatters/overTime"); + return; + } + this.queryParams.name = name; + this.queryParams.overTimeId = overTimeId; this.getList(); }, methods: { diff --git a/src/views/restaurant/statistics/index.vue b/src/views/restaurant/statistics/index.vue index 5bd6bce..6b25a73 100644 --- a/src/views/restaurant/statistics/index.vue +++ b/src/views/restaurant/statistics/index.vue @@ -278,9 +278,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('restaurant/statistics/export', { - ...this.queryParams - }, `员工餐费明细_${new Date().getTime()}.xlsx`) + exportStatistics(this.queryParams).then(response => { + this.downloadExcel(response.msg); + }) }, /** 科大实习生导出 */ handleExportKd(){