1
This commit is contained in:
@@ -104,7 +104,9 @@
|
||||
</span>
|
||||
<div class="header-actions">
|
||||
<el-button type="primary" icon="DataAnalysis" @click="handleConfirmScore">学分确认</el-button>
|
||||
<el-button type="info" icon="Finished" plain @click="handleSolidifyScore">固化学分</el-button>
|
||||
<el-button type="success" icon="DataAnalysis" @click="handleConfirmConduct">操行确认</el-button>
|
||||
<el-button type="primary" icon="Finished" plain @click="handleSolidifyConduct">固化操行考核</el-button>
|
||||
<el-button type="warning" icon="DataAnalysis" @click="handleConfirmPunish">违纪确认</el-button>
|
||||
<el-button type="info" icon="DataAnalysis" @click="handleConfirmSkill">等级工确认</el-button>
|
||||
<right-toolbar
|
||||
@@ -247,7 +249,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 } from '/@/api/stuwork/stugraducheck'
|
||||
import { fetchList, confirmScore, confirmConduct, confirmPunish, confirmSkill, solidifyConduct, solidifyScore } from '/@/api/stuwork/stugraducheck'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
||||
import {
|
||||
@@ -258,10 +260,12 @@ import {
|
||||
Menu,
|
||||
Search,
|
||||
Grid,
|
||||
DataAnalysis
|
||||
DataAnalysis,
|
||||
Finished
|
||||
} from '@element-plus/icons-vue'
|
||||
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
|
||||
const route = useRoute()
|
||||
const searchFormRef = ref()
|
||||
@@ -460,6 +464,57 @@ const handleConfirmSkill = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 固化操行考核数据
|
||||
const solidifyLoading = ref(false)
|
||||
const handleSolidifyConduct = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的操行考核数据吗?这将汇总所有学生的操行分并存储到缓存中。`,
|
||||
'固化操行考核',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
solidifyLoading.value = true
|
||||
const res = await solidifyConduct(searchForm.graduYear)
|
||||
useMessage().success(res.msg || `成功固化 ${res.data} 名学生的操行考核数据`)
|
||||
getDataList()
|
||||
} catch (err: any) {
|
||||
if (err !== 'cancel') {
|
||||
useMessage().error(err.msg || '固化管理失败')
|
||||
}
|
||||
} finally {
|
||||
solidifyLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 固化学分数据
|
||||
const handleSolidifyScore = async () => {
|
||||
if (!searchForm.graduYear) {
|
||||
useMessage().warning('请先选择毕业年份')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定要固化 ${searchForm.graduYear} 年毕业学生的学分数据吗?这将汇总所有学生的学分情况并存储到缓存中。`,
|
||||
'固化学分',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
solidifyLoading.value = true
|
||||
const res = await solidifyScore(searchForm.graduYear)
|
||||
useMessage().success(res.msg || `成功固化 ${res.data} 名学生的学分数据`)
|
||||
getDataList()
|
||||
} catch (err: any) {
|
||||
if (err !== 'cancel') {
|
||||
useMessage().error(err.msg || '固化学分失败')
|
||||
}
|
||||
} finally {
|
||||
solidifyLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadDeptList()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user