fix:新增重新批改
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
parent
07ec772e9b
commit
9c7fc197aa
@ -66,6 +66,13 @@ class TaskMgrService extends BasicService {
|
||||
})
|
||||
}
|
||||
|
||||
// 重新批改学生试卷
|
||||
async regradePaper(recordId: any) {
|
||||
return await post<any>(`/school/paper/regrade`, {
|
||||
recordId,
|
||||
})
|
||||
}
|
||||
|
||||
// 统计试卷记录学生完成信息
|
||||
async getListRecordStudentInfo(taskId: any, status: any) {
|
||||
return await get<any>(`/school/recordReport/listRecordStudentInfo`, {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import MdKatex from '@vscode/markdown-it-katex'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
|
||||
import { uploadImgToPath } from '#/api/global'
|
||||
@ -26,6 +26,7 @@ const props = defineProps({
|
||||
default: () => [],
|
||||
},
|
||||
})
|
||||
const emit = defineEmits(['refresh'])
|
||||
const studentDialogVisible = ref(false)
|
||||
const paperRecordDetail = ref<any>({})
|
||||
const aiReasonMarkdown = new MarkdownIt({
|
||||
@ -89,6 +90,7 @@ const rows = computed(() => {
|
||||
gradingStatusText: getGradingStatusText(item),
|
||||
recordId: item?.recordId ?? '',
|
||||
canView,
|
||||
canRegrade: canView,
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -214,6 +216,35 @@ const handleView = (row: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
const regradingRecordId = ref('')
|
||||
|
||||
async function handleRegrade(row: any) {
|
||||
if (!row.recordId) {
|
||||
ElMessage.warning('缺少学生答卷记录ID')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await ElMessageBox.confirm('确定重新批改该学生试卷吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
|
||||
regradingRecordId.value = row.recordId
|
||||
try {
|
||||
await taskMgrService.regradePaper(row.recordId)
|
||||
ElMessage.success('已发起重新批改')
|
||||
emit('refresh')
|
||||
} catch {
|
||||
ElMessage.error('重新批改失败,请重试')
|
||||
} finally {
|
||||
regradingRecordId.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
const correctionDialogVisible = ref(false)
|
||||
const correctionForm = ref({
|
||||
itemId: 0,
|
||||
@ -417,7 +448,7 @@ async function submitCorrection() {
|
||||
label="操作"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="160"
|
||||
width="240"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
@ -428,6 +459,14 @@ async function submitCorrection() {
|
||||
>
|
||||
<p style="color: #fff">查看</p>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.canRegrade"
|
||||
type="warning"
|
||||
:loading="regradingRecordId === row.recordId"
|
||||
@click="handleRegrade(row)"
|
||||
>
|
||||
重新批改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -254,6 +254,7 @@ watch(
|
||||
:resource-id="resourceId"
|
||||
:class-id="filterData.classId"
|
||||
:students="studentList"
|
||||
@refresh="getStudentInfoFun"
|
||||
v-if="situationType === 'student'"
|
||||
/>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user