|
|
|
@ -1,7 +1,30 @@ |
|
|
|
|
<template> |
|
|
|
|
<!-- 实验报告 --> |
|
|
|
|
<div class="wrap"> |
|
|
|
|
<breadcrumb ref="breadcrumb" data="实验记录/实验情况/实验报告"></breadcrumb> |
|
|
|
|
<div class="breadcrumb"> |
|
|
|
|
<el-breadcrumb separator=">"> |
|
|
|
|
<template v-for="(item, i) in breadPath"> |
|
|
|
|
<el-breadcrumb-item |
|
|
|
|
v-if="!i" |
|
|
|
|
:key="i" |
|
|
|
|
:to="{ path: 'list' }"> |
|
|
|
|
{{item}} |
|
|
|
|
</el-breadcrumb-item> |
|
|
|
|
<el-breadcrumb-item |
|
|
|
|
v-else-if="breadPath.length > 2 && i === 1" |
|
|
|
|
:to="{ path: 'details', query: { curriculumId, projectId } }" |
|
|
|
|
:key="i"> |
|
|
|
|
{{item}} |
|
|
|
|
</el-breadcrumb-item> |
|
|
|
|
<el-breadcrumb-item |
|
|
|
|
v-else |
|
|
|
|
:key="i"> |
|
|
|
|
{{item}} |
|
|
|
|
</el-breadcrumb-item> |
|
|
|
|
</template> |
|
|
|
|
</el-breadcrumb> |
|
|
|
|
</div> |
|
|
|
|
<!-- <breadcrumb ref="breadcrumb" data="实验记录/实验情况/实验报告"></breadcrumb> --> |
|
|
|
|
<div class="content" :class="{loading}" id="pdfDom"> |
|
|
|
|
<div class="text-right" v-if="!loading"> |
|
|
|
|
<el-button @click="editReport"> |
|
|
|
@ -76,7 +99,7 @@ |
|
|
|
|
实验数据 |
|
|
|
|
</h6> |
|
|
|
|
<el-table :data="expData" class="table" border stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" label="序号" align="center" width="100"> |
|
|
|
|
<el-table-column type="index" label="序号" align="center" width="60"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.$index + 1 }} |
|
|
|
|
</template> |
|
|
|
@ -91,7 +114,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="ruleAnswer" label="参考答案" width="200" style='word-wrap: break-word' align="center"> |
|
|
|
|
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word' align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div v-if='scope.row.lcRuleRecords'> |
|
|
|
|
<div v-for="(item, index) in scope.row.lcRuleRecords"> |
|
|
|
@ -105,7 +128,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="userAnswer" label="学生答案" width="200" align="center"> |
|
|
|
|
<el-table-column prop="userAnswer" label="学生答案" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div v-if='scope.row.lcRuleRecords'> |
|
|
|
|
<div v-for="(item, index) in scope.row.lcRuleRecords"> |
|
|
|
@ -117,12 +140,10 @@ |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'> |
|
|
|
|
<!-- {{}}--> |
|
|
|
|
</div> |
|
|
|
|
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="score" label="得分" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
<div class="m-b-20"> |
|
|
|
@ -149,6 +170,9 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
reportId: this.$route.query.reportId, |
|
|
|
|
curriculumId: this.$route.query.curriculumId, |
|
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
|
breadPath: ['实验记录', '实验情况', '实验报告'], |
|
|
|
|
title: "实验报告", |
|
|
|
|
form: { |
|
|
|
|
className: "", |
|
|
|
@ -189,7 +213,7 @@ export default { |
|
|
|
|
score: form.score, |
|
|
|
|
userName: form.userName |
|
|
|
|
} |
|
|
|
|
form.assessmentId && this.$refs.breadcrumb.update('实验记录/实验报告') |
|
|
|
|
form.assessmentId && (this.breadPath = ['实验记录', '实验报告']) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
exportPage() { // 导出实验报告 |
|
|
|
@ -255,6 +279,20 @@ export default { |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.breadcrumb { |
|
|
|
|
margin: 4px 0 16px; |
|
|
|
|
/deep/.el-breadcrumb__item { |
|
|
|
|
.is-link, .el-breadcrumb__separator { |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: $main-color; |
|
|
|
|
} |
|
|
|
|
&:last-child { |
|
|
|
|
.is-link { |
|
|
|
|
color: #0B1D30; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.wrap { |
|
|
|
|
padding: 12px 300px 20px; |
|
|
|
|
} |
|
|
|
|