提交请假销假代码
This commit is contained in:
1 parent
4e8b6d77b6
commit
86f65df783
22 files changed
+4583
-191
No files matched your search
@@ -0,0 +1,85 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { StudentCancelLeaveVO, StudentCancelLeaveForm, StudentCancelLeaveQuery } from '@/api/workflow/studentCancelLeave/studentCancelLeave/types';
|
||||
|
||||
/**
|
||||
* 查询学生销假列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listStudentCancelLeave = (query?: StudentCancelLeaveQuery): AxiosPromise<StudentCancelLeaveVO[]> => {
|
||||
return request({
|
||||
url: '/studentCancelLeave/studentCancelLeave/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生销假详细
|
||||
* @param id
|
||||
*/
|
||||
export const getStudentCancelLeave = (id: string | number): AxiosPromise<StudentCancelLeaveVO> => {
|
||||
return request({
|
||||
url: '/studentCancelLeave/studentCancelLeave/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生销假
|
||||
* @param data
|
||||
*/
|
||||
export const addStudentCancelLeave = (data: StudentCancelLeaveForm): AxiosPromise<StudentCancelLeaveVO> => {
|
||||
return request({
|
||||
url: '/studentCancelLeave/studentCancelLeave',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生销假
|
||||
* @param data
|
||||
*/
|
||||
export const updateStudentCancelLeave = (data: StudentCancelLeaveForm) => {
|
||||
return request({
|
||||
url: '/studentCancelLeave/studentCancelLeave',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生销假
|
||||
* @param id
|
||||
*/
|
||||
export const delStudentCancelLeave = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/studentCancelLeave/studentCancelLeave/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据请假ID获取销假ID
|
||||
* @param leaveId
|
||||
*/
|
||||
export const getCancelLeaveIdByLeaveId = (leaveId: string | number): AxiosPromise<number> => {
|
||||
return request({
|
||||
url: `/studentCancelLeave/studentCancelLeave/getCancelLeaveId/${leaveId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据销假ID获取请假ID
|
||||
* @param cancelLeaveId
|
||||
*/
|
||||
export const getLeaveIdByCancelLeaveId = (cancelLeaveId: string | number): AxiosPromise<number> => {
|
||||
return request({
|
||||
url: `/studentCancelLeave/studentCancelLeave/getLeaveId/${cancelLeaveId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,521 @@
|
||||
export interface StudentCancelLeaveVO {
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted: number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 请假类型编码
|
||||
*/
|
||||
leaveTypeCode: string;
|
||||
|
||||
/**
|
||||
* 请假类型名称
|
||||
*/
|
||||
leaveTypeName: string;
|
||||
|
||||
/**
|
||||
* 开始时间(年月日时分秒)
|
||||
*/
|
||||
startTime: string;
|
||||
|
||||
/**
|
||||
* 结束时间(年月日时分秒)
|
||||
*/
|
||||
endTime: string;
|
||||
|
||||
/**
|
||||
* 请假时长(天)
|
||||
*/
|
||||
leaveDuration: number;
|
||||
|
||||
/**
|
||||
* 是否离校:0-否,1-是
|
||||
*/
|
||||
isLeaveSchool: string;
|
||||
|
||||
/**
|
||||
* 是否需要销假:0-否,1-是
|
||||
*/
|
||||
needCancel: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
emergencyContact: string;
|
||||
|
||||
/**
|
||||
* 紧急联系电话
|
||||
*/
|
||||
emergencyPhone: string;
|
||||
|
||||
/**
|
||||
* 请假原因
|
||||
*/
|
||||
leaveReason: string;
|
||||
|
||||
/**
|
||||
* 请假时地理位置
|
||||
*/
|
||||
leaveLocation: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID(逗号分隔)
|
||||
*/
|
||||
attachmentOssIds: string | number;
|
||||
|
||||
/**
|
||||
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
approvalStatus: string;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
approvalOpinion: string;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy: number;
|
||||
|
||||
/**
|
||||
* 审批人姓名
|
||||
*/
|
||||
approvalByName: string;
|
||||
|
||||
/**
|
||||
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
cancelStatus: string;
|
||||
|
||||
/**
|
||||
* 销假时间
|
||||
*/
|
||||
cancelTime: string;
|
||||
|
||||
/**
|
||||
* 销假地理位置
|
||||
*/
|
||||
cancelLocation: string;
|
||||
|
||||
/**
|
||||
* 销假照片OSS文件ID(逗号分隔)
|
||||
*/
|
||||
cancelPhotoOssIds: string | number;
|
||||
|
||||
/**
|
||||
* 销假备注
|
||||
*/
|
||||
cancelRemark: string;
|
||||
|
||||
/**
|
||||
* 学生请假表id
|
||||
*/
|
||||
leaveId: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface StudentCancelLeaveForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID(雪花ID)
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 请假类型编码
|
||||
*/
|
||||
leaveTypeCode?: string;
|
||||
|
||||
/**
|
||||
* 请假类型名称
|
||||
*/
|
||||
leaveTypeName?: string;
|
||||
|
||||
/**
|
||||
* 开始时间(年月日时分秒)
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 结束时间(年月日时分秒)
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 请假时长(天)
|
||||
*/
|
||||
leaveDuration?: number;
|
||||
|
||||
/**
|
||||
* 是否离校:0-否,1-是
|
||||
*/
|
||||
isLeaveSchool?: string;
|
||||
|
||||
/**
|
||||
* 是否需要销假:0-否,1-是
|
||||
*/
|
||||
needCancel?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
emergencyContact?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系电话
|
||||
*/
|
||||
emergencyPhone?: string;
|
||||
|
||||
/**
|
||||
* 请假原因
|
||||
*/
|
||||
leaveReason?: string;
|
||||
|
||||
/**
|
||||
* 请假时地理位置
|
||||
*/
|
||||
leaveLocation?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID(逗号分隔)
|
||||
*/
|
||||
attachmentOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
approvalOpinion?: string;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: number;
|
||||
|
||||
/**
|
||||
* 审批人姓名
|
||||
*/
|
||||
approvalByName?: string;
|
||||
|
||||
/**
|
||||
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
cancelStatus?: string;
|
||||
|
||||
/**
|
||||
* 销假时间
|
||||
*/
|
||||
cancelTime?: string;
|
||||
|
||||
/**
|
||||
* 销假地理位置
|
||||
*/
|
||||
cancelLocation?: string;
|
||||
|
||||
/**
|
||||
* 销假照片OSS文件ID(逗号分隔)
|
||||
*/
|
||||
cancelPhotoOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 销假备注
|
||||
*/
|
||||
cancelRemark?: string;
|
||||
|
||||
/**
|
||||
* 学生请假表id
|
||||
*/
|
||||
leaveId?: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface StudentCancelLeaveQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 请假类型编码
|
||||
*/
|
||||
leaveTypeCode?: string;
|
||||
|
||||
/**
|
||||
* 请假类型名称
|
||||
*/
|
||||
leaveTypeName?: string;
|
||||
|
||||
/**
|
||||
* 开始时间(年月日时分秒)
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 结束时间(年月日时分秒)
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 请假时长(天)
|
||||
*/
|
||||
leaveDuration?: number;
|
||||
|
||||
/**
|
||||
* 是否离校:0-否,1-是
|
||||
*/
|
||||
isLeaveSchool?: string;
|
||||
|
||||
/**
|
||||
* 是否需要销假:0-否,1-是
|
||||
*/
|
||||
needCancel?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
emergencyContact?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系电话
|
||||
*/
|
||||
emergencyPhone?: string;
|
||||
|
||||
/**
|
||||
* 请假原因
|
||||
*/
|
||||
leaveReason?: string;
|
||||
|
||||
/**
|
||||
* 请假时地理位置
|
||||
*/
|
||||
leaveLocation?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID(逗号分隔)
|
||||
*/
|
||||
attachmentOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 审批状态:"cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
approvalOpinion?: string;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: number;
|
||||
|
||||
/**
|
||||
* 审批人姓名
|
||||
*/
|
||||
approvalByName?: string;
|
||||
|
||||
/**
|
||||
* 销假状态:0-未销假,1-已销假,2-逾期未销假 3 - 无需销假 "cancel", "已撤销" "draft", "草稿" "waiting", "待审核" "finish", "已完成" "invalid", "已作废" "back", "已退回" "termination", "已终止"
|
||||
*/
|
||||
cancelStatus?: string;
|
||||
|
||||
/**
|
||||
* 销假时间
|
||||
*/
|
||||
cancelTime?: string;
|
||||
|
||||
/**
|
||||
* 销假地理位置
|
||||
*/
|
||||
cancelLocation?: string;
|
||||
|
||||
/**
|
||||
* 销假照片OSS文件ID(逗号分隔)
|
||||
*/
|
||||
cancelPhotoOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 销假备注
|
||||
*/
|
||||
cancelRemark?: string;
|
||||
|
||||
/**
|
||||
* 学生请假表id
|
||||
*/
|
||||
leaveId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -386,31 +386,31 @@ const flowCodeOptions = [
|
||||
{
|
||||
value: 'hzdyjs-qj',
|
||||
label: '学生请假流程-杭州第一技师'
|
||||
},
|
||||
{
|
||||
value: 'leave1',
|
||||
label: '请假申请-普通'
|
||||
},
|
||||
{
|
||||
value: 'leave2',
|
||||
label: '请假申请-排他网关'
|
||||
},
|
||||
{
|
||||
value: 'leave3',
|
||||
label: '请假申请-并行网关'
|
||||
},
|
||||
{
|
||||
value: 'leave4',
|
||||
label: '请假申请-会签'
|
||||
},
|
||||
{
|
||||
value: 'leave5',
|
||||
label: '请假申请-并行会签网关'
|
||||
},
|
||||
{
|
||||
value: 'leave6',
|
||||
label: '请假申请-排他并行会签'
|
||||
}
|
||||
// {
|
||||
// value: 'leave1',
|
||||
// label: '请假申请-普通'
|
||||
// },
|
||||
// {
|
||||
// value: 'leave2',
|
||||
// label: '请假申请-排他网关'
|
||||
// },
|
||||
// {
|
||||
// value: 'leave3',
|
||||
// label: '请假申请-并行网关'
|
||||
// },
|
||||
// {
|
||||
// value: 'leave4',
|
||||
// label: '请假申请-会签'
|
||||
// },
|
||||
// {
|
||||
// value: 'leave5',
|
||||
// label: '请假申请-并行会签网关'
|
||||
// },
|
||||
// {
|
||||
// value: 'leave6',
|
||||
// label: '请假申请-排他并行会签'
|
||||
// }
|
||||
];
|
||||
|
||||
// 上传相关配置
|
||||
@@ -1418,7 +1418,8 @@ onMounted(() => {
|
||||
/* 附件上传容器样式 */
|
||||
.attachment-upload-container {
|
||||
width: 100%;
|
||||
max-height: 300px;
|
||||
max-height: calc(100vh - 650px);
|
||||
min-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding-right: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
@@ -1429,7 +1430,7 @@ onMounted(() => {
|
||||
/* 附件上传区域内容样式 */
|
||||
.attachment-upload-container .upload-demo {
|
||||
padding: 12px;
|
||||
min-height: 150px;
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
.attachment-upload-container .upload-demo .el-upload {
|
||||
|
||||
@@ -172,17 +172,17 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="studentLeaveList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="false" />
|
||||
<!-- <el-table-column label="删除标志" align="center" prop="deleted" /> -->
|
||||
<!-- <el-table-column label="学生ID" align="center" prop="studentId" /> -->
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" />
|
||||
<el-table-column label="学号" align="center" prop="studentNo" />
|
||||
<!-- <el-table-column label="班级ID" align="center" prop="classId" /> -->
|
||||
<el-table-column label="班级名称" align="center" prop="className" />
|
||||
<!-- <el-table-column label="专业ID" align="center" prop="majorId" /> -->
|
||||
<el-table-column label="专业名称" align="center" prop="majorName" />
|
||||
<!-- <el-table-column label="学院ID" align="center" prop="collegeId" /> -->
|
||||
<el-table-column label="学院名称" align="center" prop="collegeName" />
|
||||
<!-- <el-table-column label="专业ID" align="center" prop="majorId" /> -->
|
||||
<el-table-column label="专业名称" align="center" prop="majorName" />
|
||||
<!-- <el-table-column label="班级ID" align="center" prop="classId" /> -->
|
||||
<el-table-column label="班级名称" align="center" prop="className" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" />
|
||||
<el-table-column label="学号" align="center" prop="studentNo" />
|
||||
<!-- <el-table-column label="请假类型编码" align="center" prop="leaveTypeCode" /> -->
|
||||
<el-table-column label="请假类型名称" align="center" prop="leaveTypeName" />
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||
@@ -210,12 +210,17 @@
|
||||
<el-table-column label="紧急联系电话" align="center" prop="emergencyPhone" />
|
||||
<el-table-column label="请假原因" align="center" prop="leaveReason" />
|
||||
<!-- <el-table-column label="请假时地理位置" align="center" prop="leaveLocation" /> -->
|
||||
<el-table-column label="附件OSS文件ID" align="center" prop="attachmentOssIds" width="280" />
|
||||
<!-- <el-table-column label="附件OSS文件ID" align="center" prop="attachmentOssIds" width="280" /> -->
|
||||
<el-table-column label="审批状态" align="center" prop="approvalStatus">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="student_leave_approval_status" :value="scope.row.approvalStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销假状态" align="center" prop="cancelStatus">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="xg_xsqj_cancel_status" :value="scope.row.cancelStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="审批意见" align="center" prop="approvalOpinion" />
|
||||
<el-table-column label="审批时间" align="center" prop="approvalTime" width="180">
|
||||
<template #default="scope">
|
||||
@@ -233,12 +238,13 @@
|
||||
<el-table-column label="销假地理位置" align="center" prop="cancelLocation" />
|
||||
<el-table-column label="销假照片OSS文件ID" align="center" prop="cancelPhotoOssIds" />
|
||||
<el-table-column label="销假备注" align="center" prop="cancelRemark" /> -->
|
||||
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="150px" class-name="small-padding fixed-width" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['studentLeave:studentLeave:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<!-- 删除按钮:仅草稿状态可见 -->
|
||||
<el-tooltip content="删除" placement="top" v-if="scope.row.approvalStatus === 'draft'">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@@ -247,6 +253,16 @@
|
||||
v-hasPermi="['studentLeave:studentLeave:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<!-- 销假按钮:仅已完成状态且需要销假时可见 -->
|
||||
<el-tooltip content="销假" placement="top" v-if="scope.row.approvalStatus === 'finish' && scope.row.needCancel === '1'">
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
icon="CircleCheck"
|
||||
@click="handleCancelLeave(scope.row)"
|
||||
v-hasPermi="['studentLeave:studentLeave:cancel']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -282,7 +298,9 @@ interface PageData<T, Q> {
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
// 加载字典数据
|
||||
const { sys_yesno, student_leave_approval_status } = toRefs<any>(proxy?.useDict('sys_yesno', 'student_leave_approval_status'));
|
||||
const { sys_yesno, student_leave_approval_status, xg_xsqj_cancel_status } = toRefs<any>(
|
||||
proxy?.useDict('sys_yesno', 'student_leave_approval_status', 'xg_xsqj_cancel_status')
|
||||
);
|
||||
|
||||
const studentLeaveList = ref<StudentLeaveVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@@ -500,6 +518,41 @@ const handleDelete = async (row?: StudentLeaveVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 销假按钮操作 */
|
||||
const handleCancelLeave = async (row: StudentLeaveVO) => {
|
||||
await proxy?.$modal.confirm('是否确认销假学生请假申请?').finally(() => (loading.value = false));
|
||||
|
||||
// TODO: 调用销假API
|
||||
// await cancelStudentLeave(row.id);
|
||||
// reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
|
||||
// 根据销假状态设置type参数
|
||||
// 当销假状态cancel_status = '0' 或者 '3'时,type = 'add',其他都是 'update'
|
||||
const type = row.cancelStatus === '0' || row.cancelStatus === '3' ? 'add' : 'update';
|
||||
|
||||
// const res = await getStudentLeave(_id);
|
||||
// Object.assign(form.value, res.data);
|
||||
// // 传递type参数,标识为修改操作
|
||||
// form.value.type = 'update';
|
||||
// form.value.id = _id;
|
||||
// dialog.visible = true;
|
||||
// dialog.title = '修改学生请假';
|
||||
// proxy.$tab.closePage(proxy.$route);
|
||||
console.log('type:', type);
|
||||
|
||||
proxy.$router.push({
|
||||
path: `/xg/xsjcxx/xsqj/cancelLeaveEdit/index`,
|
||||
query: {
|
||||
id: _id,
|
||||
type: type
|
||||
}
|
||||
});
|
||||
|
||||
// proxy?.$modal.msgSuccess('销假成功');
|
||||
// await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user