1
This commit is contained in:
@@ -71,3 +71,51 @@ export const confirmSkill = (graduYear: string) => {
|
|||||||
params: { graduYear }
|
params: { graduYear }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固化学生操行考核数据到MongoDB
|
||||||
|
* @param graduYear 毕业年份
|
||||||
|
*/
|
||||||
|
export const solidifyConduct = (graduYear: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/stugraducheck/solidifyConduct',
|
||||||
|
method: 'post',
|
||||||
|
params: { graduYear }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从MongoDB分页查询操行考核汇总数据
|
||||||
|
* @param params 查询参数
|
||||||
|
*/
|
||||||
|
export const queryConductSummaryPage = (params: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/stugraducheck/conductSummaryPage',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固化学生学分数据到MongoDB
|
||||||
|
* @param graduYear 毕业年份
|
||||||
|
*/
|
||||||
|
export const solidifyScore = (graduYear: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/stugraducheck/solidifyScore',
|
||||||
|
method: 'post',
|
||||||
|
params: { graduYear }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从MongoDB分页查询学分汇总数据
|
||||||
|
* @param params 查询参数
|
||||||
|
*/
|
||||||
|
export const queryScoreSummaryPage = (params: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/stuwork/stugraducheck/scoreSummaryPage',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -104,7 +104,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<el-button type="primary" icon="DataAnalysis" @click="handleConfirmScore">学分确认</el-button>
|
<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="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="warning" icon="DataAnalysis" @click="handleConfirmPunish">违纪确认</el-button>
|
||||||
<el-button type="info" icon="DataAnalysis" @click="handleConfirmSkill">等级工确认</el-button>
|
<el-button type="info" icon="DataAnalysis" @click="handleConfirmSkill">等级工确认</el-button>
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
@@ -247,7 +249,7 @@
|
|||||||
import { reactive, ref, computed, onMounted } from 'vue'
|
import { reactive, ref, computed, onMounted } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
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 { getDeptList } from '/@/api/basic/basicclass'
|
||||||
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
import TableColumnControl from '/@/components/TableColumnControl/index.vue'
|
||||||
import {
|
import {
|
||||||
@@ -258,10 +260,12 @@ import {
|
|||||||
Menu,
|
Menu,
|
||||||
Search,
|
Search,
|
||||||
Grid,
|
Grid,
|
||||||
DataAnalysis
|
DataAnalysis,
|
||||||
|
Finished
|
||||||
} from '@element-plus/icons-vue'
|
} from '@element-plus/icons-vue'
|
||||||
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
import { useTableColumnControl } from '/@/hooks/tableColumn'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage } from '/@/hooks/message'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchFormRef = ref()
|
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(() => {
|
onMounted(() => {
|
||||||
loadDeptList()
|
loadDeptList()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user