wuzhen 修改实
This commit is contained in:
1 parent
df38590dbf
commit
d22438647e
6 files changed
+458
-17
No files matched your search
@@ -1,6 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { InternshipInfoVO, InternshipInfoQuery, ClassInfoVO, InternshipStatisticsVO } from '@/api/zsjy/types';
|
||||
import {
|
||||
InternshipInfoVO,
|
||||
InternshipInfoQuery,
|
||||
InternshipInfoAddBO,
|
||||
InternshipInfoEditBO,
|
||||
ClassInfoVO,
|
||||
InternshipStatisticsVO
|
||||
} from '@/api/zsjy/types';
|
||||
import { TableDataInfo, R } from '@/api/types';
|
||||
|
||||
/**
|
||||
@@ -65,7 +72,7 @@ export const getInternshipStatistics = (query?: InternshipInfoQuery): AxiosPromi
|
||||
* 新增实习信息
|
||||
* @param data 实习信息数据
|
||||
*/
|
||||
export const addInternshipInfo = (data: any): AxiosPromise<R<void>> => {
|
||||
export const addInternshipInfo = (data: InternshipInfoAddBO): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/zsjy/internship',
|
||||
method: 'post',
|
||||
@@ -77,7 +84,7 @@ export const addInternshipInfo = (data: any): AxiosPromise<R<void>> => {
|
||||
* 修改实习信息
|
||||
* @param data 实习信息数据
|
||||
*/
|
||||
export const updateInternshipInfo = (data: any): AxiosPromise<R<void>> => {
|
||||
export const updateInternshipInfo = (data: InternshipInfoEditBO): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/zsjy/internship',
|
||||
method: 'put',
|
||||
|
||||
@@ -862,6 +862,211 @@ export interface InternshipInfoVO {
|
||||
updateBy?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实习信息新增 BO
|
||||
*/
|
||||
export interface InternshipInfoAddBO {
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 实习状态(1进行中 2已完成 3中断)
|
||||
*/
|
||||
internshipStatus: string;
|
||||
|
||||
/**
|
||||
* 实习单位名称
|
||||
*/
|
||||
companyName: string;
|
||||
|
||||
/**
|
||||
* 实习单位地址
|
||||
*/
|
||||
companyAddress: string;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
companyIndustry?: string;
|
||||
|
||||
/**
|
||||
* 单位规模
|
||||
*/
|
||||
companyScale?: string;
|
||||
|
||||
/**
|
||||
* 单位联系人
|
||||
*/
|
||||
companyContact: string;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
companyPhone: string;
|
||||
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
positionName: string;
|
||||
|
||||
/**
|
||||
* 岗位职责
|
||||
*/
|
||||
positionDuties?: string;
|
||||
|
||||
/**
|
||||
* 实习津贴
|
||||
*/
|
||||
internshipAllowance?: number;
|
||||
|
||||
/**
|
||||
* 工作时长
|
||||
*/
|
||||
workHours?: string;
|
||||
|
||||
/**
|
||||
* 住宿地址
|
||||
*/
|
||||
accommodationAddress?: string;
|
||||
|
||||
/**
|
||||
* 住宿类型
|
||||
*/
|
||||
accommodationType?: string;
|
||||
|
||||
/**
|
||||
* 住宿费用
|
||||
*/
|
||||
accommodationCost?: number;
|
||||
|
||||
/**
|
||||
* 实习开始日期
|
||||
*/
|
||||
startDate: string;
|
||||
|
||||
/**
|
||||
* 实习结束日期
|
||||
*/
|
||||
endDate: string;
|
||||
|
||||
/**
|
||||
* 实际结束日期
|
||||
*/
|
||||
actualEndDate?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实习信息编辑 BO
|
||||
*/
|
||||
export interface InternshipInfoEditBO {
|
||||
/**
|
||||
* 实习信息ID
|
||||
*/
|
||||
internshipId: string | number;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 实习状态(1进行中 2已完成 3中断)
|
||||
*/
|
||||
internshipStatus: string;
|
||||
|
||||
/**
|
||||
* 实习单位名称
|
||||
*/
|
||||
companyName: string;
|
||||
|
||||
/**
|
||||
* 实习单位地址
|
||||
*/
|
||||
companyAddress: string;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
companyIndustry?: string;
|
||||
|
||||
/**
|
||||
* 单位规模
|
||||
*/
|
||||
companyScale?: string;
|
||||
|
||||
/**
|
||||
* 单位联系人
|
||||
*/
|
||||
companyContact: string;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
companyPhone: string;
|
||||
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
positionName: string;
|
||||
|
||||
/**
|
||||
* 岗位职责
|
||||
*/
|
||||
positionDuties?: string;
|
||||
|
||||
/**
|
||||
* 实习津贴
|
||||
*/
|
||||
internshipAllowance?: number;
|
||||
|
||||
/**
|
||||
* 工作时长
|
||||
*/
|
||||
workHours?: string;
|
||||
|
||||
/**
|
||||
* 住宿地址
|
||||
*/
|
||||
accommodationAddress?: string;
|
||||
|
||||
/**
|
||||
* 住宿类型
|
||||
*/
|
||||
accommodationType?: string;
|
||||
|
||||
/**
|
||||
* 住宿费用
|
||||
*/
|
||||
accommodationCost?: number;
|
||||
|
||||
/**
|
||||
* 实习开始日期
|
||||
*/
|
||||
startDate: string;
|
||||
|
||||
/**
|
||||
* 实习结束日期
|
||||
*/
|
||||
endDate: string;
|
||||
|
||||
/**
|
||||
* 实际结束日期
|
||||
*/
|
||||
actualEndDate?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实习信息查询 BO
|
||||
*/
|
||||
|
||||
@@ -137,7 +137,8 @@
|
||||
<el-table-column label="班主任" align="center" prop="classTeacherName" width="100" />
|
||||
<el-table-column label="实习状态" align="center" prop="internshipStatus" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="internship_status" :value="scope.row.internshipStatus" />
|
||||
<span v-if="scope.row.internshipStatus === 'null' || !scope.row.internshipStatus" class="status-tag not-started">未实习</span>
|
||||
<dict-tag v-else :options="internship_status" :value="scope.row.internshipStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实习公司" align="center" prop="companyName" min-width="150" show-overflow-tooltip />
|
||||
@@ -190,6 +191,8 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
<!-- 学生实习详情对话框 -->
|
||||
<el-dialog title="学生实习详情" v-model="dialog.visible" width="800px" append-to-body>
|
||||
<div v-if="studentDetail" class="student-detail">
|
||||
@@ -206,7 +209,8 @@
|
||||
|
||||
<el-descriptions title="实习信息" :column="2" border class="mt-4">
|
||||
<el-descriptions-item label="实习状态">
|
||||
<dict-tag :options="internship_status" :value="studentDetail.internshipStatus" />
|
||||
<span v-if="studentDetail.internshipStatus === 'null' || !studentDetail.internshipStatus" class="status-tag not-started">未实习</span>
|
||||
<dict-tag v-else :options="internship_status" :value="studentDetail.internshipStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实习公司">{{ studentDetail.internshipCompany || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实习岗位">{{ studentDetail.internshipPosition || '-' }}</el-descriptions-item>
|
||||
@@ -227,6 +231,20 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增弹窗 -->
|
||||
<AddDialog
|
||||
v-model="showAddDialog"
|
||||
:student-info="selectedStudentInfo"
|
||||
@success="handleDialogSuccess"
|
||||
/>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<EditDialog
|
||||
v-model="showEditDialog"
|
||||
:student-id="selectedStudentId"
|
||||
@success="handleDialogSuccess"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -236,6 +254,9 @@ import { InternshipInfoVO, InternshipInfoQuery, ClassInfoVO, InternshipStatistic
|
||||
import { ComponentInternalInstance, getCurrentInstance, reactive, ref, toRefs } from 'vue';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import { download } from '@/utils/request';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import AddDialog from './components/AddDialog.vue';
|
||||
import EditDialog from './components/EditDialog.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { internship_status, sys_user_sex } = toRefs<any>(proxy?.useDict('internship_status', 'sys_user_sex'));
|
||||
@@ -254,6 +275,20 @@ const total = ref(0);
|
||||
const dateRange = ref<[string, string]>([]);
|
||||
const studentDetail = ref<InternshipInfoVO>();
|
||||
|
||||
// 弹窗相关状态
|
||||
const showAddDialog = ref(false);
|
||||
const showEditDialog = ref(false);
|
||||
const selectedStudentInfo = ref<{
|
||||
studentId: string;
|
||||
studentName: string;
|
||||
studentNo: string;
|
||||
}>({
|
||||
studentId: '',
|
||||
studentName: '',
|
||||
studentNo: ''
|
||||
});
|
||||
const selectedStudentId = ref('');
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -388,14 +423,23 @@ const handleExport = () => {
|
||||
|
||||
/** 新增实习信息按钮操作 */
|
||||
const handleAdd = (row: InternshipInfoVO) => {
|
||||
// TODO: 实现新增实习信息功能
|
||||
proxy?.$modal.msgInfo('新增实习信息功能开发中...');
|
||||
selectedStudentInfo.value = {
|
||||
studentId: row.studentId,
|
||||
studentName: row.studentName,
|
||||
studentNo: row.studentNo
|
||||
};
|
||||
showAddDialog.value = true;
|
||||
};
|
||||
|
||||
/** 编辑实习信息按钮操作 */
|
||||
const handleEdit = (row: InternshipInfoVO) => {
|
||||
// TODO: 实现编辑实习信息功能
|
||||
proxy?.$modal.msgInfo('编辑实习信息功能开发中...');
|
||||
selectedStudentId.value = row.studentId;
|
||||
showEditDialog.value = true;
|
||||
};
|
||||
|
||||
/** 弹窗操作成功后刷新列表 */
|
||||
const handleDialogSuccess = () => {
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
@@ -498,5 +542,18 @@ const cancel = () => {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
|
||||
&.not-started {
|
||||
background-color: #f56c6c;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user