单个毕业学生确认
This commit is contained in:
@@ -119,3 +119,53 @@ export const queryScoreSummaryPage = (params: any) => {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// ========== 单个学生确认接口 ==========
|
||||
|
||||
/**
|
||||
* 单个学生学分确认详情
|
||||
* @param stuNo 学号
|
||||
*/
|
||||
export const confirmScoreByStuNo = (stuNo: string) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/confirmScoreByStuNo',
|
||||
method: 'get',
|
||||
params: { stuNo }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个学生操行确认详情
|
||||
* @param stuNo 学号
|
||||
*/
|
||||
export const confirmConductByStuNo = (stuNo: string) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/confirmConductByStuNo',
|
||||
method: 'get',
|
||||
params: { stuNo }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个学生违纪确认详情
|
||||
* @param stuNo 学号
|
||||
*/
|
||||
export const confirmPunishByStuNo = (stuNo: string) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/confirmPunishByStuNo',
|
||||
method: 'get',
|
||||
params: { stuNo }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个学生等级工确认详情
|
||||
* @param stuNo 学号
|
||||
*/
|
||||
export const confirmSkillByStuNo = (stuNo: string) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/confirmSkillByStuNo',
|
||||
method: 'get',
|
||||
params: { stuNo }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -173,6 +173,36 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<!-- 操作列 -->
|
||||
<el-table-column label="操作" width="260" align="center" fixed="right">
|
||||
<template #header>
|
||||
<el-icon><Setting /></el-icon>
|
||||
<span style="margin-left: 4px">操作</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-dropdown trigger="click">
|
||||
<el-button type="primary" link size="small">
|
||||
单项确认<el-icon class="el-icon--right"><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="handleDetailConfirm('score', scope.row)">
|
||||
<el-icon><Document /></el-icon>学分详情
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleDetailConfirm('conduct', scope.row)">
|
||||
<el-icon><UserFilled /></el-icon>操行详情
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleDetailConfirm('punish', scope.row)">
|
||||
<el-icon><Warning /></el-icon>违纪详情
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleDetailConfirm('skill', scope.row)">
|
||||
<el-icon><Medal /></el-icon>等级工详情
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据,请选择条件查询" :image-size="120" />
|
||||
</template>
|
||||
@@ -234,7 +264,6 @@
|
||||
<el-table-column prop="realName" label="姓名" align="center" width="100" />
|
||||
<el-table-column prop="classNo" label="班号" align="center" width="120" />
|
||||
<el-table-column prop="reason" label="不合格原因" align="center" min-width="150" />
|
||||
<el-table-column prop="detail" label="详情" align="center" min-width="150" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -242,6 +271,134 @@
|
||||
<el-button @click="confirmDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 单个学生确认详情对话框 -->
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
:title="detailTitle"
|
||||
width="700px"
|
||||
destroy-on-close>
|
||||
<div v-loading="detailLoading">
|
||||
<!-- 学生基本信息 -->
|
||||
<el-descriptions :column="3" border size="small" class="detail-desc">
|
||||
<el-descriptions-item label="学号">{{ detailData.stuNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ detailData.realName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="班号">{{ detailData.classNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="培养层次">{{ detailData.majorLevelName }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 学分详情 -->
|
||||
<template v-if="detailType === 'score' && detailData.scoreDetail">
|
||||
<el-divider content-position="left">学分情况</el-divider>
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="是否合格">
|
||||
<el-tag :type="detailData.scoreDetail.isQualified ? 'success' : 'danger'" size="small">
|
||||
{{ detailData.scoreDetail.isQualified ? '合格' : '不合格' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="已修学分">{{ detailData.scoreDetail.earnedCredit || 0 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="要求学分">{{ detailData.scoreDetail.requiredCredit || 120 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="必修学分">{{ detailData.scoreDetail.requiredCourseCredit || 0 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="选修学分">{{ detailData.scoreDetail.electiveCredit || 0 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="核心学分">{{ detailData.scoreDetail.coreCredit || 0 }} 分</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-alert v-if="detailData.scoreDetail.reason" :title="detailData.scoreDetail.reason" type="warning" :closable="false" class="detail-alert" />
|
||||
</template>
|
||||
|
||||
<!-- 操行详情 -->
|
||||
<template v-if="detailType === 'conduct' && detailData.conductDetail">
|
||||
<el-divider content-position="left">操行情况</el-divider>
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="是否合格">
|
||||
<el-tag :type="detailData.conductDetail.isQualified ? 'success' : 'danger'" size="small">
|
||||
{{ detailData.conductDetail.isQualified ? '合格' : '不合格' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最终得分">{{ detailData.conductDetail.finalScore || 0 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="基础分">{{ detailData.conductDetail.baseScore || 85 }} 分</el-descriptions-item>
|
||||
<el-descriptions-item label="总加分">
|
||||
<span style="color: #67c23a">+{{ detailData.conductDetail.totalAddScore || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="总扣分">
|
||||
<span style="color: #f56c6c">-{{ detailData.conductDetail.totalDeductScore || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-alert v-if="detailData.conductDetail.reason" :title="detailData.conductDetail.reason" type="warning" :closable="false" class="detail-alert" />
|
||||
|
||||
<!-- 学期明细 -->
|
||||
<template v-if="detailData.conductDetail.termScores && detailData.conductDetail.termScores.length > 0">
|
||||
<el-divider content-position="left">学期明细</el-divider>
|
||||
<el-table :data="detailData.conductDetail.termScores" size="small" border>
|
||||
<el-table-column prop="schoolYear" label="学年" align="center" />
|
||||
<el-table-column prop="schoolTerm" label="学期" align="center" />
|
||||
<el-table-column prop="score" label="得分" align="center" />
|
||||
</el-table>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 违纪详情 -->
|
||||
<template v-if="detailType === 'punish' && detailData.punishDetail">
|
||||
<el-divider content-position="left">违纪情况</el-divider>
|
||||
<el-descriptions :column="1" border size="small">
|
||||
<el-descriptions-item label="是否合格">
|
||||
<el-tag :type="detailData.punishDetail.isQualified ? 'success' : 'danger'" size="small">
|
||||
{{ detailData.punishDetail.isQualified ? '合格' : '不合格' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-alert v-if="detailData.punishDetail.reason" :title="detailData.punishDetail.reason" type="warning" :closable="false" class="detail-alert" />
|
||||
|
||||
<!-- 违纪记录 -->
|
||||
<template v-if="detailData.punishDetail.punishRecords && detailData.punishDetail.punishRecords.length > 0">
|
||||
<el-divider content-position="left">违纪记录</el-divider>
|
||||
<el-table :data="detailData.punishDetail.punishRecords" size="small" border>
|
||||
<el-table-column prop="punishName" label="处分名称" align="center" />
|
||||
<el-table-column prop="punishDate" label="处分日期" align="center" width="120" />
|
||||
<el-table-column prop="revokeDate" label="撤销日期" align="center" width="120" />
|
||||
<el-table-column label="是否撤销" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.isRevoked ? 'success' : 'danger'" size="small">
|
||||
{{ scope.row.isRevoked ? '已撤销' : '未撤销' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<el-empty v-else description="无违纪记录" :image-size="60" />
|
||||
</template>
|
||||
|
||||
<!-- 等级工详情 -->
|
||||
<template v-if="detailType === 'skill' && detailData.skillDetail">
|
||||
<el-divider content-position="left">技能等级情况</el-divider>
|
||||
<el-descriptions :column="2" border size="small">
|
||||
<el-descriptions-item label="是否合格">
|
||||
<el-tag :type="detailData.skillDetail.isQualified ? 'success' : 'danger'" size="small">
|
||||
{{ detailData.skillDetail.isQualified ? '合格' : '不合格' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="要求等级">{{ detailData.skillDetail.requiredLevelName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实际等级">{{ detailData.skillDetail.actualLevelName || '未获取' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-alert v-if="detailData.skillDetail.reason" :title="detailData.skillDetail.reason" type="warning" :closable="false" class="detail-alert" />
|
||||
|
||||
<!-- 证书列表 -->
|
||||
<template v-if="detailData.skillDetail.certificates && detailData.skillDetail.certificates.length > 0">
|
||||
<el-divider content-position="left">证书列表</el-divider>
|
||||
<el-table :data="detailData.skillDetail.certificates" size="small" border>
|
||||
<el-table-column prop="workType" label="工种" align="center" />
|
||||
<el-table-column prop="workLevelName" label="等级" align="center" width="100" />
|
||||
<el-table-column prop="cardNo" label="证书编号" align="center" />
|
||||
<el-table-column prop="certificateDate" label="发证日期" align="center" width="120" />
|
||||
</el-table>
|
||||
</template>
|
||||
<el-empty v-else description="无技能等级证书" :image-size="60" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="detailDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -249,7 +406,7 @@
|
||||
import { reactive, ref, computed, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill, solidifyConduct, solidifyScore } from '/@/api/stuwork/stugraducheck'
|
||||
import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill, solidifyConduct, solidifyScore, confirmScoreByStuNo, confirmConductByStuNo, confirmPunishByStuNo, confirmSkillByStuNo } from '/@/api/stuwork/stugraducheck'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
||||
import {
|
||||
@@ -261,7 +418,11 @@ import {
|
||||
Search,
|
||||
Grid,
|
||||
DataAnalysis,
|
||||
Finished
|
||||
Finished,
|
||||
Setting,
|
||||
ArrowDown,
|
||||
Warning,
|
||||
Medal
|
||||
} from '@element-plus/icons-vue'
|
||||
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
@@ -293,13 +454,28 @@ const confirmTypeLabel = computed(() => {
|
||||
return map[confirmResult.value.confirmType] || '确认结果'
|
||||
})
|
||||
|
||||
// 单个学生详情对话框
|
||||
const detailDialogVisible = ref(false)
|
||||
const detailLoading = ref(false)
|
||||
const detailType = ref('')
|
||||
const detailData = ref<any>({})
|
||||
const detailTitle = computed(() => {
|
||||
const map: Record<string, string> = {
|
||||
score: '学分确认详情',
|
||||
conduct: '操行确认详情',
|
||||
punish: '违纪确认详情',
|
||||
skill: '等级工确认详情'
|
||||
}
|
||||
return map[detailType.value] || '详情'
|
||||
})
|
||||
|
||||
// 毕业年份:当前年前后各 5 年
|
||||
const graduYearOptions = computed(() => {
|
||||
const y = new Date().getFullYear()
|
||||
return Array.from({ length: 11 }, (_, i) => y - 5 + i)
|
||||
})
|
||||
|
||||
// 表格列配置(与其它页面一致,icon 写在列上)
|
||||
// 表格列配置
|
||||
const tableColumns = [
|
||||
{ prop: 'stuNo', label: '学号', icon: UserFilled },
|
||||
{ prop: 'realName', label: '姓名', icon: UserFilled },
|
||||
@@ -321,7 +497,7 @@ const {
|
||||
handleColumnOrderChange
|
||||
} = useTableColumnControl(tableColumns, route.path)
|
||||
|
||||
// 搜索表单(与接口文档一致:graduYear, status, type, stuNo, realName, deptCode, classCode 等)
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
graduYear: '',
|
||||
status: '',
|
||||
@@ -473,7 +649,7 @@ const handleSolidifyConduct = async () => {
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的操行考核数据吗?这将汇总所有学生的操行分并存储到缓存中。`,
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的操行考核数据吗?`,
|
||||
'固化操行考核',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
@@ -498,7 +674,7 @@ const handleSolidifyScore = async () => {
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的学分数据吗?这将汇总所有学生的学分情况并存储到缓存中。`,
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的学分数据吗?`,
|
||||
'固化学分',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
@@ -515,6 +691,39 @@ const handleSolidifyScore = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 单个学生确认详情
|
||||
const handleDetailConfirm = async (type: string, row: any) => {
|
||||
detailType.value = type
|
||||
detailDialogVisible.value = true
|
||||
detailLoading.value = true
|
||||
detailData.value = { stuNo: row.stuNo, realName: row.realName, classNo: row.classNo }
|
||||
|
||||
try {
|
||||
let res: any
|
||||
switch (type) {
|
||||
case 'score':
|
||||
res = await confirmScoreByStuNo(row.stuNo)
|
||||
break
|
||||
case 'conduct':
|
||||
res = await confirmConductByStuNo(row.stuNo)
|
||||
break
|
||||
case 'punish':
|
||||
res = await confirmPunishByStuNo(row.stuNo)
|
||||
break
|
||||
case 'skill':
|
||||
res = await confirmSkillByStuNo(row.stuNo)
|
||||
break
|
||||
}
|
||||
if (res.data) {
|
||||
detailData.value = res.data
|
||||
}
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg || '查询失败')
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadDeptList()
|
||||
})
|
||||
@@ -522,4 +731,16 @@ onMounted(() => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '/@/assets/styles/modern-page.scss';
|
||||
</style>
|
||||
|
||||
.detail-desc {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-alert {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.confirm-stats {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user