线上考试学员试卷自动答题,生成合格的考试成绩
parent
c9ad40d30e
commit
5d477b1d07
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
// 简单验证身份证号格式(18位或15位数字,末位可为X)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue