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 @@