From 07c5dcde11ecff0422c564fbc1cb9afa99017ec4 Mon Sep 17 00:00:00 2001 From: re-JZzzz Date: Mon, 22 Sep 2025 20:47:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E6=8E=92=E7=8F=AD=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=8F=8A=E5=85=B6?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3=202.=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E6=8E=92=E7=8F=AD=E4=BA=BA=E5=91=98=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=203.=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/renyuan/paiban/index.ts | 26 ++ src/api/renyuan/paiban/types.ts | 0 src/api/renyuan/schedulingDate/index.ts | 63 ++++ src/api/renyuan/schedulingDate/types.ts | 86 ++++++ .../attendManage/components/attendTrend.vue | 4 +- .../components/renyuanguanliDialog.vue | 22 +- .../attendManage/components/renyuanpaiban.vue | 55 +++- .../{leftBox => rightBox}/approval.vue | 0 .../{leftBox => rightBox}/calendar.vue | 0 .../{leftBox => rightBox}/todayAttend.vue | 0 .../integratedManage/attendManage/index.vue | 52 +++- src/views/integratedManage/paibanTimeType.vue | 274 ++++++++++++++++++ 12 files changed, 566 insertions(+), 16 deletions(-) create mode 100644 src/api/renyuan/paiban/index.ts create mode 100644 src/api/renyuan/paiban/types.ts create mode 100644 src/api/renyuan/schedulingDate/index.ts create mode 100644 src/api/renyuan/schedulingDate/types.ts rename src/views/integratedManage/attendManage/components/{leftBox => rightBox}/approval.vue (100%) rename src/views/integratedManage/attendManage/components/{leftBox => rightBox}/calendar.vue (100%) rename src/views/integratedManage/attendManage/components/{leftBox => rightBox}/todayAttend.vue (100%) create mode 100644 src/views/integratedManage/paibanTimeType.vue diff --git a/src/api/renyuan/paiban/index.ts b/src/api/renyuan/paiban/index.ts new file mode 100644 index 0000000..9c0a83d --- /dev/null +++ b/src/api/renyuan/paiban/index.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; + + +/** + * 查询排班人员列表 + * @param deptId + */ +export function getPaibanRenYuanList(deptId:string | number): AxiosPromise { + return request({ + url: `/system/user/list/dept/`+deptId, + method: 'get', + }); +} + + +/** + * 查询运维-人员排班列表 + * @param deptId + */ +export function getPaibanRiLiList(deptId:string | number): AxiosPromise { + return request({ + url: `/ops/personnel/scheduling/getRiLiList/`+deptId, + method: 'get', + }); +} diff --git a/src/api/renyuan/paiban/types.ts b/src/api/renyuan/paiban/types.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/renyuan/schedulingDate/index.ts b/src/api/renyuan/schedulingDate/index.ts new file mode 100644 index 0000000..f5f2d94 --- /dev/null +++ b/src/api/renyuan/schedulingDate/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SchedulingDateVO, SchedulingDateForm, SchedulingDateQuery } from '@/api/renyuan/schedulingDate/types'; + +/** + * 查询运维-排班时间类型列表 + * @param query + * @returns {*} + */ + +export const listSchedulingDate = (query?: SchedulingDateQuery): AxiosPromise => { + return request({ + url: '/ops/personnel/schedulingDate/list', + method: 'get', + params: query + }); +}; + +/** + * 查询运维-排班时间类型详细 + * @param id + */ +export const getSchedulingDate = (id: string | number): AxiosPromise => { + return request({ + url: '/ops/personnel/schedulingDate/' + id, + method: 'get' + }); +}; + +/** + * 新增运维-排班时间类型 + * @param data + */ +export const addSchedulingDate = (data: SchedulingDateForm) => { + return request({ + url: '/ops/personnel/schedulingDate', + method: 'post', + data: data + }); +}; + +/** + * 修改运维-排班时间类型 + * @param data + */ +export const updateSchedulingDate = (data: SchedulingDateForm) => { + return request({ + url: '/ops/personnel/schedulingDate', + method: 'put', + data: data + }); +}; + +/** + * 删除运维-排班时间类型 + * @param id + */ +export const delSchedulingDate = (id: string | number | Array) => { + return request({ + url: '/ops/personnel/schedulingDate/' + id, + method: 'delete' + }); +}; diff --git a/src/api/renyuan/schedulingDate/types.ts b/src/api/renyuan/schedulingDate/types.ts new file mode 100644 index 0000000..33ee171 --- /dev/null +++ b/src/api/renyuan/schedulingDate/types.ts @@ -0,0 +1,86 @@ +export interface SchedulingDateVO { + /** + * id + */ + id: string | number; + + /** + * 排班名称 + */ + schedulingName: string; + + /** + * 开始时间 + */ + startTime: string; + + /** + * 结束时间 + */ + endTime: string; + + /** + * 部门ID + */ + projectId?: string | number; + +} + +export interface SchedulingDateForm extends BaseEntity { + /** + * id + */ + id?: string | number; + + /** + * 排班名称 + */ + schedulingName?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 部门ID + */ + projectId?: string | number; + +} + +export interface SchedulingDateQuery extends PageQuery { + + /** + * 排班名称 + */ + schedulingName?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 部门ID + */ + projectId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/integratedManage/attendManage/components/attendTrend.vue b/src/views/integratedManage/attendManage/components/attendTrend.vue index 182fe0b..3a5f3e5 100644 --- a/src/views/integratedManage/attendManage/components/attendTrend.vue +++ b/src/views/integratedManage/attendManage/components/attendTrend.vue @@ -242,7 +242,7 @@ onMounted(() => { background-color: #fff; border-radius: 8px; overflow: hidden; - height: 500px; + height: 435px; width: 100%; padding: 10px; box-sizing: border-box; @@ -288,7 +288,7 @@ onMounted(() => { @media (max-width: 768px) { .chart-container { - height: 450px; + height: 435px; } } diff --git a/src/views/integratedManage/attendManage/components/renyuanguanliDialog.vue b/src/views/integratedManage/attendManage/components/renyuanguanliDialog.vue index d716041..88aa71a 100644 --- a/src/views/integratedManage/attendManage/components/renyuanguanliDialog.vue +++ b/src/views/integratedManage/attendManage/components/renyuanguanliDialog.vue @@ -43,11 +43,12 @@ multiple filterable > - - - - - + @@ -97,6 +98,17 @@ const props = defineProps({ manageAttendDialogVisible: { type: Boolean, default: false + }, + // 排班人员列表数据 + personnelList: { + type: Array, + default: () => [ + { label: '张三', value: '1' }, + { label: '李四', value: '2' }, + { label: '王五', value: '3' }, + { label: '赵六', value: '4' }, + { label: '钱七', value: '5' } + ] } }); diff --git a/src/views/integratedManage/attendManage/components/renyuanpaiban.vue b/src/views/integratedManage/attendManage/components/renyuanpaiban.vue index afe193d..b4c9121 100644 --- a/src/views/integratedManage/attendManage/components/renyuanpaiban.vue +++ b/src/views/integratedManage/attendManage/components/renyuanpaiban.vue @@ -37,6 +37,19 @@ + + +
+ +
@@ -110,9 +123,17 @@ const getCurrentMonthDates = () => { return dates; }; +// 分页相关状态 +const currentPage = ref(1); +const pageSize = ref(10); +const total = ref(50); // 总数据条数,模拟数据 + // 生成排班数据 const scheduleData = computed(() => { - return Array.from({ length: 20 }, (_, index) => { + const startIndex = (currentPage.value - 1) * pageSize.value; + const endIndex = startIndex + pageSize.value; + + return Array.from({ length: total.value }, (_, index) => { // 循环使用员工数据 const employee = employees[index % employees.length]; @@ -131,9 +152,20 @@ const scheduleData = computed(() => { }); return rowData; - }); + }).slice(startIndex, endIndex); }); +// 分页大小变化处理 +const handleSizeChange = (size: number) => { + pageSize.value = size; + currentPage.value = 1; // 重置为第一页 +}; + +// 当前页码变化处理 +const handleCurrentChange = (current: number) => { + currentPage.value = current; +}; + // 组件挂载时获取当前月数据 onMounted(() => { currentMonthDates.value = getCurrentMonthDates(); @@ -216,7 +248,20 @@ const handleCellClick = (rowData: any, columnData: any, cellEvent: any) => { } .week-day { - font-size: 12px; - color: #666; -} + font-size: 12px; + color: #666; + } + + /* 分页容器样式 */ + .pagination-container { + margin-top: 16px; + display: flex; + justify-content: flex-end; + align-items: center; + } + + /* 分页组件样式优化 */ + :deep(.el-pagination) { + font-size: 14px; + } diff --git a/src/views/integratedManage/attendManage/components/leftBox/approval.vue b/src/views/integratedManage/attendManage/components/rightBox/approval.vue similarity index 100% rename from src/views/integratedManage/attendManage/components/leftBox/approval.vue rename to src/views/integratedManage/attendManage/components/rightBox/approval.vue diff --git a/src/views/integratedManage/attendManage/components/leftBox/calendar.vue b/src/views/integratedManage/attendManage/components/rightBox/calendar.vue similarity index 100% rename from src/views/integratedManage/attendManage/components/leftBox/calendar.vue rename to src/views/integratedManage/attendManage/components/rightBox/calendar.vue diff --git a/src/views/integratedManage/attendManage/components/leftBox/todayAttend.vue b/src/views/integratedManage/attendManage/components/rightBox/todayAttend.vue similarity index 100% rename from src/views/integratedManage/attendManage/components/leftBox/todayAttend.vue rename to src/views/integratedManage/attendManage/components/rightBox/todayAttend.vue diff --git a/src/views/integratedManage/attendManage/index.vue b/src/views/integratedManage/attendManage/index.vue index 8328837..1caf5b8 100644 --- a/src/views/integratedManage/attendManage/index.vue +++ b/src/views/integratedManage/attendManage/index.vue @@ -72,6 +72,7 @@ @@ -107,13 +108,49 @@