提交代码
This commit is contained in:
1 parent
6d3ffdb0f6
commit
db3d6c786e
6 files changed
+1812
-1
No files matched your search
+6
@@ -115,4 +115,10 @@ public class XskhDisciplineRecord extends TenantEntity {
|
||||
*/
|
||||
private String attachmentOssIds;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Long deleted;
|
||||
|
||||
}
|
||||
@@ -71,7 +71,7 @@ CREATE TABLE `xskh_discipline_revoke` (
|
||||
`student_id` bigint(20) NOT NULL COMMENT '学生ID',
|
||||
`student_name` varchar(50) NOT NULL COMMENT '学生姓名',
|
||||
`revoke_reason` varchar(500) NOT NULL COMMENT '撤销申请原因',
|
||||
`revoke_evidence` varchar(500) DEFAULT NULL COMMENT '撤销证明材料',
|
||||
`revoke_evidence` varchar(500) DEFAULT NULL COMMENT '撤销证明材料,附件的oss_id,多个用逗号分隔',
|
||||
`apply_time` datetime NOT NULL COMMENT '申请时间',
|
||||
`status` char(1) DEFAULT '1' COMMENT '状态(1-待审核 2-审核通过 3-审核拒绝)',
|
||||
`approval_by` bigint(20) DEFAULT NULL COMMENT '审核人ID',
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DisciplineRecordVO, DisciplineRecordForm, DisciplineRecordQuery, XskhStudentOptionVO } from './xsDisciplineRecord/types';
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDisciplineRecord = (query?: DisciplineRecordQuery): AxiosPromise<DisciplineRecordVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生违纪处分记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDisciplineRecord = (id: string | number): AxiosPromise<DisciplineRecordVO> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改学生违纪处分记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDisciplineRecord = (data: DisciplineRecordForm) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除学生违纪处分记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDisciplineRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询学生选项列表(用于下拉框)
|
||||
* @param keyword
|
||||
*/
|
||||
export const getStudentOptions = (keyword?: string): AxiosPromise<XskhStudentOptionVO[]> => {
|
||||
return request({
|
||||
url: '/disciplineRecord/disciplineRecord/studentOptions',
|
||||
method: 'get',
|
||||
params: { keyword }
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,403 @@
|
||||
import { PageQuery } from '@/types/base';
|
||||
|
||||
export interface DisciplineRecordVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
attachmentOssIds?: string;
|
||||
}
|
||||
|
||||
export interface DisciplineRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分类型ID
|
||||
*/
|
||||
disciplineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 违纪处分类型名称
|
||||
*/
|
||||
disciplineTypeName?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分日期
|
||||
*/
|
||||
disciplineDate?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分原因
|
||||
*/
|
||||
disciplineReason?: string;
|
||||
|
||||
/**
|
||||
* 违纪处分内容
|
||||
*/
|
||||
disciplineContent?: string;
|
||||
|
||||
/**
|
||||
* 扣分分值
|
||||
*/
|
||||
scoreDeduction?: number;
|
||||
|
||||
/**
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 审批状态(1-已审批 2-审批中)
|
||||
*/
|
||||
approvalStatus?: string;
|
||||
|
||||
/**
|
||||
* 审批人ID
|
||||
*/
|
||||
approvalBy?: string | number;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
approvalTime?: string;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
approvalRemark?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生考核-学生选项
|
||||
*/
|
||||
export interface XskhStudentOptionVO {
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<div class="p-2 page-container">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学号" prop="studentNo">
|
||||
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学生姓名" prop="studentName">
|
||||
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option v-for="dict in student_discipline_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="search-btn-container">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['disciplineRecord:disciplineRecord:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['disciplineRecord:disciplineRecord:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="disciplineRecordList" @selection-change="handleSelectionChange" class="full-width-table">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
|
||||
<el-table-column label="学院名称" align="center" prop="collegeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="专业名称" align="center" prop="majorName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="班级名称" align="center" prop="className" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分类型" align="center" prop="disciplineTypeName" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="违纪处分日期" align="center" prop="disciplineDate" min-width="130" />
|
||||
<el-table-column label="扣分分值" align="center" prop="scoreDeduction" min-width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.scoreDeduction ? parseFloat(scope.row.scoreDeduction).toFixed(2) : '0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" min-width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="student_discipline_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['disciplineRecord:disciplineRecord:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改学生违纪处分记录对话框 -->
|
||||
<DisciplineRecordForm ref="disciplineRecordFormRef" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DisciplineRecord" lang="ts">
|
||||
import { ref, reactive, toRefs, onMounted, getCurrentInstance, ComponentInternalInstance } from 'vue';
|
||||
import { listDisciplineRecord, delDisciplineRecord } from '@/api/xskh/xsDisciplineRecord/disciplineRecord';
|
||||
import {
|
||||
DisciplineRecordVO,
|
||||
DisciplineRecordQuery,
|
||||
DisciplineRecordForm as DisciplineRecordFormType
|
||||
} from '@/api/xskh/xsDisciplineRecord/xsDisciplineRecord/types';
|
||||
import DisciplineRecordForm from './DisciplineRecordForm.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { student_discipline_status } = toRefs<any>(proxy?.useDict('student_discipline_status'));
|
||||
|
||||
const disciplineRecordList = ref<DisciplineRecordVO[]>([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const disciplineRecordFormRef = ref<ComponentRef<typeof DisciplineRecordForm>>();
|
||||
|
||||
const initFormData: DisciplineRecordForm = {
|
||||
id: undefined,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
attachmentOssIds: undefined
|
||||
};
|
||||
|
||||
const data = reactive<PageData<DisciplineRecordForm, DisciplineRecordQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: undefined,
|
||||
studentNo: undefined,
|
||||
studentName: undefined,
|
||||
collegeId: undefined,
|
||||
collegeName: undefined,
|
||||
majorId: undefined,
|
||||
majorName: undefined,
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
disciplineTypeId: undefined,
|
||||
disciplineTypeName: undefined,
|
||||
disciplineDate: undefined,
|
||||
disciplineReason: undefined,
|
||||
disciplineContent: undefined,
|
||||
scoreDeduction: undefined,
|
||||
status: undefined,
|
||||
approvalStatus: undefined,
|
||||
approvalBy: undefined,
|
||||
approvalTime: undefined,
|
||||
approvalRemark: undefined,
|
||||
params: {}
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form } = toRefs(data);
|
||||
|
||||
/** 查询学生违纪处分记录列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDisciplineRecord(queryParams.value);
|
||||
disciplineRecordList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: DisciplineRecordVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
disciplineRecordFormRef.value?.openDialog(undefined, '新增');
|
||||
};
|
||||
|
||||
/** 查看按钮操作 */
|
||||
const handleView = (row: DisciplineRecordVO) => {
|
||||
disciplineRecordFormRef.value?.openDialog(row.id, '查看');
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row?: DisciplineRecordVO) => {
|
||||
const id = row?.id || ids.value[0];
|
||||
disciplineRecordFormRef.value?.openDialog(id, '修改');
|
||||
};
|
||||
|
||||
/** 提交成功回调 */
|
||||
const handleSuccess = () => {
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: DisciplineRecordVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除学生违纪处分记录编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delDisciplineRecord(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'disciplineRecord/disciplineRecord/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`disciplineRecord_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面容器样式 */
|
||||
.page-container {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 搜索按钮容器样式 */
|
||||
.search-btn-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格全宽样式 */
|
||||
.full-width-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 确保表格容器充满宽度 */
|
||||
:deep(.el-table) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 表格内容区域充满宽度 */
|
||||
:deep(.el-table__body-wrapper) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user