成绩报告修改银行与py项目不同展示

dev_2022-05-11
e 3 years ago
parent 69db917e5d
commit 4ed82ecdc6
  1. 54
      src/pages/achievement/show/index.vue
  2. 1
      src/styles/common.scss

@ -54,14 +54,14 @@
<p class="meta-title">实验数据</p> <p class="meta-title">实验数据</p>
</div> </div>
<el-table :data="expData" class="table" stripe header-align="center"> <el-table :data="expData" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="50" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="judgmentName" label="任务名称" align="center"> <el-table-column prop="judgmentName" width="150" label="任务名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer" label="考核点" align="center"> <el-table-column v-if='project' prop="userAnswer" label="考核点" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords"> <div v-for="(item, index) in scope.row.lcRuleRecords">
<span>{{index+1}}. </span>{{item.name}} <span>{{index+1}}. </span>{{item.name}}
@ -70,19 +70,29 @@
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer" label="学生答案" align="center"> <el-table-column prop="userAnswer" label="学生答案" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords"> <div v-if=' scope.row.lcRuleRecords'>
<span>{{index+1}}. </span>{{item.ruleAnswer}} <div v-for="(item, index) in scope.row.lcRuleRecords">
<span>{{index+1}}. </span>{{item.userAnswer}}
</div>
</div>
<div v-else>
{{scope.row.answer}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="answer" label="参考答案" align="center"> <el-table-column prop="answer" label="参考答案" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords"> <div v-if=' scope.row.lcRuleRecords'>
<span>{{index+1}}. </span>{{item.ruleAnswer}} <div v-for="(item, index) in scope.row.lcRuleRecords">
<span>{{index+1}}. </span>{{item.ruleAnswer}}
</div>
</div>
<div v-else>
{{scope.row.referenceAnswer}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="得分" align="center"> <el-table-column prop="score" width="50" label="得分" align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -142,6 +152,7 @@ export default {
autograph: "1", autograph: "1",
pages: 1, pages: 1,
ipVisible: false, ipVisible: false,
project:false,
fileList: [{ name: "food.jpeg", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" }, { fileList: [{ name: "food.jpeg", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" }, {
name: "food2.jpeg", name: "food2.jpeg",
url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
@ -160,6 +171,7 @@ export default {
]) ])
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
@ -173,6 +185,16 @@ export default {
let expData = res.userScores; let expData = res.userScores;
let form = this.form; let form = this.form;
let score = form.score; let score = form.score;
for(var i=0;i<expData.length;i++){
console.log(expData[i].referenceAnswer)
if (expData[i].referenceAnswer != undefined && expData[i].referenceAnswer){
console.log('123')
this.project = false
}else{
console.log('456')
this.project = true
}
}
if (expData) { if (expData) {
if (score) { if (score) {
expData.map(n => { expData.map(n => {
@ -183,7 +205,6 @@ export default {
}); });
form.score = score; form.score = score;
} }
this.expData = expData; this.expData = expData;
} }
this.infoData.push({ this.infoData.push({
@ -212,7 +233,16 @@ export default {
let expData = res.userScores; let expData = res.userScores;
let form = this.form; let form = this.form;
let score = form.score; let score = form.score;
for(var i=0;i<expData.length;i++){
console.log(expData[i].referenceAnswer)
if (expData[i].referenceAnswer != undefined && expData[i].referenceAnswer){
console.log('123')
this.project = false
}else{
console.log('456')
this.project = true
}
}
if (expData) { if (expData) {
if (score) { if (score) {
expData.map(n => { expData.map(n => {
@ -345,12 +375,11 @@ export default {
/deep/ .info-table { /deep/ .info-table {
margin-bottom: 40px; margin-bottom: 40px;
border: 0; border: 0;
th { th {
background-color: #fff !important; background-color: #fff !important;
.cell { .cell {
color: #444; color: #444;
line-height: 35px;
} }
} }
@ -385,6 +414,7 @@ export default {
background-color: #e1eaff !important; background-color: #e1eaff !important;
.cell { .cell {
line-height: 35px;
color: #555555; color: #555555;
} }
} }

@ -138,6 +138,7 @@
.cell { .cell {
font-size: 14px; font-size: 14px;
line-height: 35px;
} }
th { th {

Loading…
Cancel
Save