社团统计及团员统计
This commit is contained in:
@@ -103,6 +103,10 @@
|
||||
毕业学生名单
|
||||
</span>
|
||||
<div class="header-actions">
|
||||
<el-button type="primary" icon="DataAnalysis" @click="handleConfirmScore">学分确认</el-button>
|
||||
<el-button type="success" icon="DataAnalysis" @click="handleConfirmConduct">操行确认</el-button>
|
||||
<el-button type="warning" icon="DataAnalysis" @click="handleConfirmPunish">违纪确认</el-button>
|
||||
<el-button type="info" icon="DataAnalysis" @click="handleConfirmSkill">等级工确认</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
class="ml10"
|
||||
@@ -181,6 +185,61 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 确认结果对话框 -->
|
||||
<el-dialog
|
||||
v-model="confirmDialogVisible"
|
||||
:title="confirmTypeLabel"
|
||||
width="800px"
|
||||
destroy-on-close>
|
||||
<div v-loading="confirmLoading">
|
||||
<!-- 统计信息 -->
|
||||
<el-row :gutter="20" class="confirm-stats">
|
||||
<el-col :span="6">
|
||||
<el-statistic title="总人数" :value="confirmResult.totalCount || 0">
|
||||
<template #suffix>
|
||||
<span style="font-size: 12px; color: #909399;">人</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="合格人数" :value="confirmResult.qualifiedCount || 0">
|
||||
<template #suffix>
|
||||
<span style="font-size: 12px; color: #67c23a;">人</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="不合格人数" :value="confirmResult.unqualifiedCount || 0">
|
||||
<template #suffix>
|
||||
<span style="font-size: 12px; color: #f56c6c;">人</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">不合格学生列表</el-divider>
|
||||
|
||||
<!-- 不合格学生表格 -->
|
||||
<el-table
|
||||
:data="confirmResult.unqualifiedList || []"
|
||||
stripe
|
||||
max-height="350px"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle">
|
||||
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||
<el-table-column prop="stuNo" label="学号" align="center" width="120" />
|
||||
<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>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="confirmDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -188,7 +247,7 @@
|
||||
import { reactive, ref, computed, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList } from '/@/api/stuwork/stugraducheck'
|
||||
import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill } from '/@/api/stuwork/stugraducheck'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
||||
import {
|
||||
@@ -198,9 +257,11 @@ import {
|
||||
Document,
|
||||
Menu,
|
||||
Search,
|
||||
Grid
|
||||
Grid,
|
||||
DataAnalysis
|
||||
} from '@element-plus/icons-vue'
|
||||
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
|
||||
const route = useRoute()
|
||||
const searchFormRef = ref()
|
||||
@@ -208,6 +269,26 @@ const columnControlRef = ref<any>()
|
||||
const showSearch = ref(true)
|
||||
const deptList = ref<any[]>([])
|
||||
|
||||
// 确认对话框相关变量
|
||||
const confirmDialogVisible = ref(false)
|
||||
const confirmLoading = ref(false)
|
||||
const confirmResult = ref<any>({
|
||||
confirmType: '',
|
||||
totalCount: 0,
|
||||
qualifiedCount: 0,
|
||||
unqualifiedCount: 0,
|
||||
unqualifiedList: []
|
||||
})
|
||||
const confirmTypeLabel = computed(() => {
|
||||
const map: Record<string, string> = {
|
||||
score: '学分确认',
|
||||
conduct: '操行确认',
|
||||
punish: '违纪确认',
|
||||
skill: '等级工确认'
|
||||
}
|
||||
return map[confirmResult.value.confirmType] || '确认结果'
|
||||
})
|
||||
|
||||
// 毕业年份:当前年前后各 5 年
|
||||
const graduYearOptions = computed(() => {
|
||||
const y = new Date().getFullYear()
|
||||
@@ -299,6 +380,86 @@ const loadDeptList = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 学分确认
|
||||
const handleConfirmScore = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
confirmLoading.value = true
|
||||
confirmDialogVisible.value = true
|
||||
try {
|
||||
const res = await confirmScore(searchForm.graduYear)
|
||||
if (res.data) {
|
||||
confirmResult.value = res.data
|
||||
}
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg || '学分确认失败')
|
||||
} finally {
|
||||
confirmLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 操行确认
|
||||
const handleConfirmConduct = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
confirmLoading.value = true
|
||||
confirmDialogVisible.value = true
|
||||
try {
|
||||
const res = await confirmConduct(searchForm.graduYear)
|
||||
if (res.data) {
|
||||
confirmResult.value = res.data
|
||||
}
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg || '操行确认失败')
|
||||
} finally {
|
||||
confirmLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 违纪确认
|
||||
const handleConfirmPunish = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
confirmLoading.value = true
|
||||
confirmDialogVisible.value = true
|
||||
try {
|
||||
const res = await confirmPunish(searchForm.graduYear)
|
||||
if (res.data) {
|
||||
confirmResult.value = res.data
|
||||
}
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg || '违纪确认失败')
|
||||
} finally {
|
||||
confirmLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 等级工确认
|
||||
const handleConfirmSkill = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
confirmLoading.value = true
|
||||
confirmDialogVisible.value = true
|
||||
try {
|
||||
const res = await confirmSkill(searchForm.graduYear)
|
||||
if (res.data) {
|
||||
confirmResult.value = res.data
|
||||
}
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg || '等级工确认失败')
|
||||
} finally {
|
||||
confirmLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadDeptList()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user