wuzhen 修改实
This commit is contained in:
1 parent
df38590dbf
commit
d22438647e
6 files changed
+458
-17
No files matched your search
@@ -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