|
|
|
@ -38,7 +38,10 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="startTime" label="实验时间" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="score" label="实验成绩" align="center"> |
|
|
|
|
<el-table-column label="实验成绩" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{form.score}} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
@ -107,7 +110,7 @@ |
|
|
|
|
<el-table-column prop="points" label="分值" width="100" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="score" label="得分" width="100" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input v-if="edit" type="number" min="0" v-model="scope.row.score"></el-input> |
|
|
|
|
<el-input v-if="edit" type="number" min="0" v-model.number="scope.row.score"></el-input> |
|
|
|
|
<template v-else>{{scope.row.score}}</template> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -270,6 +273,25 @@ |
|
|
|
|
futuresLoss: [], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
sjData: { |
|
|
|
|
handler (newName, oldName) { |
|
|
|
|
let score = 0 |
|
|
|
|
let data = this.sjData |
|
|
|
|
let over = false |
|
|
|
|
data.map(n => { |
|
|
|
|
if(n.points < n.score){ |
|
|
|
|
over || this.$message.error('得分不得大于该考核点分值') |
|
|
|
|
over = true |
|
|
|
|
} |
|
|
|
|
score += n.score |
|
|
|
|
}) |
|
|
|
|
over = false |
|
|
|
|
this.form.score = score |
|
|
|
|
}, |
|
|
|
|
deep: true |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted(){ |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|