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(){