|
|
|
@ -90,7 +90,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word' align="center"> |
|
|
|
|
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div v-if='scope.row.lcRuleRecords'> |
|
|
|
|
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> |
|
|
|
@ -102,7 +102,7 @@ |
|
|
|
|
<div v-else v-html="scope.row.referenceAnswer"></div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="userAnswer" label="学生答案" align="center"> |
|
|
|
|
<el-table-column prop="userAnswer" label="学生答案"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div v-if='scope.row.lcRuleRecords'> |
|
|
|
|
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index"> |
|
|
|
@ -115,6 +115,9 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div> |
|
|
|
|
<template v-if="scope.row.runThePictureList"> |
|
|
|
|
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" :src="img" alt=""> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column> |
|
|
|
@ -152,7 +155,8 @@ export default { |
|
|
|
|
editing: false, |
|
|
|
|
loadIns: null, |
|
|
|
|
loading: false, |
|
|
|
|
project:false |
|
|
|
|
project:false, |
|
|
|
|
userScores: [] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -176,6 +180,7 @@ export default { |
|
|
|
|
userName: form.userName |
|
|
|
|
} |
|
|
|
|
const data = report.data |
|
|
|
|
this.userScores = userScores |
|
|
|
|
// 如果没有data,则添加,否则,直接使用 |
|
|
|
|
if (!data) { |
|
|
|
|
this.handleList(userScores) |
|
|
|
@ -184,7 +189,7 @@ export default { |
|
|
|
|
data: JSON.stringify(userScores) |
|
|
|
|
}).then(res => {}).catch(err => {}) |
|
|
|
|
} else { |
|
|
|
|
this.handleList(JSON.parse(data)) |
|
|
|
|
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data)) |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
@ -206,11 +211,14 @@ export default { |
|
|
|
|
this.expData = list |
|
|
|
|
}, |
|
|
|
|
exportPage() { |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
|
const form = Object.assign(this.form, this.infoData) |
|
|
|
|
const list = JSON.parse(JSON.stringify(this.expData)) |
|
|
|
|
list.map((e, i) => { |
|
|
|
|
const item = this.userScores.find(n => n.judgmentId == e.judgmentId) |
|
|
|
|
if (item && item.runThePicture) e.runThePicture = item.runThePicture |
|
|
|
|
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList |
|
|
|
|
e.id = i + 1 |
|
|
|
|
if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/( |&|%s)/g, '').replace(/>/g, '>').replace(/</g, '<') |
|
|
|
|
// if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/( |&|%s)/g, '').replace(/>/g, '>').replace(/</g, '<') |
|
|
|
|
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/( |&|%s)/g, '').replace(/>/g, '>').replace(/</g, '<') |
|
|
|
|
}) |
|
|
|
|
for (const i in form) { |
|
|
|
@ -343,6 +351,9 @@ code, kbd, samp{ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.result-pic { |
|
|
|
|
margin: 10px 0; |
|
|
|
|
} |
|
|
|
|
@media (max-width: 1650px) { |
|
|
|
|
.wrap { |
|
|
|
|
padding: 12px 200px 20px; |
|
|
|
|