线上考试学员试卷自动答题,生成合格的考试成绩

master
zhangyanli 2026-04-21 17:10:50 +08:00
parent c9ad40d30e
commit 5d477b1d07
4 changed files with 61 additions and 26 deletions

View File

@ -13,7 +13,7 @@
学员统计情况总表
</div>
<div class="tableFooter">
<span>平台名称:{{ pd.CORPINFO_NAME }}</span>
<span></span>
<span>报表日期:{{ formatDate(new Date()) }}</span>
</div>
<table class="table-dialog">

View File

@ -541,7 +541,7 @@
<span style="line-height: 50px">签字:
<span style="">
<img v-if="classInfo.SIGNATURE_PATH" :src="config.fileUrl+classInfo.SIGNATURE_PATH" style="height: 50px;width: 120px; vertical-align: top">
<span v-else></span>
<span v-else></span>
</span>
</span>
</el-col>

View File

@ -349,6 +349,13 @@ export default {
}
},
inject: ['setCLASS_ID', 'setTabsActive', 'setSTATE', 'setEXAMTYPE', 'setActiveName', 'setENTERPRISE_ID', 'setTYPE', 'setTRAINLEVEL_NAME', 'setCORPINFO_ID'],
activated() {
this.$nextTick(() => {
if (this.$refs.multipleTable) {
this.$refs.multipleTable.doLayout()
}
})
},
created() {
this.getList()
this.getEnterprise()
@ -413,6 +420,10 @@ export default {
this.enterStuNum = data.enterStuNum
this.total = data.page.totalResult
//
this.$nextTick(() => {
this.$refs.multipleTable && this.$refs.multipleTable.doLayout()
})
}).catch((e) => {
this.listLoading = false
})
@ -558,14 +569,15 @@ export default {
}
</script>
<style>
.span-green{
color: #52c41a;
<style scoped>.app-container {
position: relative;
}
.span-blue{
color: #1E9FFF;
.page-btn-group {
margin-top: 15px;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 10;
padding-top: 10px;
}
.span-orange{
color: #e36c09;
}
</style>

View File

@ -127,8 +127,8 @@
{{ row.HASUSERSIGN == 1 ? '有' : '无' }}
</template>
</el-table-column>
<el-table-column prop="START_TIME" label="入班时间"/>
<el-table-column prop="SIGNATURE_PATH" label="签字图片">
<el-table-column prop="START_TIME" label="入班时间" width="120"/>
<el-table-column prop="SIGNATURE_PATH" label="签字图片" width="150" :show-overflow-tooltip="false">
<template slot-scope="{row}">
<el-image
v-if="row.SIGNATURE_PATH"
@ -140,7 +140,7 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<el-table-column label="操作" align="center" fixed="right" width="250">
<template slot-scope="{row}">
<el-button type="text" @click="studentsDialogShow(row.STUDENT_ID)"></el-button>
<span v-if="parentObj.STATE === '' || parentObj.STATE === '1'" class="app-divider"/>
@ -1080,6 +1080,22 @@ export default {
this.$message.error('上传图片只能是 jpg、jpeg、png 格式!')
fileList.pop()
} else {
// _
const fileName = file.name
const nameWithoutExt = fileName.substring(0, fileName.lastIndexOf('.'))
const parts = nameWithoutExt.split('_')
let isValid = true
if (parts.length !== 2) {
isValid = false
} else {
const idCard = parts[0]
// 1815X
if (!/^\d{15}$|^\d{17}[\dXx]$/.test(idCard)) {
isValid = false
}
}
// raw
file.raw.isValid = isValid
this.batchImportSignDialog.fileList = fileList
}
},
@ -1091,6 +1107,13 @@ export default {
this.$message.error('请上传签字图片')
return
}
//
const invalidFiles = this.batchImportSignDialog.fileList.filter(file => !file.raw.isValid)
if (invalidFiles.length > 0) {
const fileNames = invalidFiles.map(f => f.name).join('、')
this.$message.error(`以下图片名称格式错误,应为 "身份证号_姓名"${fileNames}`)
return
}
const formData = new FormData()
this.batchImportSignDialog.fileList.forEach((file) => {
formData.append('FFILE', file.raw)